Mercurial > pidgin
changeset 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 | 1d989562af1f |
children | a9758452f3c4 |
files | src/aim.c src/gaim.h src/prefs.c |
diffstat | 3 files changed, 30 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/aim.c Wed Aug 16 20:44:39 2000 +0000 +++ b/src/aim.c Thu Aug 17 00:00:25 2000 +0000 @@ -73,6 +73,7 @@ GList *chat_rooms = NULL; GtkWidget *mainwindow = NULL; +GtkWidget *remember = NULL; void BuddyTickerCreateWindow( void ); @@ -329,7 +330,6 @@ GtkWidget *sbox; GtkWidget *label; GtkWidget *table; - GtkWidget *remember; #ifndef USE_APPLET GtkWidget *pmw; @@ -340,6 +340,8 @@ if (mainwindow) { gtk_widget_show(mainwindow); + if (!(general_options & OPT_GEN_REMEMBER_PASS)) + gtk_entry_set_text(GTK_ENTRY(pass), ""); return; }
--- a/src/gaim.h Wed Aug 16 20:44:39 2000 +0000 +++ b/src/gaim.h Thu Aug 17 00:00:25 2000 +0000 @@ -399,7 +399,7 @@ #define TYPE_SIGNOFF 4 #define TYPE_KEEPALIVE 5 -#define REVISION "gaim:$Revision: 709 $" +#define REVISION "gaim:$Revision: 715 $" #define FLAPON "FLAPON\r\n\r\n" #define ROAST "Tic/Toc" @@ -447,6 +447,7 @@ extern GList *conversations; extern GList *chat_rooms; extern GtkWidget *mainwindow; +extern GtkWidget *remember; extern char *quad_addr; extern char toc_addy[16];
--- 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(); }