Mercurial > pidgin.yaz
annotate pidgin/plugins/pidginrc.c @ 29994:6ca9aa923250
I don't think 'debug' spouts an extra 'b' when adding the '-ing'.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 15 Mar 2010 02:51:28 +0000 |
parents | d5fe33c3a765 |
children | 4e7a9940627e |
rev | line source |
---|---|
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
1 /** |
27424
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
2 * @file pidginrc.c Pidgin GTK+ resource control plugin. |
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
3 * @ingroup pidgin |
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
4 */ |
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
5 |
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
6 /* pidgin |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
7 * |
27424
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
8 * Pidgin is the legal property of its developers, whose names are too numerous |
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
10 * source distribution. |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
11 * |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
12 * 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
|
13 * 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
|
14 * 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
|
15 * (at your option) any later version. |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
16 * |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
17 * 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
|
18 * 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
|
19 * 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
|
20 * GNU General Public License for more details. |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
21 * |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
22 * 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
|
23 * 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
|
24 * 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
|
25 */ |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
26 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
27 #include "internal.h" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
28 #include "gtkplugin.h" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
29 #include "gtkprefs.h" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
30 #include "gtkutils.h" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
31 #include "util.h" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
32 #include "version.h" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
33 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
34 static guint pref_callback; |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
35 |
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
|
36 static const gchar *color_prefs[] = { |
21840
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::hyperlink-color", |
24061
0d0f99cd425e
Show visited links in a different color. This also plugs a memory leak
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22007
diff
changeset
|
38 "/plugins/gtk/purplerc/color/GtkIMHtml::hyperlink-visited-color", |
21840
9a39d47a9cd3
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@gmail.com>
parents:
21657
diff
changeset
|
39 "/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
|
40 "/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
|
41 "/plugins/gtk/purplerc/color/GtkIMHtml::highlight-name-color", |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
42 "/plugins/gtk/purplerc/color/GtkIMHtml::action-name-color", |
27156
7b7d1fc8dbbf
Fix a typo caught by Geoffrey Antos.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27132
diff
changeset
|
43 "/plugins/gtk/purplerc/color/GtkIMHtml::typing-notification-color" |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
44 }; |
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
|
45 static const gchar *color_prefs_set[] = { |
21840
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::hyperlink-color", |
24061
0d0f99cd425e
Show visited links in a different color. This also plugs a memory leak
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22007
diff
changeset
|
47 "/plugins/gtk/purplerc/set/color/GtkIMHtml::hyperlink-visited-color", |
21840
9a39d47a9cd3
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@gmail.com>
parents:
21657
diff
changeset
|
48 "/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
|
49 "/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
|
50 "/plugins/gtk/purplerc/set/color/GtkIMHtml::highlight-name-color", |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
51 "/plugins/gtk/purplerc/set/color/GtkIMHtml::action-name-color", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
52 "/plugins/gtk/purplerc/set/color/GtkIMHtml::typing-notification-color" |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
53 }; |
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
|
54 static const gchar *color_names[] = { |
21840
9a39d47a9cd3
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@gmail.com>
parents:
21657
diff
changeset
|
55 N_("Hyperlink Color"), |
24061
0d0f99cd425e
Show visited links in a different color. This also plugs a memory leak
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22007
diff
changeset
|
56 N_("Visited Hyperlink Color"), |
21840
9a39d47a9cd3
Another patch from DHowett. This one adds conversation nick colors to gtkrc
Sean Egan <seanegan@gmail.com>
parents:
21657
diff
changeset
|
57 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
|
58 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
|
59 N_("Highlighted Message Name Color"), |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
60 N_("Action Message Name Color"), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
61 N_("Typing Notification Color") |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
62 }; |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
63 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
|
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_prefs[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
66 "/plugins/gtk/purplerc/size/GtkTreeView::horizontal_separator" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
67 }; |
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
|
68 static const gchar *widget_size_prefs_set[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
69 "/plugins/gtk/purplerc/set/size/GtkTreeView::horizontal_separator" |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
70 }; |
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
|
71 static const gchar *widget_size_names[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
72 N_("GtkTreeView Horizontal Separation") |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
73 }; |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
74 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
|
75 |
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
|
76 static const gchar *font_prefs[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
77 "/plugins/gtk/purplerc/font/*pidgin_conv_entry", |
28948
8c2ba3cc6921
Add a font pref to the pidginrc plugin to control the conversation history
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27424
diff
changeset
|
78 "/plugins/gtk/purplerc/font/*pidgin_conv_imhtml", |
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
|
79 "/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
|
80 "/plugins/gtk/purplerc/font/*pidgin_notify_imhtml", |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
81 }; |
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
|
82 static const gchar *font_prefs_set[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
83 "/plugins/gtk/purplerc/set/font/*pidgin_conv_entry", |
28948
8c2ba3cc6921
Add a font pref to the pidginrc plugin to control the conversation history
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27424
diff
changeset
|
84 "/plugins/gtk/purplerc/set/font/*pidgin_conv_imhtml", |
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
|
85 "/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
|
86 "/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
|
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 *font_names[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
89 N_("Conversation Entry"), |
28948
8c2ba3cc6921
Add a font pref to the pidginrc plugin to control the conversation history
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27424
diff
changeset
|
90 N_("Conversation History"), |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
91 N_("Request Dialog"), |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
92 N_("Notify Dialog") |
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 *font_widgets[G_N_ELEMENTS(font_prefs)]; |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
95 |
17153
8504e859c782
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <pidgin@unreliablesource.net>
parents:
17061
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 const gchar *widget_bool_prefs[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
98 }; |
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
|
99 static const gchar *widget_bool_prefs_set[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
100 }; |
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
|
101 static const gchar *widget_bool_names[] = { |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
102 }; |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
103 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
|
104 */ |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
105 |
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
|
106 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
|
107 make_gtkrc_string(void) |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
108 { |
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
|
109 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
|
110 gchar *prefbase = NULL; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
111 GString *style_string = g_string_new(""); |
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 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
|
114 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
|
115 |
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
|
116 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
|
117 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
|
118 "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
|
119 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
|
120 } |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
121 } |
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 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
|
124 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
|
125 |
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
|
126 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
|
127 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
|
128 "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
|
129 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
|
130 } |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
131 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
132 |
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
|
133 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
|
134 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
135 if(purple_prefs_get_bool("/plugins/gtk/purplerc/set/disable-typing-notification")) { |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
136 g_string_append(style_string, "\tGtkIMHtml::typing-notification-enable = 0\n"); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
137 } |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
138 |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
139 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
|
140 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
|
141 const gchar *pref; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
142 |
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
|
143 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
|
144 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
|
145 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
|
146 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
|
147 "\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
|
148 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
|
149 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
|
150 } |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
151 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
152 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
153 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
154 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
|
155 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
|
156 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
|
157 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
|
158 "\n\t%s = %d", prefbase, |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
159 purple_prefs_get_int(widget_size_prefs[i])); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
160 g_free(prefbase); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
161 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
162 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
163 |
17153
8504e859c782
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <pidgin@unreliablesource.net>
parents:
17061
diff
changeset
|
164 /* |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
165 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
|
166 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
|
167 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
|
168 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
|
169 "\t%s = %d\n", prefbase, |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
170 purple_prefs_get_bool(widget_bool_prefs[i])); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
171 g_free(prefbase); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
172 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
173 } |
17153
8504e859c782
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <pidgin@unreliablesource.net>
parents:
17061
diff
changeset
|
174 */ |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
175 |
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
|
176 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
|
177 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
178 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
|
179 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
|
180 const gchar *pref; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
181 |
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
|
182 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
|
183 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
|
184 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
|
185 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
|
186 "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
|
187 "\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
|
188 "\nwidget \"%s\" " |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
189 "style \"%s_style\"\n", |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
190 prefbase, pref, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
191 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
|
192 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
|
193 } |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
194 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
195 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
196 |
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
|
197 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
|
198 } |
160ec876bbaf
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <pidgin@unreliablesource.net>
parents:
17185
diff
changeset
|
199 |
160ec876bbaf
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <pidgin@unreliablesource.net>
parents:
17185
diff
changeset
|
200 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
|
201 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
|
202 { |
160ec876bbaf
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <pidgin@unreliablesource.net>
parents:
17185
diff
changeset
|
203 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
|
204 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
|
205 |
160ec876bbaf
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <pidgin@unreliablesource.net>
parents:
17185
diff
changeset
|
206 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
|
207 g_string_free(str, TRUE); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
208 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
209 setting = gtk_settings_get_default(); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
210 gtk_rc_reset_styles(setting); |
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_write(GtkWidget *widget, gpointer data) |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
215 { |
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
|
216 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
|
217 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
|
218 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
|
219 g_string_free(str, TRUE); |
15905
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 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
222 static void |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
223 purplerc_reread(GtkWidget *widget, gpointer data) |
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 gtk_rc_reparse_all(); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
226 /* 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
|
227 purplerc_make_changes(); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
228 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
229 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
230 static void |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
231 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
|
232 gconstpointer value, gpointer data) |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
233 { |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
234 purplerc_make_changes(); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
235 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
236 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
237 static void |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
238 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
|
239 { |
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
|
240 gint subscript = GPOINTER_TO_INT(data); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
241 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
242 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
|
243 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
|
244 gchar colorstr[8]; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
245 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
|
246 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
247 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
|
248 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
249 g_snprintf(colorstr, sizeof(colorstr), "#%02X%02X%02X", |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
250 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
|
251 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
252 purple_prefs_set_string(color_prefs[subscript], colorstr); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
253 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
254 gtk_widget_destroy(GTK_WIDGET(color_dialog)); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
255 } |
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 static void |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
258 purplerc_set_color(GtkWidget *widget, gpointer data) |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
259 { |
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
|
260 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
|
261 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
|
262 const gchar *pref = NULL; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
263 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
|
264 gint subscript = GPOINTER_TO_INT(data); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
265 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
266 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
|
267 _(color_names[GPOINTER_TO_INT(data)])); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
268 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
|
269 g_signal_connect(G_OBJECT(color_dialog), "response", |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
270 G_CALLBACK(purplerc_color_response), data); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
271 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
272 pref = purple_prefs_get_string(color_prefs[subscript]); |
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 if (pref != NULL && strcmp(pref, "")) { |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
275 if (gdk_color_parse(pref, &color)) { |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
276 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
|
277 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
278 } |
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 gtk_window_present(GTK_WINDOW(color_dialog)); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
281 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
282 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
283 static void |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
284 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
|
285 { |
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
|
286 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
|
287 gint subscript = GPOINTER_TO_INT(data); |
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 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
|
290 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
|
291 |
160ec876bbaf
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <pidgin@unreliablesource.net>
parents:
17185
diff
changeset
|
292 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
|
293 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
|
294 } 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
|
295 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
|
296 } |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
297 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
298 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
|
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 purple_prefs_set_string(prefpath, fontname); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
301 g_free(fontname); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
302 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
303 gtk_widget_destroy(GTK_WIDGET(font_dialog)); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
304 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
305 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
306 static void |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
307 purplerc_set_font(GtkWidget *widget, gpointer data) |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
308 { |
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
|
309 gchar title[128]; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
310 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
|
311 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
|
312 const gchar *pref = NULL, *prefpath = NULL; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
313 |
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
|
314 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
|
315 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
|
316 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
|
317 } 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
|
318 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
|
319 _(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
|
320 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
|
321 } |
160ec876bbaf
Some general cleanup of the pidginrc plugin that I did while working on my
Etan Reisner <pidgin@unreliablesource.net>
parents:
17185
diff
changeset
|
322 |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
323 font_dialog = gtk_font_selection_dialog_new(title); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
324 g_signal_connect(G_OBJECT(font_dialog), "response", |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
325 G_CALLBACK(purplerc_font_response), data); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
326 |
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
|
327 pref = purple_prefs_get_string(prefpath); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
328 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
329 if (pref != NULL && strcmp(pref, "")) { |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
330 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
|
331 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
332 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
333 gtk_window_present(GTK_WINDOW(font_dialog)); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
334 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
335 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
336 static gboolean |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
337 purplerc_plugin_load(PurplePlugin *plugin) |
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 purplerc_make_changes(); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
340 |
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
|
341 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
|
342 "/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
|
343 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
|
344 NULL); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
345 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
346 return TRUE; |
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 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
349 static gboolean |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
350 purplerc_plugin_unload(PurplePlugin *plugin) |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
351 { |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
352 purple_prefs_disconnect_callback(pref_callback); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
353 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
354 return TRUE; |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
355 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
356 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
357 static GtkWidget * |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
358 purplerc_make_interface_vbox(void) |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
359 { |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
360 GtkWidget *vbox = NULL, *hbox = NULL, *check = NULL; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
361 GtkSizeGroup *labelsg = 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
|
362 gint i; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
363 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
364 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
365 labelsg = 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
|
366 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
367 gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BORDER); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
368 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
369 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
|
370 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
371 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
372 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
373 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
|
374 color_prefs_set[i], hbox); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
375 gtk_size_group_add_widget(labelsg, check); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
376 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
377 color_widgets[i] = pidgin_pixbuf_button_from_stock("", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
378 GTK_STOCK_SELECT_COLOR, PIDGIN_BUTTON_HORIZONTAL); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
379 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
|
380 FALSE, 0); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
381 gtk_widget_set_sensitive(color_widgets[i], |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
382 purple_prefs_get_bool(color_prefs_set[i])); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
383 g_signal_connect(G_OBJECT(check), "toggled", |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
384 G_CALLBACK(pidgin_toggle_sensitive), |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
385 color_widgets[i]); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
386 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
|
387 G_CALLBACK(purplerc_set_color), |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
388 GINT_TO_POINTER(i)); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
389 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
390 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
391 g_object_unref(labelsg); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
392 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
393 return vbox; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
394 } |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
395 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
396 static GtkWidget * |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
397 purplerc_make_fonts_vbox(void) |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
398 { |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
399 GtkWidget *vbox = NULL, *hbox = NULL, *check = NULL, *widget = NULL; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
400 GtkSizeGroup *labelsg = NULL; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
401 int i; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
402 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
403 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
404 labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
405 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
406 gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BORDER); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
407 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
408 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
409 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
410 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
411 check = pidgin_prefs_checkbox(_("GTK+ Interface Font"), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
412 "/plugins/gtk/purplerc/set/gtk-font-name", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
413 hbox); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
414 gtk_size_group_add_widget(labelsg, check); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
415 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
416 widget = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
417 PIDGIN_BUTTON_HORIZONTAL); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
418 gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
419 gtk_widget_set_sensitive(widget, |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
420 purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-font-name")); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
421 g_signal_connect(G_OBJECT(check), "toggled", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
422 G_CALLBACK(pidgin_toggle_sensitive), widget); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
423 g_signal_connect(G_OBJECT(widget), "clicked", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
424 G_CALLBACK(purplerc_set_font), GINT_TO_POINTER(-1)); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
425 |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
426 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
|
427 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
428 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
429 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
430 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
|
431 font_prefs_set[i], hbox); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
432 gtk_size_group_add_widget(labelsg, check); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
433 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
434 font_widgets[i] = pidgin_pixbuf_button_from_stock("", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
435 GTK_STOCK_SELECT_FONT, PIDGIN_BUTTON_HORIZONTAL); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
436 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
|
437 FALSE, 0); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
438 gtk_widget_set_sensitive(font_widgets[i], |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
439 purple_prefs_get_bool(font_prefs_set[i])); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
440 g_signal_connect(G_OBJECT(check), "toggled", |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
441 G_CALLBACK(pidgin_toggle_sensitive), |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
442 font_widgets[i]); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
443 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
|
444 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
|
445 GINT_TO_POINTER(i)); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
446 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
447 |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
448 g_object_unref(labelsg); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
449 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
450 return vbox; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
451 } |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
452 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
453 static GtkWidget * |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
454 purplerc_make_misc_vbox(void) |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
455 { |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
456 /* Note: Intentionally not using the size group argument to the |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
457 * pidgin_prefs_labeled_* functions they only add the text label to |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
458 * the size group not the whole thing, which isn't what I want. */ |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
459 GtkWidget *vbox = NULL, *hbox = NULL, *check = NULL, *widget = NULL; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
460 GtkSizeGroup *labelsg = NULL; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
461 int i; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
462 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
463 vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
464 labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
465 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
466 gtk_container_set_border_width(GTK_CONTAINER(vbox), PIDGIN_HIG_BORDER); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
467 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
468 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
469 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
470 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
471 check = pidgin_prefs_checkbox(_("GTK+ Text Shortcut Theme"), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
472 "/plugins/gtk/purplerc/set/gtk-key-theme-name", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
473 hbox); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
474 gtk_size_group_add_widget(labelsg, check); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
475 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
476 widget = pidgin_prefs_labeled_entry(hbox, "", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
477 "/plugins/gtk/purplerc/gtk-key-theme-name", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
478 NULL); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
479 gtk_widget_set_sensitive(widget, |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
480 purple_prefs_get_bool("/plugins/gtk/purplerc/set/gtk-key-theme-name")); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
481 g_signal_connect(G_OBJECT(check), "toggled", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
482 G_CALLBACK(pidgin_toggle_sensitive), widget); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
483 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
484 for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
485 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
486 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
487 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
488 check = pidgin_prefs_checkbox(_(widget_size_names[i]), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
489 widget_size_prefs_set[i], hbox); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
490 gtk_size_group_add_widget(labelsg, check); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
491 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
492 widget_size_widgets[i] = pidgin_prefs_labeled_spin_button(hbox, "", widget_size_prefs[i], 0, 50, NULL); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
493 gtk_widget_set_sensitive(widget_size_widgets[i], |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
494 purple_prefs_get_bool(widget_size_prefs_set[i])); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
495 g_signal_connect(G_OBJECT(check), "toggled", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
496 G_CALLBACK(pidgin_toggle_sensitive), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
497 widget_size_widgets[i]); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
498 } |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
499 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
500 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
501 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
502 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
503 check = pidgin_prefs_checkbox(_("Disable Typing Notification Text"), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
504 "/plugins/gtk/purplerc/set/disable-typing-notification", hbox); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
505 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
506 /* Widget boolean stuff */ |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
507 /* |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
508 for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
509 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
510 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
511 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
512 check = pidgin_prefs_checkbox(_(widget_bool_names[i]), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
513 widget_bool_prefs_set[i], hbox); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
514 gtk_size_group_add_widget(labelsg, check); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
515 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
516 widget_bool_widgets[i] = pidgin_prefs_checkbox("", widget_bool_prefs[i], hbox); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
517 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
518 gtk_widget_set_sensitive(widget_bool_widgets[i], |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
519 purple_prefs_get_bool(widget_bool_prefs_set[i])); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
520 g_signal_connect(G_OBJECT(check), "toggled", |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
521 G_CALLBACK(pidgin_toggle_sensitive), |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
522 widget_bool_widgets[i]); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
523 } |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
524 */ |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
525 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
526 g_object_unref(labelsg); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
527 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
528 return vbox; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
529 } |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
530 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
531 static GtkWidget * |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
532 purplerc_get_config_frame(PurplePlugin *plugin) |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
533 { |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
534 gchar *tmp; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
535 GtkWidget *check = NULL, *label = NULL; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
536 GtkWidget *ret = NULL, *hbox = NULL, *frame = NULL, *note = NULL; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
537 #ifndef _WIN32 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
538 const gchar *homepath = "$HOME"; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
539 #else |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
540 const gchar *homepath = "\%APPDATA\%"; |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
541 #endif |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
542 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
543 ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
544 note = gtk_notebook_new(); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
545 label = gtk_label_new(NULL); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
546 hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
547 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
548 gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
549 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
550 tmp = g_strdup_printf("<span weight=\"bold\">%s</span>", _("GTK+ Theme Control Settings")); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
551 gtk_label_set_markup(GTK_LABEL(label), tmp); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
552 g_free(tmp); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
553 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
554 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
555 gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
556 gtk_box_pack_start(GTK_BOX(ret), note, FALSE, FALSE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
557 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
558 label = gtk_label_new(_("Colors")); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
559 gtk_notebook_insert_page(GTK_NOTEBOOK(note), purplerc_make_interface_vbox(), label, -1); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
560 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
561 label = gtk_label_new(_("Fonts")); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
562 gtk_notebook_insert_page(GTK_NOTEBOOK(note), purplerc_make_fonts_vbox(), label, -1); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
563 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
564 label = gtk_label_new(_("Miscellaneous")); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
565 gtk_notebook_insert_page(GTK_NOTEBOOK(note), purplerc_make_misc_vbox(), label, -1); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
566 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
567 gtk_box_pack_start(GTK_BOX(ret), gtk_hseparator_new(), TRUE, TRUE, 0); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
568 |
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
|
569 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
|
570 |
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
|
571 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
|
572 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
|
573 |
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
|
574 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
|
575 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
|
576 check = gtk_button_new_with_label(tmp); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
577 g_free(tmp); |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
578 gtk_box_pack_start(GTK_BOX(hbox), check, TRUE, TRUE, 0); |
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 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
|
580 G_CALLBACK(purplerc_write), NULL); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
581 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
582 check = gtk_button_new_with_label(_("Re-read gtkrc files")); |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
583 gtk_box_pack_start(GTK_BOX(hbox), check, TRUE, TRUE, 0); |
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
|
584 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
|
585 G_CALLBACK(purplerc_reread), NULL); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
586 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
587 gtk_widget_show_all(ret); |
21056
9e45c28b4b2b
Fix some leaking GtkSizeGroups.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
21030
diff
changeset
|
588 |
9e45c28b4b2b
Fix some leaking GtkSizeGroups.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
21030
diff
changeset
|
589 |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
590 return ret; |
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 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
593 static PidginPluginUiInfo purplerc_ui_info = |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
594 { |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
595 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
|
596 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
|
597 |
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
|
598 /* 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
|
599 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
|
600 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
|
601 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
|
602 NULL |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
603 }; |
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 static PurplePluginInfo purplerc_info = |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
606 { |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
607 PURPLE_PLUGIN_MAGIC, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
608 PURPLE_MAJOR_VERSION, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
609 PURPLE_MINOR_VERSION, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
610 PURPLE_PLUGIN_STANDARD, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
611 PIDGIN_PLUGIN_TYPE, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
612 0, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
613 NULL, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
614 PURPLE_PRIORITY_DEFAULT, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
615 "purplerc", |
16012
765cfc73182f
more help for translators (I removed a few PIDGIN_NAME references
Nathan Walp <nwalp@pidgin.im>
parents:
15905
diff
changeset
|
616 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
|
617 DISPLAY_VERSION, |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
618 N_("Provides access to commonly used gtkrc settings."), |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
619 N_("Provides access to commonly used gtkrc settings."), |
27424
6ce4c8f80d04
Correct the doxygen documentation in the pidginrc plugin and swap out a
Etan Reisner <pidgin@unreliablesource.net>
parents:
27156
diff
changeset
|
620 "Etan Reisner <deryni@pidgin.im>", |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
621 PURPLE_WEBSITE, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
622 purplerc_plugin_load, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
623 purplerc_plugin_unload, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
624 NULL, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
625 &purplerc_ui_info, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
626 NULL, |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
627 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
|
628 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
|
629 |
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
|
630 /* 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
|
631 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
|
632 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
|
633 NULL, |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
634 NULL |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
635 }; |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
636 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
637 static void |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
638 purplerc_init(PurplePlugin *plugin) |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
639 { |
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
|
640 gint i; |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
641 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
642 purple_prefs_add_none("/plugins"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
643 purple_prefs_add_none("/plugins/gtk"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
644 purple_prefs_add_none("/plugins/gtk/purplerc"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
645 purple_prefs_add_none("/plugins/gtk/purplerc/set"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
646 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
647 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
|
648 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
|
649 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
650 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
|
651 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
|
652 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
653 purple_prefs_add_none("/plugins/gtk/purplerc/color"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
654 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
|
655 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
|
656 purple_prefs_add_string(color_prefs[i], ""); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
657 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
|
658 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
659 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
660 purple_prefs_add_none("/plugins/gtk/purplerc/size"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
661 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
|
662 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
|
663 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
|
664 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
|
665 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
666 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
667 purple_prefs_add_none("/plugins/gtk/purplerc/font"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
668 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
|
669 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
|
670 purple_prefs_add_string(font_prefs[i], ""); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
671 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
|
672 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
673 |
17153
8504e859c782
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <pidgin@unreliablesource.net>
parents:
17061
diff
changeset
|
674 /* |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
675 purple_prefs_add_none("/plugins/gtk/purplerc/bool"); |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
676 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
|
677 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
|
678 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
|
679 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
|
680 } |
17153
8504e859c782
Remove the "GtkTreeView Indent Expanders" boolean preference, because the
Etan Reisner <pidgin@unreliablesource.net>
parents:
17061
diff
changeset
|
681 */ |
27132
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
682 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
683 purple_prefs_add_bool("/plugins/gtk/purplerc/disable-typing-notification", FALSE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
684 purple_prefs_add_bool("/plugins/gtk/purplerc/set/disable-typing-notification", FALSE); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
685 |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
686 /* remove old cursor color prefs */ |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
687 purple_prefs_remove("/plugins/gtk/purplerc/color/GtkWidget::cursor-color"); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
688 purple_prefs_remove("/plugins/gtk/purplerc/color/GtkWidget::secondary-cursor-color"); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
689 purple_prefs_remove("/plugins/gtk/purplerc/set/color/GtkWidget::cursor-color"); |
be6d08b9f410
This change is probably going to spark some debate about the pidginrc plugin.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
24061
diff
changeset
|
690 purple_prefs_remove("/plugins/gtk/purplerc/set/color/GtkWidget::secondary-cursor-color"); |
15905
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
691 } |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
692 |
6f04fe174f40
Change some stuff from gaim to pidgin
Mark Doliner <mark@kingant.net>
parents:
diff
changeset
|
693 PURPLE_INIT_PLUGIN(purplerc, purplerc_init, purplerc_info) |