talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 19c1222959db7a2cc2352b57a224b0bf431287e7
parent 75a265c2446822652843fecaa0c1aef44c9081eb
Author: wwp <subscript@free.fr>
Date:   Mon,  8 Apr 2024 12:28:54 +0200

fix bug 4788, '"Change primary passphrase" disabled status handling

Diffstat:
Msrc/prefs_other.c | 13+------------
1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/prefs_other.c b/src/prefs_other.c @@ -75,7 +75,6 @@ typedef struct _OtherPage #ifndef PASSWORD_CRYPTO_OLD static void prefs_change_primary_passphrase(GtkButton *button, gpointer data); -static void prefs_use_passphrase_toggled(GtkToggleButton *button, gpointer data); #endif struct KeyBind { @@ -530,8 +529,7 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window, gtk_box_pack_start (GTK_BOX (vbox_passphrase), hbox1, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox1), button_change_passphrase, FALSE, FALSE, 0); - g_signal_connect (G_OBJECT (checkbtn_use_passphrase), "toggled", - G_CALLBACK (prefs_use_passphrase_toggled), button_change_passphrase); + SET_TOGGLE_SENSITIVITY (checkbtn_use_passphrase, button_change_passphrase); g_signal_connect (G_OBJECT (button_change_passphrase), "clicked", G_CALLBACK (prefs_change_primary_passphrase), NULL); #endif @@ -730,13 +728,4 @@ void prefs_change_primary_passphrase(GtkButton *button, gpointer data) /* Call the passphrase change dialog */ primary_passphrase_change_dialog(); } - -void prefs_use_passphrase_toggled(GtkToggleButton *chkbtn, gpointer data) -{ - GtkWidget *button = GTK_WIDGET(data); - gboolean active = gtk_toggle_button_get_active(chkbtn); - - if (!active) - gtk_widget_set_sensitive(button, active); -} #endif