# HG changeset patch # User Christian Hammond # Date 1053937848 0 # Node ID 2c4c975620f000f0a4d3f9186e822aa76431008b # Parent e7747cae971006ffe7e8c30d700065c51b2534b1 [gaim-migrate @ 5930] Okay, several changes in this commit. - We now have gtkprefs.h. - We have a place where we can add UI prefs. - show_prefs() -> gaim_gtk_prefs_show(). - make_frame() -> gaim_gtk_make_frame(). - The debug window is the first thing to have prefs. You can even turn off the toolbar if you edit ~/.gaim/prefs.xml. committer: Tailor Script diff -r e7747cae9710 -r 2c4c975620f0 plugins/docklet/docklet.c --- a/plugins/docklet/docklet.c Mon May 26 07:06:20 2003 +0000 +++ b/plugins/docklet/docklet.c Mon May 26 08:30:48 2003 +0000 @@ -151,7 +151,7 @@ gaim_new_item_from_stock(menu, _("File Transfers..."), GAIM_STOCK_FILE_TRANSFER, G_CALLBACK(gaim_show_xfer_dialog), NULL, 0, 0, NULL); gaim_new_item_from_stock(menu, _("Accounts..."), GAIM_STOCK_ACCOUNTS, G_CALLBACK(account_editor), NULL, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("Preferences..."), GTK_STOCK_PREFERENCES, G_CALLBACK(show_prefs), NULL, 0, 0, NULL); + gaim_new_item_from_stock(menu, _("Preferences..."), GTK_STOCK_PREFERENCES, G_CALLBACK(gaim_gtk_prefs_show), NULL, 0, 0, NULL); gaim_separator(menu); @@ -448,7 +448,7 @@ frame = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(frame), 12); - vbox = make_frame(frame, _("Tray Icon Configuration")); + vbox = gaim_gtk_make_frame(frame, _("Tray Icon Configuration")); hbox = gtk_hbox_new(FALSE, 18); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); diff -r e7747cae9710 -r 2c4c975620f0 plugins/gestures/gestures.c --- a/plugins/gestures/gestures.c Mon May 26 07:06:20 2003 +0000 +++ b/plugins/gestures/gestures.c Mon May 26 08:30:48 2003 +0000 @@ -207,7 +207,7 @@ gtk_container_set_border_width(GTK_CONTAINER(ret), 12); /* Configuration frame */ - vbox = make_frame(ret, _("Mouse Gestures Configuration")); + vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); #if 0 /* Mouse button drop-down menu */ diff -r e7747cae9710 -r 2c4c975620f0 plugins/idle.c --- a/plugins/idle.c Mon May 26 07:06:20 2003 +0000 +++ b/plugins/idle.c Mon May 26 08:30:48 2003 +0000 @@ -75,7 +75,7 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(ret), 12); - frame = make_frame(ret, _("Idle Time")); + frame = gaim_gtk_make_frame(ret, _("Idle Time")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); diff -r e7747cae9710 -r 2c4c975620f0 plugins/notify.c --- a/plugins/notify.c Mon May 26 07:06:20 2003 +0000 +++ b/plugins/notify.c Mon May 26 08:30:48 2003 +0000 @@ -570,7 +570,7 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame(ret, _("Notify For")); + vbox = gaim_gtk_make_frame(ret, _("Notify For")); toggle = gtk_check_button_new_with_mnemonic(_("_IM windows")); gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), type & TYPE_IM); @@ -582,7 +582,7 @@ g_signal_connect(G_OBJECT(toggle), "toggled", G_CALLBACK(options), GINT_TO_POINTER(9)); /*--------------*/ - vbox = make_frame(ret, _("Notification Methods")); + vbox = gaim_gtk_make_frame(ret, _("Notification Methods")); hbox = gtk_hbox_new(FALSE, 18); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); toggle = gtk_check_button_new_with_mnemonic(_("Prepend _string into window title (hit enter to save):")); @@ -617,7 +617,7 @@ g_signal_connect(G_OBJECT(toggle), "toggled", G_CALLBACK(options), GINT_TO_POINTER(6)); /*--------------*/ - vbox = make_frame(ret, _("Notification Removal")); + vbox = gaim_gtk_make_frame(ret, _("Notification Removal")); toggle = gtk_check_button_new_with_mnemonic(_("Remove when conversation window gains _focus")); gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), choice & NOTIFY_FOCUS); diff -r e7747cae9710 -r 2c4c975620f0 plugins/spellchk.c --- a/plugins/spellchk.c Mon May 26 07:06:20 2003 +0000 +++ b/plugins/spellchk.c Mon May 26 08:30:48 2003 +0000 @@ -408,7 +408,7 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame(ret, _("Text Replacements")); + vbox = gaim_gtk_make_frame(ret, _("Text Replacements")); gtk_container_set_border_width(GTK_CONTAINER(vbox), 4); gtk_widget_set_size_request(vbox, 300, -1); gtk_widget_show (vbox); @@ -470,7 +470,7 @@ gtk_widget_show(button); - vbox = make_frame(ret, _("Add a new text replacement")); + vbox = gaim_gtk_make_frame(ret, _("Add a new text replacement")); gtk_widget_set_size_request(vbox, 300, -1); hbox = gtk_hbox_new(FALSE, 2); diff -r e7747cae9710 -r 2c4c975620f0 plugins/timestamp.c --- a/plugins/timestamp.c Mon May 26 07:06:20 2003 +0000 +++ b/plugins/timestamp.c Mon May 26 08:30:48 2003 +0000 @@ -69,7 +69,7 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - frame = make_frame(ret, _("iChat Timestamp")); + frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); diff -r e7747cae9710 -r 2c4c975620f0 src/Makefile.am --- a/src/Makefile.am Mon May 26 07:06:20 2003 +0000 +++ b/src/Makefile.am Mon May 26 08:30:48 2003 +0000 @@ -70,6 +70,7 @@ gtkplugin.c \ gtkplugin.h \ gtkprefs.c \ + gtkprefs.h \ gtkpounce.c \ gtkpounce.h \ gtkrequest.c \ diff -r e7747cae9710 -r 2c4c975620f0 src/buddy_chat.c --- a/src/buddy_chat.c Mon May 26 07:06:20 2003 +0000 +++ b/src/buddy_chat.c Mon May 26 08:30:48 2003 +0000 @@ -267,7 +267,7 @@ gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5); gtk_container_add(GTK_CONTAINER(joinchat), mainbox); - frame = make_frame(mainbox, _("Buddy Chat")); + frame = gaim_gtk_make_frame(mainbox, _("Buddy Chat")); fbox = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); diff -r e7747cae9710 -r 2c4c975620f0 src/gtkdebug.c --- a/src/gtkdebug.c Mon May 26 07:06:20 2003 +0000 +++ b/src/gtkdebug.c Mon May 26 08:30:48 2003 +0000 @@ -23,6 +23,7 @@ #include "gtkdebug.h" #include "gaim.h" #include "gtkimhtml.h" +#include "prefs.h" #include typedef struct @@ -52,10 +53,18 @@ g_free(debug_win); debug_win = NULL; - if (misc_options & OPT_MISC_DEBUG) - misc_options ^= OPT_MISC_DEBUG; + gaim_prefs_set_bool("/gaim/gtk/debug/enabled", FALSE); + + return FALSE; +} - save_prefs(); +static gboolean +__configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win) +{ + if (GTK_WIDGET_VISIBLE(w)) { + gaim_prefs_set_int("/gaim/gtk/debug/width", event->width); + gaim_prefs_set_int("/gaim/gtk/debug/height", event->height); + } return FALSE; } @@ -76,6 +85,9 @@ __timestamps_cb(GtkWidget *w, DebugWindow *win) { win->timestamps = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); + + gaim_prefs_set_bool("/gaim/gtk/debug/timestamps", win->timestamps); + } static DebugWindow * @@ -85,56 +97,69 @@ GtkWidget *vbox; GtkWidget *toolbar; GtkWidget *sw; + GtkWidget *button; + int width, height; win = g_new0(DebugWindow, 1); + width = gaim_prefs_get_int("/gaim/gtk/debug/width"); + height = gaim_prefs_get_int("/gaim/gtk/debug/height"); + GAIM_DIALOG(win->window); - gtk_window_set_default_size(GTK_WINDOW(win->window), 500, 200); + gtk_window_set_default_size(GTK_WINDOW(win->window), width, height); gtk_window_set_role(GTK_WINDOW(win->window), "debug"); gtk_window_set_title(GTK_WINDOW(win->window), _("Debug Window")); g_signal_connect(G_OBJECT(win->window), "delete_event", G_CALLBACK(debug_window_destroy), NULL); + g_signal_connect(G_OBJECT(win->window), "configure_event", + G_CALLBACK(__configure_cb), win); /* Setup the vbox */ vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(win->window), vbox); - /* Setup our top button bar thingie. */ - toolbar = gtk_toolbar_new(); - gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH_HORIZ); - gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), - GTK_ICON_SIZE_SMALL_TOOLBAR); + if (gaim_prefs_get_bool("/gaim/gtk/debug/toolbar")) { + /* Setup our top button bar thingie. */ + toolbar = gtk_toolbar_new(); + gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH_HORIZ); + gtk_toolbar_set_icon_size(GTK_TOOLBAR(toolbar), + GTK_ICON_SIZE_SMALL_TOOLBAR); - gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); #if 0 - /* Find button */ - gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_FIND, - NULL, NULL, NULL, NULL, -1); + /* Find button */ + gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_FIND, + NULL, NULL, NULL, NULL, -1); - /* Save */ - gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_SAVE, - NULL, NULL, NULL, NULL, -1); + /* Save */ + gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_SAVE, + NULL, NULL, NULL, NULL, -1); #endif - /* Clear button */ - gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_CLEAR, - NULL, NULL, G_CALLBACK(__clear_cb), win, -1); + /* Clear button */ + gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_CLEAR, + NULL, NULL, G_CALLBACK(__clear_cb), win, -1); - gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); + gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); - /* Pause */ - gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), - GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, - _("Pause"), NULL, NULL, - NULL, G_CALLBACK(__pause_cb), win); + /* Pause */ + gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), + GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, + _("Pause"), NULL, NULL, + NULL, G_CALLBACK(__pause_cb), win); - /* Timestamps */ - gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), - GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, - _("Timestamps"), NULL, NULL, - NULL, G_CALLBACK(__timestamps_cb), win); + /* Timestamps */ + button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), + GTK_TOOLBAR_CHILD_TOGGLEBUTTON, + NULL, _("Timestamps"), NULL, NULL, + NULL, G_CALLBACK(__timestamps_cb), + win); + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), + gaim_prefs_get_bool("/gaim/gtk/debug/timestamps")); + } /* Now our scrolled window... */ sw = gtk_scrolled_window_new(NULL, NULL); @@ -163,6 +188,8 @@ debug_win = debug_window_new(); gtk_widget_show(debug_win->window); + + gaim_prefs_set_bool("/gaim/gtk/debug/enabled", TRUE); } void @@ -178,44 +205,48 @@ gaim_gtk_debug_print(GaimDebugLevel level, const char *category, const char *format, va_list args) { - gchar *arg_s; + gchar *arg_s, *ts_s; + gboolean timestamps; + + timestamps = gaim_prefs_get_bool("/gaim/gtk/debug/timestamps"); arg_s = g_strdup_vprintf(format, args); + if (category == NULL) { + ts_s = g_strdup(""); + } + else { + /* + * If the category is not NULL, then do timestamps. + * This IS right. :) + */ + if (timestamps) { + gchar mdate[64]; + time_t mtime = time(NULL); + + strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); + + ts_s = g_strdup_printf("(%s) ", mdate); + } + else + ts_s = g_strdup(""); + } + if ((misc_options & OPT_MISC_DEBUG) && debug_win != NULL && !debug_win->paused) { - gchar *esc_s, *cat_s, *ts_s, *s; - - if (category == NULL) { - cat_s = g_strdup(""); - ts_s = g_strdup(""); - } - else { - cat_s = g_strdup_printf("%s: ", category); + gchar *esc_s, *cat_s, *s; - /* - * If the category is not NULL, then do timestamps. - * This IS right. :) - */ - if (debug_win->timestamps) { - gchar mdate[64]; - time_t mtime = time(NULL); - - strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); - - ts_s = g_strdup_printf("(%s) ", mdate); - } - else - ts_s = g_strdup(""); - } + if (category == NULL) + cat_s = g_strdup(""); + else + cat_s = g_strdup_printf("%s: ", category); esc_s = g_markup_escape_text(arg_s, -1); s = g_strdup_printf("%s%s%s", debug_fg_colors[level], ts_s, cat_s, esc_s); - g_free(ts_s); g_free(esc_s); if (level == GAIM_DEBUG_FATAL) { @@ -234,11 +265,12 @@ if (opt_debug) { if (category == NULL) - g_print("%s", arg_s); + g_print("%s%s", ts_s, arg_s); else - g_print("%s: %s", category, arg_s); + g_print("%s%s: %s", ts_s, category, arg_s); } + g_free(ts_s); g_free(arg_s); } diff -r e7747cae9710 -r 2c4c975620f0 src/gtkpounce.c --- a/src/gtkpounce.c Mon May 26 07:06:20 2003 +0000 +++ b/src/gtkpounce.c Mon May 26 08:30:48 2003 +0000 @@ -510,7 +510,7 @@ gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); /* Create the "Pounce Who" frame. */ - frame = make_frame(vbox2, _("Pounce Who")); + frame = gaim_gtk_make_frame(vbox2, _("Pounce Who")); /* Account: */ hbox = gtk_hbox_new(FALSE, 6); @@ -551,7 +551,7 @@ } /* Create the "Pounce When" frame. */ - frame = make_frame(vbox2, _("Pounce When")); + frame = gaim_gtk_make_frame(vbox2, _("Pounce When")); table = gtk_table_new(2, 4, FALSE); gtk_container_add(GTK_CONTAINER(frame), table); @@ -602,7 +602,7 @@ gtk_widget_show(dialog->stop_typing); /* Create the "Pounce Action" frame. */ - frame = make_frame(vbox2, _("Pounce Action")); + frame = gaim_gtk_make_frame(vbox2, _("Pounce Action")); table = gtk_table_new(3, 5, FALSE); gtk_container_add(GTK_CONTAINER(frame), table); diff -r e7747cae9710 -r 2c4c975620f0 src/gtkprefs.c --- a/src/gtkprefs.c Mon May 26 07:06:20 2003 +0000 +++ b/src/gtkprefs.c Mon May 26 08:30:48 2003 +0000 @@ -1,4 +1,7 @@ -/* +/** + * @file gtkprefs.c GTK+ Preferences + * @ingroup gtkui + * * gaim * * Copyright (C) 1998-2002, Mark Spencer @@ -37,9 +40,11 @@ #include "gtkimhtml.h" #include "gaim.h" #include "gtkblist.h" +#include "gtkdebug.h" #include "gtkplugin.h" -#include "gtkdebug.h" +#include "gtkprefs.h" #include "prpl.h" +#include "prefs.h" #include "proxy.h" #include "sound.h" #include "notify.h" @@ -155,27 +160,6 @@ to save it */ } - -GtkWidget *make_frame(GtkWidget *ret, char *text) { - GtkWidget *vbox, *label, *hbox; - char labeltext[256]; - - vbox = gtk_vbox_new(FALSE, 6); - gtk_box_pack_start(GTK_BOX(ret), vbox, FALSE, FALSE, 0); - label = gtk_label_new(NULL); - g_snprintf(labeltext, sizeof(labeltext), "%s", text); - gtk_label_set_markup(GTK_LABEL(label), labeltext); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); - gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); - hbox = gtk_hbox_new(FALSE, 6); - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - label = gtk_label_new(" "); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - vbox = gtk_vbox_new(FALSE, 6); - gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); - return vbox; -} - /* OK, Apply and Cancel */ static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { @@ -203,7 +187,7 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame(ret, _("Interface Options")); + vbox = gaim_gtk_make_frame(ret, _("Interface Options")); gaim_button(_("D_isplay remote nicknames if no alias is set"), &misc_options, OPT_MISC_USE_SERVER_ALIAS, vbox); @@ -443,6 +427,40 @@ return ret; } +static void update_color(GtkWidget *w, GtkWidget *pic) +{ + GdkColor c; + GtkStyle *style; + c.pixel = 0; + + if (pic == pref_fg_picture) { + if (font_options & OPT_FONT_FGCOL) { + c.red = fgcolor.red; + c.blue = fgcolor.blue; + c.green = fgcolor.green; + } else { + c.red = 0; + c.blue = 0; + c.green = 0; + } + } else { + if (font_options & OPT_FONT_BGCOL) { + c.red = bgcolor.red; + c.blue = bgcolor.blue; + c.green = bgcolor.green; + } else { + c.red = 0xffff; + c.blue = 0xffff; + c.green = 0xffff; + } + } + + style = gtk_style_new(); + style->bg[0] = c; + gtk_widget_set_style(pic, style); + g_object_unref(style); +} + GtkWidget *font_page() { GtkWidget *ret; GtkWidget *button; @@ -453,13 +471,13 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame(ret, _("Style")); + vbox = gaim_gtk_make_frame(ret, _("Style")); gaim_button(_("_Bold"), &font_options, OPT_FONT_BOLD, vbox); gaim_button(_("_Italics"), &font_options, OPT_FONT_ITALIC, vbox); gaim_button(_("_Underline"), &font_options, OPT_FONT_UNDERLINE, vbox); gaim_button(_("_Strikethrough"), &font_options, OPT_FONT_STRIKE, vbox); - vbox = make_frame(ret, _("Face")); + vbox = gaim_gtk_make_frame(ret, _("Face")); hbox = gtk_hbox_new(FALSE, 6); gtk_container_add(GTK_CONTAINER(vbox), hbox); button = gaim_button(_("Use custo_m face"), &font_options, OPT_FONT_FACE, hbox); @@ -484,7 +502,7 @@ g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(gaim_gtk_toggle_sensitive), select); - vbox = make_frame(ret, _("Color")); + vbox = gaim_gtk_make_frame(ret, _("Color")); hbox = gtk_hbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(vbox), hbox); @@ -532,14 +550,14 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame (ret, _("Display")); + vbox = gaim_gtk_make_frame (ret, _("Display")); gaim_button(_("Show graphical _smileys"), &convo_options, OPT_CONVO_SHOW_SMILEY, vbox); gaim_button(_("Show _timestamp on messages"), &convo_options, OPT_CONVO_SHOW_TIME, vbox); gaim_button(_("Show _URLs as links"), &convo_options, OPT_CONVO_SEND_LINKS, vbox); #ifdef USE_GTKSPELL gaim_button(_("_Highlight misspelled words"), &convo_options, OPT_CONVO_CHECK_SPELLING, vbox); #endif - vbox = make_frame (ret, _("Ignore")); + vbox = gaim_gtk_make_frame (ret, _("Ignore")); gaim_button(_("Ignore c_olors"), &convo_options, OPT_CONVO_IGNORE_COLOUR, vbox); gaim_button(_("Ignore font _faces"), &convo_options, OPT_CONVO_IGNORE_FONTS, vbox); gaim_button(_("Ignore font si_zes"), &convo_options, OPT_CONVO_IGNORE_SIZES, vbox); @@ -554,15 +572,15 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame(ret, _("Send Message")); + vbox = gaim_gtk_make_frame(ret, _("Send Message")); gaim_button(_("_Enter sends message"), &convo_options, OPT_CONVO_ENTER_SENDS, vbox); gaim_button(_("C_ontrol-Enter sends message"), &convo_options, OPT_CONVO_CTL_ENTER, vbox); - vbox = make_frame (ret, _("Window Closing")); + vbox = gaim_gtk_make_frame (ret, _("Window Closing")); gaim_button(_("E_scape closes window"), &convo_options, OPT_CONVO_ESC_CAN_CLOSE, vbox); gaim_button(_("Control-_W closes window"), &convo_options, OPT_CONVO_CTL_W_CLOSES, vbox); - vbox = make_frame(ret, _("Insertions")); + vbox = gaim_gtk_make_frame(ret, _("Insertions")); gaim_button(_("Control-{B/I/U/S} inserts _HTML tags"), &convo_options, OPT_CONVO_CTL_CHARS, vbox); gaim_button(_("Control-(number) inserts _smileys"), &convo_options, OPT_CONVO_CTL_SMILEYS, vbox); @@ -582,7 +600,7 @@ gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame (ret, _("Buddy List Sorting")); + vbox = gaim_gtk_make_frame (ret, _("Buddy List Sorting")); while (sl) { l = g_list_append(l, ((struct gaim_gtk_blist_sort_method*)sl->data)->name); l = g_list_append(l, ((struct gaim_gtk_blist_sort_method*)sl->data)->name); @@ -596,21 +614,21 @@ g_list_free(l); - vbox = make_frame (ret, _("Buddy List Toolbar")); + vbox = gaim_gtk_make_frame (ret, _("Buddy List Toolbar")); gaim_dropdown(vbox, _("Show _buttons as:"), &blist_options, OPT_BLIST_SHOW_BUTTON_XPM | OPT_BLIST_NO_BUTTON_TEXT, _("Pictures"), OPT_BLIST_SHOW_BUTTON_XPM | OPT_BLIST_NO_BUTTON_TEXT, _("Text"), 0, _("Pictures and text"), OPT_BLIST_SHOW_BUTTON_XPM, _("None"), OPT_BLIST_NO_BUTTON_TEXT, NULL); - vbox = make_frame (ret, _("Buddy List Window")); + vbox = gaim_gtk_make_frame (ret, _("Buddy List Window")); gaim_button(_("_Raise window on events"), &blist_options, OPT_BLIST_POPUP, vbox); - vbox = make_frame (ret, _("Group Display")); + vbox = gaim_gtk_make_frame (ret, _("Group Display")); /* gaim_button(_("Hide _groups with no online buddies"), &blist_options, OPT_BLIST_NO_MT_GRP, vbox); */ gaim_button(_("Show _numbers in groups"), &blist_options, OPT_BLIST_SHOW_GRPNUM, vbox); - vbox = make_frame (ret, _("Buddy Display")); + vbox = gaim_gtk_make_frame (ret, _("Buddy Display")); button = gaim_button(_("Show buddy _icons"), &blist_options, OPT_BLIST_SHOW_ICONS, vbox); b2 = gaim_button(_("Show _warning levels"), &blist_options, OPT_BLIST_SHOW_WARN, vbox); if (blist_options & OPT_BLIST_SHOW_ICONS) @@ -640,7 +658,7 @@ gtk_container_set_border_width(GTK_CONTAINER(ret), 12); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = make_frame(ret, _("Conversations")); + vbox = gaim_gtk_make_frame(ret, _("Conversations")); /* Build a list of names. */ for (i = 0; i < gaim_conv_placement_get_fnc_count(); i++) { @@ -675,7 +693,7 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = make_frame (ret, _("Window")); + vbox = gaim_gtk_make_frame (ret, _("Window")); widge = gaim_dropdown(vbox, _("Show _buttons as:"), &im_options, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM, _("Pictures"), OPT_IM_BUTTON_XPM, _("Text"), OPT_IM_BUTTON_TEXT, @@ -689,15 +707,15 @@ gaim_button(_("Hide window on _send"), &im_options, OPT_IM_POPDOWN, vbox); gtk_widget_show (vbox); - vbox = make_frame (ret, _("Buddy Icons")); + vbox = gaim_gtk_make_frame (ret, _("Buddy Icons")); gaim_button(_("Hide buddy _icons"), &im_options, OPT_IM_HIDE_ICONS, vbox); gaim_button(_("Disable buddy icon a_nimation"), &im_options, OPT_IM_NO_ANIMATION, vbox); - vbox = make_frame (ret, _("Display")); + vbox = gaim_gtk_make_frame (ret, _("Display")); gaim_button(_("Show _logins in window"), &im_options, OPT_IM_LOGON, vbox); gaim_button(_("Show a_liases in tabs/titles"), &im_options, OPT_IM_ALIAS_TAB, vbox); - vbox = make_frame (ret, _("Typing Notification")); + vbox = gaim_gtk_make_frame (ret, _("Typing Notification")); typingbutton = gaim_button(_("Notify buddies that you are _typing to them"), &misc_options, OPT_MISC_STEALTH_TYPING, vbox); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton))); @@ -718,7 +736,7 @@ sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); - vbox = make_frame (ret, _("Window")); + vbox = gaim_gtk_make_frame (ret, _("Window")); dd = gaim_dropdown(vbox, _("Show _buttons as:"), &chat_options, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM, _("Pictures"), OPT_CHAT_BUTTON_XPM, _("Text"), OPT_CHAT_BUTTON_TEXT, @@ -730,11 +748,11 @@ gaim_labeled_spin_button(vbox, _("_Entry field height:"), &buddy_chat_size.entry_height, 25, 9999, sg); gaim_button(_("_Raise windows on events"), &chat_options, OPT_CHAT_POPUP, vbox); - vbox = make_frame (ret, _("Tab Completion")); + vbox = gaim_gtk_make_frame (ret, _("Tab Completion")); gaim_button(_("_Tab-complete nicks"), &chat_options, OPT_CHAT_TAB_COMPLETE, vbox); gaim_button(_("_Old-style tab completion"), &chat_options, OPT_CHAT_OLD_STYLE_TAB, vbox); - vbox = make_frame (ret, _("Display")); + vbox = gaim_gtk_make_frame (ret, _("Display")); gaim_button(_("_Show people joining/leaving in window"), &chat_options, OPT_CHAT_LOGON, vbox); gaim_button(_("Co_lorize screennames"), &chat_options, OPT_CHAT_COLORIZE, vbox); @@ -753,7 +771,7 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = make_frame (ret, _("IM Tabs")); + vbox = gaim_gtk_make_frame (ret, _("IM Tabs")); dd = gaim_dropdown(vbox, _("Tab _placement:"), &im_options, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB, _("Top"), 0, _("Bottom"), OPT_IM_BR_TAB, @@ -763,7 +781,7 @@ gaim_button(_("Show all _instant messages in one tabbed\nwindow"), &im_options, OPT_IM_ONE_WINDOW, vbox); - vbox = make_frame (ret, _("Chat Tabs")); + vbox = gaim_gtk_make_frame (ret, _("Chat Tabs")); dd = gaim_dropdown(vbox, _("Tab _placement:"), &chat_options, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, _("Top"), 0, _("Bottom"), OPT_CHAT_BR_TAB, @@ -773,7 +791,7 @@ gaim_button(_("Show all c_hats in one tabbed window"), &chat_options, OPT_CHAT_ONE_WINDOW, vbox); - vbox = make_frame (ret, _("Tab Options")); + vbox = gaim_gtk_make_frame (ret, _("Tab Options")); button = gaim_button(_("Show _close button on tabs."), &convo_options, OPT_CONVO_NO_X_ON_TAB, vbox); convo_options ^= OPT_CONVO_NO_X_ON_TAB; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))); @@ -794,14 +812,14 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame (ret, _("Proxy Type")); + vbox = gaim_gtk_make_frame (ret, _("Proxy Type")); gaim_dropdown(vbox, _("Proxy _type:"), (int*)&global_proxy_info.proxytype, -1, _("No proxy"), PROXY_NONE, "SOCKS 4", PROXY_SOCKS4, "SOCKS 5", PROXY_SOCKS5, "HTTP", PROXY_HTTP, NULL); - vbox = make_frame(ret, _("Proxy Server")); + vbox = gaim_gtk_make_frame(ret, _("Proxy Server")); prefs_proxy_frame = vbox; if (global_proxy_info.proxytype == PROXY_NONE) @@ -936,7 +954,7 @@ gtk_container_set_border_width (GTK_CONTAINER (ret), 12); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = make_frame (ret, _("Browser Selection")); + vbox = gaim_gtk_make_frame (ret, _("Browser Selection")); browsers = get_available_browsers(); if (browsers != NULL) { @@ -963,7 +981,7 @@ g_signal_connect(G_OBJECT(browser_entry), "focus-out-event", G_CALLBACK(manual_browser_set), NULL); if (browsers != NULL) { - vbox = make_frame (ret, _("Browser Options")); + vbox = gaim_gtk_make_frame (ret, _("Browser Options")); label = gaim_button(_("Open new _window by default"), &misc_options, OPT_MISC_BROWSER_POPUP, vbox); } @@ -978,12 +996,12 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - vbox = make_frame (ret, _("Message Logs")); + vbox = gaim_gtk_make_frame (ret, _("Message Logs")); gaim_button(_("_Log all instant messages"), &logging_options, OPT_LOG_CONVOS, vbox); gaim_button(_("Log all c_hats"), &logging_options, OPT_LOG_CHATS, vbox); gaim_button(_("Strip _HTML from logs"), &logging_options, OPT_LOG_STRIP_HTML, vbox); - vbox = make_frame (ret, _("System Logs")); + vbox = gaim_gtk_make_frame (ret, _("System Logs")); gaim_button(_("Log when buddies _sign on/sign off"), &logging_options, OPT_LOG_BUDDY_SIGNON, vbox); gaim_button(_("Log when buddies become _idle/un-idle"), &logging_options, OPT_LOG_BUDDY_IDLE, @@ -1024,12 +1042,12 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = make_frame (ret, _("Sound Options")); + vbox = gaim_gtk_make_frame (ret, _("Sound Options")); gaim_button(_("_No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, vbox); gaim_button(_("_Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox); #ifndef _WIN32 - vbox = make_frame (ret, _("Sound Method")); + vbox = gaim_gtk_make_frame (ret, _("Sound Method")); dd = gaim_dropdown(vbox, _("_Method"), &sound_options, OPT_SOUND_BEEP | OPT_SOUND_ESD | OPT_SOUND_ARTS | OPT_SOUND_NAS | OPT_SOUND_NORMAL | OPT_SOUND_CMD, @@ -1089,11 +1107,11 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = make_frame (ret, _("Away")); + vbox = gaim_gtk_make_frame (ret, _("Away")); gaim_button(_("_Sending messages removes away status"), &away_options, OPT_AWAY_BACK_ON_IM, vbox); gaim_button(_("_Queue new messages when away"), &away_options, OPT_AWAY_QUEUE, vbox); - vbox = make_frame (ret, _("Auto-response")); + vbox = gaim_gtk_make_frame (ret, _("Auto-response")); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); gaim_labeled_spin_button(hbox, _("Seconds before _resending:"), @@ -1105,7 +1123,7 @@ if (away_options & OPT_AWAY_NO_AUTO_RESP) gtk_widget_set_sensitive(hbox, FALSE); - vbox = make_frame (ret, _("Idle")); + vbox = gaim_gtk_make_frame (ret, _("Idle")); dd = gaim_dropdown(vbox, _("Idle _time reporting:"), &report_idle, -1, _("None"), IDLE_NONE, _("Gaim usage"), IDLE_GAIM, @@ -1120,7 +1138,7 @@ gtk_size_group_add_widget(sg, dd); gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); - vbox = make_frame (ret, _("Auto-away")); + vbox = gaim_gtk_make_frame (ret, _("Auto-away")); button = gaim_button(_("Set away _when idle"), &away_options, OPT_AWAY_AUTO, vbox); select = gaim_labeled_spin_button(vbox, _("_Minutes before setting away:"), &auto_away, 1, 24 * 60, sg); if (!(away_options & OPT_AWAY_AUTO)) @@ -1847,7 +1865,7 @@ } } -void show_prefs() +void gaim_gtk_prefs_show(void) { GtkWidget *vbox, *vbox2; GtkWidget *hbox; @@ -1971,11 +1989,6 @@ gtk_widget_show(prefs); } -void set_option(GtkWidget *w, int *option) -{ - *option = !(*option); -} - static void set_misc_option(GtkWidget *w, int option) { misc_options ^= option; @@ -2194,40 +2207,6 @@ gaim_conversation_foreach(gaim_gtkconv_update_font_colors); } -void update_color(GtkWidget *w, GtkWidget *pic) -{ - GdkColor c; - GtkStyle *style; - c.pixel = 0; - - if (pic == pref_fg_picture) { - if (font_options & OPT_FONT_FGCOL) { - c.red = fgcolor.red; - c.blue = fgcolor.blue; - c.green = fgcolor.green; - } else { - c.red = 0; - c.blue = 0; - c.green = 0; - } - } else { - if (font_options & OPT_FONT_BGCOL) { - c.red = bgcolor.red; - c.blue = bgcolor.blue; - c.green = bgcolor.green; - } else { - c.red = 0xffff; - c.blue = 0xffff; - c.green = 0xffff; - } - } - - style = gtk_style_new(); - style->bg[0] = c; - gtk_widget_set_style(pic, style); - g_object_unref(style); -} - void set_default_away(GtkWidget *w, gpointer i) { @@ -2511,3 +2490,18 @@ gaim_conversation_foreach(gaim_gtkconv_update_font_face); } +void +gaim_gtk_prefs_init(void) +{ + gaim_prefs_add_none("/gaim"); + gaim_prefs_add_none("/gaim/gtk"); + + /* Debug window preferences. */ + gaim_prefs_add_none("/gaim/gtk/debug"); + gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE); + gaim_prefs_add_bool("/gaim/gtk/debug/timestamps", FALSE); + gaim_prefs_add_bool("/gaim/gtk/debug/enabled", FALSE); + gaim_prefs_add_int("/gaim/gtk/debug/width", 400); + gaim_prefs_add_int("/gaim/gtk/debug/height", 150); +} + diff -r e7747cae9710 -r 2c4c975620f0 src/gtkprefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gtkprefs.h Mon May 26 08:30:48 2003 +0000 @@ -0,0 +1,61 @@ +/** + * @file gtkprefs.h GTK+ Preferences + * @ingroup gtkui + * + * gaim + * + * Copyright (C) 1998-2002, Mark Spencer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#ifndef _GAIM_GTK_PREFS_H_ +#define _GAIM_GTK_PREFS_H_ + +/* XXX These should go. */ +extern GtkListStore *prefs_away_store; +extern GtkWidget *prefs_away_menu; +extern GtkWidget *pref_fg_picture; +extern GtkWidget *pref_bg_picture; + +/** + * Initializes all UI-specific preferences. + */ +void gaim_gtk_prefs_init(void); + +/** + * Shows the preferences dialog. + */ +void gaim_gtk_prefs_show(void); + +/** + * Sets the default away message. + * + * @todo This should be moved or renamed or something? + */ +void set_default_away(GtkWidget *, gpointer); + +/** + * Initializes the default away menu. + * + * @todo This should be moved or renamed or something? + */ +void default_away_menu_init(GtkWidget *); + +void apply_font_dlg(GtkWidget *, GtkWidget *); +void apply_color_dlg(GtkWidget *, gpointer); +void destroy_colorsel(GtkWidget *, gpointer); + +#endif /* _GAIM_GTK_PREFS_H_ */ diff -r e7747cae9710 -r 2c4c975620f0 src/gtkutils.c --- a/src/gtkutils.c Mon May 26 07:06:20 2003 +0000 +++ b/src/gtkutils.c Mon May 26 08:30:48 2003 +0000 @@ -484,3 +484,33 @@ return menuitem; } + +GtkWidget * +gaim_gtk_make_frame(GtkWidget *parent, const char *title) +{ + GtkWidget *vbox, *label, *hbox; + char labeltitle[256]; + + vbox = gtk_vbox_new(FALSE, 6); + gtk_box_pack_start(GTK_BOX(parent), vbox, FALSE, FALSE, 0); + + label = gtk_label_new(NULL); + g_snprintf(labeltitle, sizeof(labeltitle), + "%s", title); + + gtk_label_set_markup(GTK_LABEL(label), labeltitle); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); + + hbox = gtk_hbox_new(FALSE, 6); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + + label = gtk_label_new(" "); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); + + vbox = gtk_vbox_new(FALSE, 6); + gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); + + return vbox; +} + diff -r e7747cae9710 -r 2c4c975620f0 src/gtkutils.h --- a/src/gtkutils.h Mon May 26 07:06:20 2003 +0000 +++ b/src/gtkutils.h Mon May 26 08:30:48 2003 +0000 @@ -138,7 +138,8 @@ * * @param menu The menu to which to append the menu item. * @param str The title for the menu item. - * @param icon An icon to place to the left of the menu item, or NULL for no icon. + * @param icon An icon to place to the left of the menu item, + * or @c NULL for no icon. * @param sf A function to call when the menu item is activated. * @param data Data to pass to the signal function. * @param accel_key Something. @@ -147,6 +148,19 @@ * * @return The newly created menu item. */ -GtkWidget *gaim_new_item_from_stock(GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod); +GtkWidget *gaim_new_item_from_stock(GtkWidget *menu, const char *str, + const char *icon, GtkSignalFunc sf, + gpointer data, guint accel_key, + guint accel_mods, char *mod); + +/** + * Creates a HIG preferences frame. + * + * @param parent The widget to put the frame into. + * @param title The title for the frame. + * + * @return The vbox to put things into. + */ +GtkWidget *gaim_gtk_make_frame(GtkWidget *parent, const char *title); #endif /* _GAIM_GTK_UTILS_H_ */ diff -r e7747cae9710 -r 2c4c975620f0 src/main.c --- a/src/main.c Mon May 26 07:06:20 2003 +0000 +++ b/src/main.c Mon May 26 08:30:48 2003 +0000 @@ -376,7 +376,7 @@ button = gaim_pixbuf_button_from_stock(_("Preferences"), GTK_STOCK_PREFERENCES, GAIM_BUTTON_VERTICAL); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); g_signal_connect(G_OBJECT(button), "clicked", - G_CALLBACK(show_prefs), mainwindow); + G_CALLBACK(gaim_gtk_prefs_show), mainwindow); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); button = gaim_pixbuf_button_from_stock(_("Sign On"), GAIM_STOCK_SIGN_ON, GAIM_BUTTON_VERTICAL); @@ -881,6 +881,10 @@ gaim_set_notify_ui_ops(gaim_get_gtk_notify_ui_ops()); gaim_set_request_ui_ops(gaim_get_gtk_request_ui_ops()); + gaim_prefs_init(); + gaim_gtk_prefs_init(); + gaim_prefs_load(); + load_prefs(); plugin_search_paths[0] = LIBDIR; plugin_search_paths[1] = gaim_user_dir(); @@ -899,9 +903,6 @@ wgaim_init(); #endif - gaim_prefs_init(); - gaim_prefs_load(); - load_prefs(); core_main(); load_pounces(); ui_main(); diff -r e7747cae9710 -r 2c4c975620f0 src/multi.c --- a/src/multi.c Mon May 26 07:06:20 2003 +0000 +++ b/src/multi.c Mon May 26 08:30:48 2003 +0000 @@ -744,7 +744,7 @@ gtk_widget_destroy(ma->login_frame); ma->login_frame = NULL; - frame = make_frame(box, _("Login Options")); + frame = gaim_gtk_make_frame(box, _("Login Options")); ma->login_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); gtk_box_reorder_child(GTK_BOX(box), ma->login_frame, 0); @@ -884,7 +884,7 @@ gtk_widget_destroy(ma->user_frame); ma->user_frame = NULL; - frame = make_frame(box, _("User Options")); + frame = gaim_gtk_make_frame(box, _("User Options")); ma->user_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); gtk_box_reorder_child(GTK_BOX(box), ma->user_frame, 1); gtk_widget_show_all(ma->user_frame); @@ -956,7 +956,7 @@ return; g_snprintf(buf, sizeof(buf), _("%s Options"), p->info->name); - frame = make_frame(box, buf); + frame = gaim_gtk_make_frame(box, buf); /* BLEH */ ma->proto_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); @@ -1032,7 +1032,7 @@ if(ma->account) gpi = ma->account->gpi; - frame = make_frame(box, _("Proxy Options")); + frame = gaim_gtk_make_frame(box, _("Proxy Options")); ma->proxy_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); gtk_widget_show_all(ma->proxy_frame); diff -r e7747cae9710 -r 2c4c975620f0 src/ui.h --- a/src/ui.h Mon May 26 07:06:20 2003 +0000 +++ b/src/ui.h Mon May 26 08:30:48 2003 +0000 @@ -36,6 +36,7 @@ #include "gtkconv.h" #include "pounce.h" #include "gtkft.h" +#include "gtkprefs.h" #include "gtkutils.h" #include "stock.h" @@ -171,6 +172,8 @@ extern int smiley_array[FACE_TOTAL]; extern GtkWidget *fgcseld; extern GtkWidget *bgcseld; +void build_allow_list(); +void build_block_list(); /* Globals in pounce.c */ extern GtkWidget *bpmenu; @@ -298,24 +301,6 @@ extern void update_show_plugins(); /* this is a hack and will be removed */ #endif -/* Functions in prefs.c */ -extern void set_option(GtkWidget *, int *); -extern void show_prefs(); -extern void show_debug(); -extern void update_color(GtkWidget *, GtkWidget *); -extern void set_default_away(GtkWidget *, gpointer); -extern void default_away_menu_init(GtkWidget *); -extern void build_allow_list(); -extern void build_block_list(); -extern GtkWidget *make_frame(GtkWidget *, char *); -extern GtkListStore *prefs_away_store; -extern GtkWidget *prefs_away_menu; -extern GtkWidget *pref_fg_picture; -extern GtkWidget *pref_bg_picture; -extern void apply_font_dlg(GtkWidget *, GtkWidget *); -extern void apply_color_dlg(GtkWidget *, gpointer); -extern void destroy_colorsel(GtkWidget *, gpointer); - /* Functions in prpl.c */ extern void register_dialog();