comparison src/gtkprefs.c @ 7128:43e8430a4469

[gaim-migrate @ 7695] this was dumb committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 03 Oct 2003 04:03:19 +0000
parents 6faeeecab0dc
children 8246bd3141ae
comparison
equal deleted inserted replaced
7127:4c0b7e7118ee 7128:43e8430a4469
881 881
882 GtkWidget *conv_page() { 882 GtkWidget *conv_page() {
883 GtkWidget *ret; 883 GtkWidget *ret;
884 GtkWidget *vbox; 884 GtkWidget *vbox;
885 GtkWidget *label; 885 GtkWidget *label;
886 GtkWidget *button, *close_checkbox, *icons_checkbox; 886 GtkWidget *close_checkbox, *icons_checkbox;
887 GtkWidget *tabs_checkbox, *same_checkbox;
887 GtkSizeGroup *sg; 888 GtkSizeGroup *sg;
888 GList *names = NULL; 889 GList *names = NULL;
889 890
890 ret = gtk_vbox_new(FALSE, 18); 891 ret = gtk_vbox_new(FALSE, 18);
891 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); 892 gtk_container_set_border_width(GTK_CONTAINER(ret), 12);
893 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); 894 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
894 vbox = gaim_gtk_make_frame(ret, _("Conversations")); 895 vbox = gaim_gtk_make_frame(ret, _("Conversations"));
895 896
896 names = gaim_conv_placement_get_options(); 897 names = gaim_conv_placement_get_options();
897 898
898 label = prefs_dropdown_from_list(vbox, _("_Placement:"), GAIM_PREF_STRING, 899 label = prefs_dropdown_from_list(vbox, _("_Placement:"),
899 "/core/conversations/placement", 900 GAIM_PREF_STRING, "/core/conversations/placement", names);
900 names);
901
902 g_list_free(names); 901 g_list_free(names);
903 902
904 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); 903 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
905 gtk_size_group_add_widget(sg, label); 904 gtk_size_group_add_widget(sg, label);
906 905
918 NULL); 917 NULL);
919 918
920 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); 919 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
921 gtk_size_group_add_widget(sg, label); 920 gtk_size_group_add_widget(sg, label);
922 921
923 button = prefs_checkbox(_("Show IMs and chats in _tabbed windows"), 922 tabs_checkbox = prefs_checkbox(_("Show IMs and chats in _tabbed windows"),
924 "/gaim/gtk/conversations/tabs", vbox); 923 "/gaim/gtk/conversations/tabs", vbox);
925 924
926 /* XXX: grey this out when the above is unchecked */ 925 same_checkbox = prefs_checkbox(_("Show IMs and chats in _same tabbed window"),
927 button = prefs_checkbox(_("Show IMs and chats in _same tabbed window"),
928 "/core/conversations/combine_chat_im", vbox); 926 "/core/conversations/combine_chat_im", vbox);
927
928 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) {
929 gtk_widget_set_sensitive(GTK_WIDGET(same_checkbox), FALSE);
930 }
931
932 g_signal_connect(G_OBJECT(tabs_checkbox), "clicked",
933 G_CALLBACK(gaim_gtk_toggle_sensitive), same_checkbox);
929 934
930 close_checkbox = prefs_checkbox(_("Show _close button on tabs"), 935 close_checkbox = prefs_checkbox(_("Show _close button on tabs"),
931 "/gaim/gtk/conversations/close_on_tabs", 936 "/gaim/gtk/conversations/close_on_tabs",
932 vbox); 937 vbox);
933 938
934 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { 939 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) {
935 gtk_widget_set_sensitive(GTK_WIDGET(close_checkbox), FALSE); 940 gtk_widget_set_sensitive(GTK_WIDGET(close_checkbox), FALSE);
936 } 941 }
937 942
938 g_signal_connect(G_OBJECT(button), "clicked", 943 g_signal_connect(G_OBJECT(tabs_checkbox), "clicked",
939 G_CALLBACK(gaim_gtk_toggle_sensitive), close_checkbox); 944 G_CALLBACK(gaim_gtk_toggle_sensitive), close_checkbox);
940 945
941 icons_checkbox = prefs_checkbox(_("Show status _icons on tabs"), 946 icons_checkbox = prefs_checkbox(_("Show status _icons on tabs"),
942 "/gaim/gtk/conversations/icons_on_tabs", 947 "/gaim/gtk/conversations/icons_on_tabs",
943 vbox); 948 vbox);
944 949
945 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { 950 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) {
946 gtk_widget_set_sensitive(GTK_WIDGET(icons_checkbox), FALSE); 951 gtk_widget_set_sensitive(GTK_WIDGET(icons_checkbox), FALSE);
947 } 952 }
948 953
949 g_signal_connect(G_OBJECT(button), "clicked", 954 g_signal_connect(G_OBJECT(tabs_checkbox), "clicked",
950 G_CALLBACK(gaim_gtk_toggle_sensitive), icons_checkbox); 955 G_CALLBACK(gaim_gtk_toggle_sensitive), icons_checkbox);
951 956
952 gtk_widget_show_all(ret); 957 gtk_widget_show_all(ret);
953 958
954 return ret; 959 return ret;