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