Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
704:1d989562af1f | 705:dcf672c5a1ff |
---|---|
55 static void prefs_build_browser(GtkWidget *); | 55 static void prefs_build_browser(GtkWidget *); |
56 static gint handle_delete(GtkWidget *, GdkEvent *, void *); | 56 static gint handle_delete(GtkWidget *, GdkEvent *, void *); |
57 | 57 |
58 static GtkWidget *prefdialog = NULL; | 58 static GtkWidget *prefdialog = NULL; |
59 static GtkWidget *debugbutton = NULL; | 59 static GtkWidget *debugbutton = NULL; |
60 static GtkWidget *prefrem = NULL; | |
60 GtkWidget *prefs_away_list = NULL; | 61 GtkWidget *prefs_away_list = NULL; |
61 | 62 |
62 static void destdeb(GtkWidget *m, gpointer n) | 63 static void destdeb(GtkWidget *m, gpointer n) |
63 { | 64 { |
64 gtk_widget_destroy(debugbutton); | 65 gtk_widget_destroy(debugbutton); |
65 debugbutton = NULL; | 66 debugbutton = NULL; |
67 } | |
68 | |
69 static void remdes(GtkWidget *m, gpointer n) | |
70 { | |
71 gtk_widget_destroy(prefrem); | |
72 prefrem = NULL; | |
66 } | 73 } |
67 | 74 |
68 static void general_page() | 75 static void general_page() |
69 { | 76 { |
70 GtkWidget *parent; | 77 GtkWidget *parent; |
85 | 92 |
86 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); | 93 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
87 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); | 94 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
88 gtk_widget_show(label); | 95 gtk_widget_show(label); |
89 | 96 |
90 gaim_button(_("Remember password"), &general_options, OPT_GEN_REMEMBER_PASS, box); | 97 prefrem = gaim_button(_("Remember password"), &general_options, OPT_GEN_REMEMBER_PASS, box); |
98 gtk_signal_connect(GTK_OBJECT(prefrem), "destroy", GTK_SIGNAL_FUNC(remdes), 0); | |
91 gaim_button(_("Auto-login"), &general_options, OPT_GEN_AUTO_LOGIN, box); | 99 gaim_button(_("Auto-login"), &general_options, OPT_GEN_AUTO_LOGIN, box); |
92 | 100 |
93 sep = gtk_hseparator_new(); | 101 sep = gtk_hseparator_new(); |
94 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); | 102 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
95 gtk_widget_show(sep); | 103 gtk_widget_show(sep); |
1519 { | 1527 { |
1520 general_options = general_options ^ (int)option; | 1528 general_options = general_options ^ (int)option; |
1521 | 1529 |
1522 if ((int)option == OPT_GEN_LOG_ALL) | 1530 if ((int)option == OPT_GEN_LOG_ALL) |
1523 update_log_convs(); | 1531 update_log_convs(); |
1532 | |
1533 if (prefrem) | |
1534 gtk_signal_handler_block_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS); | |
1535 if (remember) | |
1536 gtk_signal_handler_block_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS); | |
1537 if (prefrem) | |
1538 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(prefrem), | |
1539 (general_options & OPT_GEN_REMEMBER_PASS)); | |
1540 if (remember) | |
1541 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(remember), | |
1542 (general_options & OPT_GEN_REMEMBER_PASS)); | |
1543 if (prefrem) | |
1544 gtk_signal_handler_unblock_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS); | |
1545 if (remember) | |
1546 gtk_signal_handler_unblock_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS); | |
1547 | |
1524 save_prefs(); | 1548 save_prefs(); |
1525 } | 1549 } |
1526 | 1550 |
1527 void set_display_option(GtkWidget *w, int *option) | 1551 void set_display_option(GtkWidget *w, int *option) |
1528 { | 1552 { |