Mercurial > pidgin
comparison src/gtkprefs.c @ 8979:e2ad3e04d248
[gaim-migrate @ 9753]
"Adds a feature requested by my brother, a conversation placement option
limited by number of conversations in that window, so as to let one avoid
needing the GtkNotebook scroll arrows." --deryni
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 19 May 2004 04:44:36 +0000 |
parents | cd1c9bbab491 |
children | d6fea11c62d7 |
comparison
equal
deleted
inserted
replaced
8978:8e69a730885c | 8979:e2ad3e04d248 |
---|---|
82 static guint browser_pref1_id = 0; | 82 static guint browser_pref1_id = 0; |
83 static guint browser_pref2_id = 0; | 83 static guint browser_pref2_id = 0; |
84 static guint proxy_pref_id = 0; | 84 static guint proxy_pref_id = 0; |
85 static guint sound_pref_id = 0; | 85 static guint sound_pref_id = 0; |
86 static guint auto_resp_pref_id = 0; | 86 static guint auto_resp_pref_id = 0; |
87 static guint placement_pref_id = 0; | |
87 | 88 |
88 /* | 89 /* |
89 * PROTOTYPES | 90 * PROTOTYPES |
90 */ | 91 */ |
91 static GtkTreeIter *prefs_notebook_add_page(const char*, GdkPixbuf*, | 92 static GtkTreeIter *prefs_notebook_add_page(const char*, GdkPixbuf*, |
344 gaim_prefs_disconnect_callback(browser_pref1_id); | 345 gaim_prefs_disconnect_callback(browser_pref1_id); |
345 gaim_prefs_disconnect_callback(browser_pref2_id); | 346 gaim_prefs_disconnect_callback(browser_pref2_id); |
346 gaim_prefs_disconnect_callback(proxy_pref_id); | 347 gaim_prefs_disconnect_callback(proxy_pref_id); |
347 gaim_prefs_disconnect_callback(sound_pref_id); | 348 gaim_prefs_disconnect_callback(sound_pref_id); |
348 gaim_prefs_disconnect_callback(auto_resp_pref_id); | 349 gaim_prefs_disconnect_callback(auto_resp_pref_id); |
350 gaim_prefs_disconnect_callback(placement_pref_id); | |
349 | 351 |
350 for (l = gaim_plugins_get_loaded(); l != NULL; l = l->next) { | 352 for (l = gaim_plugins_get_loaded(); l != NULL; l = l->next) { |
351 plug = l->data; | 353 plug = l->data; |
352 | 354 |
353 if (GAIM_IS_GTK_PLUGIN(plug)) { | 355 if (GAIM_IS_GTK_PLUGIN(plug)) { |
879 gtk_widget_show_all(ret); | 881 gtk_widget_show_all(ret); |
880 | 882 |
881 return ret; | 883 return ret; |
882 } | 884 } |
883 | 885 |
886 static void | |
887 conversation_placement_cb(const char *name, GaimPrefType type, gpointer value, | |
888 gpointer data) | |
889 { | |
890 const char *placement = value; | |
891 | |
892 if (strcmp(placement, "number")) | |
893 gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE); | |
894 else | |
895 gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE); | |
896 } | |
897 | |
884 GtkWidget *conv_page() { | 898 GtkWidget *conv_page() { |
885 GtkWidget *ret; | 899 GtkWidget *ret; |
886 GtkWidget *vbox; | 900 GtkWidget *vbox; |
887 GtkWidget *label; | 901 GtkWidget *label; |
888 GtkWidget *close_checkbox;/*, *icons_checkbox;*/ | 902 GtkWidget *close_checkbox;/*, *icons_checkbox;*/ |
902 GAIM_PREF_STRING, "/gaim/gtk/conversations/placement", names); | 916 GAIM_PREF_STRING, "/gaim/gtk/conversations/placement", names); |
903 g_list_free(names); | 917 g_list_free(names); |
904 | 918 |
905 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | 919 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
906 gtk_size_group_add_widget(sg, label); | 920 gtk_size_group_add_widget(sg, label); |
921 | |
922 label = gaim_gtk_prefs_labeled_spin_button(vbox, "Number of conversations per window", | |
923 "/gaim/gtk/conversations/placement_number", | |
924 1, 50, sg); | |
925 | |
926 placement_pref_id = gaim_prefs_connect_callback("/gaim/gtk/conversations/placement", | |
927 conversation_placement_cb, | |
928 label); | |
929 gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement"); | |
907 | 930 |
908 gaim_gtk_prefs_checkbox(_("Show _formatting toolbar"), | 931 gaim_gtk_prefs_checkbox(_("Show _formatting toolbar"), |
909 "/gaim/gtk/conversations/show_formatting_toolbar", vbox); | 932 "/gaim/gtk/conversations/show_formatting_toolbar", vbox); |
910 | 933 |
911 gaim_gtk_prefs_checkbox(_("Show a_liases in tabs/titles"), | 934 gaim_gtk_prefs_checkbox(_("Show a_liases in tabs/titles"), |