comparison src/gtkprefs.c @ 5530:2c4c975620f0

[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 <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 26 May 2003 08:30:48 +0000
parents 7e8524b5ff98
children 933739f789f9
comparison
equal deleted inserted replaced
5529:e7747cae9710 5530:2c4c975620f0
1 /* 1 /**
2 * @file gtkprefs.c GTK+ Preferences
3 * @ingroup gtkui
4 *
2 * gaim 5 * gaim
3 * 6 *
4 * Copyright (C) 1998-2002, Mark Spencer <markster@marko.net> 7 * Copyright (C) 1998-2002, Mark Spencer <markster@marko.net>
5 * 8 *
6 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
35 #include <ctype.h> 38 #include <ctype.h>
36 #include <gtk/gtk.h> 39 #include <gtk/gtk.h>
37 #include "gtkimhtml.h" 40 #include "gtkimhtml.h"
38 #include "gaim.h" 41 #include "gaim.h"
39 #include "gtkblist.h" 42 #include "gtkblist.h"
43 #include "gtkdebug.h"
40 #include "gtkplugin.h" 44 #include "gtkplugin.h"
41 #include "gtkdebug.h" 45 #include "gtkprefs.h"
42 #include "prpl.h" 46 #include "prpl.h"
47 #include "prefs.h"
43 #include "proxy.h" 48 #include "proxy.h"
44 #include "sound.h" 49 #include "sound.h"
45 #include "notify.h" 50 #include "notify.h"
46 51
47 #ifdef _WIN32 52 #ifdef _WIN32
153 g_snprintf(global_proxy_info.proxypass, sizeof(global_proxy_info.proxypass), "%s", gtk_entry_get_text(entry)); 158 g_snprintf(global_proxy_info.proxypass, sizeof(global_proxy_info.proxypass), "%s", gtk_entry_get_text(entry));
154 proxy_info_is_from_gaimrc = 1; /* If the user specifies it, we want 159 proxy_info_is_from_gaimrc = 1; /* If the user specifies it, we want
155 to save it */ 160 to save it */
156 } 161 }
157 162
158
159 GtkWidget *make_frame(GtkWidget *ret, char *text) {
160 GtkWidget *vbox, *label, *hbox;
161 char labeltext[256];
162
163 vbox = gtk_vbox_new(FALSE, 6);
164 gtk_box_pack_start(GTK_BOX(ret), vbox, FALSE, FALSE, 0);
165 label = gtk_label_new(NULL);
166 g_snprintf(labeltext, sizeof(labeltext), "<span weight=\"bold\">%s</span>", text);
167 gtk_label_set_markup(GTK_LABEL(label), labeltext);
168 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
169 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
170 hbox = gtk_hbox_new(FALSE, 6);
171 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
172 label = gtk_label_new(" ");
173 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
174 vbox = gtk_vbox_new(FALSE, 6);
175 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
176 return vbox;
177 }
178
179 /* OK, Apply and Cancel */ 163 /* OK, Apply and Cancel */
180 164
181 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { 165 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) {
182 GtkTreeIter iter; 166 GtkTreeIter iter;
183 char text[128]; 167 char text[128];
201 GtkWidget *ret; 185 GtkWidget *ret;
202 GtkWidget *vbox; 186 GtkWidget *vbox;
203 ret = gtk_vbox_new(FALSE, 18); 187 ret = gtk_vbox_new(FALSE, 18);
204 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 188 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
205 189
206 vbox = make_frame(ret, _("Interface Options")); 190 vbox = gaim_gtk_make_frame(ret, _("Interface Options"));
207 191
208 gaim_button(_("D_isplay remote nicknames if no alias is set"), &misc_options, OPT_MISC_USE_SERVER_ALIAS, vbox); 192 gaim_button(_("D_isplay remote nicknames if no alias is set"), &misc_options, OPT_MISC_USE_SERVER_ALIAS, vbox);
209 193
210 194
211 gtk_widget_show_all(ret); 195 gtk_widget_show_all(ret);
441 425
442 gtk_widget_show_all(ret); 426 gtk_widget_show_all(ret);
443 return ret; 427 return ret;
444 } 428 }
445 429
430 static void update_color(GtkWidget *w, GtkWidget *pic)
431 {
432 GdkColor c;
433 GtkStyle *style;
434 c.pixel = 0;
435
436 if (pic == pref_fg_picture) {
437 if (font_options & OPT_FONT_FGCOL) {
438 c.red = fgcolor.red;
439 c.blue = fgcolor.blue;
440 c.green = fgcolor.green;
441 } else {
442 c.red = 0;
443 c.blue = 0;
444 c.green = 0;
445 }
446 } else {
447 if (font_options & OPT_FONT_BGCOL) {
448 c.red = bgcolor.red;
449 c.blue = bgcolor.blue;
450 c.green = bgcolor.green;
451 } else {
452 c.red = 0xffff;
453 c.blue = 0xffff;
454 c.green = 0xffff;
455 }
456 }
457
458 style = gtk_style_new();
459 style->bg[0] = c;
460 gtk_widget_set_style(pic, style);
461 g_object_unref(style);
462 }
463
446 GtkWidget *font_page() { 464 GtkWidget *font_page() {
447 GtkWidget *ret; 465 GtkWidget *ret;
448 GtkWidget *button; 466 GtkWidget *button;
449 GtkWidget *vbox, *hbox; 467 GtkWidget *vbox, *hbox;
450 GtkWidget *select = NULL; 468 GtkWidget *select = NULL;
451 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 469 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
452 470
453 ret = gtk_vbox_new(FALSE, 18); 471 ret = gtk_vbox_new(FALSE, 18);
454 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 472 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
455 473
456 vbox = make_frame(ret, _("Style")); 474 vbox = gaim_gtk_make_frame(ret, _("Style"));
457 gaim_button(_("_Bold"), &font_options, OPT_FONT_BOLD, vbox); 475 gaim_button(_("_Bold"), &font_options, OPT_FONT_BOLD, vbox);
458 gaim_button(_("_Italics"), &font_options, OPT_FONT_ITALIC, vbox); 476 gaim_button(_("_Italics"), &font_options, OPT_FONT_ITALIC, vbox);
459 gaim_button(_("_Underline"), &font_options, OPT_FONT_UNDERLINE, vbox); 477 gaim_button(_("_Underline"), &font_options, OPT_FONT_UNDERLINE, vbox);
460 gaim_button(_("_Strikethrough"), &font_options, OPT_FONT_STRIKE, vbox); 478 gaim_button(_("_Strikethrough"), &font_options, OPT_FONT_STRIKE, vbox);
461 479
462 vbox = make_frame(ret, _("Face")); 480 vbox = gaim_gtk_make_frame(ret, _("Face"));
463 hbox = gtk_hbox_new(FALSE, 6); 481 hbox = gtk_hbox_new(FALSE, 6);
464 gtk_container_add(GTK_CONTAINER(vbox), hbox); 482 gtk_container_add(GTK_CONTAINER(vbox), hbox);
465 button = gaim_button(_("Use custo_m face"), &font_options, OPT_FONT_FACE, hbox); 483 button = gaim_button(_("Use custo_m face"), &font_options, OPT_FONT_FACE, hbox);
466 gtk_size_group_add_widget(sg, button); 484 gtk_size_group_add_widget(sg, button);
467 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); 485 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT);
482 if (!(font_options & OPT_FONT_SIZE)) 500 if (!(font_options & OPT_FONT_SIZE))
483 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); 501 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE);
484 g_signal_connect(G_OBJECT(button), "clicked", 502 g_signal_connect(G_OBJECT(button), "clicked",
485 G_CALLBACK(gaim_gtk_toggle_sensitive), select); 503 G_CALLBACK(gaim_gtk_toggle_sensitive), select);
486 504
487 vbox = make_frame(ret, _("Color")); 505 vbox = gaim_gtk_make_frame(ret, _("Color"));
488 hbox = gtk_hbox_new(FALSE, 5); 506 hbox = gtk_hbox_new(FALSE, 5);
489 gtk_container_add(GTK_CONTAINER(vbox), hbox); 507 gtk_container_add(GTK_CONTAINER(vbox), hbox);
490 508
491 509
492 button = gaim_button(_("_Text color"), &font_options, OPT_FONT_FGCOL, hbox); 510 button = gaim_button(_("_Text color"), &font_options, OPT_FONT_FGCOL, hbox);
530 GtkWidget *ret; 548 GtkWidget *ret;
531 GtkWidget *vbox; 549 GtkWidget *vbox;
532 ret = gtk_vbox_new(FALSE, 18); 550 ret = gtk_vbox_new(FALSE, 18);
533 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 551 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
534 552
535 vbox = make_frame (ret, _("Display")); 553 vbox = gaim_gtk_make_frame (ret, _("Display"));
536 gaim_button(_("Show graphical _smileys"), &convo_options, OPT_CONVO_SHOW_SMILEY, vbox); 554 gaim_button(_("Show graphical _smileys"), &convo_options, OPT_CONVO_SHOW_SMILEY, vbox);
537 gaim_button(_("Show _timestamp on messages"), &convo_options, OPT_CONVO_SHOW_TIME, vbox); 555 gaim_button(_("Show _timestamp on messages"), &convo_options, OPT_CONVO_SHOW_TIME, vbox);
538 gaim_button(_("Show _URLs as links"), &convo_options, OPT_CONVO_SEND_LINKS, vbox); 556 gaim_button(_("Show _URLs as links"), &convo_options, OPT_CONVO_SEND_LINKS, vbox);
539 #ifdef USE_GTKSPELL 557 #ifdef USE_GTKSPELL
540 gaim_button(_("_Highlight misspelled words"), &convo_options, OPT_CONVO_CHECK_SPELLING, vbox); 558 gaim_button(_("_Highlight misspelled words"), &convo_options, OPT_CONVO_CHECK_SPELLING, vbox);
541 #endif 559 #endif
542 vbox = make_frame (ret, _("Ignore")); 560 vbox = gaim_gtk_make_frame (ret, _("Ignore"));
543 gaim_button(_("Ignore c_olors"), &convo_options, OPT_CONVO_IGNORE_COLOUR, vbox); 561 gaim_button(_("Ignore c_olors"), &convo_options, OPT_CONVO_IGNORE_COLOUR, vbox);
544 gaim_button(_("Ignore font _faces"), &convo_options, OPT_CONVO_IGNORE_FONTS, vbox); 562 gaim_button(_("Ignore font _faces"), &convo_options, OPT_CONVO_IGNORE_FONTS, vbox);
545 gaim_button(_("Ignore font si_zes"), &convo_options, OPT_CONVO_IGNORE_SIZES, vbox); 563 gaim_button(_("Ignore font si_zes"), &convo_options, OPT_CONVO_IGNORE_SIZES, vbox);
546 564
547 gtk_widget_show_all(ret); 565 gtk_widget_show_all(ret);
552 GtkWidget *ret; 570 GtkWidget *ret;
553 GtkWidget *vbox; 571 GtkWidget *vbox;
554 ret = gtk_vbox_new(FALSE, 18); 572 ret = gtk_vbox_new(FALSE, 18);
555 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 573 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
556 574
557 vbox = make_frame(ret, _("Send Message")); 575 vbox = gaim_gtk_make_frame(ret, _("Send Message"));
558 gaim_button(_("_Enter sends message"), &convo_options, OPT_CONVO_ENTER_SENDS, vbox); 576 gaim_button(_("_Enter sends message"), &convo_options, OPT_CONVO_ENTER_SENDS, vbox);
559 gaim_button(_("C_ontrol-Enter sends message"), &convo_options, OPT_CONVO_CTL_ENTER, vbox); 577 gaim_button(_("C_ontrol-Enter sends message"), &convo_options, OPT_CONVO_CTL_ENTER, vbox);
560 578
561 vbox = make_frame (ret, _("Window Closing")); 579 vbox = gaim_gtk_make_frame (ret, _("Window Closing"));
562 gaim_button(_("E_scape closes window"), &convo_options, OPT_CONVO_ESC_CAN_CLOSE, vbox); 580 gaim_button(_("E_scape closes window"), &convo_options, OPT_CONVO_ESC_CAN_CLOSE, vbox);
563 gaim_button(_("Control-_W closes window"), &convo_options, OPT_CONVO_CTL_W_CLOSES, vbox); 581 gaim_button(_("Control-_W closes window"), &convo_options, OPT_CONVO_CTL_W_CLOSES, vbox);
564 582
565 vbox = make_frame(ret, _("Insertions")); 583 vbox = gaim_gtk_make_frame(ret, _("Insertions"));
566 gaim_button(_("Control-{B/I/U/S} inserts _HTML tags"), &convo_options, OPT_CONVO_CTL_CHARS, vbox); 584 gaim_button(_("Control-{B/I/U/S} inserts _HTML tags"), &convo_options, OPT_CONVO_CTL_CHARS, vbox);
567 gaim_button(_("Control-(number) inserts _smileys"), &convo_options, OPT_CONVO_CTL_SMILEYS, vbox); 585 gaim_button(_("Control-(number) inserts _smileys"), &convo_options, OPT_CONVO_CTL_SMILEYS, vbox);
568 586
569 gtk_widget_show_all(ret); 587 gtk_widget_show_all(ret);
570 return ret; 588 return ret;
580 GSList *sl = gaim_gtk_blist_sort_methods; 598 GSList *sl = gaim_gtk_blist_sort_methods;
581 ret = gtk_vbox_new(FALSE, 18); 599 ret = gtk_vbox_new(FALSE, 18);
582 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 600 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
583 601
584 602
585 vbox = make_frame (ret, _("Buddy List Sorting")); 603 vbox = gaim_gtk_make_frame (ret, _("Buddy List Sorting"));
586 while (sl) { 604 while (sl) {
587 l = g_list_append(l, ((struct gaim_gtk_blist_sort_method*)sl->data)->name); 605 l = g_list_append(l, ((struct gaim_gtk_blist_sort_method*)sl->data)->name);
588 l = g_list_append(l, ((struct gaim_gtk_blist_sort_method*)sl->data)->name); 606 l = g_list_append(l, ((struct gaim_gtk_blist_sort_method*)sl->data)->name);
589 if (!fnd && !gaim_utf8_strcasecmp(((struct gaim_gtk_blist_sort_method*)sl->data)->name, sort_method)) 607 if (!fnd && !gaim_utf8_strcasecmp(((struct gaim_gtk_blist_sort_method*)sl->data)->name, sort_method))
590 fnd = TRUE; 608 fnd = TRUE;
594 gaim_dropdown_from_list(vbox, _("Sorting:"), 612 gaim_dropdown_from_list(vbox, _("Sorting:"),
595 (int*)&sort_method, r, l); 613 (int*)&sort_method, r, l);
596 614
597 g_list_free(l); 615 g_list_free(l);
598 616
599 vbox = make_frame (ret, _("Buddy List Toolbar")); 617 vbox = gaim_gtk_make_frame (ret, _("Buddy List Toolbar"));
600 gaim_dropdown(vbox, _("Show _buttons as:"), &blist_options, OPT_BLIST_SHOW_BUTTON_XPM | OPT_BLIST_NO_BUTTON_TEXT, 618 gaim_dropdown(vbox, _("Show _buttons as:"), &blist_options, OPT_BLIST_SHOW_BUTTON_XPM | OPT_BLIST_NO_BUTTON_TEXT,
601 _("Pictures"), OPT_BLIST_SHOW_BUTTON_XPM | OPT_BLIST_NO_BUTTON_TEXT, 619 _("Pictures"), OPT_BLIST_SHOW_BUTTON_XPM | OPT_BLIST_NO_BUTTON_TEXT,
602 _("Text"), 0, 620 _("Text"), 0,
603 _("Pictures and text"), OPT_BLIST_SHOW_BUTTON_XPM, 621 _("Pictures and text"), OPT_BLIST_SHOW_BUTTON_XPM,
604 _("None"), OPT_BLIST_NO_BUTTON_TEXT, NULL); 622 _("None"), OPT_BLIST_NO_BUTTON_TEXT, NULL);
605 623
606 vbox = make_frame (ret, _("Buddy List Window")); 624 vbox = gaim_gtk_make_frame (ret, _("Buddy List Window"));
607 gaim_button(_("_Raise window on events"), &blist_options, OPT_BLIST_POPUP, vbox); 625 gaim_button(_("_Raise window on events"), &blist_options, OPT_BLIST_POPUP, vbox);
608 626
609 vbox = make_frame (ret, _("Group Display")); 627 vbox = gaim_gtk_make_frame (ret, _("Group Display"));
610 /* gaim_button(_("Hide _groups with no online buddies"), &blist_options, OPT_BLIST_NO_MT_GRP, vbox); */ 628 /* gaim_button(_("Hide _groups with no online buddies"), &blist_options, OPT_BLIST_NO_MT_GRP, vbox); */
611 gaim_button(_("Show _numbers in groups"), &blist_options, OPT_BLIST_SHOW_GRPNUM, vbox); 629 gaim_button(_("Show _numbers in groups"), &blist_options, OPT_BLIST_SHOW_GRPNUM, vbox);
612 630
613 vbox = make_frame (ret, _("Buddy Display")); 631 vbox = gaim_gtk_make_frame (ret, _("Buddy Display"));
614 button = gaim_button(_("Show buddy _icons"), &blist_options, OPT_BLIST_SHOW_ICONS, vbox); 632 button = gaim_button(_("Show buddy _icons"), &blist_options, OPT_BLIST_SHOW_ICONS, vbox);
615 b2 = gaim_button(_("Show _warning levels"), &blist_options, OPT_BLIST_SHOW_WARN, vbox); 633 b2 = gaim_button(_("Show _warning levels"), &blist_options, OPT_BLIST_SHOW_WARN, vbox);
616 if (blist_options & OPT_BLIST_SHOW_ICONS) 634 if (blist_options & OPT_BLIST_SHOW_ICONS)
617 gtk_widget_set_sensitive(GTK_WIDGET(b2), FALSE); 635 gtk_widget_set_sensitive(GTK_WIDGET(b2), FALSE);
618 g_signal_connect(G_OBJECT(button), "clicked", 636 g_signal_connect(G_OBJECT(button), "clicked",
638 656
639 ret = gtk_vbox_new(FALSE, 18); 657 ret = gtk_vbox_new(FALSE, 18);
640 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); 658 gtk_container_set_border_width(GTK_CONTAINER(ret), 12);
641 659
642 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 660 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
643 vbox = make_frame(ret, _("Conversations")); 661 vbox = gaim_gtk_make_frame(ret, _("Conversations"));
644 662
645 /* Build a list of names. */ 663 /* Build a list of names. */
646 for (i = 0; i < gaim_conv_placement_get_fnc_count(); i++) { 664 for (i = 0; i < gaim_conv_placement_get_fnc_count(); i++) {
647 names = g_list_append(names, (char *)gaim_conv_placement_get_name(i)); 665 names = g_list_append(names, (char *)gaim_conv_placement_get_name(i));
648 names = g_list_append(names, GINT_TO_POINTER(i)); 666 names = g_list_append(names, GINT_TO_POINTER(i));
673 ret = gtk_vbox_new(FALSE, 18); 691 ret = gtk_vbox_new(FALSE, 18);
674 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 692 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
675 693
676 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 694 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
677 695
678 vbox = make_frame (ret, _("Window")); 696 vbox = gaim_gtk_make_frame (ret, _("Window"));
679 widge = gaim_dropdown(vbox, _("Show _buttons as:"), &im_options, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM, 697 widge = gaim_dropdown(vbox, _("Show _buttons as:"), &im_options, OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM,
680 _("Pictures"), OPT_IM_BUTTON_XPM, 698 _("Pictures"), OPT_IM_BUTTON_XPM,
681 _("Text"), OPT_IM_BUTTON_TEXT, 699 _("Text"), OPT_IM_BUTTON_TEXT,
682 _("Pictures and text"), OPT_IM_BUTTON_XPM | OPT_IM_BUTTON_TEXT, NULL); 700 _("Pictures and text"), OPT_IM_BUTTON_XPM | OPT_IM_BUTTON_TEXT, NULL);
683 gtk_size_group_add_widget(sg, widge); 701 gtk_size_group_add_widget(sg, widge);
687 gaim_labeled_spin_button(vbox, _("_Entry field height:"), &conv_size.entry_height, 25, 9999, sg); 705 gaim_labeled_spin_button(vbox, _("_Entry field height:"), &conv_size.entry_height, 25, 9999, sg);
688 gaim_button(_("_Raise windows on events"), &im_options, OPT_IM_POPUP, vbox); 706 gaim_button(_("_Raise windows on events"), &im_options, OPT_IM_POPUP, vbox);
689 gaim_button(_("Hide window on _send"), &im_options, OPT_IM_POPDOWN, vbox); 707 gaim_button(_("Hide window on _send"), &im_options, OPT_IM_POPDOWN, vbox);
690 gtk_widget_show (vbox); 708 gtk_widget_show (vbox);
691 709
692 vbox = make_frame (ret, _("Buddy Icons")); 710 vbox = gaim_gtk_make_frame (ret, _("Buddy Icons"));
693 gaim_button(_("Hide buddy _icons"), &im_options, OPT_IM_HIDE_ICONS, vbox); 711 gaim_button(_("Hide buddy _icons"), &im_options, OPT_IM_HIDE_ICONS, vbox);
694 gaim_button(_("Disable buddy icon a_nimation"), &im_options, OPT_IM_NO_ANIMATION, vbox); 712 gaim_button(_("Disable buddy icon a_nimation"), &im_options, OPT_IM_NO_ANIMATION, vbox);
695 713
696 vbox = make_frame (ret, _("Display")); 714 vbox = gaim_gtk_make_frame (ret, _("Display"));
697 gaim_button(_("Show _logins in window"), &im_options, OPT_IM_LOGON, vbox); 715 gaim_button(_("Show _logins in window"), &im_options, OPT_IM_LOGON, vbox);
698 gaim_button(_("Show a_liases in tabs/titles"), &im_options, OPT_IM_ALIAS_TAB, vbox); 716 gaim_button(_("Show a_liases in tabs/titles"), &im_options, OPT_IM_ALIAS_TAB, vbox);
699 717
700 vbox = make_frame (ret, _("Typing Notification")); 718 vbox = gaim_gtk_make_frame (ret, _("Typing Notification"));
701 typingbutton = gaim_button(_("Notify buddies that you are _typing to them"), &misc_options, 719 typingbutton = gaim_button(_("Notify buddies that you are _typing to them"), &misc_options,
702 OPT_MISC_STEALTH_TYPING, vbox); 720 OPT_MISC_STEALTH_TYPING, vbox);
703 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton))); 721 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(typingbutton), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(typingbutton)));
704 misc_options ^= OPT_MISC_STEALTH_TYPING; 722 misc_options ^= OPT_MISC_STEALTH_TYPING;
705 723
716 ret = gtk_vbox_new(FALSE, 18); 734 ret = gtk_vbox_new(FALSE, 18);
717 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 735 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
718 736
719 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); 737 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
720 738
721 vbox = make_frame (ret, _("Window")); 739 vbox = gaim_gtk_make_frame (ret, _("Window"));
722 dd = gaim_dropdown(vbox, _("Show _buttons as:"), &chat_options, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM, 740 dd = gaim_dropdown(vbox, _("Show _buttons as:"), &chat_options, OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM,
723 _("Pictures"), OPT_CHAT_BUTTON_XPM, 741 _("Pictures"), OPT_CHAT_BUTTON_XPM,
724 _("Text"), OPT_CHAT_BUTTON_TEXT, 742 _("Text"), OPT_CHAT_BUTTON_TEXT,
725 _("Pictures and text"), OPT_CHAT_BUTTON_XPM | OPT_CHAT_BUTTON_TEXT, NULL); 743 _("Pictures and text"), OPT_CHAT_BUTTON_XPM | OPT_CHAT_BUTTON_TEXT, NULL);
726 gtk_size_group_add_widget(sg, dd); 744 gtk_size_group_add_widget(sg, dd);
728 gaim_labeled_spin_button(vbox, _("New window _width:"), &buddy_chat_size.width, 25, 9999, sg); 746 gaim_labeled_spin_button(vbox, _("New window _width:"), &buddy_chat_size.width, 25, 9999, sg);
729 gaim_labeled_spin_button(vbox, _("New window _height:"), &buddy_chat_size.height, 25, 9999, sg); 747 gaim_labeled_spin_button(vbox, _("New window _height:"), &buddy_chat_size.height, 25, 9999, sg);
730 gaim_labeled_spin_button(vbox, _("_Entry field height:"), &buddy_chat_size.entry_height, 25, 9999, sg); 748 gaim_labeled_spin_button(vbox, _("_Entry field height:"), &buddy_chat_size.entry_height, 25, 9999, sg);
731 gaim_button(_("_Raise windows on events"), &chat_options, OPT_CHAT_POPUP, vbox); 749 gaim_button(_("_Raise windows on events"), &chat_options, OPT_CHAT_POPUP, vbox);
732 750
733 vbox = make_frame (ret, _("Tab Completion")); 751 vbox = gaim_gtk_make_frame (ret, _("Tab Completion"));
734 gaim_button(_("_Tab-complete nicks"), &chat_options, OPT_CHAT_TAB_COMPLETE, vbox); 752 gaim_button(_("_Tab-complete nicks"), &chat_options, OPT_CHAT_TAB_COMPLETE, vbox);
735 gaim_button(_("_Old-style tab completion"), &chat_options, OPT_CHAT_OLD_STYLE_TAB, vbox); 753 gaim_button(_("_Old-style tab completion"), &chat_options, OPT_CHAT_OLD_STYLE_TAB, vbox);
736 754
737 vbox = make_frame (ret, _("Display")); 755 vbox = gaim_gtk_make_frame (ret, _("Display"));
738 gaim_button(_("_Show people joining/leaving in window"), &chat_options, OPT_CHAT_LOGON, vbox); 756 gaim_button(_("_Show people joining/leaving in window"), &chat_options, OPT_CHAT_LOGON, vbox);
739 gaim_button(_("Co_lorize screennames"), &chat_options, OPT_CHAT_COLORIZE, vbox); 757 gaim_button(_("Co_lorize screennames"), &chat_options, OPT_CHAT_COLORIZE, vbox);
740 758
741 gtk_widget_show_all(ret); 759 gtk_widget_show_all(ret);
742 return ret; 760 return ret;
751 ret = gtk_vbox_new(FALSE, 18); 769 ret = gtk_vbox_new(FALSE, 18);
752 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 770 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
753 771
754 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 772 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
755 773
756 vbox = make_frame (ret, _("IM Tabs")); 774 vbox = gaim_gtk_make_frame (ret, _("IM Tabs"));
757 dd = gaim_dropdown(vbox, _("Tab _placement:"), &im_options, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB, 775 dd = gaim_dropdown(vbox, _("Tab _placement:"), &im_options, OPT_IM_SIDE_TAB | OPT_IM_BR_TAB,
758 _("Top"), 0, 776 _("Top"), 0,
759 _("Bottom"), OPT_IM_BR_TAB, 777 _("Bottom"), OPT_IM_BR_TAB,
760 _("Left"), OPT_IM_SIDE_TAB, 778 _("Left"), OPT_IM_SIDE_TAB,
761 _("Right"), OPT_IM_BR_TAB | OPT_IM_SIDE_TAB, NULL); 779 _("Right"), OPT_IM_BR_TAB | OPT_IM_SIDE_TAB, NULL);
762 gtk_size_group_add_widget(sg, dd); 780 gtk_size_group_add_widget(sg, dd);
763 gaim_button(_("Show all _instant messages in one tabbed\nwindow"), &im_options, OPT_IM_ONE_WINDOW, vbox); 781 gaim_button(_("Show all _instant messages in one tabbed\nwindow"), &im_options, OPT_IM_ONE_WINDOW, vbox);
764 782
765 783
766 vbox = make_frame (ret, _("Chat Tabs")); 784 vbox = gaim_gtk_make_frame (ret, _("Chat Tabs"));
767 dd = gaim_dropdown(vbox, _("Tab _placement:"), &chat_options, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, 785 dd = gaim_dropdown(vbox, _("Tab _placement:"), &chat_options, OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB,
768 _("Top"), 0, 786 _("Top"), 0,
769 _("Bottom"), OPT_CHAT_BR_TAB, 787 _("Bottom"), OPT_CHAT_BR_TAB,
770 _("Left"), OPT_CHAT_SIDE_TAB, 788 _("Left"), OPT_CHAT_SIDE_TAB,
771 _("Right"), OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, NULL); 789 _("Right"), OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB, NULL);
772 gtk_size_group_add_widget(sg, dd); 790 gtk_size_group_add_widget(sg, dd);
773 gaim_button(_("Show all c_hats in one tabbed window"), &chat_options, OPT_CHAT_ONE_WINDOW, 791 gaim_button(_("Show all c_hats in one tabbed window"), &chat_options, OPT_CHAT_ONE_WINDOW,
774 vbox); 792 vbox);
775 793
776 vbox = make_frame (ret, _("Tab Options")); 794 vbox = gaim_gtk_make_frame (ret, _("Tab Options"));
777 button = gaim_button(_("Show _close button on tabs."), &convo_options, OPT_CONVO_NO_X_ON_TAB, vbox); 795 button = gaim_button(_("Show _close button on tabs."), &convo_options, OPT_CONVO_NO_X_ON_TAB, vbox);
778 convo_options ^= OPT_CONVO_NO_X_ON_TAB; 796 convo_options ^= OPT_CONVO_NO_X_ON_TAB;
779 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button))); 797 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)));
780 798
781 799
792 GtkWidget *table; 810 GtkWidget *table;
793 811
794 ret = gtk_vbox_new(FALSE, 18); 812 ret = gtk_vbox_new(FALSE, 18);
795 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 813 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
796 814
797 vbox = make_frame (ret, _("Proxy Type")); 815 vbox = gaim_gtk_make_frame (ret, _("Proxy Type"));
798 gaim_dropdown(vbox, _("Proxy _type:"), (int*)&global_proxy_info.proxytype, -1, 816 gaim_dropdown(vbox, _("Proxy _type:"), (int*)&global_proxy_info.proxytype, -1,
799 _("No proxy"), PROXY_NONE, 817 _("No proxy"), PROXY_NONE,
800 "SOCKS 4", PROXY_SOCKS4, 818 "SOCKS 4", PROXY_SOCKS4,
801 "SOCKS 5", PROXY_SOCKS5, 819 "SOCKS 5", PROXY_SOCKS5,
802 "HTTP", PROXY_HTTP, NULL); 820 "HTTP", PROXY_HTTP, NULL);
803 821
804 vbox = make_frame(ret, _("Proxy Server")); 822 vbox = gaim_gtk_make_frame(ret, _("Proxy Server"));
805 prefs_proxy_frame = vbox; 823 prefs_proxy_frame = vbox;
806 824
807 if (global_proxy_info.proxytype == PROXY_NONE) 825 if (global_proxy_info.proxytype == PROXY_NONE)
808 gtk_widget_set_sensitive(GTK_WIDGET(vbox), FALSE); 826 gtk_widget_set_sensitive(GTK_WIDGET(vbox), FALSE);
809 827
934 952
935 ret = gtk_vbox_new(FALSE, 18); 953 ret = gtk_vbox_new(FALSE, 18);
936 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 954 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
937 955
938 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 956 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
939 vbox = make_frame (ret, _("Browser Selection")); 957 vbox = gaim_gtk_make_frame (ret, _("Browser Selection"));
940 958
941 browsers = get_available_browsers(); 959 browsers = get_available_browsers();
942 if (browsers != NULL) { 960 if (browsers != NULL) {
943 label = gaim_dropdown_from_list(vbox,_("_Browser"), &web_browser, -1, 961 label = gaim_dropdown_from_list(vbox,_("_Browser"), &web_browser, -1,
944 browsers); 962 browsers);
961 979
962 gtk_entry_set_text(GTK_ENTRY(browser_entry), web_command); 980 gtk_entry_set_text(GTK_ENTRY(browser_entry), web_command);
963 g_signal_connect(G_OBJECT(browser_entry), "focus-out-event", G_CALLBACK(manual_browser_set), NULL); 981 g_signal_connect(G_OBJECT(browser_entry), "focus-out-event", G_CALLBACK(manual_browser_set), NULL);
964 982
965 if (browsers != NULL) { 983 if (browsers != NULL) {
966 vbox = make_frame (ret, _("Browser Options")); 984 vbox = gaim_gtk_make_frame (ret, _("Browser Options"));
967 label = gaim_button(_("Open new _window by default"), &misc_options, OPT_MISC_BROWSER_POPUP, vbox); 985 label = gaim_button(_("Open new _window by default"), &misc_options, OPT_MISC_BROWSER_POPUP, vbox);
968 } 986 }
969 987
970 gtk_widget_show_all(ret); 988 gtk_widget_show_all(ret);
971 return ret; 989 return ret;
976 GtkWidget *ret; 994 GtkWidget *ret;
977 GtkWidget *vbox; 995 GtkWidget *vbox;
978 ret = gtk_vbox_new(FALSE, 18); 996 ret = gtk_vbox_new(FALSE, 18);
979 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 997 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
980 998
981 vbox = make_frame (ret, _("Message Logs")); 999 vbox = gaim_gtk_make_frame (ret, _("Message Logs"));
982 gaim_button(_("_Log all instant messages"), &logging_options, OPT_LOG_CONVOS, vbox); 1000 gaim_button(_("_Log all instant messages"), &logging_options, OPT_LOG_CONVOS, vbox);
983 gaim_button(_("Log all c_hats"), &logging_options, OPT_LOG_CHATS, vbox); 1001 gaim_button(_("Log all c_hats"), &logging_options, OPT_LOG_CHATS, vbox);
984 gaim_button(_("Strip _HTML from logs"), &logging_options, OPT_LOG_STRIP_HTML, vbox); 1002 gaim_button(_("Strip _HTML from logs"), &logging_options, OPT_LOG_STRIP_HTML, vbox);
985 1003
986 vbox = make_frame (ret, _("System Logs")); 1004 vbox = gaim_gtk_make_frame (ret, _("System Logs"));
987 gaim_button(_("Log when buddies _sign on/sign off"), &logging_options, OPT_LOG_BUDDY_SIGNON, 1005 gaim_button(_("Log when buddies _sign on/sign off"), &logging_options, OPT_LOG_BUDDY_SIGNON,
988 vbox); 1006 vbox);
989 gaim_button(_("Log when buddies become _idle/un-idle"), &logging_options, OPT_LOG_BUDDY_IDLE, 1007 gaim_button(_("Log when buddies become _idle/un-idle"), &logging_options, OPT_LOG_BUDDY_IDLE,
990 vbox); 1008 vbox);
991 gaim_button(_("Log when buddies go away/come _back"), &logging_options, OPT_LOG_BUDDY_AWAY, vbox); 1009 gaim_button(_("Log when buddies go away/come _back"), &logging_options, OPT_LOG_BUDDY_AWAY, vbox);
1022 ret = gtk_vbox_new(FALSE, 18); 1040 ret = gtk_vbox_new(FALSE, 18);
1023 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 1041 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
1024 1042
1025 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 1043 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
1026 1044
1027 vbox = make_frame (ret, _("Sound Options")); 1045 vbox = gaim_gtk_make_frame (ret, _("Sound Options"));
1028 gaim_button(_("_No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, vbox); 1046 gaim_button(_("_No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, vbox);
1029 gaim_button(_("_Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox); 1047 gaim_button(_("_Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox);
1030 1048
1031 #ifndef _WIN32 1049 #ifndef _WIN32
1032 vbox = make_frame (ret, _("Sound Method")); 1050 vbox = gaim_gtk_make_frame (ret, _("Sound Method"));
1033 dd = gaim_dropdown(vbox, _("_Method"), &sound_options, OPT_SOUND_BEEP | 1051 dd = gaim_dropdown(vbox, _("_Method"), &sound_options, OPT_SOUND_BEEP |
1034 OPT_SOUND_ESD | OPT_SOUND_ARTS | OPT_SOUND_NAS | 1052 OPT_SOUND_ESD | OPT_SOUND_ARTS | OPT_SOUND_NAS |
1035 OPT_SOUND_NORMAL | OPT_SOUND_CMD, 1053 OPT_SOUND_NORMAL | OPT_SOUND_CMD,
1036 _("Console beep"), OPT_SOUND_BEEP, 1054 _("Console beep"), OPT_SOUND_BEEP,
1037 #ifdef USE_AO 1055 #ifdef USE_AO
1087 ret = gtk_vbox_new(FALSE, 18); 1105 ret = gtk_vbox_new(FALSE, 18);
1088 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); 1106 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
1089 1107
1090 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 1108 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
1091 1109
1092 vbox = make_frame (ret, _("Away")); 1110 vbox = gaim_gtk_make_frame (ret, _("Away"));
1093 gaim_button(_("_Sending messages removes away status"), &away_options, OPT_AWAY_BACK_ON_IM, vbox); 1111 gaim_button(_("_Sending messages removes away status"), &away_options, OPT_AWAY_BACK_ON_IM, vbox);
1094 gaim_button(_("_Queue new messages when away"), &away_options, OPT_AWAY_QUEUE, vbox); 1112 gaim_button(_("_Queue new messages when away"), &away_options, OPT_AWAY_QUEUE, vbox);
1095 1113
1096 vbox = make_frame (ret, _("Auto-response")); 1114 vbox = gaim_gtk_make_frame (ret, _("Auto-response"));
1097 hbox = gtk_hbox_new(FALSE, 0); 1115 hbox = gtk_hbox_new(FALSE, 0);
1098 gtk_container_add(GTK_CONTAINER(vbox), hbox); 1116 gtk_container_add(GTK_CONTAINER(vbox), hbox);
1099 gaim_labeled_spin_button(hbox, _("Seconds before _resending:"), 1117 gaim_labeled_spin_button(hbox, _("Seconds before _resending:"),
1100 &away_resend, 1, 24 * 60 * 60, sg); 1118 &away_resend, 1, 24 * 60 * 60, sg);
1101 gaim_button(_("_Don't send auto-response"), &away_options, OPT_AWAY_NO_AUTO_RESP, vbox); 1119 gaim_button(_("_Don't send auto-response"), &away_options, OPT_AWAY_NO_AUTO_RESP, vbox);
1103 gaim_button(_("Do_n't send auto-response in active conversations"), &away_options, OPT_AWAY_DELAY_IN_USE, vbox); 1121 gaim_button(_("Do_n't send auto-response in active conversations"), &away_options, OPT_AWAY_DELAY_IN_USE, vbox);
1104 1122
1105 if (away_options & OPT_AWAY_NO_AUTO_RESP) 1123 if (away_options & OPT_AWAY_NO_AUTO_RESP)
1106 gtk_widget_set_sensitive(hbox, FALSE); 1124 gtk_widget_set_sensitive(hbox, FALSE);
1107 1125
1108 vbox = make_frame (ret, _("Idle")); 1126 vbox = gaim_gtk_make_frame (ret, _("Idle"));
1109 dd = gaim_dropdown(vbox, _("Idle _time reporting:"), &report_idle, -1, 1127 dd = gaim_dropdown(vbox, _("Idle _time reporting:"), &report_idle, -1,
1110 _("None"), IDLE_NONE, 1128 _("None"), IDLE_NONE,
1111 _("Gaim usage"), IDLE_GAIM, 1129 _("Gaim usage"), IDLE_GAIM,
1112 #ifdef USE_SCREENSAVER 1130 #ifdef USE_SCREENSAVER
1113 #ifndef _WIN32 1131 #ifndef _WIN32
1118 #endif 1136 #endif
1119 NULL); 1137 NULL);
1120 gtk_size_group_add_widget(sg, dd); 1138 gtk_size_group_add_widget(sg, dd);
1121 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); 1139 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0);
1122 1140
1123 vbox = make_frame (ret, _("Auto-away")); 1141 vbox = gaim_gtk_make_frame (ret, _("Auto-away"));
1124 button = gaim_button(_("Set away _when idle"), &away_options, OPT_AWAY_AUTO, vbox); 1142 button = gaim_button(_("Set away _when idle"), &away_options, OPT_AWAY_AUTO, vbox);
1125 select = gaim_labeled_spin_button(vbox, _("_Minutes before setting away:"), &auto_away, 1, 24 * 60, sg); 1143 select = gaim_labeled_spin_button(vbox, _("_Minutes before setting away:"), &auto_away, 1, 24 * 60, sg);
1126 if (!(away_options & OPT_AWAY_AUTO)) 1144 if (!(away_options & OPT_AWAY_AUTO))
1127 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); 1145 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE);
1128 g_signal_connect(G_OBJECT(button), "clicked", 1146 g_signal_connect(G_OBJECT(button), "clicked",
1845 } 1863 }
1846 } 1864 }
1847 } 1865 }
1848 } 1866 }
1849 1867
1850 void show_prefs() 1868 void gaim_gtk_prefs_show(void)
1851 { 1869 {
1852 GtkWidget *vbox, *vbox2; 1870 GtkWidget *vbox, *vbox2;
1853 GtkWidget *hbox; 1871 GtkWidget *hbox;
1854 GtkWidget *frame; 1872 GtkWidget *frame;
1855 GtkTreeViewColumn *column; 1873 GtkTreeViewColumn *column;
1967 1985
1968 prefs_notebook_init(); 1986 prefs_notebook_init();
1969 1987
1970 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); 1988 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v));
1971 gtk_widget_show(prefs); 1989 gtk_widget_show(prefs);
1972 }
1973
1974 void set_option(GtkWidget *w, int *option)
1975 {
1976 *option = !(*option);
1977 } 1990 }
1978 1991
1979 static void set_misc_option(GtkWidget *w, int option) 1992 static void set_misc_option(GtkWidget *w, int option)
1980 { 1993 {
1981 misc_options ^= option; 1994 misc_options ^= option;
2190 &bgcolor); 2203 &bgcolor);
2191 destroy_colorsel(NULL, (void *)0); 2204 destroy_colorsel(NULL, (void *)0);
2192 update_color(NULL, pref_bg_picture); 2205 update_color(NULL, pref_bg_picture);
2193 } 2206 }
2194 gaim_conversation_foreach(gaim_gtkconv_update_font_colors); 2207 gaim_conversation_foreach(gaim_gtkconv_update_font_colors);
2195 }
2196
2197 void update_color(GtkWidget *w, GtkWidget *pic)
2198 {
2199 GdkColor c;
2200 GtkStyle *style;
2201 c.pixel = 0;
2202
2203 if (pic == pref_fg_picture) {
2204 if (font_options & OPT_FONT_FGCOL) {
2205 c.red = fgcolor.red;
2206 c.blue = fgcolor.blue;
2207 c.green = fgcolor.green;
2208 } else {
2209 c.red = 0;
2210 c.blue = 0;
2211 c.green = 0;
2212 }
2213 } else {
2214 if (font_options & OPT_FONT_BGCOL) {
2215 c.red = bgcolor.red;
2216 c.blue = bgcolor.blue;
2217 c.green = bgcolor.green;
2218 } else {
2219 c.red = 0xffff;
2220 c.blue = 0xffff;
2221 c.green = 0xffff;
2222 }
2223 }
2224
2225 style = gtk_style_new();
2226 style->bg[0] = c;
2227 gtk_widget_set_style(pic, style);
2228 g_object_unref(style);
2229 } 2208 }
2230 2209
2231 void set_default_away(GtkWidget *w, gpointer i) 2210 void set_default_away(GtkWidget *w, gpointer i)
2232 { 2211 {
2233 2212
2509 g_free(fontname); 2488 g_free(fontname);
2510 2489
2511 gaim_conversation_foreach(gaim_gtkconv_update_font_face); 2490 gaim_conversation_foreach(gaim_gtkconv_update_font_face);
2512 } 2491 }
2513 2492
2493 void
2494 gaim_gtk_prefs_init(void)
2495 {
2496 gaim_prefs_add_none("/gaim");
2497 gaim_prefs_add_none("/gaim/gtk");
2498
2499 /* Debug window preferences. */
2500 gaim_prefs_add_none("/gaim/gtk/debug");
2501 gaim_prefs_add_bool("/gaim/gtk/debug/toolbar", TRUE);
2502 gaim_prefs_add_bool("/gaim/gtk/debug/timestamps", FALSE);
2503 gaim_prefs_add_bool("/gaim/gtk/debug/enabled", FALSE);
2504 gaim_prefs_add_int("/gaim/gtk/debug/width", 400);
2505 gaim_prefs_add_int("/gaim/gtk/debug/height", 150);
2506 }
2507