Sat, 05 Sep 2009 20:01:46 +0000
Fix a bunch of warnings from check_po.pl about mismatched format specifiers
between the English string and the localized string
| 10584 | 1 | /** |
|
27598
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
2 | * @file pidginrc.c Pidgin GTK+ resource control plugin. |
|
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
3 | * @ingroup pidgin |
|
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
4 | */ |
|
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
5 | |
|
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
6 | /* pidgin |
| 10584 | 7 | * |
|
27598
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
8 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
10 | * source distribution. |
| 10584 | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18242
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 10584 | 25 | */ |
| 26 | ||
| 27 | #include "internal.h" | |
| 28 | #include "gtkplugin.h" | |
| 29 | #include "gtkprefs.h" | |
| 30 | #include "gtkutils.h" | |
|
12044
e49179a1496a
[gaim-migrate @ 14339]
Richard Laager <rlaager@pidgin.im>
parents:
12042
diff
changeset
|
31 | #include "util.h" |
| 10584 | 32 | #include "version.h" |
| 33 | ||
| 34 | static guint pref_callback; | |
| 35 | ||
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
36 | static const gchar *color_prefs[] = { |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
37 | "/plugins/gtk/purplerc/color/GtkIMHtml::hyperlink-color", |
|
24328
7be2af5c9129
Show visited links in a different color. This also plugs a memory leak
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
38 | "/plugins/gtk/purplerc/color/GtkIMHtml::hyperlink-visited-color", |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
39 | "/plugins/gtk/purplerc/color/GtkIMHtml::send-name-color", |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
40 | "/plugins/gtk/purplerc/color/GtkIMHtml::receive-name-color", |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
41 | "/plugins/gtk/purplerc/color/GtkIMHtml::highlight-name-color", |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
42 | "/plugins/gtk/purplerc/color/GtkIMHtml::action-name-color", |
|
27307
65906c6de115
Fix a typo caught by Geoffrey Antos.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27269
diff
changeset
|
43 | "/plugins/gtk/purplerc/color/GtkIMHtml::typing-notification-color" |
| 10584 | 44 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
45 | static const gchar *color_prefs_set[] = { |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
46 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::hyperlink-color", |
|
24328
7be2af5c9129
Show visited links in a different color. This also plugs a memory leak
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
47 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::hyperlink-visited-color", |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
48 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::send-name-color", |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
49 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::receive-name-color", |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
50 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::highlight-name-color", |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
51 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::action-name-color", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
52 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::typing-notification-color" |
| 10584 | 53 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
54 | static const gchar *color_names[] = { |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
55 | N_("Hyperlink Color"), |
|
24328
7be2af5c9129
Show visited links in a different color. This also plugs a memory leak
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
22104
diff
changeset
|
56 | N_("Visited Hyperlink Color"), |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
57 | N_("Sent Message Name Color"), |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
58 | N_("Received Message Name Color"), |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
59 | N_("Highlighted Message Name Color"), |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
60 | N_("Action Message Name Color"), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
61 | N_("Typing Notification Color") |
| 10584 | 62 | }; |
| 63 | static GtkWidget *color_widgets[G_N_ELEMENTS(color_prefs)]; | |
| 64 | ||
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
65 | static const gchar *widget_size_prefs[] = { |
| 15884 | 66 | "/plugins/gtk/purplerc/size/GtkTreeView::horizontal_separator" |
| 10584 | 67 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
68 | static const gchar *widget_size_prefs_set[] = { |
| 15884 | 69 | "/plugins/gtk/purplerc/set/size/GtkTreeView::horizontal_separator" |
| 10584 | 70 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
71 | static const gchar *widget_size_names[] = { |
| 12201 | 72 | N_("GtkTreeView Horizontal Separation") |
| 10584 | 73 | }; |
| 74 | static GtkWidget *widget_size_widgets[G_N_ELEMENTS(widget_size_prefs)]; | |
| 75 | ||
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
76 | static const gchar *font_prefs[] = { |
| 15884 | 77 | "/plugins/gtk/purplerc/font/*pidgin_conv_entry", |
|
17096
b38e5c5c934e
Fix incorrect widget names in pidginrc plugin. Also, fix spacing - I'm not sure if this actually matters. Fixes #874.
Daniel Atallah <datallah@pidgin.im>
parents:
16749
diff
changeset
|
78 | "/plugins/gtk/purplerc/font/*pidgin_request_imhtml", |
|
b38e5c5c934e
Fix incorrect widget names in pidginrc plugin. Also, fix spacing - I'm not sure if this actually matters. Fixes #874.
Daniel Atallah <datallah@pidgin.im>
parents:
16749
diff
changeset
|
79 | "/plugins/gtk/purplerc/font/*pidgin_notify_imhtml", |
| 10584 | 80 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
81 | static const gchar *font_prefs_set[] = { |
| 15884 | 82 | "/plugins/gtk/purplerc/set/font/*pidgin_conv_entry", |
|
17096
b38e5c5c934e
Fix incorrect widget names in pidginrc plugin. Also, fix spacing - I'm not sure if this actually matters. Fixes #874.
Daniel Atallah <datallah@pidgin.im>
parents:
16749
diff
changeset
|
83 | "/plugins/gtk/purplerc/set/font/*pidgin_request_imhtml", |
|
b38e5c5c934e
Fix incorrect widget names in pidginrc plugin. Also, fix spacing - I'm not sure if this actually matters. Fixes #874.
Daniel Atallah <datallah@pidgin.im>
parents:
16749
diff
changeset
|
84 | "/plugins/gtk/purplerc/set/font/*pidgin_notify_imhtml", |
| 10584 | 85 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
86 | static const gchar *font_names[] = { |
|
10585
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
87 | N_("Conversation Entry"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
88 | N_("Request Dialog"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
89 | N_("Notify Dialog") |
| 10584 | 90 | }; |
| 91 | static GtkWidget *font_widgets[G_N_ELEMENTS(font_prefs)]; | |
| 92 | ||
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
93 | /* |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
94 | static const gchar *widget_bool_prefs[] = { |
| 12973 | 95 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
96 | static const gchar *widget_bool_prefs_set[] = { |
| 12973 | 97 | }; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
98 | static const gchar *widget_bool_names[] = { |
| 12973 | 99 | }; |
| 100 | static GtkWidget *widget_bool_widgets[G_N_ELEMENTS(widget_bool_prefs)]; | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
101 | */ |
| 12973 | 102 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
103 | static GString * |
|
22104
56970903b8e9
Probe for -Wstrict-prototypes to get some more warnings. I then cleaned up
Richard Laager <rlaager@pidgin.im>
parents:
21955
diff
changeset
|
104 | make_gtkrc_string(void) |
| 10584 | 105 | { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
106 | gint i; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
107 | gchar *prefbase = NULL; |
| 10584 | 108 | GString *style_string = g_string_new(""); |
| 109 | ||
| 15884 | 110 | if (purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-font-name")) { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
111 | const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-font-name"); |
| 14391 | 112 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
113 | if (pref != NULL && strcmp(pref, "")) { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
114 | g_string_append_printf(style_string, |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
115 | "gtk-font-name = \"%s\"\n", |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
116 | pref); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
117 | } |
| 10584 | 118 | } |
| 119 | ||
| 15884 | 120 | if (purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name")) { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
121 | const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-key-theme-name"); |
| 14391 | 122 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
123 | if (pref != NULL && strcmp(pref, "")) { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
124 | g_string_append_printf(style_string, |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
125 | "gtk-key-theme-name = \"%s\"\n", |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
126 | pref); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
127 | } |
| 10584 | 128 | } |
| 129 | ||
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
130 | g_string_append(style_string, "style \"purplerc_style\"\n{"); |
| 10584 | 131 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
132 | if(purple_prefs_get_bool("/plugins/gtk/purplerc/set/disable-typing-notification")) { |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
133 | g_string_append(style_string, "\tGtkIMHtml::typing-notification-enable = 0\n"); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
134 | } |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
135 | |
| 10584 | 136 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { |
| 15884 | 137 | if (purple_prefs_get_bool(color_prefs_set[i])) { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
138 | const gchar *pref; |
| 14391 | 139 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
140 | pref = purple_prefs_get_string(color_prefs[i]); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
141 | if (pref != NULL && strcmp(pref, "")) { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
142 | prefbase = g_path_get_basename(color_prefs[i]); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
143 | g_string_append_printf(style_string, |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
144 | "\n\t%s = \"%s\"", |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
145 | prefbase, pref); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
146 | g_free(prefbase); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
147 | } |
| 10584 | 148 | } |
| 149 | } | |
| 150 | ||
| 151 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { | |
| 15884 | 152 | if (purple_prefs_get_bool(widget_size_prefs_set[i])) { |
| 10584 | 153 | prefbase = g_path_get_basename(widget_size_prefs[i]); |
| 154 | g_string_append_printf(style_string, | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
155 | "\n\t%s = %d", prefbase, |
| 15884 | 156 | purple_prefs_get_int(widget_size_prefs[i])); |
| 10584 | 157 | g_free(prefbase); |
| 158 | } | |
| 159 | } | |
| 160 | ||
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
161 | /* |
| 12973 | 162 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15884 | 163 | if (purple_prefs_get_bool(widget_bool_prefs_set[i])) { |
| 12973 | 164 | prefbase = g_path_get_basename(widget_bool_prefs[i]); |
| 165 | g_string_append_printf(style_string, | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
166 | "\t%s = %d\n", prefbase, |
| 15884 | 167 | purple_prefs_get_bool(widget_bool_prefs[i])); |
| 12973 | 168 | g_free(prefbase); |
| 169 | } | |
| 170 | } | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
171 | */ |
| 12973 | 172 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
173 | g_string_append(style_string, "\n}\nwidget_class \"*\" style \"purplerc_style\"\n"); |
| 10584 | 174 | |
| 175 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { | |
| 15884 | 176 | if (purple_prefs_get_bool(font_prefs_set[i])) { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
177 | const gchar *pref; |
| 14391 | 178 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
179 | pref = purple_prefs_get_string(font_prefs[i]); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
180 | if (pref != NULL && strcmp(pref, "")) { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
181 | prefbase = g_path_get_basename(font_prefs[i]); |
| 14391 | 182 | g_string_append_printf(style_string, |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
183 | "style \"%s_style\"\n{\n" |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
184 | "\tfont_name = \"%s\"\n}" |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
185 | "\nwidget \"%s\" " |
| 14391 | 186 | "style \"%s_style\"\n", |
| 187 | prefbase, pref, | |
| 188 | prefbase, prefbase); | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
189 | g_free(prefbase); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
190 | } |
| 10584 | 191 | } |
| 192 | } | |
| 193 | ||
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
194 | return style_string; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
195 | } |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
196 | |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
197 | static void |
|
22104
56970903b8e9
Probe for -Wstrict-prototypes to get some more warnings. I then cleaned up
Richard Laager <rlaager@pidgin.im>
parents:
21955
diff
changeset
|
198 | purplerc_make_changes(void) |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
199 | { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
200 | GString *str = make_gtkrc_string(); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
201 | #if GTK_CHECK_VERSION(2,4,0) |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
202 | GtkSettings *setting = NULL; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
203 | #endif |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
204 | |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
205 | gtk_rc_parse_string(str->str); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
206 | g_string_free(str, TRUE); |
| 10584 | 207 | |
| 12973 | 208 | #if GTK_CHECK_VERSION(2,4,0) |
| 209 | setting = gtk_settings_get_default(); | |
| 210 | gtk_rc_reset_styles(setting); | |
| 211 | #endif | |
| 10584 | 212 | } |
| 213 | ||
| 214 | static void | |
| 15884 | 215 | purplerc_write(GtkWidget *widget, gpointer data) |
| 11940 | 216 | { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
217 | GString *str = make_gtkrc_string(); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
218 | str = g_string_prepend(str, "# This file automatically written by the Pidgin GTK+ Theme Control plugin.\n# Any changes to this file will be overwritten by the plugin when told to\n# write the settings again.\n# The FAQ (http://developer.pidgin.im/wiki/FAQ) contains some further examples\n# of possible pidgin gtkrc settings.\n"); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
219 | purple_util_write_data_to_file("gtkrc-2.0", str->str, -1); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
220 | g_string_free(str, TRUE); |
| 11940 | 221 | } |
| 222 | ||
| 223 | static void | |
| 15884 | 224 | purplerc_reread(GtkWidget *widget, gpointer data) |
| 11940 | 225 | { |
| 226 | gtk_rc_reparse_all(); | |
| 12973 | 227 | /* I don't know if this is necessary but if not it shouldn't hurt. */ |
| 15884 | 228 | purplerc_make_changes(); |
| 11940 | 229 | } |
| 230 | ||
| 231 | static void | |
| 15884 | 232 | purplerc_pref_changed_cb(const char *name, PurplePrefType type, |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
233 | gconstpointer value, gpointer data) |
| 10584 | 234 | { |
| 15884 | 235 | purplerc_make_changes(); |
| 10584 | 236 | } |
| 237 | ||
| 238 | static void | |
| 15884 | 239 | purplerc_color_response(GtkDialog *color_dialog, gint response, gpointer data) |
| 10584 | 240 | { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
241 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 242 | |
| 243 | if (response == GTK_RESPONSE_OK) { | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
244 | GdkColor color; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
245 | gchar colorstr[8]; |
| 10584 | 246 | GtkWidget *colorsel = GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel; |
| 247 | ||
| 248 | gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), &color); | |
| 249 | ||
| 250 | g_snprintf(colorstr, sizeof(colorstr), "#%02X%02X%02X", | |
| 251 | color.red/256, color.green/256, color.blue/256); | |
| 252 | ||
| 15884 | 253 | purple_prefs_set_string(color_prefs[subscript], colorstr); |
| 10584 | 254 | } |
| 255 | gtk_widget_destroy(GTK_WIDGET(color_dialog)); | |
| 256 | } | |
| 257 | ||
| 258 | static void | |
| 15884 | 259 | purplerc_set_color(GtkWidget *widget, gpointer data) |
| 10584 | 260 | { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
261 | GdkColor color; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
262 | gchar title[128]; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
263 | const gchar *pref = NULL; |
| 10584 | 264 | GtkWidget *color_dialog = NULL; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
265 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 266 | |
| 267 | g_snprintf(title, sizeof(title), _("Select Color for %s"), | |
|
10586
fd1399d550fc
[gaim-migrate @ 11990]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10585
diff
changeset
|
268 | _(color_names[GPOINTER_TO_INT(data)])); |
| 10584 | 269 | color_dialog = gtk_color_selection_dialog_new(_("Select Color")); |
| 270 | g_signal_connect(G_OBJECT(color_dialog), "response", | |
| 15884 | 271 | G_CALLBACK(purplerc_color_response), data); |
| 10584 | 272 | |
| 15884 | 273 | pref = purple_prefs_get_string(color_prefs[subscript]); |
| 14391 | 274 | |
| 275 | if (pref != NULL && strcmp(pref, "")) { | |
| 276 | if (gdk_color_parse(pref, &color)) { | |
| 277 | gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), &color); | |
| 278 | } | |
| 10584 | 279 | } |
| 280 | ||
| 281 | gtk_window_present(GTK_WINDOW(color_dialog)); | |
| 282 | } | |
| 283 | ||
| 284 | static void | |
| 15884 | 285 | purplerc_font_response(GtkDialog *font_dialog, gint response, gpointer data) |
| 10584 | 286 | { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
287 | const gchar *prefpath; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
288 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 289 | |
| 290 | if (response == GTK_RESPONSE_OK) { | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
291 | gchar *fontname = NULL; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
292 | |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
293 | if (subscript == -1) { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
294 | prefpath = "/plugins/gtk/purplerc/gtk-font-name"; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
295 | } else { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
296 | prefpath = font_prefs[subscript]; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
297 | } |
| 10584 | 298 | |
| 299 | fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(font_dialog)); | |
| 300 | ||
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
301 | purple_prefs_set_string(prefpath, fontname); |
| 10584 | 302 | g_free(fontname); |
| 303 | } | |
| 304 | gtk_widget_destroy(GTK_WIDGET(font_dialog)); | |
| 305 | } | |
| 306 | ||
| 307 | static void | |
| 15884 | 308 | purplerc_set_font(GtkWidget *widget, gpointer data) |
| 10584 | 309 | { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
310 | gchar title[128]; |
| 10584 | 311 | GtkWidget *font_dialog = NULL; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
312 | gint subscript = GPOINTER_TO_INT(data); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
313 | const gchar *pref = NULL, *prefpath = NULL; |
| 10584 | 314 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
315 | if (subscript == -1) { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
316 | g_snprintf(title, sizeof(title), _("Select Interface Font")); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
317 | prefpath = "/plugins/gtk/purplerc/gtk-font-name"; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
318 | } else { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
319 | g_snprintf(title, sizeof(title), _("Select Font for %s"), |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
320 | _(font_names[subscript])); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
321 | prefpath = font_prefs[subscript]; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
322 | } |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
323 | |
| 10584 | 324 | font_dialog = gtk_font_selection_dialog_new(title); |
| 325 | g_signal_connect(G_OBJECT(font_dialog), "response", | |
| 15884 | 326 | G_CALLBACK(purplerc_font_response), data); |
| 10584 | 327 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
328 | pref = purple_prefs_get_string(prefpath); |
| 14391 | 329 | |
| 330 | if (pref != NULL && strcmp(pref, "")) { | |
| 331 | gtk_font_selection_set_font_name(GTK_FONT_SELECTION(GTK_FONT_SELECTION_DIALOG(font_dialog)->fontsel), pref); | |
| 10584 | 332 | } |
| 333 | ||
| 334 | gtk_window_present(GTK_WINDOW(font_dialog)); | |
| 335 | } | |
| 336 | ||
| 337 | static gboolean | |
| 15884 | 338 | purplerc_plugin_load(PurplePlugin *plugin) |
| 10584 | 339 | { |
| 15884 | 340 | purplerc_make_changes(); |
| 10584 | 341 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
342 | pref_callback = purple_prefs_connect_callback(plugin, |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
343 | "/plugins/gtk/purplerc", |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
344 | purplerc_pref_changed_cb, |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
345 | NULL); |
| 10584 | 346 | |
| 347 | return TRUE; | |
| 348 | } | |
| 349 | ||
| 350 | static gboolean | |
| 15884 | 351 | purplerc_plugin_unload(PurplePlugin *plugin) |
| 10584 | 352 | { |
| 15884 | 353 | purple_prefs_disconnect_callback(pref_callback); |
| 10584 | 354 | |
| 355 | return TRUE; | |
| 356 | } | |
| 357 | ||
| 358 | static GtkWidget * | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
359 | purplerc_make_interface_vbox(void) |
| 10584 | 360 | { |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
361 | GtkWidget *vbox = NULL, *hbox = NULL, *check = NULL; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
362 | GtkSizeGroup *labelsg = NULL; |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
363 | gint i; |
| 10584 | 364 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
365 | vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
366 | labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 10584 | 367 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
368 | gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BORDER); |
| 12973 | 369 | |
| 10584 | 370 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { |
| 15882 | 371 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
372 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 10584 | 373 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
374 | check = pidgin_prefs_checkbox(_(color_names[i]), |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
375 | color_prefs_set[i], hbox); |
| 12546 | 376 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 377 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
378 | color_widgets[i] = pidgin_pixbuf_button_from_stock("", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
379 | GTK_STOCK_SELECT_COLOR, PIDGIN_BUTTON_HORIZONTAL); |
| 10584 | 380 | gtk_box_pack_start(GTK_BOX(hbox), color_widgets[i], FALSE, |
| 381 | FALSE, 0); | |
| 382 | gtk_widget_set_sensitive(color_widgets[i], | |
| 15884 | 383 | purple_prefs_get_bool(color_prefs_set[i])); |
| 10584 | 384 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
385 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 386 | color_widgets[i]); |
| 387 | g_signal_connect(G_OBJECT(color_widgets[i]), "clicked", | |
| 15884 | 388 | G_CALLBACK(purplerc_set_color), |
| 10584 | 389 | GINT_TO_POINTER(i)); |
| 390 | } | |
| 391 | ||
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
392 | g_object_unref(labelsg); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
393 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
394 | return vbox; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
395 | } |
| 10584 | 396 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
397 | static GtkWidget * |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
398 | purplerc_make_fonts_vbox(void) |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
399 | { |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
400 | GtkWidget *vbox = NULL, *hbox = NULL, *check = NULL, *widget = NULL; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
401 | GtkSizeGroup *labelsg = NULL; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
402 | int i; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
403 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
404 | vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
405 | labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
406 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
407 | gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BORDER); |
| 10584 | 408 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
409 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
410 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
411 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
412 | check = pidgin_prefs_checkbox(_("GTK+ Interface Font"), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
413 | "/plugins/gtk/purplerc/set/gtk-font-name", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
414 | hbox); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
415 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 416 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
417 | widget = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
418 | PIDGIN_BUTTON_HORIZONTAL); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
419 | gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
420 | gtk_widget_set_sensitive(widget, |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
421 | purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-font-name")); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
422 | g_signal_connect(G_OBJECT(check), "toggled", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
423 | G_CALLBACK(pidgin_toggle_sensitive), widget); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
424 | g_signal_connect(G_OBJECT(widget), "clicked", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
425 | G_CALLBACK(purplerc_set_font), GINT_TO_POINTER(-1)); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
426 | |
| 10584 | 427 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { |
| 15882 | 428 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
429 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 10584 | 430 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
431 | check = pidgin_prefs_checkbox(_(font_names[i]), |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
432 | font_prefs_set[i], hbox); |
| 12546 | 433 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 434 | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
435 | font_widgets[i] = pidgin_pixbuf_button_from_stock("", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
436 | GTK_STOCK_SELECT_FONT, PIDGIN_BUTTON_HORIZONTAL); |
| 10584 | 437 | gtk_box_pack_start(GTK_BOX(hbox), font_widgets[i], FALSE, |
| 438 | FALSE, 0); | |
| 439 | gtk_widget_set_sensitive(font_widgets[i], | |
| 15884 | 440 | purple_prefs_get_bool(font_prefs_set[i])); |
| 10584 | 441 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
442 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 443 | font_widgets[i]); |
| 444 | g_signal_connect(G_OBJECT(font_widgets[i]), "clicked", | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
445 | G_CALLBACK(purplerc_set_font), |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
446 | GINT_TO_POINTER(i)); |
| 10584 | 447 | } |
| 448 | ||
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
449 | g_object_unref(labelsg); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
450 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
451 | return vbox; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
452 | } |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
453 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
454 | static GtkWidget * |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
455 | purplerc_make_misc_vbox(void) |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
456 | { |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
457 | /* Note: Intentionally not using the size group argument to the |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
458 | * pidgin_prefs_labeled_* functions they only add the text label to |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
459 | * the size group not the whole thing, which isn't what I want. */ |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
460 | GtkWidget *vbox = NULL, *hbox = NULL, *check = NULL, *widget = NULL; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
461 | GtkSizeGroup *labelsg = NULL; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
462 | int i; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
463 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
464 | vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
465 | labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
466 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
467 | gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BORDER); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
468 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
469 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
470 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
471 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
472 | check = pidgin_prefs_checkbox(_("GTK+ Text Shortcut Theme"), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
473 | "/plugins/gtk/purplerc/set/gtk-key-theme-name", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
474 | hbox); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
475 | gtk_size_group_add_widget(labelsg, check); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
476 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
477 | widget = pidgin_prefs_labeled_entry(hbox, "", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
478 | "/plugins/gtk/purplerc/gtk-key-theme-name", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
479 | NULL); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
480 | gtk_widget_set_sensitive(widget, |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
481 | purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name")); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
482 | g_signal_connect(G_OBJECT(check), "toggled", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
483 | G_CALLBACK(pidgin_toggle_sensitive), widget); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
484 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
485 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
486 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
487 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
488 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
489 | check = pidgin_prefs_checkbox(_(widget_size_names[i]), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
490 | widget_size_prefs_set[i], hbox); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
491 | gtk_size_group_add_widget(labelsg, check); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
492 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
493 | widget_size_widgets[i] = pidgin_prefs_labeled_spin_button(hbox, "", widget_size_prefs[i], 0, 50, NULL); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
494 | gtk_widget_set_sensitive(widget_size_widgets[i], |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
495 | purple_prefs_get_bool(widget_size_prefs_set[i])); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
496 | g_signal_connect(G_OBJECT(check), "toggled", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
497 | G_CALLBACK(pidgin_toggle_sensitive), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
498 | widget_size_widgets[i]); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
499 | } |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
500 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
501 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
502 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
503 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
504 | check = pidgin_prefs_checkbox(_("Disable Typing Notification Text"), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
505 | "/plugins/gtk/purplerc/set/disable-typing-notification", hbox); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
506 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
507 | /* Widget boolean stuff */ |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
508 | /* |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
509 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
510 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
511 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
512 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
513 | check = pidgin_prefs_checkbox(_(widget_bool_names[i]), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
514 | widget_bool_prefs_set[i], hbox); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
515 | gtk_size_group_add_widget(labelsg, check); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
516 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
517 | widget_bool_widgets[i] = pidgin_prefs_checkbox("", widget_bool_prefs[i], hbox); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
518 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
519 | gtk_widget_set_sensitive(widget_bool_widgets[i], |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
520 | purple_prefs_get_bool(widget_bool_prefs_set[i])); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
521 | g_signal_connect(G_OBJECT(check), "toggled", |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
522 | G_CALLBACK(pidgin_toggle_sensitive), |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
523 | widget_bool_widgets[i]); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
524 | } |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
525 | */ |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
526 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
527 | g_object_unref(labelsg); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
528 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
529 | return vbox; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
530 | } |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
531 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
532 | static GtkWidget * |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
533 | purplerc_get_config_frame(PurplePlugin *plugin) |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
534 | { |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
535 | gchar *tmp; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
536 | GtkWidget *check = NULL, *label = NULL; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
537 | GtkWidget *ret = NULL, *hbox = NULL, *frame = NULL, *note = NULL; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
538 | #ifndef _WIN32 |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
539 | const gchar *homepath = "$HOME"; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
540 | #else |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
541 | const gchar *homepath = "\%APPDATA\%"; |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
542 | #endif |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
543 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
544 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
545 | note = gtk_notebook_new(); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
546 | label = gtk_label_new(NULL); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
547 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
548 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
549 | gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
550 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
551 | tmp = g_strdup_printf("<span weight=\"bold\">%s</span>", _("GTK+ Theme Control Settings")); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
552 | gtk_label_set_markup(GTK_LABEL(label), tmp); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
553 | g_free(tmp); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
554 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
555 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
556 | gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
557 | gtk_box_pack_start(GTK_BOX(ret), note, FALSE, FALSE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
558 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
559 | label = gtk_label_new(_("Colors")); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
560 | gtk_notebook_insert_page(GTK_NOTEBOOK(note), purplerc_make_interface_vbox(), label, -1); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
561 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
562 | label = gtk_label_new(_("Fonts")); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
563 | gtk_notebook_insert_page(GTK_NOTEBOOK(note), purplerc_make_fonts_vbox(), label, -1); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
564 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
565 | label = gtk_label_new(_("Miscellaneous")); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
566 | gtk_notebook_insert_page(GTK_NOTEBOOK(note), purplerc_make_misc_vbox(), label, -1); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
567 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
568 | gtk_box_pack_start(GTK_BOX(ret), gtk_hseparator_new(), TRUE, TRUE, 0); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
569 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
570 | frame = pidgin_make_frame(ret, _("Gtkrc File Tools")); |
| 11940 | 571 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
572 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
573 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 11940 | 574 | |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
575 | tmp = g_strdup_printf(_("Write settings to %s%sgtkrc-2.0"), |
|
21720
235394d5c7f4
Pull a bunch of bugfix only changes to im.pidgin.pidgin.2.3.1,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
21127
diff
changeset
|
576 | homepath, G_DIR_SEPARATOR_S ".purple" G_DIR_SEPARATOR_S); |
|
12042
b90399880391
[gaim-migrate @ 14337]
Richard Laager <rlaager@pidgin.im>
parents:
11941
diff
changeset
|
577 | check = gtk_button_new_with_label(tmp); |
|
b90399880391
[gaim-migrate @ 14337]
Richard Laager <rlaager@pidgin.im>
parents:
11941
diff
changeset
|
578 | g_free(tmp); |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
579 | gtk_box_pack_start(GTK_BOX(hbox), check, TRUE, TRUE, 0); |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
580 | g_signal_connect(G_OBJECT(check), "clicked", |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
581 | G_CALLBACK(purplerc_write), NULL); |
| 11940 | 582 | |
| 583 | check = gtk_button_new_with_label(_("Re-read gtkrc files")); | |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
584 | gtk_box_pack_start(GTK_BOX(hbox), check, TRUE, TRUE, 0); |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
585 | g_signal_connect(G_OBJECT(check), "clicked", |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
586 | G_CALLBACK(purplerc_reread), NULL); |
| 11940 | 587 | |
| 10584 | 588 | gtk_widget_show_all(ret); |
|
21127
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
589 | |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
590 | |
| 10584 | 591 | return ret; |
| 592 | } | |
| 593 | ||
| 15884 | 594 | static PidginPluginUiInfo purplerc_ui_info = |
| 10584 | 595 | { |
| 15884 | 596 | purplerc_get_config_frame, |
|
16749
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
597 | 0, /* page_num (Reserved) */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
598 | |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
599 | /* padding */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
600 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
601 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
602 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
603 | NULL |
| 10584 | 604 | }; |
| 605 | ||
| 15884 | 606 | static PurplePluginInfo purplerc_info = |
| 10584 | 607 | { |
| 15884 | 608 | PURPLE_PLUGIN_MAGIC, |
| 609 | PURPLE_MAJOR_VERSION, | |
| 610 | PURPLE_MINOR_VERSION, | |
| 611 | PURPLE_PLUGIN_STANDARD, | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
612 | PIDGIN_PLUGIN_TYPE, |
| 10584 | 613 | 0, |
| 614 | NULL, | |
| 15884 | 615 | PURPLE_PRIORITY_DEFAULT, |
| 616 | "purplerc", | |
|
16073
e70e589dde54
more help for translators (I removed a few PIDGIN_NAME references
Nathan Walp <nwalp@pidgin.im>
parents:
15987
diff
changeset
|
617 | N_("Pidgin GTK+ Theme Control"), |
|
21106
b85fbef13eed
Add a --with-extraversion option to ./configure so packagers can fine tune
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20308
diff
changeset
|
618 | DISPLAY_VERSION, |
| 10584 | 619 | N_("Provides access to commonly used gtkrc settings."), |
| 620 | N_("Provides access to commonly used gtkrc settings."), | |
|
27598
92eb3a61465b
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <deryni@pidgin.im>
parents:
27307
diff
changeset
|
621 | "Etan Reisner <deryni@pidgin.im>", |
| 15884 | 622 | PURPLE_WEBSITE, |
| 623 | purplerc_plugin_load, | |
| 624 | purplerc_plugin_unload, | |
| 10584 | 625 | NULL, |
| 15884 | 626 | &purplerc_ui_info, |
| 10584 | 627 | NULL, |
| 628 | NULL, | |
|
16749
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
629 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
630 | |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
631 | /* padding */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
632 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
633 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16073
diff
changeset
|
634 | NULL, |
| 10584 | 635 | NULL |
| 636 | }; | |
| 637 | ||
| 638 | static void | |
| 15884 | 639 | purplerc_init(PurplePlugin *plugin) |
| 10584 | 640 | { |
|
18242
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
641 | gint i; |
| 10584 | 642 | |
| 15884 | 643 | purple_prefs_add_none("/plugins"); |
| 644 | purple_prefs_add_none("/plugins/gtk"); | |
| 645 | purple_prefs_add_none("/plugins/gtk/purplerc"); | |
| 646 | purple_prefs_add_none("/plugins/gtk/purplerc/set"); | |
| 10584 | 647 | |
| 15884 | 648 | purple_prefs_add_string("/plugins/gtk/purplerc/gtk-font-name", ""); |
| 649 | purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-font-name", FALSE); | |
| 10584 | 650 | |
| 15884 | 651 | purple_prefs_add_string("/plugins/gtk/purplerc/gtk-key-theme-name", ""); |
| 652 | purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name", FALSE); | |
| 10584 | 653 | |
| 15884 | 654 | purple_prefs_add_none("/plugins/gtk/purplerc/color"); |
| 655 | purple_prefs_add_none("/plugins/gtk/purplerc/set/color"); | |
| 10584 | 656 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { |
| 15884 | 657 | purple_prefs_add_string(color_prefs[i], ""); |
| 658 | purple_prefs_add_bool(color_prefs_set[i], FALSE); | |
| 10584 | 659 | } |
| 660 | ||
| 15884 | 661 | purple_prefs_add_none("/plugins/gtk/purplerc/size"); |
| 662 | purple_prefs_add_none("/plugins/gtk/purplerc/set/size"); | |
| 10584 | 663 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { |
| 15884 | 664 | purple_prefs_add_int(widget_size_prefs[i], 0); |
| 665 | purple_prefs_add_bool(widget_size_prefs_set[i], FALSE); | |
| 10584 | 666 | } |
| 667 | ||
| 15884 | 668 | purple_prefs_add_none("/plugins/gtk/purplerc/font"); |
| 669 | purple_prefs_add_none("/plugins/gtk/purplerc/set/font"); | |
| 10584 | 670 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { |
| 15884 | 671 | purple_prefs_add_string(font_prefs[i], ""); |
| 672 | purple_prefs_add_bool(font_prefs_set[i], FALSE); | |
| 10584 | 673 | } |
| 12973 | 674 | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
675 | /* |
| 15884 | 676 | purple_prefs_add_none("/plugins/gtk/purplerc/bool"); |
| 677 | purple_prefs_add_none("/plugins/gtk/purplerc/set/bool"); | |
| 12973 | 678 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15884 | 679 | purple_prefs_add_bool(widget_bool_prefs[i], TRUE); |
| 680 | purple_prefs_add_bool(widget_bool_prefs_set[i], FALSE); | |
| 12973 | 681 | } |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
682 | */ |
|
27269
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
683 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
684 | purple_prefs_add_bool("/plugins/gtk/purplerc/disable-typing-notification", FALSE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
685 | purple_prefs_add_bool("/plugins/gtk/purplerc/set/disable-typing-notification", FALSE); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
686 | |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
687 | /* remove old cursor color prefs */ |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
688 | purple_prefs_remove("/plugins/gtk/purplerc/color/GtkWidget::cursor-color"); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
689 | purple_prefs_remove("/plugins/gtk/purplerc/color/GtkWidget::secondary-cursor-color"); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
690 | purple_prefs_remove("/plugins/gtk/purplerc/set/color/GtkWidget::cursor-color"); |
|
77c9c61baf6e
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24328
diff
changeset
|
691 | purple_prefs_remove("/plugins/gtk/purplerc/set/color/GtkWidget::secondary-cursor-color"); |
| 10584 | 692 | } |
| 693 | ||
| 15884 | 694 | PURPLE_INIT_PLUGIN(purplerc, purplerc_init, purplerc_info) |