Sat, 01 Dec 2007 14:08:02 +0000
Pull a bunch of bugfix only changes to im.pidgin.pidgin.2.3.1,
hopefully I didn't get any string changes in here so we can
release off this branch without requiring a new freeze.
applied changes from 8e8cba27fc7816cd4f4c7cf3b88766fa17044415
through 39e5d9f03e532b8584c78ddc91caff2e849faf4c
applied changes from 2702e711166c502d17af8586d58eac0247a01886
through 9a0ae9156ebcba6ee62646fb7e310af4f1b5b33a
applied changes from 9a0ae9156ebcba6ee62646fb7e310af4f1b5b33a
through 5956ea2cb4af794d14fab6bab838fd44782f00e7
applied changes from dc4128cfe2d3f8a85eec29eb92526e18aec6e227
through b4d7c3fe216cda1272c646960d568aaf68155d4d
applied changes from c77aee16184e888f78cd2e43d89ecb6202938d9b
through 30553187b82f795a4c65a0bf7f1e7e6c3fc4ff57
applied changes from 30553187b82f795a4c65a0bf7f1e7e6c3fc4ff57
through b1278944ccaa36c30b7f00edf5b79dc38347c931
applied changes from 41c1eba01a2c9fe574f5c3b0c4a2a6ee0c9955b0
through 83367f8f60af4ebb6636d5aa3e3eed63fc7e49b8
applied changes from 83367f8f60af4ebb6636d5aa3e3eed63fc7e49b8
through cf65b89d71f0a142ac21a919ced9f163b4bc7251
applied changes from cf65b89d71f0a142ac21a919ced9f163b4bc7251
through 55decf7b3893d1f4798d2a966b93eb9f08858f67
applied changes from 88390766d9b581d7a7e2e3b6156437c5bef76e93
through a00ff8e1a342a8326627d51728ad97699740c945
applied changes from a00ff8e1a342a8326627d51728ad97699740c945
through c55dabf731ea4d3fcb287e43b157062eb2d425fa
applied changes from c55dabf731ea4d3fcb287e43b157062eb2d425fa
through b576470ab9bee5e0b1c48de1e78e3e6234254cdb
applied changes from b576470ab9bee5e0b1c48de1e78e3e6234254cdb
through 5865eb4a45b2c059f8cd82ebd88bcca28ec72bd7
applied changes from 472e5899208300c15ff10fe526443261c740d2e2
through b5f18a0ed9a1cdf744b5d3344e415afd5fb05cf1
applied changes from cfebb2730668c41870ff696f157ddd68175aa0f3
through e7f1ca64fe26b46544c0f64f082c81a0a9e96f5f
applied changes from 87a81ecce720018f2f6c6d2983c0259ae3c88814
through 72fffff81de35e7d400bf8b8fb18ba7ed84a6b8c
applied changes from f5e03381162836652532f1495162df4868b7b8cb
through 48faf08abe024b6ad491a1145e309b36fceda249
applied changes from cd4038a435bd39cc62244d5614b8d94ad689d8bf
through d03ce5e2bc3aaa6ee963e1ebced007175aaa099f
applied changes from d03ce5e2bc3aaa6ee963e1ebced007175aaa099f
through f5e03381162836652532f1495162df4868b7b8cb
applied changes from 9e52f5f3fa15ac341c185f72558447f3ff263337
through 727439d778b7d7f40aa0230cb9be26765e8d50a9
applied changes from cd4038a435bd39cc62244d5614b8d94ad689d8bf
through 37d10660345bc1f2092492296caa8deaf84744b4
applied changes from d5c8358a1cdfe381e834ab7f86a9e1fb6835e65f
through 41b4d75b70555daf78b3c5701a59453027ca57e7
applied changes from 41b4d75b70555daf78b3c5701a59453027ca57e7
through fb945a0cab270a5eaf15d294b8706714e22742c1
applied changes from fb945a0cab270a5eaf15d294b8706714e22742c1
through 680ead8ac23fbdc99bd7178248a4cdf0bec54307
applied changes from 41b4d75b70555daf78b3c5701a59453027ca57e7
through 29f8aed19e209a53a63c57cf872bc9f446d84aeb
applied changes from 2996670bdeb36ac63658ea4760a8a1f2e362e703
through 7595eff42168a97a13aec5a68f05916a862b22df
applied changes from 1273d64fc47b82be9ff2bca00d14e37199bcc026
through bd625d93706896fbd570aee9b3d53ceb38241a12
applied changes from c27700a33779f1f8f380b0ed0a62756be4b6f17c
through a66a55b8836e3241bcc5772e499aa7c85d7bef88
applied changes from ed49703095cc1bf4f1938ef4cebcc2d906f5d911
through ae553a7b1f48faebd22d107832f5827460d5d656
| 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", | |
| 33 | "/plugins/gtk/purplerc/color/GtkIMHtml::hyperlink-color" | |
| 10584 | 34 | }; |
|
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
|
35 | static const gchar *color_prefs_set[] = { |
| 15884 | 36 | "/plugins/gtk/purplerc/set/color/GtkWidget::cursor-color", |
| 37 | "/plugins/gtk/purplerc/set/color/GtkWidget::secondary-cursor-color", | |
| 38 | "/plugins/gtk/purplerc/set/color/GtkIMHtml::hyperlink-color" | |
| 10584 | 39 | }; |
|
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
|
40 | static const gchar *color_names[] = { |
|
10585
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
41 | N_("Cursor Color"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
42 | N_("Secondary Cursor Color"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
43 | N_("Hyperlink Color") |
| 10584 | 44 | }; |
| 45 | static GtkWidget *color_widgets[G_N_ELEMENTS(color_prefs)]; | |
| 46 | ||
|
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
|
47 | static const gchar *widget_size_prefs[] = { |
| 15884 | 48 | "/plugins/gtk/purplerc/size/GtkTreeView::horizontal_separator" |
| 10584 | 49 | }; |
|
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
|
50 | static const gchar *widget_size_prefs_set[] = { |
| 15884 | 51 | "/plugins/gtk/purplerc/set/size/GtkTreeView::horizontal_separator" |
| 10584 | 52 | }; |
|
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
|
53 | static const gchar *widget_size_names[] = { |
| 12201 | 54 | N_("GtkTreeView Horizontal Separation") |
| 10584 | 55 | }; |
| 56 | static GtkWidget *widget_size_widgets[G_N_ELEMENTS(widget_size_prefs)]; | |
| 57 | ||
|
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
|
58 | static const gchar *font_prefs[] = { |
| 15884 | 59 | "/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
|
60 | "/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
|
61 | "/plugins/gtk/purplerc/font/*pidgin_notify_imhtml", |
| 10584 | 62 | }; |
|
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
|
63 | static const gchar *font_prefs_set[] = { |
| 15884 | 64 | "/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
|
65 | "/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
|
66 | "/plugins/gtk/purplerc/set/font/*pidgin_notify_imhtml", |
| 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 *font_names[] = { |
|
10585
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
69 | N_("Conversation Entry"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
70 | N_("Request Dialog"), |
|
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
71 | N_("Notify Dialog") |
| 10584 | 72 | }; |
| 73 | static GtkWidget *font_widgets[G_N_ELEMENTS(font_prefs)]; | |
| 74 | ||
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
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 *widget_bool_prefs[] = { |
| 12973 | 77 | }; |
|
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
|
78 | static const gchar *widget_bool_prefs_set[] = { |
| 12973 | 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 *widget_bool_names[] = { |
| 12973 | 81 | }; |
| 82 | 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
|
83 | */ |
| 12973 | 84 | |
|
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
|
85 | static GString * |
|
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 | make_gtkrc_string() |
| 10584 | 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 | 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
|
89 | gchar *prefbase = NULL; |
| 10584 | 90 | GString *style_string = g_string_new(""); |
| 91 | ||
| 15884 | 92 | 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
|
93 | const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-font-name"); |
| 14391 | 94 | |
|
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
|
95 | 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
|
96 | 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
|
97 | "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
|
98 | 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
|
99 | } |
| 10584 | 100 | } |
| 101 | ||
| 15884 | 102 | 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
|
103 | const gchar *pref = purple_prefs_get_string("/plugins/gtk/purplerc/gtk-key-theme-name"); |
| 14391 | 104 | |
|
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 | 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
|
106 | 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
|
107 | "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
|
108 | 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
|
109 | } |
| 10584 | 110 | } |
| 111 | ||
|
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
|
112 | g_string_append(style_string, "style \"purplerc_style\"\n{"); |
| 10584 | 113 | |
| 114 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { | |
| 15884 | 115 | 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
|
116 | const gchar *pref; |
| 14391 | 117 | |
|
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
|
118 | 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
|
119 | 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
|
120 | 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
|
121 | 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
|
122 | "\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
|
123 | 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
|
124 | 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
|
125 | } |
| 10584 | 126 | } |
| 127 | } | |
| 128 | ||
| 129 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { | |
| 15884 | 130 | if (purple_prefs_get_bool(widget_size_prefs_set[i])) { |
| 10584 | 131 | prefbase = g_path_get_basename(widget_size_prefs[i]); |
| 132 | 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
|
133 | "\n\t%s = %d", prefbase, |
| 15884 | 134 | purple_prefs_get_int(widget_size_prefs[i])); |
| 10584 | 135 | g_free(prefbase); |
| 136 | } | |
| 137 | } | |
| 138 | ||
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
139 | /* |
| 12973 | 140 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15884 | 141 | if (purple_prefs_get_bool(widget_bool_prefs_set[i])) { |
| 12973 | 142 | prefbase = g_path_get_basename(widget_bool_prefs[i]); |
| 143 | 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
|
144 | "\t%s = %d\n", prefbase, |
| 15884 | 145 | purple_prefs_get_bool(widget_bool_prefs[i])); |
| 12973 | 146 | g_free(prefbase); |
| 147 | } | |
| 148 | } | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
149 | */ |
| 12973 | 150 | |
|
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
|
151 | g_string_append(style_string, "\n}\nwidget_class \"*\" style \"purplerc_style\"\n"); |
| 10584 | 152 | |
| 153 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { | |
| 15884 | 154 | 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
|
155 | const gchar *pref; |
| 14391 | 156 | |
|
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
|
157 | 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
|
158 | 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
|
159 | prefbase = g_path_get_basename(font_prefs[i]); |
| 14391 | 160 | 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
|
161 | "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
|
162 | "\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
|
163 | "\nwidget \"%s\" " |
| 14391 | 164 | "style \"%s_style\"\n", |
| 165 | prefbase, pref, | |
| 166 | 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
|
167 | 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
|
168 | } |
| 10584 | 169 | } |
| 170 | } | |
| 171 | ||
|
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
|
172 | 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
|
173 | } |
|
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 | |
|
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 | static void |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
176 | purplerc_make_changes() |
|
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 | { |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
178 | 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
|
179 | #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
|
180 | 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
|
181 | #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
|
182 | |
|
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 | 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
|
184 | g_string_free(str, TRUE); |
| 10584 | 185 | |
| 12973 | 186 | #if GTK_CHECK_VERSION(2,4,0) |
| 187 | setting = gtk_settings_get_default(); | |
| 188 | gtk_rc_reset_styles(setting); | |
| 189 | #endif | |
| 10584 | 190 | } |
| 191 | ||
| 192 | static void | |
| 15884 | 193 | purplerc_write(GtkWidget *widget, gpointer data) |
| 11940 | 194 | { |
|
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
|
195 | 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
|
196 | 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
|
197 | 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
|
198 | g_string_free(str, TRUE); |
| 11940 | 199 | } |
| 200 | ||
| 201 | static void | |
| 15884 | 202 | purplerc_reread(GtkWidget *widget, gpointer data) |
| 11940 | 203 | { |
| 204 | gtk_rc_reparse_all(); | |
| 12973 | 205 | /* I don't know if this is necessary but if not it shouldn't hurt. */ |
| 15884 | 206 | purplerc_make_changes(); |
| 11940 | 207 | } |
| 208 | ||
| 209 | static void | |
| 15884 | 210 | 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
|
211 | gconstpointer value, gpointer data) |
| 10584 | 212 | { |
| 15884 | 213 | purplerc_make_changes(); |
| 10584 | 214 | } |
| 215 | ||
| 216 | static void | |
| 15884 | 217 | purplerc_color_response(GtkDialog *color_dialog, gint response, gpointer data) |
| 10584 | 218 | { |
|
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
|
219 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 220 | |
| 221 | 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
|
222 | 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
|
223 | gchar colorstr[8]; |
| 10584 | 224 | GtkWidget *colorsel = GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel; |
| 225 | ||
| 226 | gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), &color); | |
| 227 | ||
| 228 | g_snprintf(colorstr, sizeof(colorstr), "#%02X%02X%02X", | |
| 229 | color.red/256, color.green/256, color.blue/256); | |
| 230 | ||
| 15884 | 231 | purple_prefs_set_string(color_prefs[subscript], colorstr); |
| 10584 | 232 | } |
| 233 | gtk_widget_destroy(GTK_WIDGET(color_dialog)); | |
| 234 | } | |
| 235 | ||
| 236 | static void | |
| 15884 | 237 | purplerc_set_color(GtkWidget *widget, gpointer data) |
| 10584 | 238 | { |
|
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
|
239 | 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
|
240 | 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
|
241 | const gchar *pref = NULL; |
| 10584 | 242 | 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
|
243 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 244 | |
| 245 | g_snprintf(title, sizeof(title), _("Select Color for %s"), | |
|
10586
fd1399d550fc
[gaim-migrate @ 11990]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10585
diff
changeset
|
246 | _(color_names[GPOINTER_TO_INT(data)])); |
| 10584 | 247 | color_dialog = gtk_color_selection_dialog_new(_("Select Color")); |
| 248 | g_signal_connect(G_OBJECT(color_dialog), "response", | |
| 15884 | 249 | G_CALLBACK(purplerc_color_response), data); |
| 10584 | 250 | |
| 15884 | 251 | pref = purple_prefs_get_string(color_prefs[subscript]); |
| 14391 | 252 | |
| 253 | if (pref != NULL && strcmp(pref, "")) { | |
| 254 | if (gdk_color_parse(pref, &color)) { | |
| 255 | gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), &color); | |
| 256 | } | |
| 10584 | 257 | } |
| 258 | ||
| 259 | gtk_window_present(GTK_WINDOW(color_dialog)); | |
| 260 | } | |
| 261 | ||
| 262 | static void | |
| 15884 | 263 | purplerc_font_response(GtkDialog *font_dialog, gint response, gpointer data) |
| 10584 | 264 | { |
|
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 | 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
|
266 | gint subscript = GPOINTER_TO_INT(data); |
| 10584 | 267 | |
| 268 | 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
|
269 | 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
|
270 | |
|
899ccffe6c26
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <deryni@pidgin.im>
parents:
17247
diff
changeset
|
271 | 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
|
272 | 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
|
273 | } 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
|
274 | 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
|
275 | } |
| 10584 | 276 | |
| 277 | fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(font_dialog)); | |
| 278 | ||
|
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
|
279 | purple_prefs_set_string(prefpath, fontname); |
| 10584 | 280 | g_free(fontname); |
| 281 | } | |
| 282 | gtk_widget_destroy(GTK_WIDGET(font_dialog)); | |
| 283 | } | |
| 284 | ||
| 285 | static void | |
| 15884 | 286 | purplerc_set_font(GtkWidget *widget, gpointer data) |
| 10584 | 287 | { |
|
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
|
288 | gchar title[128]; |
| 10584 | 289 | 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
|
290 | 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
|
291 | const gchar *pref = NULL, *prefpath = NULL; |
| 10584 | 292 | |
|
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
|
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 | 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
|
295 | 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
|
296 | } 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
|
297 | 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
|
298 | _(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
|
299 | 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
|
300 | } |
|
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 | |
| 10584 | 302 | font_dialog = gtk_font_selection_dialog_new(title); |
| 303 | g_signal_connect(G_OBJECT(font_dialog), "response", | |
| 15884 | 304 | G_CALLBACK(purplerc_font_response), data); |
| 10584 | 305 | |
|
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
|
306 | pref = purple_prefs_get_string(prefpath); |
| 14391 | 307 | |
| 308 | if (pref != NULL && strcmp(pref, "")) { | |
| 309 | gtk_font_selection_set_font_name(GTK_FONT_SELECTION(GTK_FONT_SELECTION_DIALOG(font_dialog)->fontsel), pref); | |
| 10584 | 310 | } |
| 311 | ||
| 312 | gtk_window_present(GTK_WINDOW(font_dialog)); | |
| 313 | } | |
| 314 | ||
| 315 | static gboolean | |
| 15884 | 316 | purplerc_plugin_load(PurplePlugin *plugin) |
| 10584 | 317 | { |
| 15884 | 318 | purplerc_make_changes(); |
| 10584 | 319 | |
|
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
|
320 | 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
|
321 | "/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
|
322 | 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
|
323 | NULL); |
| 10584 | 324 | |
| 325 | return TRUE; | |
| 326 | } | |
| 327 | ||
| 328 | static gboolean | |
| 15884 | 329 | purplerc_plugin_unload(PurplePlugin *plugin) |
| 10584 | 330 | { |
| 15884 | 331 | purple_prefs_disconnect_callback(pref_callback); |
| 10584 | 332 | |
| 333 | return TRUE; | |
| 334 | } | |
| 335 | ||
| 336 | static GtkWidget * | |
| 15884 | 337 | purplerc_get_config_frame(PurplePlugin *plugin) |
| 10584 | 338 | { |
| 12546 | 339 | /* 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
|
340 | * pidgin_prefs_labeled_* functions they only add the text label to |
| 12546 | 341 | * 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
|
342 | 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
|
343 | gchar *tmp; |
| 12546 | 344 | 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
|
345 | 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
|
346 | 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
|
347 | #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
|
348 | 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
|
349 | #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
|
350 | 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
|
351 | #endif |
| 10584 | 352 | |
| 15882 | 353 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 354 | gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); | |
| 10584 | 355 | |
| 12546 | 356 | labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 357 | 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
|
358 | buttonsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 10584 | 359 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
360 | frame = pidgin_make_frame(ret, _("General")); |
| 10584 | 361 | /* interface font */ |
| 15882 | 362 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 363 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 364 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
365 | 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
|
366 | "/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
|
367 | hbox); |
| 12546 | 368 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 369 | |
| 15568 | 370 | 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
|
371 | PIDGIN_BUTTON_HORIZONTAL); |
| 10584 | 372 | gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); |
| 12546 | 373 | gtk_size_group_add_widget(widgetsg, widget); |
| 10584 | 374 | gtk_widget_set_sensitive(widget, |
| 15884 | 375 | purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-font-name")); |
| 10584 | 376 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
377 | G_CALLBACK(pidgin_toggle_sensitive), widget); |
| 10584 | 378 | 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
|
379 | G_CALLBACK(purplerc_set_font), GINT_TO_POINTER(-1)); |
| 10584 | 380 | |
| 381 | /* key theme name */ | |
| 15882 | 382 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 383 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 384 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
385 | 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
|
386 | "/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
|
387 | hbox); |
| 12546 | 388 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 389 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
390 | 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
|
391 | "/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
|
392 | NULL); |
| 12546 | 393 | /* |
| 394 | gtk_size_group_add_widget(widgetsg, widget); | |
| 395 | */ | |
| 10584 | 396 | gtk_widget_set_sensitive(widget, |
| 15884 | 397 | purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name")); |
| 10584 | 398 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
399 | G_CALLBACK(pidgin_toggle_sensitive), widget); |
| 10584 | 400 | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
401 | /* |
| 12973 | 402 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15882 | 403 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 12973 | 404 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 405 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
406 | 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
|
407 | widget_bool_prefs_set[i], hbox); |
| 12973 | 408 | gtk_size_group_add_widget(labelsg, check); |
| 409 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
410 | 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
|
411 | * |
| 12973 | 412 | 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
|
413 | * |
| 12973 | 414 | gtk_widget_set_sensitive(widget_bool_widgets[i], |
| 15884 | 415 | purple_prefs_get_bool(widget_bool_prefs_set[i])); |
| 12973 | 416 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
417 | G_CALLBACK(pidgin_toggle_sensitive), |
| 12973 | 418 | widget_bool_widgets[i]); |
| 419 | } | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
420 | */ |
| 12973 | 421 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
422 | frame = pidgin_make_frame(ret, _("Interface colors")); |
| 10584 | 423 | /* imhtml stuff */ |
| 424 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { | |
| 15882 | 425 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 426 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 427 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
428 | 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
|
429 | color_prefs_set[i], hbox); |
| 12546 | 430 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 431 | |
| 15568 | 432 | color_widgets[i] = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR, PIDGIN_BUTTON_HORIZONTAL); |
| 12546 | 433 | gtk_size_group_add_widget(widgetsg, color_widgets[i]); |
| 10584 | 434 | gtk_box_pack_start(GTK_BOX(hbox), color_widgets[i], FALSE, |
| 435 | FALSE, 0); | |
| 436 | gtk_widget_set_sensitive(color_widgets[i], | |
| 15884 | 437 | purple_prefs_get_bool(color_prefs_set[i])); |
| 10584 | 438 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
439 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 440 | color_widgets[i]); |
| 441 | g_signal_connect(G_OBJECT(color_widgets[i]), "clicked", | |
| 15884 | 442 | G_CALLBACK(purplerc_set_color), |
| 10584 | 443 | GINT_TO_POINTER(i)); |
| 444 | } | |
| 445 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
446 | frame = pidgin_make_frame(ret, _("Widget Sizes")); |
|
10585
42d99375d8d0
[gaim-migrate @ 11989]
Nathan Fredrickson <nathan@silverorange.com>
parents:
10584
diff
changeset
|
447 | /* widget size stuff */ |
| 10584 | 448 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { |
| 15882 | 449 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 450 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 451 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
452 | 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
|
453 | widget_size_prefs_set[i], hbox); |
| 12546 | 454 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 455 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
456 | widget_size_widgets[i] = pidgin_prefs_labeled_spin_button(hbox, "", widget_size_prefs[i], 0, 50, NULL); |
| 12546 | 457 | /* |
| 458 | gtk_size_group_add_widget(widgetsg, widget_size_widgets[i]); | |
| 459 | */ | |
| 10584 | 460 | gtk_widget_set_sensitive(widget_size_widgets[i], |
| 15884 | 461 | purple_prefs_get_bool(widget_size_prefs_set[i])); |
| 10584 | 462 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
463 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 464 | widget_size_widgets[i]); |
| 465 | } | |
| 466 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
467 | frame = pidgin_make_frame(ret, _("Fonts")); |
| 10584 | 468 | /* imhtml font stuff */ |
| 469 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { | |
| 15882 | 470 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 10584 | 471 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 472 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
473 | 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
|
474 | font_prefs_set[i], hbox); |
| 12546 | 475 | gtk_size_group_add_widget(labelsg, check); |
| 10584 | 476 | |
| 15568 | 477 | font_widgets[i] = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, PIDGIN_BUTTON_HORIZONTAL); |
| 12546 | 478 | gtk_size_group_add_widget(widgetsg, font_widgets[i]); |
| 10584 | 479 | gtk_box_pack_start(GTK_BOX(hbox), font_widgets[i], FALSE, |
| 480 | FALSE, 0); | |
| 481 | gtk_widget_set_sensitive(font_widgets[i], | |
| 15884 | 482 | purple_prefs_get_bool(font_prefs_set[i])); |
| 10584 | 483 | g_signal_connect(G_OBJECT(check), "toggled", |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
484 | G_CALLBACK(pidgin_toggle_sensitive), |
| 10584 | 485 | font_widgets[i]); |
| 486 | 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
|
487 | 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
|
488 | GINT_TO_POINTER(i)); |
| 10584 | 489 | } |
| 490 | ||
|
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
|
491 | frame = pidgin_make_frame(ret, _("Gtkrc File Tools")); |
| 11940 | 492 | |
|
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
|
493 | 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
|
494 | gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); |
| 11940 | 495 | |
|
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
|
496 | 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
|
497 | homepath, G_DIR_SEPARATOR_S ".purple" G_DIR_SEPARATOR_S); |
|
12042
b90399880391
[gaim-migrate @ 14337]
Richard Laager <rlaager@pidgin.im>
parents:
11941
diff
changeset
|
498 | check = gtk_button_new_with_label(tmp); |
|
b90399880391
[gaim-migrate @ 14337]
Richard Laager <rlaager@pidgin.im>
parents:
11941
diff
changeset
|
499 | 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
|
500 | 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
|
501 | 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
|
502 | 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
|
503 | G_CALLBACK(purplerc_write), NULL); |
| 11940 | 504 | |
| 505 | 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
|
506 | 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
|
507 | 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
|
508 | 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
|
509 | G_CALLBACK(purplerc_reread), NULL); |
| 11940 | 510 | |
| 10584 | 511 | gtk_widget_show_all(ret); |
|
21127
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
512 | |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
513 | g_object_unref(labelsg); |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
514 | g_object_unref(widgetsg); |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
515 | g_object_unref(buttonsg); |
|
c6347aed1fb0
Fix some leaking GtkSizeGroups.
Daniel Atallah <datallah@pidgin.im>
parents:
21106
diff
changeset
|
516 | |
| 10584 | 517 | return ret; |
| 518 | } | |
| 519 | ||
| 15884 | 520 | static PidginPluginUiInfo purplerc_ui_info = |
| 10584 | 521 | { |
| 15884 | 522 | 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
|
523 | 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
|
524 | |
|
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
|
525 | /* 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
|
526 | 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
|
527 | 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
|
528 | 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
|
529 | NULL |
| 10584 | 530 | }; |
| 531 | ||
| 15884 | 532 | static PurplePluginInfo purplerc_info = |
| 10584 | 533 | { |
| 15884 | 534 | PURPLE_PLUGIN_MAGIC, |
| 535 | PURPLE_MAJOR_VERSION, | |
| 536 | PURPLE_MINOR_VERSION, | |
| 537 | PURPLE_PLUGIN_STANDARD, | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15442
diff
changeset
|
538 | PIDGIN_PLUGIN_TYPE, |
| 10584 | 539 | 0, |
| 540 | NULL, | |
| 15884 | 541 | PURPLE_PRIORITY_DEFAULT, |
| 542 | "purplerc", | |
|
16073
e70e589dde54
more help for translators (I removed a few PIDGIN_NAME references
Nathan Walp <nwalp@pidgin.im>
parents:
15987
diff
changeset
|
543 | 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
|
544 | DISPLAY_VERSION, |
| 10584 | 545 | N_("Provides access to commonly used gtkrc settings."), |
| 546 | N_("Provides access to commonly used gtkrc settings."), | |
| 547 | "Etan Reisner <deryni@eden.rutgers.edu>", | |
| 15884 | 548 | PURPLE_WEBSITE, |
| 549 | purplerc_plugin_load, | |
| 550 | purplerc_plugin_unload, | |
| 10584 | 551 | NULL, |
| 15884 | 552 | &purplerc_ui_info, |
| 10584 | 553 | NULL, |
| 554 | 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
|
555 | 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
|
556 | |
|
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
|
557 | /* 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
|
558 | 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
|
559 | 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
|
560 | NULL, |
| 10584 | 561 | NULL |
| 562 | }; | |
| 563 | ||
| 564 | static void | |
| 15884 | 565 | purplerc_init(PurplePlugin *plugin) |
| 10584 | 566 | { |
|
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
|
567 | gint i; |
| 10584 | 568 | |
| 15884 | 569 | purple_prefs_add_none("/plugins"); |
| 570 | purple_prefs_add_none("/plugins/gtk"); | |
| 571 | purple_prefs_add_none("/plugins/gtk/purplerc"); | |
| 572 | purple_prefs_add_none("/plugins/gtk/purplerc/set"); | |
| 10584 | 573 | |
| 15884 | 574 | purple_prefs_add_string("/plugins/gtk/purplerc/gtk-font-name", ""); |
| 575 | purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-font-name", FALSE); | |
| 10584 | 576 | |
| 15884 | 577 | purple_prefs_add_string("/plugins/gtk/purplerc/gtk-key-theme-name", ""); |
| 578 | purple_prefs_add_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name", FALSE); | |
| 10584 | 579 | |
| 15884 | 580 | purple_prefs_add_none("/plugins/gtk/purplerc/color"); |
| 581 | purple_prefs_add_none("/plugins/gtk/purplerc/set/color"); | |
| 10584 | 582 | for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { |
| 15884 | 583 | purple_prefs_add_string(color_prefs[i], ""); |
| 584 | purple_prefs_add_bool(color_prefs_set[i], FALSE); | |
| 10584 | 585 | } |
| 586 | ||
| 15884 | 587 | purple_prefs_add_none("/plugins/gtk/purplerc/size"); |
| 588 | purple_prefs_add_none("/plugins/gtk/purplerc/set/size"); | |
| 10584 | 589 | for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { |
| 15884 | 590 | purple_prefs_add_int(widget_size_prefs[i], 0); |
| 591 | purple_prefs_add_bool(widget_size_prefs_set[i], FALSE); | |
| 10584 | 592 | } |
| 593 | ||
| 15884 | 594 | purple_prefs_add_none("/plugins/gtk/purplerc/font"); |
| 595 | purple_prefs_add_none("/plugins/gtk/purplerc/set/font"); | |
| 10584 | 596 | for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { |
| 15884 | 597 | purple_prefs_add_string(font_prefs[i], ""); |
| 598 | purple_prefs_add_bool(font_prefs_set[i], FALSE); | |
| 10584 | 599 | } |
| 12973 | 600 | |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
601 | /* |
| 15884 | 602 | purple_prefs_add_none("/plugins/gtk/purplerc/bool"); |
| 603 | purple_prefs_add_none("/plugins/gtk/purplerc/set/bool"); | |
| 12973 | 604 | for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
| 15884 | 605 | purple_prefs_add_bool(widget_bool_prefs[i], TRUE); |
| 606 | purple_prefs_add_bool(widget_bool_prefs_set[i], FALSE); | |
| 12973 | 607 | } |
|
17209
bfccb73d3ea1
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <deryni@pidgin.im>
parents:
17096
diff
changeset
|
608 | */ |
| 10584 | 609 | } |
| 610 | ||
| 15884 | 611 | PURPLE_INIT_PLUGIN(purplerc, purplerc_init, purplerc_info) |