Wed, 21 Sep 2011 06:45:26 +0000
Apply conversation theme when opening the GTK conversation. All the
parsing stuff was moved out of the theme code and into the conversation
code.
Someone (not me!) needs to check the code I commented out and see if
we really need that stuff (and then port it to WebKit/styling).
We also need to determine where to place Template.html and the rest
of our (not-yet-written) default theme.
| 15231 | 1 | /* |
| 2 | * Conversation Colors | |
| 3 | * Copyright (C) 2006 | |
| 4 | * | |
| 5 | * This program is free software; you can redistribute it and/or | |
| 6 | * modify it under the terms of the GNU General Public License as | |
| 7 | * published by the Free Software Foundation; either version 2 of the | |
| 8 | * License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This program is distributed in the hope that it will be useful, but | |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU General Public License | |
| 16 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16749
diff
changeset
|
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16749
diff
changeset
|
18 | * 02111-1301, USA. |
| 15231 | 19 | */ |
| 20 | #include "internal.h" | |
| 21 | ||
| 22 | #define PLUGIN_ID "gtk-plugin_pack-convcolors" | |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
23 | #define PLUGIN_NAME N_("Conversation Colors") |
|
25633
feee0c7e503f
Fix some more mis-identified plugins, like 3b3526a0...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
22178
diff
changeset
|
24 | #define PLUGIN_STATIC_NAME ConversationColors |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
25 | #define PLUGIN_SUMMARY N_("Customize colors in the conversation window") |
|
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
26 | #define PLUGIN_DESCRIPTION N_("Customize colors in the conversation window") |
| 15231 | 27 | #define PLUGIN_AUTHOR "Sadrul H Chowdhury <sadrul@users.sourceforge.net>" |
| 28 | ||
| 29 | /* System headers */ | |
| 30 | #include <gdk/gdk.h> | |
| 31 | #include <glib.h> | |
| 32 | #include <gtk/gtk.h> | |
| 33 | ||
| 15884 | 34 | /* Purple headers */ |
| 15231 | 35 | #include <gtkplugin.h> |
| 36 | #include <version.h> | |
| 37 | ||
| 38 | #include <conversation.h> | |
| 39 | #include <gtkconv.h> | |
| 40 | #include <gtkprefs.h> | |
| 41 | #include <gtkutils.h> | |
| 42 | ||
| 43 | #define PREF_PREFIX "/plugins/gtk/" PLUGIN_ID | |
| 44 | #define PREF_IGNORE PREF_PREFIX "/ignore_incoming" | |
| 45 | #define PREF_CHATS PREF_PREFIX "/chats" | |
| 46 | #define PREF_IMS PREF_PREFIX "/ims" | |
| 47 | ||
| 48 | #define PREF_SEND PREF_PREFIX "/send" | |
| 49 | #define PREF_SEND_C PREF_SEND "/color" | |
| 50 | #define PREF_SEND_F PREF_SEND "/format" | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
51 | #define PREF_SEND_E PREF_SEND "/enabled" |
| 15231 | 52 | |
| 53 | #define PREF_RECV PREF_PREFIX "/recv" | |
| 54 | #define PREF_RECV_C PREF_RECV "/color" | |
| 55 | #define PREF_RECV_F PREF_RECV "/format" | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
56 | #define PREF_RECV_E PREF_RECV "/enabled" |
| 15231 | 57 | |
| 58 | #define PREF_SYSTEM PREF_PREFIX "/system" | |
| 59 | #define PREF_SYSTEM_C PREF_SYSTEM "/color" | |
| 60 | #define PREF_SYSTEM_F PREF_SYSTEM "/format" | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
61 | #define PREF_SYSTEM_E PREF_SYSTEM "/enabled" |
| 15231 | 62 | |
| 63 | #define PREF_ERROR PREF_PREFIX "/error" | |
| 64 | #define PREF_ERROR_C PREF_ERROR "/color" | |
| 65 | #define PREF_ERROR_F PREF_ERROR "/format" | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
66 | #define PREF_ERROR_E PREF_ERROR "/enabled" |
| 15231 | 67 | |
| 68 | #define PREF_NICK PREF_PREFIX "/nick" | |
| 69 | #define PREF_NICK_C PREF_NICK "/color" | |
| 70 | #define PREF_NICK_F PREF_NICK "/format" | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
71 | #define PREF_NICK_E PREF_NICK "/enabled" |
| 15231 | 72 | |
| 73 | enum | |
| 74 | { | |
| 75 | FONT_BOLD = 1 << 0, | |
| 76 | FONT_ITALIC = 1 << 1, | |
| 77 | FONT_UNDERLINE = 1 << 2 | |
| 78 | }; | |
| 79 | ||
|
22178
02521e1b838e
Prpls seem to be sending '\n' (or '\r\n') for newlines, instead of '<br>' to the core. Fixes #4545.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21789
diff
changeset
|
80 | static struct |
| 15231 | 81 | { |
| 15884 | 82 | PurpleMessageFlags flag; |
| 15231 | 83 | char *prefix; |
| 84 | const char *text; | |
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
30010
diff
changeset
|
85 | } formats[] = |
| 15231 | 86 | { |
| 15884 | 87 | {PURPLE_MESSAGE_ERROR, PREF_ERROR, N_("Error Messages")}, |
| 88 | {PURPLE_MESSAGE_NICK, PREF_NICK, N_("Highlighted Messages")}, | |
| 89 | {PURPLE_MESSAGE_SYSTEM, PREF_SYSTEM, N_("System Messages")}, | |
| 90 | {PURPLE_MESSAGE_SEND, PREF_SEND, N_("Sent Messages")}, | |
| 91 | {PURPLE_MESSAGE_RECV, PREF_RECV, N_("Received Messages")}, | |
| 15231 | 92 | {0, NULL, NULL} |
| 93 | }; | |
| 94 | ||
| 95 | static gboolean | |
| 15884 | 96 | displaying_msg(PurpleAccount *account, const char *who, char **displaying, |
| 97 | PurpleConversation *conv, PurpleMessageFlags flags) | |
| 15231 | 98 | { |
| 99 | int i; | |
| 100 | char tmp[128], *t; | |
| 101 | gboolean bold, italic, underline; | |
| 102 | int f; | |
| 103 | const char *color; | |
|
27234
82035475de62
Add a utlity function purple_markup_is_rtl
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
104 | gboolean rtl = FALSE; |
| 15231 | 105 | |
| 106 | for (i = 0; formats[i].prefix; i++) | |
| 107 | if (flags & formats[i].flag) | |
| 108 | break; | |
| 109 | ||
| 110 | if (!formats[i].prefix) | |
| 111 | return FALSE; | |
| 112 | ||
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
113 | g_snprintf(tmp, sizeof(tmp), "%s/enabled", formats[i].prefix); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
114 | |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
115 | if (!purple_prefs_get_bool(tmp) || |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
116 | (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM && |
| 15884 | 117 | !purple_prefs_get_bool(PREF_IMS)) || |
| 118 | (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT && | |
| 119 | !purple_prefs_get_bool(PREF_CHATS))) | |
| 15231 | 120 | return FALSE; |
| 121 | ||
| 122 | g_snprintf(tmp, sizeof(tmp), "%s/color", formats[i].prefix); | |
| 15884 | 123 | color = purple_prefs_get_string(tmp); |
| 15231 | 124 | |
| 125 | g_snprintf(tmp, sizeof(tmp), "%s/format", formats[i].prefix); | |
| 15884 | 126 | f = purple_prefs_get_int(tmp); |
| 15231 | 127 | bold = (f & FONT_BOLD); |
| 128 | italic = (f & FONT_ITALIC); | |
| 129 | underline = (f & FONT_UNDERLINE); | |
|
27234
82035475de62
Add a utlity function purple_markup_is_rtl
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
130 | rtl = purple_markup_is_rtl(*displaying); |
| 15231 | 131 | |
| 15884 | 132 | if (purple_prefs_get_bool(PREF_IGNORE)) |
| 15231 | 133 | { |
|
22178
02521e1b838e
Prpls seem to be sending '\n' (or '\r\n') for newlines, instead of '<br>' to the core. Fixes #4545.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21789
diff
changeset
|
134 | /* This seems to be necessary, especially for received messages. */ |
|
02521e1b838e
Prpls seem to be sending '\n' (or '\r\n') for newlines, instead of '<br>' to the core. Fixes #4545.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21789
diff
changeset
|
135 | t = *displaying; |
|
02521e1b838e
Prpls seem to be sending '\n' (or '\r\n') for newlines, instead of '<br>' to the core. Fixes #4545.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21789
diff
changeset
|
136 | *displaying = purple_strreplace(t, "\n", "<br>"); |
|
02521e1b838e
Prpls seem to be sending '\n' (or '\r\n') for newlines, instead of '<br>' to the core. Fixes #4545.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21789
diff
changeset
|
137 | g_free(t); |
|
02521e1b838e
Prpls seem to be sending '\n' (or '\r\n') for newlines, instead of '<br>' to the core. Fixes #4545.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21789
diff
changeset
|
138 | |
| 15231 | 139 | t = *displaying; |
| 15884 | 140 | *displaying = purple_markup_strip_html(t); |
| 15231 | 141 | g_free(t); |
|
15488
d3de0d1f569d
Fix bug #1645435. Thanks to Dennis Ristuccia (more commonly known as EvilDennisR) for helping me find the bug.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15481
diff
changeset
|
142 | |
|
d3de0d1f569d
Fix bug #1645435. Thanks to Dennis Ristuccia (more commonly known as EvilDennisR) for helping me find the bug.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15481
diff
changeset
|
143 | t = *displaying; |
|
d3de0d1f569d
Fix bug #1645435. Thanks to Dennis Ristuccia (more commonly known as EvilDennisR) for helping me find the bug.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15481
diff
changeset
|
144 | *displaying = g_markup_escape_text(t, -1); |
|
d3de0d1f569d
Fix bug #1645435. Thanks to Dennis Ristuccia (more commonly known as EvilDennisR) for helping me find the bug.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15481
diff
changeset
|
145 | g_free(t); |
|
d3de0d1f569d
Fix bug #1645435. Thanks to Dennis Ristuccia (more commonly known as EvilDennisR) for helping me find the bug.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15481
diff
changeset
|
146 | |
|
15481
6e9da7b5bd5c
Fix convcolors to not unlinkify the links.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
147 | /* Restore the links */ |
|
6e9da7b5bd5c
Fix convcolors to not unlinkify the links.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
148 | t = *displaying; |
| 15884 | 149 | *displaying = purple_markup_linkify(t); |
|
15481
6e9da7b5bd5c
Fix convcolors to not unlinkify the links.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15435
diff
changeset
|
150 | g_free(t); |
| 15231 | 151 | } |
| 152 | ||
| 153 | if (color && *color) | |
| 154 | { | |
| 155 | t = *displaying; | |
| 156 | *displaying = g_strdup_printf("<FONT COLOR=\"%s\">%s</FONT>", color, t); | |
| 157 | g_free(t); | |
| 158 | } | |
| 159 | ||
| 160 | t = *displaying; | |
|
27234
82035475de62
Add a utlity function purple_markup_is_rtl
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
161 | *displaying = g_strdup_printf("%s%s%s%s%s%s%s%s%s", |
| 15231 | 162 | bold ? "<B>" : "</B>", |
| 163 | italic ? "<I>" : "</I>", | |
| 164 | underline ? "<U>" : "</U>", | |
|
27234
82035475de62
Add a utlity function purple_markup_is_rtl
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
165 | rtl ? "<SPAN style=\"direction:rtl;text-align:right;\">" : "", |
|
82035475de62
Add a utlity function purple_markup_is_rtl
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
166 | t, |
|
82035475de62
Add a utlity function purple_markup_is_rtl
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
167 | rtl ? "</SPAN>" : "", |
| 15231 | 168 | bold ? "</B>" : "<B>", |
| 169 | italic ? "</I>" : "<I>", | |
| 170 | underline ? "</U>" : "<U>" | |
| 171 | ); | |
| 172 | g_free(t); | |
| 173 | ||
| 174 | return FALSE; | |
| 175 | } | |
| 176 | ||
| 177 | static gboolean | |
| 15884 | 178 | plugin_load(PurplePlugin *plugin) |
| 15231 | 179 | { |
| 15884 | 180 | purple_signal_connect(pidgin_conversations_get_handle(), |
| 15231 | 181 | "displaying-im-msg", plugin, |
| 15884 | 182 | PURPLE_CALLBACK(displaying_msg), NULL); |
| 183 | purple_signal_connect(pidgin_conversations_get_handle(), | |
| 15231 | 184 | "displaying-chat-msg", plugin, |
| 15884 | 185 | PURPLE_CALLBACK(displaying_msg), NULL); |
| 15231 | 186 | return TRUE; |
| 187 | } | |
| 188 | ||
| 189 | static gboolean | |
| 15884 | 190 | plugin_unload(PurplePlugin *plugin) |
| 15231 | 191 | { |
| 192 | return TRUE; | |
| 193 | } | |
| 194 | ||
| 15884 | 195 | /* Ripped from PurpleRC */ |
| 15231 | 196 | static void |
| 197 | color_response(GtkDialog *color_dialog, gint response, const char *data) | |
| 198 | { | |
| 199 | if (response == GTK_RESPONSE_OK) | |
| 200 | { | |
|
30010
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
201 | #if GTK_CHECK_VERSION(2,14,0) |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
202 | GtkWidget *colorsel = |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
203 | gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(color_dialog)); |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
204 | #else |
| 15231 | 205 | GtkWidget *colorsel = GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel; |
|
30010
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
206 | #endif |
| 15231 | 207 | GdkColor color; |
| 208 | char colorstr[8]; | |
| 209 | char tmp[128]; | |
| 210 | ||
| 211 | gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(colorsel), &color); | |
| 212 | ||
| 213 | g_snprintf(colorstr, sizeof(colorstr), "#%02X%02X%02X", | |
| 214 | color.red/256, color.green/256, color.blue/256); | |
| 215 | ||
| 216 | g_snprintf(tmp, sizeof(tmp), "%s/color", data); | |
| 217 | ||
| 15884 | 218 | purple_prefs_set_string(tmp, colorstr); |
| 15231 | 219 | } |
| 220 | ||
| 221 | gtk_widget_destroy(GTK_WIDGET(color_dialog)); | |
| 222 | } | |
| 223 | ||
| 224 | static void | |
| 225 | set_color(GtkWidget *widget, const char *data) | |
| 226 | { | |
| 227 | GtkWidget *color_dialog = NULL; | |
| 228 | GdkColor color; | |
| 229 | char title[128]; | |
| 230 | char tmp[128]; | |
| 231 | ||
| 232 | g_snprintf(title, sizeof(title), _("Select Color for %s"), _(data)); | |
| 233 | color_dialog = gtk_color_selection_dialog_new(title); | |
| 234 | g_signal_connect(G_OBJECT(color_dialog), "response", | |
| 235 | G_CALLBACK(color_response), (gpointer)data); | |
| 236 | ||
| 237 | g_snprintf(tmp, sizeof(tmp), "%s/color", data); | |
| 15884 | 238 | if (gdk_color_parse(purple_prefs_get_string(tmp), &color)) |
| 15231 | 239 | { |
|
30010
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
240 | #if GTK_CHECK_VERSION(2,14,0) |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
241 | gtk_color_selection_set_current_color(GTK_COLOR_SELECTION( |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
242 | gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(color_dialog))), |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
243 | &color); |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
244 | #else |
| 15231 | 245 | gtk_color_selection_set_current_color( |
|
30010
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
246 | GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(color_dialog)->colorsel), |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
247 | &color); |
|
2b3e5bbd0492
Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27234
diff
changeset
|
248 | #endif |
| 15231 | 249 | } |
| 250 | ||
| 251 | gtk_window_present(GTK_WINDOW(color_dialog)); | |
| 252 | } | |
| 253 | ||
| 254 | static void | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
255 | toggle_enabled(GtkWidget *widget, gpointer data) |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
256 | { |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
257 | const char *prefix = (char *)data; |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
258 | gboolean e; |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
259 | char tmp[128]; |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
260 | |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
261 | g_snprintf(tmp, sizeof(tmp), "%s/enabled", prefix); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
262 | e = purple_prefs_get_bool(tmp); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
263 | purple_prefs_set_bool(tmp, !e); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
264 | } |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
265 | |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
266 | static void |
| 15231 | 267 | toggle_something(const char *prefix, int format) |
| 268 | { | |
| 269 | int f; | |
| 270 | char tmp[128]; | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
271 | |
| 15231 | 272 | g_snprintf(tmp, sizeof(tmp), "%s/format", prefix); |
| 15884 | 273 | f = purple_prefs_get_int(tmp); |
| 15231 | 274 | f ^= format; |
| 15884 | 275 | purple_prefs_set_int(tmp, f); |
| 15231 | 276 | } |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
277 | |
| 15231 | 278 | static void |
| 279 | toggle_bold(GtkWidget *widget, gpointer data) | |
| 280 | { | |
| 281 | toggle_something(data, FONT_BOLD); | |
| 282 | } | |
| 283 | ||
| 284 | static void | |
| 285 | toggle_italic(GtkWidget *widget, gpointer data) | |
| 286 | { | |
| 287 | toggle_something(data, FONT_ITALIC); | |
| 288 | } | |
| 289 | ||
| 290 | static void | |
| 291 | toggle_underline(GtkWidget *widget, gpointer data) | |
| 292 | { | |
| 293 | toggle_something(data, FONT_UNDERLINE); | |
| 294 | } | |
| 295 | ||
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
296 | static void |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
297 | enable_toggled(const char *name, PurplePrefType type, gconstpointer val, gpointer data) |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
298 | { |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
299 | GtkWidget *widget = (GtkWidget *)data; |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
300 | |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
301 | gtk_widget_set_sensitive(widget, GPOINTER_TO_INT(val)); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
302 | } |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
303 | |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
304 | static void |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
305 | disconnect_prefs_callbacks(GtkObject *object, gpointer data) |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
306 | { |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
307 | PurplePlugin *plugin = (PurplePlugin *)data; |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
308 | |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
309 | purple_prefs_disconnect_by_handle(plugin); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
310 | } |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
311 | |
| 15231 | 312 | static GtkWidget * |
| 15884 | 313 | get_config_frame(PurplePlugin *plugin) |
| 15231 | 314 | { |
| 315 | GtkWidget *ret; | |
| 316 | GtkWidget *frame; | |
| 317 | int i; | |
| 318 | ||
| 15882 | 319 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
| 320 | gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); | |
| 15231 | 321 | |
| 322 | for (i = 0; formats[i].prefix; i++) | |
| 323 | { | |
| 324 | char tmp[128]; | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
325 | char tmp2[128]; |
| 15231 | 326 | int f; |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
327 | gboolean e; |
| 15231 | 328 | GtkWidget *vbox, *hbox, *button; |
| 329 | ||
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
330 | g_snprintf(tmp2, sizeof(tmp2), "%s/enabled", formats[i].prefix); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
331 | e = purple_prefs_get_bool(tmp2); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
332 | |
| 15231 | 333 | g_snprintf(tmp, sizeof(tmp), "%s/format", formats[i].prefix); |
| 15884 | 334 | f = purple_prefs_get_int(tmp); |
| 15231 | 335 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15488
diff
changeset
|
336 | frame = pidgin_make_frame(ret, _(formats[i].text)); |
| 15882 | 337 | vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
| 15231 | 338 | gtk_box_pack_start(GTK_BOX(frame), vbox, FALSE, FALSE, 0); |
| 339 | ||
| 15882 | 340 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
| 15231 | 341 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
| 342 | ||
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
343 | button = gtk_check_button_new_with_label(_("Enabled")); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
344 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
345 | if (e) |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
346 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
347 | g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(toggle_enabled), |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
348 | formats[i].prefix); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
349 | |
| 15568 | 350 | button = pidgin_pixbuf_button_from_stock(" Color", GTK_STOCK_SELECT_COLOR, |
| 351 | PIDGIN_BUTTON_HORIZONTAL); | |
| 15231 | 352 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
| 353 | g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(set_color), | |
| 354 | formats[i].prefix); | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
355 | gtk_widget_set_sensitive(button, e); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
356 | purple_prefs_connect_callback(plugin, tmp2, enable_toggled, button); |
| 15231 | 357 | |
| 358 | button = gtk_check_button_new_with_label(_("Bold")); | |
| 359 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
| 360 | if (f & FONT_BOLD) | |
| 361 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); | |
| 362 | g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(toggle_bold), | |
| 363 | formats[i].prefix); | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
364 | gtk_widget_set_sensitive(button, e); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
365 | purple_prefs_connect_callback(plugin, tmp2, enable_toggled, button); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
366 | |
| 15231 | 367 | button = gtk_check_button_new_with_label(_("Italic")); |
| 368 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
| 369 | if (f & FONT_ITALIC) | |
| 370 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); | |
| 371 | g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(toggle_italic), | |
| 372 | formats[i].prefix); | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
373 | gtk_widget_set_sensitive(button, e); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
374 | purple_prefs_connect_callback(plugin, tmp2, enable_toggled, button); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
375 | |
| 15231 | 376 | button = gtk_check_button_new_with_label(_("Underline")); |
| 377 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
| 378 | if (f & FONT_UNDERLINE) | |
| 379 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE); | |
| 380 | g_signal_connect(G_OBJECT(button), "clicked", | |
| 381 | G_CALLBACK(toggle_underline), formats[i].prefix); | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
382 | gtk_widget_set_sensitive(button, e); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
383 | purple_prefs_connect_callback(plugin, tmp2, enable_toggled, button); |
| 15231 | 384 | } |
| 385 | ||
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
386 | g_signal_connect(GTK_OBJECT(ret), "destroy", G_CALLBACK(disconnect_prefs_callbacks), plugin); |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15488
diff
changeset
|
387 | frame = pidgin_make_frame(ret, _("General")); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15488
diff
changeset
|
388 | pidgin_prefs_checkbox(_("Ignore incoming format"), PREF_IGNORE, frame); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15488
diff
changeset
|
389 | pidgin_prefs_checkbox(_("Apply in Chats"), PREF_CHATS, frame); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15488
diff
changeset
|
390 | pidgin_prefs_checkbox(_("Apply in IMs"), PREF_IMS, frame); |
| 15231 | 391 | |
| 392 | gtk_widget_show_all(ret); | |
| 393 | return ret; | |
| 394 | } | |
| 395 | ||
|
31294
73607ab89c6f
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
30010
diff
changeset
|
396 | static PidginPluginUiInfo ui_info = |
| 15231 | 397 | { |
| 398 | get_config_frame, | |
| 399 | 0, | |
|
16749
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
400 | |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
401 | /* padding */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
402 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
403 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
404 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
405 | NULL |
| 15231 | 406 | }; |
| 407 | ||
| 15884 | 408 | static PurplePluginInfo info = |
| 15231 | 409 | { |
| 15884 | 410 | PURPLE_PLUGIN_MAGIC, /* Magic */ |
| 411 | PURPLE_MAJOR_VERSION, /* Purple Major Version */ | |
| 412 | PURPLE_MINOR_VERSION, /* Purple Minor Version */ | |
| 413 | PURPLE_PLUGIN_STANDARD, /* plugin type */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15488
diff
changeset
|
414 | PIDGIN_PLUGIN_TYPE, /* ui requirement */ |
| 15231 | 415 | 0, /* flags */ |
| 416 | NULL, /* dependencies */ | |
| 15884 | 417 | PURPLE_PRIORITY_DEFAULT, /* priority */ |
| 15231 | 418 | |
| 419 | PLUGIN_ID, /* plugin id */ | |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
420 | PLUGIN_NAME, /* name */ |
|
20288
5ca925a094e2
applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
421 | DISPLAY_VERSION, /* version */ |
|
15418
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
422 | PLUGIN_SUMMARY, /* summary */ |
|
bf287f742a5a
[gaim-migrate @ 18149]
Luke Schierer <lschiere@pidgin.im>
parents:
15231
diff
changeset
|
423 | PLUGIN_DESCRIPTION, /* description */ |
| 15231 | 424 | PLUGIN_AUTHOR, /* author */ |
| 15884 | 425 | PURPLE_WEBSITE, /* website */ |
| 15231 | 426 | |
| 427 | plugin_load, /* load */ | |
| 428 | plugin_unload, /* unload */ | |
| 429 | NULL, /* destroy */ | |
| 430 | ||
| 431 | &ui_info, /* ui_info */ | |
| 432 | NULL, /* extra_info */ | |
| 433 | NULL, /* prefs_info */ | |
|
16749
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
434 | NULL, /* actions */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
435 | |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
436 | /* padding */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
437 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
438 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
439 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
440 | NULL |
| 15231 | 441 | }; |
| 442 | ||
| 443 | static void | |
| 15884 | 444 | init_plugin(PurplePlugin *plugin) |
| 15231 | 445 | { |
| 15884 | 446 | purple_prefs_add_none(PREF_PREFIX); |
| 15231 | 447 | |
| 15884 | 448 | purple_prefs_add_bool(PREF_IGNORE, TRUE); |
| 449 | purple_prefs_add_bool(PREF_CHATS, TRUE); | |
| 450 | purple_prefs_add_bool(PREF_IMS, TRUE); | |
| 15231 | 451 | |
| 15884 | 452 | purple_prefs_add_none(PREF_SEND); |
| 453 | purple_prefs_add_none(PREF_RECV); | |
| 454 | purple_prefs_add_none(PREF_SYSTEM); | |
| 455 | purple_prefs_add_none(PREF_ERROR); | |
| 456 | purple_prefs_add_none(PREF_NICK); | |
| 15231 | 457 | |
| 15884 | 458 | purple_prefs_add_string(PREF_SEND_C, "#909090"); |
| 459 | purple_prefs_add_string(PREF_RECV_C, "#000000"); | |
| 460 | purple_prefs_add_string(PREF_SYSTEM_C, "#50a050"); | |
| 461 | purple_prefs_add_string(PREF_ERROR_C, "#ff0000"); | |
| 462 | purple_prefs_add_string(PREF_NICK_C, "#0000dd"); | |
| 15231 | 463 | |
| 15884 | 464 | purple_prefs_add_int(PREF_SEND_F, 0); |
| 465 | purple_prefs_add_int(PREF_RECV_F, 0); | |
| 466 | purple_prefs_add_int(PREF_SYSTEM_F, FONT_ITALIC); | |
| 467 | purple_prefs_add_int(PREF_ERROR_F, FONT_BOLD | FONT_UNDERLINE); | |
| 468 | purple_prefs_add_int(PREF_NICK_F, FONT_BOLD); | |
|
21789
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
469 | |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
470 | purple_prefs_add_bool(PREF_SEND_E, TRUE); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
471 | purple_prefs_add_bool(PREF_RECV_E, TRUE); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
472 | purple_prefs_add_bool(PREF_SYSTEM_E, TRUE); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
473 | purple_prefs_add_bool(PREF_ERROR_E, TRUE); |
|
1ba3811fdba4
Add an option per message type to enable (/disable) the overriding of
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
474 | purple_prefs_add_bool(PREF_NICK_E, TRUE); |
| 15231 | 475 | } |
| 476 | ||
| 15884 | 477 | PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info) |