Mercurial > pidgin.yaz
changeset 6142:9a1c1b1764ac
[gaim-migrate @ 6616]
Phroggie is picky
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 15 Jul 2003 20:03:10 +0000 |
parents | 387221e0623f |
children | 821bdd38db23 |
files | src/gtkprefs.c |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkprefs.c Tue Jul 15 19:52:52 2003 +0000 +++ b/src/gtkprefs.c Tue Jul 15 20:03:10 2003 +0000 @@ -80,6 +80,7 @@ static guint browser_pref_id = 0; static guint proxy_pref_id = 0; static guint sound_pref_id = 0; +static guint auto_resp_pref_id = 0; /* * PROTOTYPES @@ -334,6 +335,7 @@ gaim_prefs_disconnect_callback(browser_pref_id); gaim_prefs_disconnect_callback(proxy_pref_id); gaim_prefs_disconnect_callback(sound_pref_id); + gaim_prefs_disconnect_callback(auto_resp_pref_id); for (l = gaim_plugins_get_loaded(); l != NULL; l = l->next) { plug = l->data; @@ -1292,6 +1294,16 @@ gtk_widget_set_sensitive(hbox, !strcmp(browser, "custom")); } +static void +auto_resp_changed_cb(const char *name, GaimPrefType type, gpointer value, + gpointer data) +{ + GtkWidget *hbox = data; + gboolean enabled = value; + + gtk_widget_set_sensitive(hbox, enabled); +} + GtkWidget *browser_page() { GtkWidget *ret; GtkWidget *vbox; @@ -1508,9 +1520,15 @@ prefs_checkbox(_("Send auto-response in active conversations"), "/core/away/auto_response/in_active_conv", vbox); + auto_resp_pref_id = gaim_prefs_connect_callback("/core/away/auto_response/enabled", + auto_resp_changed_cb, hbox); + if (!gaim_prefs_get_bool("/core/away/auto_response/enabled")) gtk_widget_set_sensitive(hbox, FALSE); + auto_resp_pref_id = gaim_prefs_connect_callback("/core/away/auto_response/enabled", + auto_resp_changed_cb, hbox); + vbox = gaim_gtk_make_frame (ret, _("Idle")); dd = prefs_dropdown(vbox, _("Idle _time reporting:"), GAIM_PREF_STRING, "/gaim/gtk/idle/reporting_method",