[Commits] [SCM] claws branch, master, updated. 3.17.8-81-ga4a629ce8

mones at claws-mail.org mones at claws-mail.org
Tue May 18 01:33:46 CEST 2021


The branch, master has been updated
       via  a4a629ce824011f5ae3f0b8cb1117f9608b7f5ad (commit)
      from  e7b38bfe425c7f2c295122663d5161db3ac250d5 (commit)

Summary of changes:
 src/plugins/libravatar/libravatar_prefs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit a4a629ce824011f5ae3f0b8cb1117f9608b7f5ad
Author: Ricardo Mones <ricardo at mones.org>
Date:   Tue May 18 01:21:57 2021 +0200

    Fix Bug 4473: segmentation fault opening Libravatar config
    
    Removes the only used instance of the long-time deprecated function
    gtk_entry_new_with_max_length() and delays gtk_widget_show() until
    everything is set up.

diff --git a/src/plugins/libravatar/libravatar_prefs.c b/src/plugins/libravatar/libravatar_prefs.c
index 4538477e8..aa2e5121c 100644
--- a/src/plugins/libravatar/libravatar_prefs.c
+++ b/src/plugins/libravatar/libravatar_prefs.c
@@ -344,20 +344,21 @@ static GtkWidget *p_create_frame_missing(struct LibravatarPrefsPage *page)
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio[i]), enable);
 		if (i == CUSTOM_URL_BUTTON_INDEX) {
 			/* set related entry next to radio button */
-			entry = gtk_entry_new_with_max_length(MAX_URL_LENGTH);
+			entry = gtk_entry_new();
 			CLAWS_SET_TIP(entry, _("Enter the URL you want to be "
 				"redirected when no user icon is available. "
 				"Leave an empty URL to use the default "
 				"libravatar orange icon."));
-			gtk_widget_show(entry);
 			gtk_entry_set_text(GTK_ENTRY(entry),
 				libravatarprefs.default_mode_url);
+			gtk_entry_set_max_length(GTK_ENTRY(entry), MAX_URL_LENGTH);
 			hbox = gtk_hbox_new(FALSE, 6);
 			gtk_box_pack_start(GTK_BOX(hbox), radio[i], FALSE, FALSE, 0);
 			gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 0);
 			gtk_widget_set_sensitive(entry,
 				(libravatarprefs.default_mode == DEF_MODE_URL)
 				? TRUE: FALSE);
+			gtk_widget_show(entry);
 			page->defm_url_text = entry;
 			gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 		} else {

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list