Thu, 03 Jan 2008 04:57:40 +0000
Probe for -Wstrict-prototypes to get some more warnings. I then cleaned up
the existing warnings. I removed a handful of dead code and cleaned up a
couple of things that I stumbled across.
| 10584 | 1 | /** |
| 15884 | 2 | * @file purplerc.c Purple gtk resource control plugin. |
| 10584 | 3 | * |
| 4 | * Copyright (C) 2005 Etan Reisner <deryni@eden.rutgers.edu> | |
| 5 | * | |
| 6 | * This program is free software; you can redistribute it and/or modify | |
| 7 | * it under the terms of the GNU General Public License as published by | |
| 8 | * the Free Software Foundation; either version 2 of the License, or | |
| 9 | * (at your option) any later version. | |
| 10 | * | |
| 11 | * This program is distributed in the hope that it will be useful, | |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 | * GNU General Public License for more details. | |
| 15 | * | |
| 16 | * You should have received a copy of the GNU General Public License | |
| 17 | * 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
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 10584 | 19 | */ |
| 20 | ||
| 21 | #include "internal.h" | |
| 22 | #include "gtkplugin.h" | |
| 23 | #include "gtkprefs.h" | |
| 24 | #include "gtkutils.h" | |
|
12044
e49179a1496a
[gaim-migrate @ 14339]
Richard Laager <rlaager@pidgin.im>
parents:
12042
diff
changeset
|
25 | #include "util.h" |
| 10584 | 26 | #include "version.h" |
| 27 | ||
| 28 | static guint pref_callback; | |
| 29 | ||
|
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
|
30 | static const gchar *color_prefs[] = { |
| 15884 | 31 | "/plugins/gtk/purplerc/color/GtkWidget::cursor-color", |
| 32 | "/plugins/gtk/purplerc/color/GtkWidget::secondary-cursor-color", | |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
33 | "/plugins/gtk/purplerc/color/GtkIMHtml::hyperlink-color", |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
34 | "/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
|
35 | "/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
|
36 | "/plugins/gtk/purplerc/color/GtkIMHtml::highlight-name-color", |
|
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::action-name-color" |
| 10584 | 38 | }; |
|
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
|
39 | static const gchar *color_prefs_set[] = { |
| 15884 | 40 | "/plugins/gtk/purplerc/set/color/GtkWidget::cursor-color", |
| 41 | "/plugins/gtk/purplerc/set/color/GtkWidget::secondary-cursor-color", | |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
42 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::hyperlink-color", |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
43 | "/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
|
44 | "/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
|
45 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::highlight-name-color", |
|
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::action-name-color" |
| 10584 | 47 | }; |
|
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
|
48 | static const gchar *color_names[] = { |
|
10585
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
49 | N_("Cursor Color"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
50 | N_("Secondary Cursor Color"), |
|
21955
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
51 | N_("Hyperlink Color"), |
|
4014918b95fc
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@pidgin.im>
parents:
21720
diff
changeset
|
52 | 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
|
53 | 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
|
54 | N_("Highlighted 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
|
55 | N_("Action Message Name Color") |
| 10584 | 56 | }; |
| 57 | static GtkWidget *color_widgets[G_N_ELEMENTS(color_prefs)]; | |
| 58 | ||
|
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
|
59 | static const gchar *widget_size_prefs[] = { |
| 15884 | 60 | "/plugins/gtk/purplerc/size/GtkTreeView::horizontal_separator" |
| 10584 | 61 | }; |
|
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
|
62 | static const gchar *widget_size_prefs_set[] = { |
| 15884 | 63 | "/plugins/gtk/purplerc/set/size/GtkTreeView::horizontal_separator" |
| 10584 | 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_names[] = { |
| 12201 | 66 | N_("GtkTreeView Horizontal Separation") |
| 10584 | 67 | }; |
| 68 | static GtkWidget *widget_size_widgets[G_N_ELEMENTS(widget_size_prefs)]; | |
| 69 | ||
|
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
|
70 | static const gchar *font_prefs[] = { |
| 15884 | 71 | "/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
|
72 | "/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
|
73 | "/plugins/gtk/purplerc/font/*pidgin_notify_imhtml", |
| 10584 | 74 | }; |
|
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
|
75 | static const gchar *font_prefs_set[] = { |
| 15884 | 76 | "/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
|
77 | "/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
|
78 | "/plugins/gtk/purplerc/set/font/*pidgin_notify_imhtml", |
| 10584 | 79 | }; |
|
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
|
80 | static const gchar *font_names[] = { |
|
10585
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
81 | N_("Conversation Entry"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
82 | N_("Request Dialog"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
83 | N_("Notify Dialog") |
| 10584 | 84 | }; |
| 85 | static GtkWidget *font_widgets[G_N_ELEMENTS(font_prefs)]; | |
| 86 | ||
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
87 | /* |
|
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
|
88 | static const gchar *widget_bool_prefs[] = { |
| 12973 | 89 | }; |
|
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
|
90 | static const gchar *widget_bool_prefs_set[] = { |
| 12973 | 91 | }; |
|
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
|
92 | static const gchar *widget_bool_names[] = { |
| 12973 | 93 | }; |
| 94 | 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
|
95 | */ |
| 12973 | 96 | |
|
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
|
97 | 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
|
98 | make_gtkrc_string(void) |
| 10584 | 99 | { |
|
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
|
100 | 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
|
101 | gchar *prefbase = NULL; |
| 10584 | 102 | GString *style_string = g_string_new(""); |
| 103 | ||
| 15884 | 104 | 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
|
105 | const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-font-name"); |
| 14391 | 106 | |
|
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
|
107 | 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
|
108 | 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
|
109 | "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
|
110 | 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
|
111 | } |
| 10584 | 112 | } |
| 113 | ||
| 15884 | 114 | 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
|
115 | const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-key-theme-name"); |
| 14391 | 116 | |
|
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
|
117 | 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
|
118 | 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
|
119 | "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
|
120 | 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
|
121 | } |
| 10584 | 122 | } |
| 123 | ||
|
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
|
124 | g_string_append(style_string, "style \"purplerc_style\"\n{"); |
| 10584 | 125 | |
| 126 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { | |
| 15884 | 127 | 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
|
128 | const gchar *pref; |
| 14391 | 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 | 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
|
131 | 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
|
132 | 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
|
133 | 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
|
134 | "\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
|
135 | 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
|
136 | 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
|
137 | } |
| 10584 | 138 | } |
| 139 | } | |
| 140 | ||
| 141 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { | |
| 15884 | 142 | if (purple_prefs_get_bool(widget_size_prefs_set[i])) { |
| 10584 | 143 | prefbase = g_path_get_basename(widget_size_prefs[i]); |
| 144 | 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
|
145 | "\n\t%s = %d", prefbase, |
| 15884 | 146 | purple_prefs_get_int(widget_size_prefs[i])); |
| 10584 | 147 | g_free(prefbase); |
| 148 | } | |
| 149 | } | |
| 150 | ||
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
151 | /* |
| 12973 | 152 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15884 | 153 | if (purple_prefs_get_bool(widget_bool_prefs_set[i])) { |
| 12973 | 154 | prefbase = g_path_get_basename(widget_bool_prefs[i]); |
| 155 | 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
|
156 | "\t%s = %d\n", prefbase, |
| 15884 | 157 | purple_prefs_get_bool(widget_bool_prefs[i])); |
| 12973 | 158 | g_free(prefbase); |
| 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 | |
|
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
|
163 | g_string_append(style_string, "\n}\nwidget_class \"*\" style \"purplerc_style\"\n"); |
| 10584 | 164 | |
| 165 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { | |
| 15884 | 166 | 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
|
167 | const gchar *pref; |
| 14391 | 168 | |
|
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
|
169 | 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
|
170 | 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
|
171 | prefbase = g_path_get_basename(font_prefs[i]); |
| 14391 | 172 | 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
|
173 | "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
|
174 | "\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
|
175 | "\nwidget \"%s\" " |
| 14391 | 176 | "style \"%s_style\"\n", |
| 177 | prefbase, pref, | |
| 178 | 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
|
179 | 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
|
180 | } |
| 10584 | 181 | } |
| 182 | } | |
| 183 | ||
|
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
|
184 | 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
|
185 | } |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
186 | |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
187 | 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
|
188 | 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
|
189 | { |
|
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 | 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
|
191 | #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
|
192 | 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
|
193 | #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
|
194 | |
|
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 | 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
|
196 | g_string_free(str, TRUE); |
| 10584 | 197 | |
| 12973 | 198 | #if GTK_CHECK_VERSION(2,4,0) |
| 199 | setting = gtk_settings_get_default(); | |
| 200 | gtk_rc_reset_styles(setting); | |
| 201 | #endif | |
| 10584 | 202 | } |
| 203 | ||
| 204 | static void | |
| 15884 | 205 | purplerc_write(GtkWidget *widget, gpointer data) |
| 11940 | 206 | { |
|
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
|
207 | 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
|
208 | 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
|
209 | 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
|
210 | g_string_free(str, TRUE); |
| 11940 | 211 | } |
| 212 | ||
| 213 | static void | |
| 15884 | 214 | purplerc_reread(GtkWidget *widget, gpointer data) |
| 11940 | 215 | { |
| 216 | gtk_rc_reparse_all(); | |
| 12973 | 217 | /* I don't know if this is necessary but if not it shouldn't hurt. */ |
| 15884 | 218 | purplerc_make_changes(); |
| 11940 | 219 | } |
| 220 | ||
| 221 | static void | |
| 15884 | 222 | 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
|
223 | gconstpointer value, gpointer data) |
| 10584 | 224 | { |
| 15884 | 225 | purplerc_make_changes(); |
| 10584 | 226 | } |
| 227 | ||
| 228 | static void | |
| 15884 | 229 | purplerc_color_response(GtkDialog *color_dialog, gint response, gpointer data) |
| 10584 | 230 | { |
|
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
|
231 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 232 | |
| 233 | 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
|
234 | 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
|
235 | gchar colorstr[8]; |
| 10584 | 236 | GtkWidget *colorsel = GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel; |
| 237 | ||
| 238 | gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), &color); | |
| 239 | ||
| 240 | g_snprintf(colorstr, sizeof(colorstr), "#%02X%02X%02X", | |
| 241 | color.red/256, color.green/256, color.blue/256); | |
| 242 | ||
| 15884 | 243 | purple_prefs_set_string(color_prefs[subscript], colorstr); |
| 10584 | 244 | } |
| 245 | gtk_widget_destroy(GTK_WIDGET(color_dialog)); | |
| 246 | } | |
| 247 | ||
| 248 | static void | |
| 15884 | 249 | purplerc_set_color(GtkWidget *widget, gpointer data) |
| 10584 | 250 | { |
|
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
|
251 | 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
|
252 | 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
|
253 | const gchar *pref = NULL; |
| 10584 | 254 | 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
|
255 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 256 | |
| 257 | g_snprintf(title, sizeof(title), _("Select Color for %s"), | |
|
10586
fd1399d550fc
[gaim-migrate @ 11990]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10585
diff
changeset
|
258 | _(color_names[GPOINTER_TO_INT(data)])); |
| 10584 | 259 | color_dialog = gtk_color_selection_dialog_new(_("Select Color")); |
| 260 | g_signal_connect(G_OBJECT(color_dialog), "response", | |
| 15884 | 261 | G_CALLBACK(purplerc_color_response), data); |
| 10584 | 262 | |
| 15884 | 263 | pref = purple_prefs_get_string(color_prefs[subscript]); |
| 14391 | 264 | |
| 265 | if (pref != NULL && strcmp(pref, "")) { | |
| 266 | if (gdk_color_parse(pref, &color)) { | |
| 267 | gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), &color); | |
| 268 | } | |
| 10584 | 269 | } |
| 270 | ||
| 271 | gtk_window_present(GTK_WINDOW(color_dialog)); | |
| 272 | } | |
| 273 | ||
| 274 | static void | |
| 15884 | 275 | purplerc_font_response(GtkDialog *font_dialog, gint response, gpointer data) |
| 10584 | 276 | { |
|
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
|
277 | 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
|
278 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 279 | |
| 280 | 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
|
281 | 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
|
282 | |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
283 | 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
|
284 | 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
|
285 | } 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
|
286 | 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
|
287 | } |
| 10584 | 288 | |
| 289 | fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(font_dialog)); | |
| 290 | ||
|
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 | purple_prefs_set_string(prefpath, fontname); |
| 10584 | 292 | g_free(fontname); |
| 293 | } | |
| 294 | gtk_widget_destroy(GTK_WIDGET(font_dialog)); | |
| 295 | } | |
| 296 | ||
| 297 | static void | |
| 15884 | 298 | purplerc_set_font(GtkWidget *widget, gpointer data) |
| 10584 | 299 | { |
|
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
|
300 | gchar title[128]; |
| 10584 | 301 | 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
|
302 | 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
|
303 | const gchar *pref = NULL, *prefpath = NULL; |
| 10584 | 304 | |
|
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
|
305 | 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
|
306 | 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
|
307 | 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
|
308 | } 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
|
309 | 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
|
310 | _(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
|
311 | 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
|
312 | } |
|
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 | |
| 10584 | 314 | font_dialog = gtk_font_selection_dialog_new(title); |
| 315 | g_signal_connect(G_OBJECT(font_dialog), "response", | |
| 15884 | 316 | G_CALLBACK(purplerc_font_response), data); |
| 10584 | 317 | |
|
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
|
318 | pref = purple_prefs_get_string(prefpath); |
| 14391 | 319 | |
| 320 | if (pref != NULL && strcmp(pref, "")) { | |
| 321 | gtk_font_selection_set_font_name(GTK_FONT_SELECTION(GTK_FONT_SELECTION_DIALOG(font_dialog)->fontsel), pref); | |
| 10584 | 322 | } |
| 323 | ||
| 324 | gtk_window_present(GTK_WINDOW(font_dialog)); | |
| 325 | } | |
| 326 | ||
| 327 | static gboolean | |
| 15884 | 328 | purplerc_plugin_load(PurplePlugin *plugin) |
| 10584 | 329 | { |
| 15884 | 330 | purplerc_make_changes(); |
| 10584 | 331 | |
|
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
|
332 | 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
|
333 | "/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
|
334 | 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
|
335 | NULL); |
| 10584 | 336 | |
| 337 | return TRUE; | |
| 338 | } | |
| 339 | ||
| 340 | static gboolean | |
| 15884 | 341 | purplerc_plugin_unload(PurplePlugin *plugin) |
| 10584 | 342 | { |
| 15884 | 343 | purple_prefs_disconnect_callback(pref_callback); |
| 10584 | 344 | |
| 345 | return TRUE; | |
| 346 | } | |
| 347 | ||
| 348 | static GtkWidget * | |
| 15884 | 349 | purplerc_get_config_frame(PurplePlugin *plugin) |
| 10584 | 350 | { |
| 12546 | 351 | /* Note: Intentionally not using the size group argument to the |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
352 | * pidgin_prefs_labeled_* functions they only add the text label to |
| 12546 | 353 | * the size group not the whole thing, which isn't what I want. */ |
|
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
|
354 | 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
|
355 | gchar *tmp; |
| 12546 | 356 | GtkWidget *check = NULL, *widget = 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
|
357 | GtkWidget *ret = NULL, *hbox = NULL, *frame = 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
|
358 | GtkSizeGroup *labelsg = NULL, *widgetsg = NULL, *buttonsg = 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
|
359 | #ifndef _WIN32 |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
360 | const gchar *homepath = "$HOME"; |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
361 | #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
|
362 | const gchar *homepath = "\%APPDATA\%"; |
|
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 | #endif |
| 10584 | 364 | |
| 15882 | 365 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 366 | gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); | |
| 10584 | 367 | |
| 12546 | 368 | labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 369 | widgetsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
|
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
|
370 | buttonsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 10584 | 371 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
372 | frame = pidgin_make_frame(ret, _("General")); |
| 10584 | 373 | /* interface font */ |
| 15882 | 374 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 375 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 376 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
377 | check = pidgin_prefs_checkbox(_("GTK+ Interface Font"), |
|
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
|
378 | "/plugins/gtk/purplerc/set/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
|
379 | hbox); |
| 12546 | 380 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 381 | |
| 15568 | 382 | widget = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, |
|
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
|
383 | PIDGIN_BUTTON_HORIZONTAL); |
| 10584 | 384 | gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); |
| 12546 | 385 | gtk_size_group_add_widget(widgetsg, widget); |
| 10584 | 386 | gtk_widget_set_sensitive(widget, |
| 15884 | 387 | purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-font-name")); |
| 10584 | 388 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
389 | G_CALLBACK(pidgin_toggle_sensitive), widget); |
| 10584 | 390 | g_signal_connect(G_OBJECT(widget), "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
|
391 | G_CALLBACK(purplerc_set_font), GINT_TO_POINTER(-1)); |
| 10584 | 392 | |
| 393 | /* key theme name */ | |
| 15882 | 394 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 395 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 396 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
397 | check = pidgin_prefs_checkbox(_("GTK+ Text Shortcut Theme"), |
|
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
|
398 | "/plugins/gtk/purplerc/set/gtk-key-theme-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
|
399 | hbox); |
| 12546 | 400 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 401 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
402 | widget = pidgin_prefs_labeled_entry(hbox, "", |
|
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
|
403 | "/plugins/gtk/purplerc/gtk-key-theme-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
|
404 | NULL); |
| 12546 | 405 | /* |
| 406 | gtk_size_group_add_widget(widgetsg, widget); | |
| 407 | */ | |
| 10584 | 408 | gtk_widget_set_sensitive(widget, |
| 15884 | 409 | purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name")); |
| 10584 | 410 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
411 | G_CALLBACK(pidgin_toggle_sensitive), widget); |
| 10584 | 412 | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
413 | /* |
| 12973 | 414 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15882 | 415 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 12973 | 416 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 417 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
418 | check = pidgin_prefs_checkbox(_(widget_bool_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
|
419 | widget_bool_prefs_set[i], hbox); |
| 12973 | 420 | gtk_size_group_add_widget(labelsg, check); |
| 421 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
422 | widget_bool_widgets[i] = pidgin_prefs_checkbox("", widget_bool_prefs[i], hbox); |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
423 | * |
| 12973 | 424 | gtk_size_group_add_widget(widgetsb, widget_bool_widgets[i]); |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
425 | * |
| 12973 | 426 | gtk_widget_set_sensitive(widget_bool_widgets[i], |
| 15884 | 427 | purple_prefs_get_bool(widget_bool_prefs_set[i])); |
| 12973 | 428 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
429 | G_CALLBACK(pidgin_toggle_sensitive), |
| 12973 | 430 | widget_bool_widgets[i]); |
| 431 | } | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
432 | */ |
| 12973 | 433 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
434 | frame = pidgin_make_frame(ret, _("Interface colors")); |
| 10584 | 435 | /* imhtml stuff */ |
| 436 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { | |
| 15882 | 437 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 438 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 439 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
440 | 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
|
441 | color_prefs_set[i], hbox); |
| 12546 | 442 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 443 | |
| 15568 | 444 | color_widgets[i] = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR, PIDGIN_BUTTON_HORIZONTAL); |
| 12546 | 445 | gtk_size_group_add_widget(widgetsg, color_widgets[i]); |
| 10584 | 446 | gtk_box_pack_start(GTK_BOX(hbox), color_widgets[i], FALSE, |
| 447 | FALSE, 0); | |
| 448 | gtk_widget_set_sensitive(color_widgets[i], | |
| 15884 | 449 | purple_prefs_get_bool(color_prefs_set[i])); |
| 10584 | 450 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
451 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 452 | color_widgets[i]); |
| 453 | g_signal_connect(G_OBJECT(color_widgets[i]), "clicked", | |
| 15884 | 454 | G_CALLBACK(purplerc_set_color), |
| 10584 | 455 | GINT_TO_POINTER(i)); |
| 456 | } | |
| 457 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
458 | frame = pidgin_make_frame(ret, _("Widget Sizes")); |
|
10585
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
459 | /* widget size stuff */ |
| 10584 | 460 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { |
| 15882 | 461 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 462 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 463 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
464 | check = pidgin_prefs_checkbox(_(widget_size_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
|
465 | widget_size_prefs_set[i], hbox); |
| 12546 | 466 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 467 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
468 | widget_size_widgets[i] = pidgin_prefs_labeled_spin_button(hbox, "", widget_size_prefs[i], 0, 50, NULL); |
| 12546 | 469 | /* |
| 470 | gtk_size_group_add_widget(widgetsg, widget_size_widgets[i]); | |
| 471 | */ | |
| 10584 | 472 | gtk_widget_set_sensitive(widget_size_widgets[i], |
| 15884 | 473 | purple_prefs_get_bool(widget_size_prefs_set[i])); |
| 10584 | 474 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
475 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 476 | widget_size_widgets[i]); |
| 477 | } | |
| 478 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
479 | frame = pidgin_make_frame(ret, _("Fonts")); |
| 10584 | 480 | /* imhtml font stuff */ |
| 481 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { | |
| 15882 | 482 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 483 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 484 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
485 | 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
|
486 | font_prefs_set[i], hbox); |
| 12546 | 487 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 488 | |
| 15568 | 489 | font_widgets[i] = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, PIDGIN_BUTTON_HORIZONTAL); |
| 12546 | 490 | gtk_size_group_add_widget(widgetsg, font_widgets[i]); |
| 10584 | 491 | gtk_box_pack_start(GTK_BOX(hbox), font_widgets[i], FALSE, |
| 492 | FALSE, 0); | |
| 493 | gtk_widget_set_sensitive(font_widgets[i], | |
| 15884 | 494 | purple_prefs_get_bool(font_prefs_set[i])); |
| 10584 | 495 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
496 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 497 | font_widgets[i]); |
| 498 | 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
|
499 | 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
|
500 | GINT_TO_POINTER(i)); |
| 10584 | 501 | } |
| 502 | ||
|
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
|
503 | frame = pidgin_make_frame(ret, _("Gtkrc File Tools")); |
| 11940 | 504 | |
|
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
|
505 | 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
|
506 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 11940 | 507 | |
|
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
|
508 | 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
|
509 | homepath, G_DIR_SEPARATOR_S ".purple" G_DIR_SEPARATOR_S); |
|
12042
b90399880391
[gaim-migrate @ 14337]
Richard Laager <rlaager@pidgin.im>
parents:
11941
diff
changeset
|
510 | check = gtk_button_new_with_label(tmp); |
|
b90399880391
[gaim-migrate @ 14337]
Richard Laager <rlaager@pidgin.im>
parents:
11941
diff
changeset
|
511 | g_free(tmp); |
|
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
|
512 | gtk_box_pack_start(GTK_BOX(hbox), check, FALSE, FALSE, 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
|
513 | gtk_size_group_add_widget(buttonsg, check); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
514 | 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
|
515 | G_CALLBACK(purplerc_write), NULL); |
| 11940 | 516 | |
| 517 | check = gtk_button_new_with_label(_("Re-read gtkrc files")); | |
|
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
|
518 | gtk_box_pack_start(GTK_BOX(hbox), check, FALSE, FALSE, 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
|
519 | gtk_size_group_add_widget(buttonsg, check); |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
520 | 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
|
521 | G_CALLBACK(purplerc_reread), NULL); |
| 11940 | 522 | |
| 10584 | 523 | gtk_widget_show_all(ret); |
|
21127
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
524 | |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
525 | g_object_unref(labelsg); |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
526 | g_object_unref(widgetsg); |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
527 | g_object_unref(buttonsg); |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
528 | |
| 10584 | 529 | return ret; |
| 530 | } | |
| 531 | ||
| 15884 | 532 | static PidginPluginUiInfo purplerc_ui_info = |
| 10584 | 533 | { |
| 15884 | 534 | 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
|
535 | 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
|
536 | |
|
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
|
537 | /* 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
|
538 | 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
|
539 | 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
|
540 | 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
|
541 | NULL |
| 10584 | 542 | }; |
| 543 | ||
| 15884 | 544 | static PurplePluginInfo purplerc_info = |
| 10584 | 545 | { |
| 15884 | 546 | PURPLE_PLUGIN_MAGIC, |
| 547 | PURPLE_MAJOR_VERSION, | |
| 548 | PURPLE_MINOR_VERSION, | |
| 549 | PURPLE_PLUGIN_STANDARD, | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
550 | PIDGIN_PLUGIN_TYPE, |
| 10584 | 551 | 0, |
| 552 | NULL, | |
| 15884 | 553 | PURPLE_PRIORITY_DEFAULT, |
| 554 | "purplerc", | |
|
16073
e70e589dde54
more help for translators (I removed a few PIDGIN_NAME references
Nathan Walp <nwalp@pidgin.im>
parents:
15987
diff
changeset
|
555 | 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
|
556 | DISPLAY_VERSION, |
| 10584 | 557 | N_("Provides access to commonly used gtkrc settings."), |
| 558 | N_("Provides access to commonly used gtkrc settings."), | |
| 559 | "Etan Reisner <deryni@eden.rutgers.edu>", | |
| 15884 | 560 | PURPLE_WEBSITE, |
| 561 | purplerc_plugin_load, | |
| 562 | purplerc_plugin_unload, | |
| 10584 | 563 | NULL, |
| 15884 | 564 | &purplerc_ui_info, |
| 10584 | 565 | NULL, |
| 566 | 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
|
567 | 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
|
568 | |
|
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
|
569 | /* 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
|
570 | 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
|
571 | 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
|
572 | NULL, |
| 10584 | 573 | NULL |
| 574 | }; | |
| 575 | ||
| 576 | static void | |
| 15884 | 577 | purplerc_init(PurplePlugin *plugin) |
| 10584 | 578 | { |
|
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
|
579 | gint i; |
| 10584 | 580 | |
| 15884 | 581 | purple_prefs_add_none("/plugins"); |
| 582 | purple_prefs_add_none("/plugins/gtk"); | |
| 583 | purple_prefs_add_none("/plugins/gtk/purplerc"); | |
| 584 | purple_prefs_add_none("/plugins/gtk/purplerc/set"); | |
| 10584 | 585 | |
| 15884 | 586 | purple_prefs_add_string("/plugins/gtk/purplerc/gtk-font-name", ""); |
| 587 | purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-font-name", FALSE); | |
| 10584 | 588 | |
| 15884 | 589 | purple_prefs_add_string("/plugins/gtk/purplerc/gtk-key-theme-name", ""); |
| 590 | purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name", FALSE); | |
| 10584 | 591 | |
| 15884 | 592 | purple_prefs_add_none("/plugins/gtk/purplerc/color"); |
| 593 | purple_prefs_add_none("/plugins/gtk/purplerc/set/color"); | |
| 10584 | 594 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { |
| 15884 | 595 | purple_prefs_add_string(color_prefs[i], ""); |
| 596 | purple_prefs_add_bool(color_prefs_set[i], FALSE); | |
| 10584 | 597 | } |
| 598 | ||
| 15884 | 599 | purple_prefs_add_none("/plugins/gtk/purplerc/size"); |
| 600 | purple_prefs_add_none("/plugins/gtk/purplerc/set/size"); | |
| 10584 | 601 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { |
| 15884 | 602 | purple_prefs_add_int(widget_size_prefs[i], 0); |
| 603 | purple_prefs_add_bool(widget_size_prefs_set[i], FALSE); | |
| 10584 | 604 | } |
| 605 | ||
| 15884 | 606 | purple_prefs_add_none("/plugins/gtk/purplerc/font"); |
| 607 | purple_prefs_add_none("/plugins/gtk/purplerc/set/font"); | |
| 10584 | 608 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { |
| 15884 | 609 | purple_prefs_add_string(font_prefs[i], ""); |
| 610 | purple_prefs_add_bool(font_prefs_set[i], FALSE); | |
| 10584 | 611 | } |
| 12973 | 612 | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
613 | /* |
| 15884 | 614 | purple_prefs_add_none("/plugins/gtk/purplerc/bool"); |
| 615 | purple_prefs_add_none("/plugins/gtk/purplerc/set/bool"); | |
| 12973 | 616 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15884 | 617 | purple_prefs_add_bool(widget_bool_prefs[i], TRUE); |
| 618 | purple_prefs_add_bool(widget_bool_prefs_set[i], FALSE); | |
| 12973 | 619 | } |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
620 | */ |
| 10584 | 621 | } |
| 622 | ||
| 15884 | 623 | PURPLE_INIT_PLUGIN(purplerc, purplerc_init, purplerc_info) |