Mercurial > pidgin.yaz
diff src/prefs.c @ 705:dcf672c5a1ff
[gaim-migrate @ 715]
remember password button wackiness
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 17 Aug 2000 00:00:25 +0000 |
parents | 056ed55962e0 |
children | efd72a117875 |
line wrap: on
line diff
--- a/src/prefs.c Wed Aug 16 20:44:39 2000 +0000 +++ b/src/prefs.c Thu Aug 17 00:00:25 2000 +0000 @@ -57,6 +57,7 @@ static GtkWidget *prefdialog = NULL; static GtkWidget *debugbutton = NULL; +static GtkWidget *prefrem = NULL; GtkWidget *prefs_away_list = NULL; static void destdeb(GtkWidget *m, gpointer n) @@ -65,6 +66,12 @@ debugbutton = NULL; } +static void remdes(GtkWidget *m, gpointer n) +{ + gtk_widget_destroy(prefrem); + prefrem = NULL; +} + static void general_page() { GtkWidget *parent; @@ -87,7 +94,8 @@ gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); gtk_widget_show(label); - gaim_button(_("Remember password"), &general_options, OPT_GEN_REMEMBER_PASS, box); + prefrem = gaim_button(_("Remember password"), &general_options, OPT_GEN_REMEMBER_PASS, box); + gtk_signal_connect(GTK_OBJECT(prefrem), "destroy", GTK_SIGNAL_FUNC(remdes), 0); gaim_button(_("Auto-login"), &general_options, OPT_GEN_AUTO_LOGIN, box); sep = gtk_hseparator_new(); @@ -1521,6 +1529,22 @@ if ((int)option == OPT_GEN_LOG_ALL) update_log_convs(); + + if (prefrem) + gtk_signal_handler_block_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS); + if (remember) + gtk_signal_handler_block_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS); + if (prefrem) + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(prefrem), + (general_options & OPT_GEN_REMEMBER_PASS)); + if (remember) + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(remember), + (general_options & OPT_GEN_REMEMBER_PASS)); + if (prefrem) + gtk_signal_handler_unblock_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS); + if (remember) + gtk_signal_handler_unblock_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS); + save_prefs(); }