Mercurial > pidgin
comparison src/gtkprefs.c @ 7987:fc6b362f9c26
[gaim-migrate @ 8664]
namespaces are cool...hopefully I didn't screw this up
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 04 Jan 2004 05:14:39 +0000 |
parents | 8e5a21b1efa6 |
children | 5f86d21b6232 |
comparison
equal
deleted
inserted
replaced
7986:802e341aa8c7 | 7987:fc6b362f9c26 |
---|---|
100 | 100 |
101 gaim_prefs_set_int(key, value); | 101 gaim_prefs_set_int(key, value); |
102 } | 102 } |
103 | 103 |
104 GtkWidget * | 104 GtkWidget * |
105 prefs_labeled_spin_button(GtkWidget *box, const gchar *title, char *key, | 105 gaim_gtk_prefs_labeled_spin_button(GtkWidget *box, const gchar *title, |
106 int min, int max, GtkSizeGroup *sg) | 106 char *key, int min, int max, GtkSizeGroup *sg) |
107 { | 107 { |
108 GtkWidget *hbox; | 108 GtkWidget *hbox; |
109 GtkWidget *label; | 109 GtkWidget *label; |
110 GtkWidget *spin; | 110 GtkWidget *spin; |
111 GtkObject *adjust; | 111 GtkObject *adjust; |
170 gaim_prefs_set_bool(bool_key, TRUE); | 170 gaim_prefs_set_bool(bool_key, TRUE); |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 GtkWidget * | 174 GtkWidget * |
175 prefs_dropdown_from_list(GtkWidget *box, const gchar *title, GaimPrefType type, | 175 gaim_gtk_prefs_dropdown_from_list(GtkWidget *box, const gchar *title, |
176 const char *key, GList *menuitems) | 176 GaimPrefType type, const char *key, GList *menuitems) |
177 { | 177 { |
178 GtkWidget *dropdown, *opt, *menu; | 178 GtkWidget *dropdown, *opt, *menu; |
179 GtkWidget *label; | 179 GtkWidget *label; |
180 GtkWidget *hbox; | 180 GtkWidget *hbox; |
181 gchar *text; | 181 gchar *text; |
255 | 255 |
256 return label; | 256 return label; |
257 } | 257 } |
258 | 258 |
259 GtkWidget * | 259 GtkWidget * |
260 prefs_dropdown(GtkWidget *box, const gchar *title, GaimPrefType type, | 260 gaim_gtk_prefs_dropdown(GtkWidget *box, const gchar *title, GaimPrefType type, |
261 const char *key, ...) | 261 const char *key, ...) |
262 { | 262 { |
263 va_list ap; | 263 va_list ap; |
264 GList *menuitems = NULL; | 264 GList *menuitems = NULL; |
265 GtkWidget *dropdown = NULL; | 265 GtkWidget *dropdown = NULL; |
285 | 285 |
286 g_return_val_if_fail(menuitems != NULL, NULL); | 286 g_return_val_if_fail(menuitems != NULL, NULL); |
287 | 287 |
288 menuitems = g_list_reverse(menuitems); | 288 menuitems = g_list_reverse(menuitems); |
289 | 289 |
290 dropdown = prefs_dropdown_from_list(box, title, type, key, menuitems); | 290 dropdown = gaim_gtk_prefs_dropdown_from_list(box, title, type, key, |
291 menuitems); | |
291 | 292 |
292 g_list_free(menuitems); | 293 g_list_free(menuitems); |
293 | 294 |
294 return dropdown; | 295 return dropdown; |
295 } | 296 } |
361 ret = gtk_vbox_new(FALSE, 18); | 362 ret = gtk_vbox_new(FALSE, 18); |
362 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 363 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
363 | 364 |
364 vbox = gaim_gtk_make_frame(ret, _("Interface Options")); | 365 vbox = gaim_gtk_make_frame(ret, _("Interface Options")); |
365 | 366 |
366 prefs_checkbox(_("D_isplay remote nicknames if no alias is set"), | 367 gaim_gtk_prefs_checkbox(_("D_isplay remote nicknames if no alias is set"), |
367 "/core/buddies/use_server_alias", vbox); | 368 "/core/buddies/use_server_alias", vbox); |
368 | 369 |
369 | 370 |
370 gtk_widget_show_all(ret); | 371 gtk_widget_show_all(ret); |
371 return ret; | 372 return ret; |
372 } | 373 } |
657 | 658 |
658 ret = gtk_vbox_new(FALSE, 18); | 659 ret = gtk_vbox_new(FALSE, 18); |
659 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 660 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
660 | 661 |
661 vbox = gaim_gtk_make_frame(ret, _("Style")); | 662 vbox = gaim_gtk_make_frame(ret, _("Style")); |
662 prefs_checkbox(_("_Bold"), | 663 gaim_gtk_prefs_checkbox(_("_Bold"), |
663 "/gaim/gtk/conversations/send_bold", vbox); | 664 "/gaim/gtk/conversations/send_bold", vbox); |
664 prefs_checkbox(_("_Italics"), | 665 gaim_gtk_prefs_checkbox(_("_Italics"), |
665 "/gaim/gtk/conversations/send_italic", vbox); | 666 "/gaim/gtk/conversations/send_italic", vbox); |
666 prefs_checkbox(_("_Underline"), | 667 gaim_gtk_prefs_checkbox(_("_Underline"), |
667 "/gaim/gtk/conversations/send_underline", vbox); | 668 "/gaim/gtk/conversations/send_underline", vbox); |
668 prefs_checkbox(_("_Strikethrough"), | 669 gaim_gtk_prefs_checkbox(_("_Strikethrough"), |
669 "/gaim/gtk/conversations/send_strikethrough", vbox); | 670 "/gaim/gtk/conversations/send_strikethrough", vbox); |
670 | 671 |
671 vbox = gaim_gtk_make_frame(ret, _("Face")); | 672 vbox = gaim_gtk_make_frame(ret, _("Face")); |
672 hbox = gtk_hbox_new(FALSE, 6); | 673 hbox = gtk_hbox_new(FALSE, 6); |
673 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 674 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
674 button = prefs_checkbox(_("Use custo_m face"), | 675 button = gaim_gtk_prefs_checkbox(_("Use custo_m face"), |
675 "/gaim/gtk/conversations/use_custom_font", hbox); | 676 "/gaim/gtk/conversations/use_custom_font", hbox); |
676 gtk_size_group_add_widget(sg, button); | 677 gtk_size_group_add_widget(sg, button); |
677 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); | 678 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); |
678 | 679 |
679 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_font")) | 680 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_font")) |
680 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 681 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
686 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | 687 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
687 | 688 |
688 hbox = gtk_hbox_new(FALSE, 5); | 689 hbox = gtk_hbox_new(FALSE, 5); |
689 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 690 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
690 | 691 |
691 button = prefs_checkbox(_("Use custom si_ze"), | 692 button = gaim_gtk_prefs_checkbox(_("Use custom si_ze"), |
692 "/gaim/gtk/conversations/use_custom_size", hbox); | 693 "/gaim/gtk/conversations/use_custom_size", hbox); |
693 gtk_size_group_add_widget(sg, button); | 694 gtk_size_group_add_widget(sg, button); |
694 select = prefs_labeled_spin_button(hbox, NULL, | 695 select = gaim_gtk_prefs_labeled_spin_button(hbox, NULL, |
695 "/gaim/gtk/conversations/font_size", | 696 "/gaim/gtk/conversations/font_size", 1, 7, NULL); |
696 1, 7, NULL); | |
697 | 697 |
698 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_size")) | 698 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_size")) |
699 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); | 699 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
700 | 700 |
701 g_signal_connect(G_OBJECT(button), "clicked", | 701 g_signal_connect(G_OBJECT(button), "clicked", |
703 | 703 |
704 vbox = gaim_gtk_make_frame(ret, _("Color")); | 704 vbox = gaim_gtk_make_frame(ret, _("Color")); |
705 hbox = gtk_hbox_new(FALSE, 5); | 705 hbox = gtk_hbox_new(FALSE, 5); |
706 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 706 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
707 | 707 |
708 button = prefs_checkbox(_("_Text color"), | 708 button = gaim_gtk_prefs_checkbox(_("_Text color"), |
709 "/gaim/gtk/conversations/use_custom_fgcolor", hbox); | 709 "/gaim/gtk/conversations/use_custom_fgcolor", hbox); |
710 gtk_size_group_add_widget(sg, button); | 710 gtk_size_group_add_widget(sg, button); |
711 | 711 |
712 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | 712 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); |
713 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | 713 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
714 pref_fg_picture = show_color_pref(hbox, TRUE); | 714 pref_fg_picture = show_color_pref(hbox, TRUE); |
722 G_CALLBACK(gaim_gtk_toggle_sensitive), select); | 722 G_CALLBACK(gaim_gtk_toggle_sensitive), select); |
723 g_signal_connect(G_OBJECT(select), "clicked", G_CALLBACK(show_fgcolor_dialog), NULL); | 723 g_signal_connect(G_OBJECT(select), "clicked", G_CALLBACK(show_fgcolor_dialog), NULL); |
724 hbox = gtk_hbox_new(FALSE, 5); | 724 hbox = gtk_hbox_new(FALSE, 5); |
725 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 725 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
726 | 726 |
727 button = prefs_checkbox(_("Bac_kground color"), | 727 button = gaim_gtk_prefs_checkbox(_("Bac_kground color"), |
728 "/gaim/gtk/conversations/use_custom_bgcolor", hbox); | 728 "/gaim/gtk/conversations/use_custom_bgcolor", hbox); |
729 gtk_size_group_add_widget(sg, button); | 729 gtk_size_group_add_widget(sg, button); |
730 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | 730 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); |
731 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | 731 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
732 pref_bg_picture = show_color_pref(hbox, FALSE); | 732 pref_bg_picture = show_color_pref(hbox, FALSE); |
733 g_signal_connect(G_OBJECT(button), "clicked", | 733 g_signal_connect(G_OBJECT(button), "clicked", |
751 GtkWidget *vbox; | 751 GtkWidget *vbox; |
752 ret = gtk_vbox_new(FALSE, 18); | 752 ret = gtk_vbox_new(FALSE, 18); |
753 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 753 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
754 | 754 |
755 vbox = gaim_gtk_make_frame (ret, _("Display")); | 755 vbox = gaim_gtk_make_frame (ret, _("Display")); |
756 prefs_checkbox(_("Show graphical _smileys"), | 756 gaim_gtk_prefs_checkbox(_("Show graphical _smileys"), |
757 "/gaim/gtk/conversations/show_smileys", vbox); | 757 "/gaim/gtk/conversations/show_smileys", vbox); |
758 prefs_checkbox(_("Show _timestamp on messages"), | 758 gaim_gtk_prefs_checkbox(_("Show _timestamp on messages"), |
759 "/gaim/gtk/conversations/show_timestamps", vbox); | 759 "/gaim/gtk/conversations/show_timestamps", vbox); |
760 prefs_checkbox(_("Show _URLs as links"), | 760 gaim_gtk_prefs_checkbox(_("Show _URLs as links"), |
761 "/gaim/gtk/conversations/show_urls_as_links", vbox); | 761 "/gaim/gtk/conversations/show_urls_as_links", vbox); |
762 | 762 |
763 #ifdef USE_GTKSPELL | 763 #ifdef USE_GTKSPELL |
764 prefs_checkbox(_("_Highlight misspelled words"), | 764 gaim_gtk_prefs_checkbox(_("_Highlight misspelled words"), |
765 "/gaim/gtk/conversations/spellcheck", vbox); | 765 "/gaim/gtk/conversations/spellcheck", vbox); |
766 #endif | 766 #endif |
767 vbox = gaim_gtk_make_frame (ret, _("Ignore")); | 767 vbox = gaim_gtk_make_frame (ret, _("Ignore")); |
768 prefs_checkbox(_("Ignore c_olors"), | 768 gaim_gtk_prefs_checkbox(_("Ignore c_olors"), |
769 "/gaim/gtk/conversations/ignore_colors", vbox); | 769 "/gaim/gtk/conversations/ignore_colors", vbox); |
770 prefs_checkbox(_("Ignore font _faces"), | 770 gaim_gtk_prefs_checkbox(_("Ignore font _faces"), |
771 "/gaim/gtk/conversations/ignore_fonts", vbox); | 771 "/gaim/gtk/conversations/ignore_fonts", vbox); |
772 prefs_checkbox(_("Ignore font si_zes"), | 772 gaim_gtk_prefs_checkbox(_("Ignore font si_zes"), |
773 "/gaim/gtk/conversations/ignore_font_sizes", vbox); | 773 "/gaim/gtk/conversations/ignore_font_sizes", vbox); |
774 | 774 |
775 gtk_widget_show_all(ret); | 775 gtk_widget_show_all(ret); |
776 return ret; | 776 return ret; |
777 } | 777 } |
778 | 778 |
781 GtkWidget *vbox; | 781 GtkWidget *vbox; |
782 ret = gtk_vbox_new(FALSE, 18); | 782 ret = gtk_vbox_new(FALSE, 18); |
783 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 783 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
784 | 784 |
785 vbox = gaim_gtk_make_frame(ret, _("Send Message")); | 785 vbox = gaim_gtk_make_frame(ret, _("Send Message")); |
786 prefs_checkbox(_("Enter _sends message"), | 786 gaim_gtk_prefs_checkbox(_("Enter _sends message"), |
787 "/gaim/gtk/conversations/enter_sends", vbox); | 787 "/gaim/gtk/conversations/enter_sends", vbox); |
788 prefs_checkbox(_("C_ontrol-Enter sends message"), | 788 gaim_gtk_prefs_checkbox(_("C_ontrol-Enter sends message"), |
789 "/gaim/gtk/conversations/ctrl_enter_sends", vbox); | 789 "/gaim/gtk/conversations/ctrl_enter_sends", vbox); |
790 | 790 |
791 vbox = gaim_gtk_make_frame (ret, _("Window Closing")); | 791 vbox = gaim_gtk_make_frame (ret, _("Window Closing")); |
792 prefs_checkbox(_("_Escape closes window"), | 792 gaim_gtk_prefs_checkbox(_("_Escape closes window"), |
793 "/gaim/gtk/conversations/escape_closes", vbox); | 793 "/gaim/gtk/conversations/escape_closes", vbox); |
794 | 794 |
795 vbox = gaim_gtk_make_frame(ret, _("Insertions")); | 795 vbox = gaim_gtk_make_frame(ret, _("Insertions")); |
796 prefs_checkbox(_("Control-{B/I/U} inserts _HTML tags"), | 796 gaim_gtk_prefs_checkbox(_("Control-{B/I/U} inserts _HTML tags"), |
797 "/gaim/gtk/conversations/html_shortcuts", vbox); | 797 "/gaim/gtk/conversations/html_shortcuts", vbox); |
798 prefs_checkbox(_("Control-(number) _inserts smileys"), | 798 gaim_gtk_prefs_checkbox(_("Control-(number) _inserts smileys"), |
799 "/gaim/gtk/conversations/smiley_shortcuts", vbox); | 799 "/gaim/gtk/conversations/smiley_shortcuts", vbox); |
800 | 800 |
801 gtk_widget_show_all(ret); | 801 gtk_widget_show_all(ret); |
802 return ret; | 802 return ret; |
803 } | 803 } |
804 | 804 |
818 | 818 |
819 l = g_list_append(l, method->name); | 819 l = g_list_append(l, method->name); |
820 l = g_list_append(l, method->id); | 820 l = g_list_append(l, method->id); |
821 } | 821 } |
822 | 822 |
823 prefs_dropdown_from_list(vbox, _("Sorting:"), GAIM_PREF_STRING, | 823 gaim_gtk_prefs_dropdown_from_list(vbox, _("Sorting:"), GAIM_PREF_STRING, |
824 "/gaim/gtk/blist/sort_type", l); | 824 "/gaim/gtk/blist/sort_type", l); |
825 | 825 |
826 g_list_free(l); | 826 g_list_free(l); |
827 | 827 |
828 vbox = gaim_gtk_make_frame (ret, _("Buddy List Toolbar")); | 828 vbox = gaim_gtk_make_frame (ret, _("Buddy List Toolbar")); |
829 prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, | 829 gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, |
830 "/gaim/gtk/blist/button_style", | 830 "/gaim/gtk/blist/button_style", |
831 _("Pictures"), GAIM_BUTTON_IMAGE, | 831 _("Pictures"), GAIM_BUTTON_IMAGE, |
832 _("Text"), GAIM_BUTTON_TEXT, | 832 _("Text"), GAIM_BUTTON_TEXT, |
833 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, | 833 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, |
834 _("None"), GAIM_BUTTON_NONE, | 834 _("None"), GAIM_BUTTON_NONE, |
835 NULL); | 835 NULL); |
836 | 836 |
837 vbox = gaim_gtk_make_frame (ret, _("Buddy List Window")); | 837 vbox = gaim_gtk_make_frame (ret, _("Buddy List Window")); |
838 prefs_checkbox(_("_Raise window on events"), | 838 gaim_gtk_prefs_checkbox(_("_Raise window on events"), |
839 "/gaim/gtk/blist/raise_on_events", vbox); | 839 "/gaim/gtk/blist/raise_on_events", vbox); |
840 | 840 |
841 vbox = gaim_gtk_make_frame (ret, _("Group Display")); | 841 vbox = gaim_gtk_make_frame (ret, _("Group Display")); |
842 prefs_checkbox(_("Show _numbers in groups"), | 842 gaim_gtk_prefs_checkbox(_("Show _numbers in groups"), |
843 "/gaim/gtk/blist/show_group_count", vbox); | 843 "/gaim/gtk/blist/show_group_count", vbox); |
844 | 844 |
845 vbox = gaim_gtk_make_frame (ret, _("Buddy Display")); | 845 vbox = gaim_gtk_make_frame (ret, _("Buddy Display")); |
846 prefs_checkbox(_("Show buddy _icons"), | 846 gaim_gtk_prefs_checkbox(_("Show buddy _icons"), |
847 "/gaim/gtk/blist/show_buddy_icons", vbox); | 847 "/gaim/gtk/blist/show_buddy_icons", vbox); |
848 prefs_checkbox(_("Show _warning levels"), | 848 gaim_gtk_prefs_checkbox(_("Show _warning levels"), |
849 "/gaim/gtk/blist/show_warning_level", vbox); | 849 "/gaim/gtk/blist/show_warning_level", vbox); |
850 prefs_checkbox(_("Show idle _times"), | 850 gaim_gtk_prefs_checkbox(_("Show idle _times"), |
851 "/gaim/gtk/blist/show_idle_time", vbox); | 851 "/gaim/gtk/blist/show_idle_time", vbox); |
852 prefs_checkbox(_("Dim i_dle buddies"), | 852 gaim_gtk_prefs_checkbox(_("Dim i_dle buddies"), |
853 "/gaim/gtk/blist/grey_idle_buddies", vbox); | 853 "/gaim/gtk/blist/grey_idle_buddies", vbox); |
854 prefs_checkbox(_("_Automatically expand contacts"), | 854 gaim_gtk_prefs_checkbox(_("_Automatically expand contacts"), |
855 "/gaim/gtk/blist/auto_expand_contacts", vbox); | 855 "/gaim/gtk/blist/auto_expand_contacts", vbox); |
856 | 856 |
857 gtk_widget_show_all(ret); | 857 gtk_widget_show_all(ret); |
858 | 858 |
859 return ret; | 859 return ret; |
874 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 874 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
875 vbox = gaim_gtk_make_frame(ret, _("Conversations")); | 875 vbox = gaim_gtk_make_frame(ret, _("Conversations")); |
876 | 876 |
877 names = gaim_conv_placement_get_options(); | 877 names = gaim_conv_placement_get_options(); |
878 | 878 |
879 label = prefs_dropdown_from_list(vbox, _("_Placement:"), | 879 label = gaim_gtk_prefs_dropdown_from_list(vbox, _("_Placement:"), |
880 GAIM_PREF_STRING, "/gaim/gtk/conversations/placement", names); | 880 GAIM_PREF_STRING, "/gaim/gtk/conversations/placement", names); |
881 g_list_free(names); | 881 g_list_free(names); |
882 | 882 |
883 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 883 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
884 gtk_size_group_add_widget(sg, label); | 884 gtk_size_group_add_widget(sg, label); |
885 | 885 |
886 prefs_checkbox(_("Send _URLs as Links"), | 886 gaim_gtk_prefs_checkbox(_("Send _URLs as Links"), |
887 "/core/conversations/send_urls_as_links", vbox); | 887 "/core/conversations/send_urls_as_links", vbox); |
888 | 888 |
889 prefs_checkbox(_("Show Formatting Toolbar"), | 889 gaim_gtk_prefs_checkbox(_("Show Formatting Toolbar"), |
890 "/gaim/gtk/conversations/show_formatting_toolbar", vbox); | 890 "/gaim/gtk/conversations/show_formatting_toolbar", vbox); |
891 | 891 |
892 vbox = gaim_gtk_make_frame (ret, _("Tab Options")); | 892 vbox = gaim_gtk_make_frame (ret, _("Tab Options")); |
893 | 893 |
894 label = prefs_dropdown(vbox, _("_Tab Placement:"), GAIM_PREF_INT, | 894 label = gaim_gtk_prefs_dropdown(vbox, _("_Tab Placement:"), GAIM_PREF_INT, |
895 "/gaim/gtk/conversations/tab_side", | 895 "/gaim/gtk/conversations/tab_side", |
896 _("Top"), GTK_POS_TOP, | 896 _("Top"), GTK_POS_TOP, |
897 _("Bottom"), GTK_POS_BOTTOM, | 897 _("Bottom"), GTK_POS_BOTTOM, |
898 _("Left"), GTK_POS_LEFT, | 898 _("Left"), GTK_POS_LEFT, |
899 _("Right"), GTK_POS_RIGHT, | 899 _("Right"), GTK_POS_RIGHT, |
900 NULL); | 900 NULL); |
901 | 901 |
902 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 902 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
903 gtk_size_group_add_widget(sg, label); | 903 gtk_size_group_add_widget(sg, label); |
904 | 904 |
905 tabs_checkbox = prefs_checkbox(_("Show IMs and chats in _tabbed windows"), | 905 tabs_checkbox = gaim_gtk_prefs_checkbox(_("Show IMs and chats in _tabbed windows"), |
906 "/gaim/gtk/conversations/tabs", vbox); | 906 "/gaim/gtk/conversations/tabs", vbox); |
907 | 907 |
908 same_checkbox = prefs_checkbox(_("Show IMs and chats in _same tabbed window"), | 908 same_checkbox = gaim_gtk_prefs_checkbox(_("Show IMs and chats in _same tabbed window"), |
909 "/core/conversations/combine_chat_im", vbox); | 909 "/core/conversations/combine_chat_im", vbox); |
910 | 910 |
911 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { | 911 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { |
912 gtk_widget_set_sensitive(GTK_WIDGET(same_checkbox), FALSE); | 912 gtk_widget_set_sensitive(GTK_WIDGET(same_checkbox), FALSE); |
913 } | 913 } |
914 | 914 |
915 g_signal_connect(G_OBJECT(tabs_checkbox), "clicked", | 915 g_signal_connect(G_OBJECT(tabs_checkbox), "clicked", |
916 G_CALLBACK(gaim_gtk_toggle_sensitive), same_checkbox); | 916 G_CALLBACK(gaim_gtk_toggle_sensitive), same_checkbox); |
917 | 917 |
918 close_checkbox = prefs_checkbox(_("Show _close button on tabs"), | 918 close_checkbox = gaim_gtk_prefs_checkbox(_("Show _close button on tabs"), |
919 "/gaim/gtk/conversations/close_on_tabs", | 919 "/gaim/gtk/conversations/close_on_tabs", |
920 vbox); | 920 vbox); |
921 | 921 |
922 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { | 922 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { |
923 gtk_widget_set_sensitive(GTK_WIDGET(close_checkbox), FALSE); | 923 gtk_widget_set_sensitive(GTK_WIDGET(close_checkbox), FALSE); |
924 } | 924 } |
925 | 925 |
926 g_signal_connect(G_OBJECT(tabs_checkbox), "clicked", | 926 g_signal_connect(G_OBJECT(tabs_checkbox), "clicked", |
927 G_CALLBACK(gaim_gtk_toggle_sensitive), close_checkbox); | 927 G_CALLBACK(gaim_gtk_toggle_sensitive), close_checkbox); |
928 | 928 |
929 icons_checkbox = prefs_checkbox(_("Show status _icons on tabs"), | 929 icons_checkbox = gaim_gtk_prefs_checkbox(_("Show status _icons on tabs"), |
930 "/gaim/gtk/conversations/icons_on_tabs", | 930 "/gaim/gtk/conversations/icons_on_tabs", |
931 vbox); | 931 vbox); |
932 | 932 |
933 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { | 933 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { |
934 gtk_widget_set_sensitive(GTK_WIDGET(icons_checkbox), FALSE); | 934 gtk_widget_set_sensitive(GTK_WIDGET(icons_checkbox), FALSE); |
952 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 952 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
953 | 953 |
954 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 954 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
955 | 955 |
956 vbox = gaim_gtk_make_frame (ret, _("Window")); | 956 vbox = gaim_gtk_make_frame (ret, _("Window")); |
957 widge = prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, | 957 widge = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, |
958 "/gaim/gtk/conversations/im/button_type", | 958 "/gaim/gtk/conversations/im/button_type", |
959 _("Pictures"), GAIM_BUTTON_IMAGE, | 959 _("Pictures"), GAIM_BUTTON_IMAGE, |
960 _("Text"), GAIM_BUTTON_TEXT, | 960 _("Text"), GAIM_BUTTON_TEXT, |
961 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, | 961 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, |
962 NULL); | 962 NULL); |
963 | 963 |
964 gtk_size_group_add_widget(sg, widge); | 964 gtk_size_group_add_widget(sg, widge); |
965 gtk_misc_set_alignment(GTK_MISC(widge), 0, 0); | 965 gtk_misc_set_alignment(GTK_MISC(widge), 0, 0); |
966 prefs_labeled_spin_button(vbox, _("New window _width:"), | 966 gaim_gtk_prefs_labeled_spin_button(vbox, _("New window _width:"), |
967 "/gaim/gtk/conversations/im/default_width", | 967 "/gaim/gtk/conversations/im/default_width", 25, 9999, sg); |
968 25, 9999, sg); | 968 gaim_gtk_prefs_labeled_spin_button(vbox, _("New window _height:"), |
969 prefs_labeled_spin_button(vbox, _("New window _height:"), | 969 "/gaim/gtk/conversations/im/default_height", 25, 9999, sg); |
970 "/gaim/gtk/conversations/im/default_height", | 970 gaim_gtk_prefs_labeled_spin_button(vbox, _("_Entry field height:"), |
971 25, 9999, sg); | 971 "/gaim/gtk/conversations/im/entry_height", 25, 9999, sg); |
972 prefs_labeled_spin_button(vbox, _("_Entry field height:"), | 972 gaim_gtk_prefs_checkbox(_("_Raise window on events"), |
973 "/gaim/gtk/conversations/im/entry_height", | 973 "/gaim/gtk/conversations/im/raise_on_events", vbox); |
974 25, 9999, sg); | 974 gaim_gtk_prefs_checkbox(_("Hide window on _send"), |
975 prefs_checkbox(_("_Raise window on events"), | 975 "/gaim/gtk/conversations/im/hide_on_send", vbox); |
976 "/gaim/gtk/conversations/im/raise_on_events", vbox); | |
977 prefs_checkbox(_("Hide window on _send"), | |
978 "/gaim/gtk/conversations/im/hide_on_send", vbox); | |
979 gtk_widget_show (vbox); | 976 gtk_widget_show (vbox); |
980 | 977 |
981 vbox = gaim_gtk_make_frame (ret, _("Buddy Icons")); | 978 vbox = gaim_gtk_make_frame (ret, _("Buddy Icons")); |
982 prefs_checkbox(_("Show buddy _icons"), | 979 gaim_gtk_prefs_checkbox(_("Show buddy _icons"), |
983 "/gaim/gtk/conversations/im/show_buddy_icons", vbox); | 980 "/gaim/gtk/conversations/im/show_buddy_icons", vbox); |
984 prefs_checkbox(_("Enable buddy icon a_nimation"), | 981 gaim_gtk_prefs_checkbox(_("Enable buddy icon a_nimation"), |
985 "/gaim/gtk/conversations/im/animate_buddy_icons", vbox); | 982 "/gaim/gtk/conversations/im/animate_buddy_icons", vbox); |
986 | 983 |
987 vbox = gaim_gtk_make_frame (ret, _("Display")); | 984 vbox = gaim_gtk_make_frame (ret, _("Display")); |
988 prefs_checkbox(_("Show _logins in window"), | 985 gaim_gtk_prefs_checkbox(_("Show _logins in window"), |
989 "/core/conversations/im/show_login", vbox); | 986 "/core/conversations/im/show_login", vbox); |
990 prefs_checkbox(_("Show a_liases in tabs/titles"), | 987 gaim_gtk_prefs_checkbox(_("Show a_liases in tabs/titles"), |
991 "/core/conversations/use_alias_for_title", vbox); | 988 "/core/conversations/use_alias_for_title", vbox); |
992 | 989 |
993 vbox = gaim_gtk_make_frame (ret, _("Typing Notification")); | 990 vbox = gaim_gtk_make_frame (ret, _("Typing Notification")); |
994 prefs_checkbox(_("Notify buddies that you are _typing to them"), | 991 gaim_gtk_prefs_checkbox(_("Notify buddies that you are _typing to them"), |
995 "/core/conversations/im/send_typing", vbox); | 992 "/core/conversations/im/send_typing", vbox); |
996 | 993 |
997 gtk_widget_show_all(ret); | 994 gtk_widget_show_all(ret); |
998 return ret; | 995 return ret; |
999 } | 996 } |
1000 | 997 |
1008 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 1005 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1009 | 1006 |
1010 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); | 1007 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); |
1011 | 1008 |
1012 vbox = gaim_gtk_make_frame (ret, _("Window")); | 1009 vbox = gaim_gtk_make_frame (ret, _("Window")); |
1013 dd = prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, | 1010 dd = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, |
1014 "/gaim/gtk/conversations/chat/button_type", | 1011 "/gaim/gtk/conversations/chat/button_type", |
1015 _("Pictures"), GAIM_BUTTON_IMAGE, | 1012 _("Pictures"), GAIM_BUTTON_IMAGE, |
1016 _("Text"), GAIM_BUTTON_TEXT, | 1013 _("Text"), GAIM_BUTTON_TEXT, |
1017 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, | 1014 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, |
1018 NULL); | 1015 NULL); |
1019 | 1016 |
1020 gtk_size_group_add_widget(sg, dd); | 1017 gtk_size_group_add_widget(sg, dd); |
1021 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); | 1018 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
1022 prefs_labeled_spin_button(vbox, _("New window _width:"), | 1019 gaim_gtk_prefs_labeled_spin_button(vbox, _("New window _width:"), |
1023 "/gaim/gtk/conversations/chat/default_width", | 1020 "/gaim/gtk/conversations/chat/default_width", 25, 9999, sg); |
1024 25, 9999, sg); | 1021 gaim_gtk_prefs_labeled_spin_button(vbox, _("New window _height:"), |
1025 prefs_labeled_spin_button(vbox, _("New window _height:"), | 1022 "/gaim/gtk/conversations/chat/default_height", 25, 9999, sg); |
1026 "/gaim/gtk/conversations/chat/default_height", | 1023 gaim_gtk_prefs_labeled_spin_button(vbox, _("_Entry field height:"), |
1027 25, 9999, sg); | 1024 "/gaim/gtk/conversations/chat/entry_height", 25, 9999, sg); |
1028 prefs_labeled_spin_button(vbox, _("_Entry field height:"), | 1025 gaim_gtk_prefs_checkbox(_("_Raise window on events"), |
1029 "/gaim/gtk/conversations/chat/entry_height", | 1026 "/gaim/gtk/conversations/chat/raise_on_events", vbox); |
1030 25, 9999, sg); | |
1031 prefs_checkbox(_("_Raise window on events"), | |
1032 "/gaim/gtk/conversations/chat/raise_on_events", vbox); | |
1033 | 1027 |
1034 vbox = gaim_gtk_make_frame (ret, _("Tab Completion")); | 1028 vbox = gaim_gtk_make_frame (ret, _("Tab Completion")); |
1035 prefs_checkbox(_("_Tab-complete nicks"), | 1029 gaim_gtk_prefs_checkbox(_("_Tab-complete nicks"), |
1036 "/gaim/gtk/conversations/chat/tab_completion", vbox); | 1030 "/gaim/gtk/conversations/chat/tab_completion", vbox); |
1037 prefs_checkbox(_("_Old-style tab completion"), | 1031 gaim_gtk_prefs_checkbox(_("_Old-style tab completion"), |
1038 "/gaim/gtk/conversations/chat/old_tab_complete", vbox); | 1032 "/gaim/gtk/conversations/chat/old_tab_complete", vbox); |
1039 | 1033 |
1040 vbox = gaim_gtk_make_frame (ret, _("Display")); | 1034 vbox = gaim_gtk_make_frame (ret, _("Display")); |
1041 prefs_checkbox(_("_Show people joining in window"), | 1035 gaim_gtk_prefs_checkbox(_("_Show people joining in window"), |
1042 "/core/conversations/chat/show_join", vbox); | 1036 "/core/conversations/chat/show_join", vbox); |
1043 prefs_checkbox(_("_Show people leaving in window"), | 1037 gaim_gtk_prefs_checkbox(_("_Show people leaving in window"), |
1044 "/core/conversations/chat/show_leave", vbox); | 1038 "/core/conversations/chat/show_leave", vbox); |
1045 prefs_checkbox(_("Co_lorize screennames"), | 1039 gaim_gtk_prefs_checkbox(_("Co_lorize screennames"), |
1046 "/gaim/gtk/conversations/chat/color_nicks", vbox); | 1040 "/gaim/gtk/conversations/chat/color_nicks", vbox); |
1047 | 1041 |
1048 gtk_widget_show_all(ret); | 1042 gtk_widget_show_all(ret); |
1049 return ret; | 1043 return ret; |
1050 } | 1044 } |
1051 | 1045 |
1052 static void | 1046 static void |
1053 proxy_changed_cb(const char *name, GaimPrefType type, gpointer value, | 1047 proxy_changed_cb(const char *name, GaimPrefType type, gpointer value, |
1054 gpointer data) | 1048 gpointer data) |
1055 { | 1049 { |
1056 GtkWidget *frame = data; | 1050 GtkWidget *frame = data; |
1057 const char *proxy = value; | 1051 const char *proxy = value; |
1058 | 1052 |
1059 if (strcmp(proxy, "none") && strcmp(proxy, "envvar")) | 1053 if (strcmp(proxy, "none") && strcmp(proxy, "envvar")) |
1085 | 1079 |
1086 ret = gtk_vbox_new(FALSE, 18); | 1080 ret = gtk_vbox_new(FALSE, 18); |
1087 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 1081 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1088 | 1082 |
1089 vbox = gaim_gtk_make_frame (ret, _("Proxy Type")); | 1083 vbox = gaim_gtk_make_frame (ret, _("Proxy Type")); |
1090 prefs_dropdown(vbox, _("Proxy _type:"), GAIM_PREF_STRING, | 1084 gaim_gtk_prefs_dropdown(vbox, _("Proxy _type:"), GAIM_PREF_STRING, |
1091 "/core/proxy/type", | 1085 "/core/proxy/type", |
1092 _("No proxy"), "none", | 1086 _("No proxy"), "none", |
1093 "SOCKS 4", "socks4", | 1087 "SOCKS 4", "socks4", |
1094 "SOCKS 5", "socks5", | 1088 "SOCKS 5", "socks5", |
1095 "HTTP", "http", | 1089 "HTTP", "http", |
1096 _("Use Environmental Settings"), "envvar", | 1090 _("Use Environmental Settings"), "envvar", |
1097 NULL); | 1091 NULL); |
1098 | 1092 |
1099 vbox = gaim_gtk_make_frame(ret, _("Proxy Server")); | 1093 vbox = gaim_gtk_make_frame(ret, _("Proxy Server")); |
1100 prefs_proxy_frame = vbox; | 1094 prefs_proxy_frame = vbox; |
1101 | 1095 |
1102 proxy_info = gaim_global_proxy_get_info(); | 1096 proxy_info = gaim_global_proxy_get_info(); |
1263 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 1257 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
1264 vbox = gaim_gtk_make_frame (ret, _("Browser Selection")); | 1258 vbox = gaim_gtk_make_frame (ret, _("Browser Selection")); |
1265 | 1259 |
1266 browsers = get_available_browsers(); | 1260 browsers = get_available_browsers(); |
1267 if (browsers != NULL) { | 1261 if (browsers != NULL) { |
1268 label = prefs_dropdown_from_list(vbox,_("_Browser:"), GAIM_PREF_STRING, | 1262 label = gaim_gtk_prefs_dropdown_from_list(vbox,_("_Browser:"), GAIM_PREF_STRING, |
1269 "/gaim/gtk/browsers/browser", | 1263 "/gaim/gtk/browsers/browser", |
1270 browsers); | 1264 browsers); |
1271 | 1265 |
1272 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 1266 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
1273 gtk_size_group_add_widget(sg, label); | 1267 gtk_size_group_add_widget(sg, label); |
1295 g_signal_connect(G_OBJECT(entry), "focus-out-event", | 1289 g_signal_connect(G_OBJECT(entry), "focus-out-event", |
1296 G_CALLBACK(manual_browser_set), NULL); | 1290 G_CALLBACK(manual_browser_set), NULL); |
1297 | 1291 |
1298 if (browsers != NULL) { | 1292 if (browsers != NULL) { |
1299 vbox = gaim_gtk_make_frame (ret, _("Browser Options")); | 1293 vbox = gaim_gtk_make_frame (ret, _("Browser Options")); |
1300 label = prefs_checkbox(_("Open new _window by default"), | 1294 label = gaim_gtk_prefs_checkbox(_("Open new _window by default"), |
1301 "/gaim/gtk/browsers/new_window", vbox); | 1295 "/gaim/gtk/browsers/new_window", vbox); |
1302 } | 1296 } |
1303 | 1297 |
1304 gtk_widget_show_all(ret); | 1298 gtk_widget_show_all(ret); |
1305 return ret; | 1299 return ret; |
1314 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 1308 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1315 | 1309 |
1316 vbox = gaim_gtk_make_frame (ret, _("Message Logs")); | 1310 vbox = gaim_gtk_make_frame (ret, _("Message Logs")); |
1317 names = gaim_log_logger_get_options(); | 1311 names = gaim_log_logger_get_options(); |
1318 | 1312 |
1319 prefs_dropdown_from_list(vbox, _("Log _Format:"), GAIM_PREF_STRING, | 1313 gaim_gtk_prefs_dropdown_from_list(vbox, _("Log _Format:"), GAIM_PREF_STRING, |
1320 "/core/logging/format", | 1314 "/core/logging/format", names); |
1321 names); | 1315 |
1322 | 1316 gaim_gtk_prefs_checkbox(_("_Log all instant messages"), |
1323 prefs_checkbox(_("_Log all instant messages"), | |
1324 "/core/logging/log_ims", vbox); | 1317 "/core/logging/log_ims", vbox); |
1325 prefs_checkbox(_("Log all c_hats"), | 1318 gaim_gtk_prefs_checkbox(_("Log all c_hats"), |
1326 "/core/logging/log_chats", vbox); | 1319 "/core/logging/log_chats", vbox); |
1327 /* | 1320 /* |
1328 vbox = gaim_gtk_make_frame (ret, _("System Logs")); | 1321 vbox = gaim_gtk_make_frame (ret, _("System Logs")); |
1329 prefs_checkbox(_("Log when buddies _sign on/sign off"), | 1322 gaim_gtk_prefs_checkbox(_("Log when buddies _sign on/sign off"), |
1330 "/gaim/gtk/logging/log_signon_signoff", vbox); | 1323 "/gaim/gtk/logging/log_signon_signoff", vbox); |
1331 prefs_checkbox(_("Log when buddies become _idle/un-idle"), | 1324 gaim_gtk_prefs_checkbox(_("Log when buddies become _idle/un-idle"), |
1332 "/gaim/gtk/logging/log_idle_state", vbox); | 1325 "/gaim/gtk/logging/log_idle_state", vbox); |
1333 prefs_checkbox(_("Log when buddies go away/come _back"), | 1326 gaim_gtk_prefs_checkbox(_("Log when buddies go away/come _back"), |
1334 "/gaim/gtk/logging/log_away_state", vbox); | 1327 "/gaim/gtk/logging/log_away_state", vbox); |
1335 prefs_checkbox(_("Log your _own signons/idleness/awayness"), | 1328 gaim_gtk_prefs_checkbox(_("Log your _own signons/idleness/awayness"), |
1336 "/gaim/gtk/logging/log_own_states", vbox); | 1329 "/gaim/gtk/logging/log_own_states", vbox); |
1337 prefs_checkbox(_("I_ndividual log file for each buddy's signons"), | 1330 gaim_gtk_prefs_checkbox(_("I_ndividual log file for each buddy's signons"), |
1338 "/gaim/gtk/logging/individual_logs", vbox); | 1331 "/gaim/gtk/logging/individual_logs", vbox); |
1339 */ | 1332 */ |
1340 gtk_widget_show_all(ret); | 1333 gtk_widget_show_all(ret); |
1341 return ret; | 1334 return ret; |
1342 } | 1335 } |
1376 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 1369 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1377 | 1370 |
1378 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 1371 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
1379 | 1372 |
1380 vbox = gaim_gtk_make_frame (ret, _("Sound Options")); | 1373 vbox = gaim_gtk_make_frame (ret, _("Sound Options")); |
1381 prefs_checkbox(_("_No sounds when you log in"), | 1374 gaim_gtk_prefs_checkbox(_("_No sounds when you log in"), |
1382 "/gaim/gtk/sound/silent_signon", vbox); | 1375 "/gaim/gtk/sound/silent_signon", vbox); |
1383 prefs_checkbox(_("_Sounds while away"), | 1376 gaim_gtk_prefs_checkbox(_("_Sounds while away"), |
1384 "/core/sound/while_away", vbox); | 1377 "/core/sound/while_away", vbox); |
1385 | 1378 |
1386 #ifndef _WIN32 | 1379 #ifndef _WIN32 |
1387 vbox = gaim_gtk_make_frame (ret, _("Sound Method")); | 1380 vbox = gaim_gtk_make_frame (ret, _("Sound Method")); |
1388 dd = prefs_dropdown(vbox, _("_Method:"), GAIM_PREF_STRING, | 1381 dd = gaim_gtk_prefs_dropdown(vbox, _("_Method:"), GAIM_PREF_STRING, |
1389 "/gaim/gtk/sound/method", | 1382 "/gaim/gtk/sound/method", |
1390 _("Console beep"), "beep", | 1383 _("Console beep"), "beep", |
1391 #ifdef USE_AO | 1384 #ifdef USE_AO |
1392 _("Automatic"), "automatic", | 1385 _("Automatic"), "automatic", |
1393 "ESD", "esd", | 1386 "ESD", "esd", |
1394 "Arts", "arts", | 1387 "Arts", "arts", |
1395 #endif | 1388 #endif |
1396 #ifdef USE_NAS_AUDIO | 1389 #ifdef USE_NAS_AUDIO |
1397 "NAS", "nas", | 1390 "NAS", "nas", |
1398 #endif | 1391 #endif |
1399 _("Command"), "custom", | 1392 _("Command"), "custom", |
1400 NULL); | 1393 NULL); |
1401 gtk_size_group_add_widget(sg, dd); | 1394 gtk_size_group_add_widget(sg, dd); |
1402 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); | 1395 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
1403 | 1396 |
1404 hbox = gtk_hbox_new(FALSE, 5); | 1397 hbox = gtk_hbox_new(FALSE, 5); |
1405 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | 1398 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
1459 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | 1452 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
1460 | 1453 |
1461 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | 1454 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
1462 | 1455 |
1463 vbox = gaim_gtk_make_frame (ret, _("Away")); | 1456 vbox = gaim_gtk_make_frame (ret, _("Away")); |
1464 prefs_checkbox(_("_Sending messages removes away status"), | 1457 gaim_gtk_prefs_checkbox(_("_Sending messages removes away status"), |
1465 "/core/conversations/away_back_on_send", vbox); | 1458 "/core/conversations/away_back_on_send", vbox); |
1466 prefs_checkbox(_("_Queue new messages when away"), | 1459 gaim_gtk_prefs_checkbox(_("_Queue new messages when away"), |
1467 "/gaim/gtk/away/queue_messages", vbox); | 1460 "/gaim/gtk/away/queue_messages", vbox); |
1468 | 1461 |
1469 vbox = gaim_gtk_make_frame (ret, _("Auto-response")); | 1462 vbox = gaim_gtk_make_frame (ret, _("Auto-response")); |
1470 hbox = gtk_hbox_new(FALSE, 0); | 1463 hbox = gtk_hbox_new(FALSE, 0); |
1471 gtk_container_add(GTK_CONTAINER(vbox), hbox); | 1464 gtk_container_add(GTK_CONTAINER(vbox), hbox); |
1472 prefs_labeled_spin_button(hbox, _("Seconds before _resending:"), | 1465 gaim_gtk_prefs_labeled_spin_button(hbox, _("Seconds before _resending:"), |
1473 "/core/away/auto_response/sec_before_resend", | 1466 "/core/away/auto_response/sec_before_resend", |
1474 1, 24 * 60 * 60, sg); | 1467 1, 24 * 60 * 60, sg); |
1475 prefs_checkbox(_("_Send auto-response"), | 1468 gaim_gtk_prefs_checkbox(_("_Send auto-response"), |
1476 "/core/away/auto_response/enabled", vbox); | 1469 "/core/away/auto_response/enabled", vbox); |
1477 prefs_checkbox(_("_Only send auto-response when idle"), | 1470 gaim_gtk_prefs_checkbox(_("_Only send auto-response when idle"), |
1478 "/core/away/auto_response/idle_only", vbox); | 1471 "/core/away/auto_response/idle_only", vbox); |
1479 prefs_checkbox(_("Send auto-response in _active conversations"), | 1472 gaim_gtk_prefs_checkbox(_("Send auto-response in _active conversations"), |
1480 "/core/away/auto_response/in_active_conv", vbox); | 1473 "/core/away/auto_response/in_active_conv", vbox); |
1481 | 1474 |
1482 if (!gaim_prefs_get_bool("/core/away/auto_response/enabled")) | 1475 if (!gaim_prefs_get_bool("/core/away/auto_response/enabled")) |
1483 gtk_widget_set_sensitive(hbox, FALSE); | 1476 gtk_widget_set_sensitive(hbox, FALSE); |
1484 | 1477 |
1485 auto_resp_pref_id = gaim_prefs_connect_callback("/core/away/auto_response/enabled", | 1478 auto_resp_pref_id = gaim_prefs_connect_callback("/core/away/auto_response/enabled", |
1486 auto_resp_changed_cb, hbox); | 1479 auto_resp_changed_cb, hbox); |
1487 | 1480 |
1488 vbox = gaim_gtk_make_frame (ret, _("Idle")); | 1481 vbox = gaim_gtk_make_frame (ret, _("Idle")); |
1489 dd = prefs_dropdown(vbox, _("Idle _time reporting:"), GAIM_PREF_STRING, | 1482 dd = gaim_gtk_prefs_dropdown(vbox, _("Idle _time reporting:"), |
1490 "/gaim/gtk/idle/reporting_method", | 1483 GAIM_PREF_STRING, "/gaim/gtk/idle/reporting_method", |
1491 _("None"), "none", | 1484 _("None"), "none", |
1492 _("Gaim usage"), "gaim", | 1485 _("Gaim usage"), "gaim", |
1493 #ifdef USE_SCREENSAVER | 1486 #ifdef USE_SCREENSAVER |
1494 #ifndef _WIN32 | 1487 #ifndef _WIN32 |
1495 _("X usage"), "system", | 1488 _("X usage"), "system", |
1496 #else | 1489 #else |
1497 _("Windows usage"), "system", | 1490 _("Windows usage"), "system", |
1498 #endif | 1491 #endif |
1499 #endif | 1492 #endif |
1500 NULL); | 1493 NULL); |
1501 | 1494 |
1502 gtk_size_group_add_widget(sg, dd); | 1495 gtk_size_group_add_widget(sg, dd); |
1503 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); | 1496 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); |
1504 | 1497 |
1505 vbox = gaim_gtk_make_frame (ret, _("Auto-away")); | 1498 vbox = gaim_gtk_make_frame (ret, _("Auto-away")); |
1506 button = prefs_checkbox(_("Set away _when idle"), | 1499 button = gaim_gtk_prefs_checkbox(_("Set away _when idle"), |
1507 "/core/away/away_when_idle", vbox); | 1500 "/core/away/away_when_idle", vbox); |
1508 select = prefs_labeled_spin_button(vbox, _("_Minutes before setting away:"), | 1501 select = gaim_gtk_prefs_labeled_spin_button(vbox, |
1509 "/core/away/mins_before_away", | 1502 _("_Minutes before setting away:"), "/core/away/mins_before_away", |
1510 1, 24 * 60, sg); | 1503 1, 24 * 60, sg); |
1511 | 1504 |
1512 g_signal_connect(G_OBJECT(button), "clicked", | 1505 g_signal_connect(G_OBJECT(button), "clicked", |
1513 G_CALLBACK(gaim_gtk_toggle_sensitive), select); | 1506 G_CALLBACK(gaim_gtk_toggle_sensitive), select); |
1514 | 1507 |
1515 label = gtk_label_new_with_mnemonic(_("Away m_essage:")); | 1508 label = gtk_label_new_with_mnemonic(_("Away m_essage:")); |
2479 gaim_prefs_set_bool(key, | 2472 gaim_prefs_set_bool(key, |
2480 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); | 2473 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); |
2481 } | 2474 } |
2482 | 2475 |
2483 GtkWidget * | 2476 GtkWidget * |
2484 prefs_checkbox(const char *text, const char *key, GtkWidget *page) | 2477 gaim_gtk_prefs_checkbox(const char *text, const char *key, GtkWidget *page) |
2485 { | 2478 { |
2486 GtkWidget *button; | 2479 GtkWidget *button; |
2487 | 2480 |
2488 button = gtk_check_button_new_with_mnemonic(text); | 2481 button = gtk_check_button_new_with_mnemonic(text); |
2489 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), | 2482 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), |