Mercurial > pidgin.yaz
changeset 6006:0aeb4fd0fc65
[gaim-migrate @ 6454]
A bit more pref clean up. Christian or Nathan: Could one of you take a
look at blist_pref_cb in blist.c and let me know the correct way to do
that? Or if you wanna fix that feel free :-)
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 03 Jul 2003 22:25:14 +0000 |
parents | 81869466b6a7 |
children | 3750fc0325ac |
files | src/blist.c src/gtkprefs.c |
diffstat | 2 files changed, 23 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blist.c Thu Jul 03 21:38:52 2003 +0000 +++ b/src/blist.c Thu Jul 03 22:25:14 2003 +0000 @@ -70,6 +70,12 @@ return ((!strcmp(hb1->name, hb2->name)) && hb1->account == hb2->account && hb1->group == hb2->group); } +static void blist_pref_cb(const char *name, GaimPrefType typ, gpointer value, gpointer data) +{ + /* XXX - We shouldn't call gtk functions directly */ + /* gaim_gtk_blist_refresh(gaimbuddylist); */ +} + /***************************************************************************** * Public API functions * *****************************************************************************/ @@ -86,6 +92,8 @@ if (gbl->ui_ops != NULL && gbl->ui_ops->new_list != NULL) gbl->ui_ops->new_list(gbl); + gaim_prefs_connect_callback("/core/buddies/use_server_alias", blist_pref_cb, NULL); + return gbl; }
--- a/src/gtkprefs.c Thu Jul 03 21:38:52 2003 +0000 +++ b/src/gtkprefs.c Thu Jul 03 22:25:14 2003 +0000 @@ -185,26 +185,6 @@ gaim_prefs_set_bool(key, FALSE); gaim_prefs_set_bool(bool_key, TRUE); } - -#if 0 - } else if (option == (int*)&blist_options) { - gaim_gtk_blist_update_toolbar(); - } else if (option == (int*)&im_options) { - if (clear == (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB)) - gaim_gtkconv_update_tabs(); - else if (clear == (OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM)) - gaim_gtkconv_update_im_button_style(); - } else if (option == (int*)&chat_options) { - if (clear == (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB)) - gaim_gtkconv_update_tabs(); - else if (clear == (OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM)) - gaim_gtkconv_update_chat_button_style(); - // } else if (option == (int*)&blist_options) { - // set_blist_tab(); - } else if (option == (int *)&conv_placement_option) { - gaim_conv_placement_set_active(conv_placement_option); - } -#endif } static GtkWidget * @@ -372,23 +352,6 @@ } } -static void proxy_print_option(GtkEntry *entry, int entrynum) -{ - if (entrynum == PROXYHOST) - gaim_prefs_set_string("/core/proxy/host", gtk_entry_get_text(entry)); - else if (entrynum == PROXYPORT) - gaim_prefs_set_int("/core/proxy/port", atoi(gtk_entry_get_text(entry))); - else if (entrynum == PROXYUSER) - gaim_prefs_set_string("/core/proxy/username", gtk_entry_get_text(entry)); - else if (entrynum == PROXYPASS) - gaim_prefs_set_string("/core/proxy/password", gtk_entry_get_text(entry)); - - /* If the user specifies it, we want to save it. */ - gaim_global_proxy_set_from_prefs(TRUE); -} - -/* OK, Apply and Cancel */ - static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { GtkTreeIter iter; char text[128]; @@ -1107,6 +1070,21 @@ gtk_widget_set_sensitive(frame, strcmp(proxy, "none")); } +static void proxy_print_option(GtkEntry *entry, int entrynum) +{ + if (entrynum == PROXYHOST) + gaim_prefs_set_string("/core/proxy/host", gtk_entry_get_text(entry)); + else if (entrynum == PROXYPORT) + gaim_prefs_set_int("/core/proxy/port", atoi(gtk_entry_get_text(entry))); + else if (entrynum == PROXYUSER) + gaim_prefs_set_string("/core/proxy/username", gtk_entry_get_text(entry)); + else if (entrynum == PROXYPASS) + gaim_prefs_set_string("/core/proxy/password", gtk_entry_get_text(entry)); + + /* If the user specifies it, we want to save it. */ + gaim_global_proxy_set_from_prefs(TRUE); +} + GtkWidget *proxy_page() { GtkWidget *ret; GtkWidget *vbox;