Sun, 15 Apr 2007 02:10:37 +0000
propagate from branch 'im.pidgin.gaim' (head b2836a24d81e7a1bd1d21b3aea8794b094391344)
to branch 'im.pidgin.rlaager.merging.soc-msnp13-to-svn18164' (head 463b4fa9f067b279f843520d95a822adc86a0a1b)
| 6302 | 1 | /* |
| 2 | * Gaim buddy notification plugin. | |
| 3 | * | |
| 4 | * Copyright (C) 2000-2001, Eric Warmenhoven (original code) | |
| 5 | * Copyright (C) 2002, Etan Reisner <deryni@eden.rutgers.edu> (rewritten code) | |
| 6 | * Copyright (C) 2003, Christian Hammond (update for changed API) | |
|
6322
35fdae8a156f
[gaim-migrate @ 6821]
Mark Doliner <markdoliner@pidgin.im>
parents:
6302
diff
changeset
|
7 | * Copyright (C) 2003, Brian Tarricone <bjt23@cornell.edu> (mostly rewritten) |
| 6302 | 8 | * Copyright (C) 2003, Mark Doliner (minor cleanup) |
| 6977 | 9 | * Copyright (C) 2003, Etan Reisner (largely rewritten again) |
| 6302 | 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 3374 | 20 | * |
| 6302 | 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | * | |
| 25 | */ | |
| 26 | ||
| 10606 | 27 | /* TODO |
| 28 | * 22:22:17 <seanegan> deryni: speaking of notify.c... you know what else | |
| 29 | * might be a neat feature? | |
| 30 | * 22:22:30 <seanegan> Changing the window icon. | |
| 31 | * 22:23:25 <deryni> seanegan: To what? | |
| 32 | * 22:23:42 <seanegan> deryni: I dunno. Flash it between the regular icon and | |
| 33 | * blank or something. | |
| 34 | * 22:23:53 <deryni> Also I think gaim might re-set that sort of frequently, | |
| 35 | * but I'd have to look. | |
| 11581 | 36 | * 22:25:16 <seanegan> deryni: I keep my conversations in one workspace and am |
| 10606 | 37 | * frequently in an another, and the icon flashing in the pager would be a |
| 38 | * neat visual clue. | |
| 39 | */ | |
| 40 | ||
| 6302 | 41 | /* |
| 42 | * From Etan, 2002: | |
| 43 | * -Added config dialog | |
| 44 | * -Added control over notification method | |
| 45 | * -Added control over when to release notification | |
| 46 | * | |
| 47 | * -Added option to get notification for chats also | |
| 48 | * -Cleaned up code | |
| 49 | * -Added option to notify on click as it's own option | |
| 50 | * rather then as what happens when on focus isn't clicked | |
| 51 | * -Added apply button to change the denotification methods for | |
| 52 | * open conversation windows | |
| 53 | * -Fixed apply to conversations, count now keeps count across applies | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
54 | * -Fixed(?) memory leak, and in the process fixed some stupidities |
| 6302 | 55 | * -Hit enter when done editing the title string entry box to save it |
| 3392 | 56 | * |
| 57 | * Thanks to Carles Pina i Estany <carles@pinux.info> | |
| 58 | * for count of new messages option | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
59 | * |
| 6302 | 60 | * From Brian, 20 July 2003: |
| 61 | * -Use new xml prefs | |
| 62 | * -Better handling of notification states tracking | |
| 63 | * -Better pref change handling | |
| 64 | * -Fixed a possible memleak and possible crash (rare) | |
| 65 | * -Use gtk_window_get_title() rather than gtkwin->title | |
| 66 | * -Other random fixes and cleanups | |
| 6977 | 67 | * |
| 9298 | 68 | * Etan again, 12 August 2003: |
| 6977 | 69 | * -Better use of the new xml prefs |
| 70 | * -Removed all bitmask stuff | |
| 71 | * -Even better pref change handling | |
| 72 | * -Removed unnecessary functions | |
| 73 | * -Reworking of notification/unnotification stuff | |
| 74 | * -Header file include cleanup | |
| 75 | * -General code cleanup | |
| 9298 | 76 | * |
| 77 | * Etan yet again, 04 April 2004: | |
| 78 | * -Re-added Urgent option | |
| 79 | * -Re-added unnotify on focus option (still needs work, as it will only | |
| 80 | * react to focus-in events when the entry or history widgets are focused) | |
| 10492 | 81 | * |
| 82 | * Sean, 08 January, 2005: | |
| 83 | * -Added Raise option, formally in Gaim proper | |
| 3392 | 84 | */ |
| 85 | ||
| 9791 | 86 | #include "internal.h" |
| 87 | #include "gtkgaim.h" | |
| 10492 | 88 | #include "gtkprefs.h" |
| 6302 | 89 | |
|
12604
893fbf89317c
[gaim-migrate @ 14939]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12600
diff
changeset
|
90 | #include "conversation.h" |
| 6302 | 91 | #include "prefs.h" |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
92 | #include "signals.h" |
| 9943 | 93 | #include "version.h" |
| 11581 | 94 | #include "debug.h" |
|
4202
8b92de3b1c07
[gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents:
4165
diff
changeset
|
95 | |
| 6302 | 96 | #include "gtkplugin.h" |
| 97 | #include "gtkutils.h" | |
| 98 | ||
| 12959 | 99 | #ifndef _WIN32 |
| 6977 | 100 | #include <X11/Xatom.h> |
| 3385 | 101 | #include <X11/Xlib.h> |
| 3374 | 102 | #include <X11/Xutil.h> |
| 12959 | 103 | #endif |
| 3374 | 104 | |
| 6302 | 105 | #define NOTIFY_PLUGIN_ID "gtk-x11-notify" |
| 3710 | 106 | |
|
5436
a0e0bacaa196
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
107 | static GaimPlugin *my_plugin = NULL; |
| 14389 | 108 | static GdkAtom _Cardinal = GDK_NONE; |
| 109 | static GdkAtom _GaimUnseenCount = GDK_NONE; | |
|
5436
a0e0bacaa196
[gaim-migrate @ 5818]
Christian Hammond <chipx86@chipx86.com>
parents:
5205
diff
changeset
|
110 | |
| 6302 | 111 | /* notification set/unset */ |
| 14385 | 112 | static int notify(GaimConversation *conv, gboolean increment); |
| 11581 | 113 | static void notify_win(GaimGtkWindow *gaimwin); |
| 9298 | 114 | static void unnotify(GaimConversation *conv, gboolean reset); |
| 14389 | 115 | static int unnotify_cb(GtkWidget *widget, gpointer data, |
| 116 | GaimConversation *conv); | |
| 6302 | 117 | |
| 118 | /* gtk widget callbacks for prefs panel */ | |
| 6977 | 119 | static void type_toggle_cb(GtkWidget *widget, gpointer data); |
| 120 | static void method_toggle_cb(GtkWidget *widget, gpointer data); | |
| 121 | static void notify_toggle_cb(GtkWidget *widget, gpointer data); | |
| 14389 | 122 | static gboolean options_entry_cb(GtkWidget *widget, GdkEventFocus *event, |
| 123 | gpointer data); | |
|
12397
aa64ec827fdf
[gaim-migrate @ 14704]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
124 | static void apply_method(void); |
|
aa64ec827fdf
[gaim-migrate @ 14704]
Richard Laager <rlaager@pidgin.im>
parents:
12286
diff
changeset
|
125 | static void apply_notify(void); |
| 191 | 126 | |
| 6977 | 127 | /* string function */ |
| 11581 | 128 | static void handle_string(GaimGtkWindow *gaimwin); |
| 6302 | 129 | |
| 14389 | 130 | /* count_title function */ |
| 131 | static void handle_count_title(GaimGtkWindow *gaimwin); | |
| 132 | ||
| 133 | /* count_xprop function */ | |
| 134 | static void handle_count_xprop(GaimGtkWindow *gaimwin); | |
| 6302 | 135 | |
| 6977 | 136 | /* urgent function */ |
| 14389 | 137 | static void handle_urgent(GaimGtkWindow *gaimwin, gboolean set); |
| 10606 | 138 | |
| 139 | /* raise function */ | |
| 11581 | 140 | static void handle_raise(GaimGtkWindow *gaimwin); |
| 3710 | 141 | |
| 6302 | 142 | /****************************************/ |
| 143 | /* Begin doing stuff below this line... */ | |
| 144 | /****************************************/ | |
| 14389 | 145 | static guint |
| 11581 | 146 | count_messages(GaimGtkWindow *gaimwin) |
| 9298 | 147 | { |
| 14389 | 148 | guint count = 0; |
| 14385 | 149 | GList *convs = NULL, *l; |
| 9298 | 150 | |
| 14385 | 151 | for (convs = gaimwin->gtkconvs; convs != NULL; convs = convs->next) { |
| 152 | GaimGtkConversation *conv = convs->data; | |
| 153 | for (l = conv->convs; l != NULL; l = l->next) { | |
| 154 | count += GPOINTER_TO_INT(gaim_conversation_get_data(l->data, "notify-message-count")); | |
| 155 | } | |
| 9298 | 156 | } |
| 157 | ||
| 158 | return count; | |
| 159 | } | |
| 6302 | 160 | |
| 6977 | 161 | static int |
| 14385 | 162 | notify(GaimConversation *conv, gboolean increment) |
| 6977 | 163 | { |
| 14385 | 164 | gint count; |
| 14326 | 165 | gboolean has_focus; |
| 14389 | 166 | GaimGtkWindow *gaimwin = NULL; |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
167 | |
| 6977 | 168 | if (conv == NULL) |
| 6302 | 169 | return 0; |
| 170 | ||
| 6977 | 171 | /* We want to remove the notifications, but not reset the counter */ |
| 172 | unnotify(conv, FALSE); | |
| 173 | ||
| 11581 | 174 | gaimwin = GAIM_GTK_CONVERSATION(conv)->win; |
| 5021 | 175 | |
| 6977 | 176 | /* If we aren't doing notifications for this type of conversation, return */ |
|
11338
1a3663ac9b05
[gaim-migrate @ 13551]
Mark Doliner <markdoliner@pidgin.im>
parents:
10984
diff
changeset
|
177 | if (((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && |
| 9298 | 178 | !gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_im")) || |
|
11338
1a3663ac9b05
[gaim-migrate @ 13551]
Mark Doliner <markdoliner@pidgin.im>
parents:
10984
diff
changeset
|
179 | ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) && |
| 9298 | 180 | !gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat"))) |
| 6977 | 181 | return 0; |
| 4203 | 182 | |
| 11581 | 183 | g_object_get(G_OBJECT(gaimwin->window), |
| 9298 | 184 | "has-toplevel-focus", &has_focus, NULL); |
| 3374 | 185 | |
| 6977 | 186 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_focused") || |
|
10984
8d8c654bf34d
[gaim-migrate @ 12819]
Mark Doliner <markdoliner@pidgin.im>
parents:
10971
diff
changeset
|
187 | !has_focus) { |
| 14385 | 188 | if (increment) { |
| 189 | count = GPOINTER_TO_INT(gaim_conversation_get_data(conv, "notify-message-count")); | |
| 190 | count++; | |
| 191 | gaim_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(count)); | |
| 192 | } | |
| 193 | ||
| 9298 | 194 | notify_win(gaimwin); |
| 6977 | 195 | } |
| 6302 | 196 | |
| 197 | return 0; | |
| 198 | } | |
| 199 | ||
| 9298 | 200 | static void |
| 11581 | 201 | notify_win(GaimGtkWindow *gaimwin) |
| 9298 | 202 | { |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
203 | if (count_messages(gaimwin) <= 0) |
|
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
204 | return; |
|
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
205 | |
| 9298 | 206 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_count")) |
| 14389 | 207 | handle_count_title(gaimwin); |
| 208 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_count_xprop")) | |
| 209 | handle_count_xprop(gaimwin); | |
| 9298 | 210 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_string")) |
| 211 | handle_string(gaimwin); | |
| 212 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_urgent")) | |
| 213 | handle_urgent(gaimwin, TRUE); | |
| 10492 | 214 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_raise")) |
| 215 | handle_raise(gaimwin); | |
| 9298 | 216 | } |
| 217 | ||
| 218 | static void | |
| 219 | unnotify(GaimConversation *conv, gboolean reset) | |
| 220 | { | |
| 221 | GaimConversation *active_conv = NULL; | |
| 11581 | 222 | GaimGtkWindow *gaimwin = NULL; |
| 9298 | 223 | |
| 224 | g_return_if_fail(conv != NULL); | |
| 225 | ||
| 11581 | 226 | gaimwin = GAIM_GTK_CONVERSATION(conv)->win; |
| 227 | active_conv = gaim_gtk_conv_window_get_active_conversation(gaimwin); | |
| 9298 | 228 | |
| 229 | /* reset the conversation window title */ | |
| 230 | gaim_conversation_autoset_title(active_conv); | |
| 231 | ||
| 232 | if (reset) { | |
| 14389 | 233 | /* Only need to actually remove the urgent hinting here, since |
| 234 | * removing it just to have it readded in re-notify is an | |
| 235 | * unnecessary couple extra RTs to the server */ | |
| 9298 | 236 | handle_urgent(gaimwin, FALSE); |
| 14385 | 237 | gaim_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(0)); |
| 14389 | 238 | /* Same logic as for the urgent hint, xprops are also a RT. |
| 239 | * This needs to go here so that it gets the updated message | |
| 240 | * count. */ | |
| 241 | handle_count_xprop(gaimwin); | |
| 9298 | 242 | } |
| 243 | ||
| 244 | return; | |
| 245 | } | |
| 246 | ||
| 247 | static int | |
| 248 | unnotify_cb(GtkWidget *widget, gpointer data, GaimConversation *conv) | |
| 249 | { | |
| 14385 | 250 | if (GPOINTER_TO_INT(gaim_conversation_get_data(conv, "notify-message-count")) != 0) |
| 9298 | 251 | unnotify(conv, TRUE); |
| 252 | ||
| 253 | return 0; | |
| 254 | } | |
| 255 | ||
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
256 | static gboolean |
|
13234
1d8e569b2053
[gaim-migrate @ 15598]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12968
diff
changeset
|
257 | message_displayed_cb(GaimAccount *account, const char *who, char *message, |
| 14389 | 258 | GaimConversation *conv, GaimMessageFlags flags) |
| 6977 | 259 | { |
|
13237
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
260 | if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT && |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
261 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat_nick") && |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
262 | !(flags & GAIM_MESSAGE_NICK))) |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
263 | return FALSE; |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
264 | |
|
12604
893fbf89317c
[gaim-migrate @ 14939]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12600
diff
changeset
|
265 | if ((flags & GAIM_MESSAGE_RECV) && !(flags & GAIM_MESSAGE_DELAYED)) |
| 14385 | 266 | notify(conv, TRUE); |
| 9298 | 267 | |
| 268 | return FALSE; | |
| 269 | } | |
| 270 | ||
| 6977 | 271 | static void |
| 14389 | 272 | im_sent_im(GaimAccount *account, const char *receiver, const char *message) |
| 273 | { | |
| 9298 | 274 | GaimConversation *conv = NULL; |
| 275 | ||
| 276 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_send")) { | |
|
11338
1a3663ac9b05
[gaim-migrate @ 13551]
Mark Doliner <markdoliner@pidgin.im>
parents:
10984
diff
changeset
|
277 | conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, receiver, account); |
| 9298 | 278 | unnotify(conv, TRUE); |
| 279 | } | |
| 280 | } | |
| 281 | ||
| 282 | static void | |
| 283 | chat_sent_im(GaimAccount *account, const char *message, int id) | |
| 6977 | 284 | { |
| 285 | GaimConversation *conv = NULL; | |
| 286 | ||
| 287 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_send")) { | |
| 288 | conv = gaim_find_chat(gaim_account_get_connection(account), id); | |
| 289 | unnotify(conv, TRUE); | |
| 290 | } | |
| 3710 | 291 | } |
| 292 | ||
| 6977 | 293 | static int |
| 294 | attach_signals(GaimConversation *conv) | |
| 295 | { | |
| 296 | GaimGtkConversation *gtkconv = NULL; | |
| 297 | GaimGtkWindow *gtkwin = NULL; | |
| 11728 | 298 | GSList *imhtml_ids = NULL, *entry_ids = NULL; |
| 6977 | 299 | guint id; |
| 300 | ||
| 301 | gtkconv = GAIM_GTK_CONVERSATION(conv); | |
| 11581 | 302 | if (!gtkconv) { |
| 303 | gaim_debug_misc("notify", "Failed to find gtkconv\n"); | |
| 304 | return 0; | |
| 305 | } | |
| 306 | ||
| 307 | gtkwin = gtkconv->win; | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
308 | |
| 6977 | 309 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_focus")) { |
| 14389 | 310 | /* TODO should really find a way to make this work no matter |
| 311 | * where the focus is inside the conv window, without having | |
| 312 | * to bind to focus-in-event on the g(d|t)kwindow */ | |
| 9298 | 313 | /* try setting the signal on the focus-in-event for |
| 314 | * gtkwin->notebook->container? */ | |
| 315 | id = g_signal_connect(G_OBJECT(gtkconv->entry), "focus-in-event", | |
| 316 | G_CALLBACK(unnotify_cb), conv); | |
| 11728 | 317 | entry_ids = g_slist_append(entry_ids, GUINT_TO_POINTER(id)); |
| 9298 | 318 | |
| 319 | id = g_signal_connect(G_OBJECT(gtkconv->imhtml), "focus-in-event", | |
| 320 | G_CALLBACK(unnotify_cb), conv); | |
| 11728 | 321 | imhtml_ids = g_slist_append(imhtml_ids, GUINT_TO_POINTER(id)); |
| 6977 | 322 | } |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
323 | |
| 6977 | 324 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_click")) { |
| 14389 | 325 | /* TODO similarly should really find a way to allow for |
| 326 | * clicking in other places of the window */ | |
| 9298 | 327 | id = g_signal_connect(G_OBJECT(gtkconv->entry), "button-press-event", |
| 328 | G_CALLBACK(unnotify_cb), conv); | |
| 6977 | 329 | entry_ids = g_slist_append(entry_ids, GUINT_TO_POINTER(id)); |
| 12286 | 330 | |
| 331 | id = g_signal_connect(G_OBJECT(gtkconv->imhtml), "button-press-event", | |
| 332 | G_CALLBACK(unnotify_cb), conv); | |
| 333 | imhtml_ids = g_slist_append(imhtml_ids, GUINT_TO_POINTER(id)); | |
| 3374 | 334 | } |
| 3710 | 335 | |
| 6977 | 336 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_type")) { |
| 9298 | 337 | id = g_signal_connect(G_OBJECT(gtkconv->entry), "key-press-event", |
| 338 | G_CALLBACK(unnotify_cb), conv); | |
| 6977 | 339 | entry_ids = g_slist_append(entry_ids, GUINT_TO_POINTER(id)); |
| 3374 | 340 | } |
| 341 | ||
| 6977 | 342 | gaim_conversation_set_data(conv, "notify-imhtml-signals", imhtml_ids); |
| 343 | gaim_conversation_set_data(conv, "notify-entry-signals", entry_ids); | |
| 4035 | 344 | |
| 3428 | 345 | return 0; |
| 191 | 346 | } |
| 347 | ||
| 6977 | 348 | static void |
| 349 | detach_signals(GaimConversation *conv) | |
| 350 | { | |
| 351 | GaimGtkConversation *gtkconv = NULL; | |
| 352 | GaimGtkWindow *gtkwin = NULL; | |
| 11606 | 353 | GSList *ids = NULL, *l; |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
354 | |
| 6977 | 355 | gtkconv = GAIM_GTK_CONVERSATION(conv); |
| 11581 | 356 | if (!gtkconv) |
| 357 | return; | |
| 358 | gtkwin = gtkconv->win; | |
| 4203 | 359 | |
| 6977 | 360 | ids = gaim_conversation_get_data(conv, "notify-imhtml-signals"); |
| 11606 | 361 | for (l = ids; l != NULL; l = l->next) |
| 362 | g_signal_handler_disconnect(gtkconv->imhtml, GPOINTER_TO_INT(l->data)); | |
| 363 | g_slist_free(ids); | |
| 6302 | 364 | |
| 6977 | 365 | ids = gaim_conversation_get_data(conv, "notify-entry-signals"); |
| 11606 | 366 | for (l = ids; l != NULL; l = l->next) |
| 367 | g_signal_handler_disconnect(gtkconv->entry, GPOINTER_TO_INT(l->data)); | |
| 368 | g_slist_free(ids); | |
| 3710 | 369 | |
| 14385 | 370 | gaim_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(0)); |
| 371 | ||
| 6977 | 372 | gaim_conversation_set_data(conv, "notify-imhtml-signals", NULL); |
| 373 | gaim_conversation_set_data(conv, "notify-entry-signals", NULL); | |
| 3710 | 374 | } |
| 375 | ||
| 6977 | 376 | static void |
| 377 | conv_created(GaimConversation *conv) | |
| 378 | { | |
| 14389 | 379 | gaim_conversation_set_data(conv, "notify-message-count", |
| 380 | GINT_TO_POINTER(0)); | |
| 14385 | 381 | |
| 14389 | 382 | /* always attach the signals, notify() will take care of conversation |
| 383 | * type checking */ | |
| 6977 | 384 | attach_signals(conv); |
| 3374 | 385 | } |
| 386 | ||
| 6977 | 387 | static void |
| 12968 | 388 | conv_switched(GaimConversation *conv) |
| 6977 | 389 | { |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
390 | #if 0 |
| 11581 | 391 | GaimGtkWindow *gaimwin = gaim_conversation_get_window(new_conv); |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
392 | #endif |
| 6302 | 393 | |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
394 | /* |
|
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
395 | * If the conversation was switched, then make sure we re-notify |
|
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
396 | * because Gaim will have overwritten our custom window title. |
|
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
397 | */ |
| 14385 | 398 | notify(conv, FALSE); |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
399 | |
|
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
400 | #if 0 |
| 9298 | 401 | printf("conv_switched - %p - %p\n", old_conv, new_conv); |
| 402 | printf("count - %d\n", count_messages(gaimwin)); | |
| 403 | if (gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_switch")) | |
| 404 | unnotify(new_conv, FALSE); | |
| 405 | else { | |
| 406 | /* if we don't have notification on the window then we don't want to | |
| 407 | * re-notify it */ | |
| 408 | if (count_messages(gaimwin)) | |
| 409 | notify_win(gaimwin); | |
| 410 | } | |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
411 | #endif |
| 6977 | 412 | } |
| 6302 | 413 | |
| 6977 | 414 | static void |
| 415 | deleting_conv(GaimConversation *conv) | |
| 416 | { | |
| 11581 | 417 | GaimGtkWindow *gaimwin = NULL; |
| 9298 | 418 | |
| 6977 | 419 | detach_signals(conv); |
| 3392 | 420 | |
| 11606 | 421 | gaimwin = GAIM_GTK_CONVERSATION(conv)->win; |
| 422 | ||
| 423 | handle_urgent(gaimwin, FALSE); | |
| 14385 | 424 | gaim_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(0)); |
| 11606 | 425 | |
| 426 | return; | |
| 427 | ||
| 11581 | 428 | #if 0 |
| 429 | /* i think this line crashes */ | |
| 9298 | 430 | if (count_messages(gaimwin)) |
| 431 | notify_win(gaimwin); | |
| 11581 | 432 | #endif |
| 6977 | 433 | } |
| 434 | ||
|
9303
e257ad08c77c
[gaim-migrate @ 10107]
Mark Doliner <markdoliner@pidgin.im>
parents:
9298
diff
changeset
|
435 | #if 0 |
| 6977 | 436 | static void |
|
11447
23594a754163
[gaim-migrate @ 13686]
Daniel Atallah <datallah@pidgin.im>
parents:
11338
diff
changeset
|
437 | conversation_dragging(GaimConversation *active_conv, |
| 11581 | 438 | GaimGtkWindow *old_gaimwin, |
| 439 | GaimGtkWindow *new_gaimwin) | |
| 6977 | 440 | { |
| 9298 | 441 | if (old_gaimwin != new_gaimwin) { |
| 442 | if (old_gaimwin == NULL) { | |
| 443 | /* | |
| 444 | gaim_conversation_autoset_title(active_conv); | |
| 445 | handle_urgent(new_gaimwin, FALSE); | |
| 446 | */ | |
| 447 | ||
| 448 | if (count_messages(new_gaimwin)) | |
| 449 | notify_win(new_gaimwin); | |
| 450 | } else { | |
| 451 | printf("if else count = %d\n", count_messages(new_gaimwin)); | |
| 452 | printf("if else count = %d\n", count_messages(old_gaimwin)); | |
| 453 | /* | |
| 454 | GaimConversation *old_active_conv = NULL; | |
| 455 | old_active_conv = gaim_conv_window_get_active_conversation(new_gaimwin); | |
| 456 | ||
| 457 | gaim_conversation_autoset_title(old_active_conv); | |
| 458 | handle_urgent(old_gaimwin, FALSE); | |
| 6302 | 459 | |
| 9298 | 460 | if (count_messages(old_gaimwin)) |
| 461 | notify_win(old_gaimwin); | |
| 462 | ||
| 463 | gaim_conversation_autoset_title(active_conv); | |
| 464 | handle_urgent(new_gaimwin, FALSE); | |
| 465 | ||
| 466 | if (count_messages(new_gaimwin)) | |
| 467 | notify_win(new_gaimwin); | |
| 468 | */ | |
| 469 | } | |
| 470 | } else { | |
| 471 | printf("else count = %d\n", count_messages(new_gaimwin)); | |
| 472 | printf("else count = %d\n", count_messages(old_gaimwin)); | |
| 473 | /* | |
| 474 | gaim_conversation_autoset_title(active_conv); | |
| 475 | handle_urgent(old_gaimwin, FALSE); | |
| 476 | ||
| 477 | if (count_messages(old_gaimwin)) | |
| 478 | notify_win(old_gaimwin); | |
| 479 | */ | |
| 480 | } | |
| 4035 | 481 | } |
|
9303
e257ad08c77c
[gaim-migrate @ 10107]
Mark Doliner <markdoliner@pidgin.im>
parents:
9298
diff
changeset
|
482 | #endif |
| 4035 | 483 | |
| 6977 | 484 | static void |
| 11581 | 485 | handle_string(GaimGtkWindow *gaimwin) |
| 9298 | 486 | { |
| 487 | GtkWindow *window = NULL; | |
| 488 | gchar newtitle[256]; | |
| 489 | ||
| 490 | g_return_if_fail(gaimwin != NULL); | |
| 491 | ||
| 11581 | 492 | window = GTK_WINDOW(gaimwin->window); |
| 9298 | 493 | g_return_if_fail(window != NULL); |
| 494 | ||
| 495 | g_snprintf(newtitle, sizeof(newtitle), "%s%s", | |
| 496 | gaim_prefs_get_string("/plugins/gtk/X11/notify/title_string"), | |
| 497 | gtk_window_get_title(window)); | |
| 498 | gtk_window_set_title(window, newtitle); | |
| 499 | } | |
| 500 | ||
| 501 | static void | |
| 14389 | 502 | handle_count_title(GaimGtkWindow *gaimwin) |
| 9298 | 503 | { |
| 504 | GtkWindow *window; | |
| 505 | char newtitle[256]; | |
| 506 | ||
| 507 | g_return_if_fail(gaimwin != NULL); | |
| 508 | ||
| 11581 | 509 | window = GTK_WINDOW(gaimwin->window); |
| 9298 | 510 | g_return_if_fail(window != NULL); |
| 511 | ||
| 10606 | 512 | g_snprintf(newtitle, sizeof(newtitle), "[%d] %s", |
| 513 | count_messages(gaimwin), gtk_window_get_title(window)); | |
| 9298 | 514 | gtk_window_set_title(window, newtitle); |
| 515 | } | |
| 516 | ||
| 517 | static void | |
| 14389 | 518 | handle_count_xprop(GaimGtkWindow *gaimwin) |
| 519 | { | |
| 520 | #ifndef _WIN32 | |
| 521 | guint count; | |
| 522 | GtkWidget *window; | |
| 523 | GdkWindow *gdkwin; | |
| 524 | ||
| 525 | window = gaimwin->window; | |
| 526 | g_return_if_fail(window != NULL); | |
| 527 | ||
| 528 | if (_GaimUnseenCount == GDK_NONE) { | |
| 529 | _GaimUnseenCount = gdk_atom_intern("_GAIM_UNSEEN_COUNT", FALSE); | |
| 530 | } | |
| 531 | ||
| 532 | if (_Cardinal == GDK_NONE) { | |
| 533 | _Cardinal = gdk_atom_intern("CARDINAL", FALSE); | |
| 534 | } | |
| 535 | ||
| 536 | count = count_messages(gaimwin); | |
| 537 | gdkwin = window->window; | |
| 538 | ||
| 539 | gdk_property_change(gdkwin, _GaimUnseenCount, _Cardinal, 32, | |
| 540 | GDK_PROP_MODE_REPLACE, (guchar *) &count, 1); | |
| 541 | #endif | |
| 542 | } | |
| 543 | ||
| 544 | static void | |
| 545 | handle_urgent(GaimGtkWindow *win, gboolean set) | |
| 6977 | 546 | { |
| 12959 | 547 | #ifndef _WIN32 |
|
15410
b56fbd3662b9
[gaim-migrate @ 18141]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
14778
diff
changeset
|
548 | gaim_gtk_set_urgent(GTK_WINDOW(win->window), set); |
| 12959 | 549 | #endif |
| 4035 | 550 | } |
| 551 | ||
| 6977 | 552 | static void |
| 11581 | 553 | handle_raise(GaimGtkWindow *gaimwin) |
| 10606 | 554 | { |
| 11581 | 555 | gaim_gtk_conv_window_raise(gaimwin); |
| 10606 | 556 | } |
| 557 | ||
| 558 | static void | |
| 6977 | 559 | type_toggle_cb(GtkWidget *widget, gpointer data) |
| 560 | { | |
| 561 | gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); | |
| 562 | gchar pref[256]; | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
563 | |
| 14389 | 564 | g_snprintf(pref, sizeof(pref), "/plugins/gtk/X11/notify/%s", |
| 565 | (char *)data); | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
566 | |
| 6977 | 567 | gaim_prefs_set_bool(pref, on); |
| 3374 | 568 | } |
| 569 | ||
| 6977 | 570 | static void |
| 571 | method_toggle_cb(GtkWidget *widget, gpointer data) | |
| 572 | { | |
| 573 | gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); | |
| 574 | gchar pref[256]; | |
| 575 | ||
| 14389 | 576 | g_snprintf(pref, sizeof(pref), "/plugins/gtk/X11/notify/%s", |
| 577 | (char *)data); | |
| 3374 | 578 | |
| 6977 | 579 | gaim_prefs_set_bool(pref, on); |
| 580 | ||
| 581 | if (!strcmp(data, "method_string")) { | |
| 582 | GtkWidget *entry = g_object_get_data(G_OBJECT(widget), "title-entry"); | |
| 583 | gtk_widget_set_sensitive(entry, on); | |
| 584 | ||
| 14448 | 585 | gaim_prefs_set_string("/plugins/gtk/X11/notify/title_string", |
| 586 | gtk_entry_get_text(GTK_ENTRY(entry))); | |
| 6977 | 587 | } |
| 588 | ||
| 589 | apply_method(); | |
| 3374 | 590 | } |
| 591 | ||
| 6977 | 592 | static void |
| 593 | notify_toggle_cb(GtkWidget *widget, gpointer data) | |
| 594 | { | |
| 595 | gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); | |
| 596 | gchar pref[256]; | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
597 | |
| 14389 | 598 | g_snprintf(pref, sizeof(pref), "/plugins/gtk/X11/notify/%s", |
| 599 | (char *)data); | |
| 3374 | 600 | |
| 6977 | 601 | gaim_prefs_set_bool(pref, on); |
| 602 | ||
| 603 | apply_notify(); | |
| 3374 | 604 | } |
| 605 | ||
| 6977 | 606 | static gboolean |
| 607 | options_entry_cb(GtkWidget *widget, GdkEventFocus *evt, gpointer data) | |
| 608 | { | |
| 609 | if (data == NULL) | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6977
diff
changeset
|
610 | return FALSE; |
| 6302 | 611 | |
| 6977 | 612 | if (!strcmp(data, "method_string")) { |
| 14389 | 613 | gaim_prefs_set_string("/plugins/gtk/X11/notify/title_string", |
| 614 | gtk_entry_get_text(GTK_ENTRY(widget))); | |
| 3374 | 615 | } |
| 6302 | 616 | |
| 6977 | 617 | apply_method(); |
| 6302 | 618 | |
| 619 | return FALSE; | |
| 620 | } | |
| 621 | ||
| 6977 | 622 | static void |
| 14389 | 623 | apply_method() |
| 624 | { | |
|
13664
fdc3b588f248
[gaim-migrate @ 16065]
Richard Laager <rlaager@pidgin.im>
parents:
13550
diff
changeset
|
625 | GList *convs; |
| 14385 | 626 | GaimGtkWindow *gaimwin = NULL; |
| 6977 | 627 | |
| 14389 | 628 | for (convs = gaim_get_conversations(); convs != NULL; |
| 629 | convs = convs->next) { | |
| 14385 | 630 | GaimConversation *conv = (GaimConversation *)convs->data; |
| 6302 | 631 | |
| 6977 | 632 | /* remove notifications */ |
| 9298 | 633 | unnotify(conv, FALSE); |
| 634 | ||
| 14385 | 635 | gaimwin = GAIM_GTK_CONVERSATION(conv)->win; |
| 636 | if (GPOINTER_TO_INT(gaim_conversation_get_data(conv, "notify-message-count")) != 0) | |
| 6977 | 637 | /* reattach appropriate notifications */ |
| 14385 | 638 | notify(conv, FALSE); |
| 6977 | 639 | } |
| 3374 | 640 | } |
| 641 | ||
| 6977 | 642 | static void |
| 643 | apply_notify() | |
| 644 | { | |
| 645 | GList *convs = gaim_get_conversations(); | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
646 | |
| 6977 | 647 | while (convs) { |
| 648 | GaimConversation *conv = (GaimConversation *)convs->data; | |
| 4203 | 649 | |
| 6977 | 650 | /* detach signals */ |
| 651 | detach_signals(conv); | |
| 652 | /* reattach appropriate signals */ | |
| 653 | attach_signals(conv); | |
| 4035 | 654 | |
| 6977 | 655 | convs = convs->next; |
| 4035 | 656 | } |
| 657 | } | |
| 658 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
659 | static GtkWidget * |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
660 | get_config_frame(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
661 | { |
| 6977 | 662 | GtkWidget *ret = NULL, *frame = NULL; |
| 663 | GtkWidget *vbox = NULL, *hbox = NULL; | |
|
13237
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
664 | GtkWidget *toggle = NULL, *entry = NULL, *ref; |
| 6302 | 665 | |
| 3565 | 666 | ret = gtk_vbox_new(FALSE, 18); |
| 6302 | 667 | gtk_container_set_border_width(GTK_CONTAINER (ret), 12); |
| 3392 | 668 | |
| 6302 | 669 | /*---------- "Notify For" ----------*/ |
| 670 | frame = gaim_gtk_make_frame(ret, _("Notify For")); | |
| 671 | vbox = gtk_vbox_new(FALSE, 5); | |
| 672 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 673 | ||
| 3710 | 674 | toggle = gtk_check_button_new_with_mnemonic(_("_IM windows")); |
| 675 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 6977 | 676 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
| 9298 | 677 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_im")); |
| 6977 | 678 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 679 | G_CALLBACK(type_toggle_cb), "type_im"); |
| 3710 | 680 | |
| 6977 | 681 | toggle = gtk_check_button_new_with_mnemonic(_("C_hat windows")); |
| 3710 | 682 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |
| 6977 | 683 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
| 9298 | 684 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat")); |
| 6977 | 685 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 686 | G_CALLBACK(type_toggle_cb), "type_chat"); |
| 6977 | 687 | |
|
13237
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
688 | ref = toggle; |
|
13550
55c77cece2d0
[gaim-migrate @ 15926]
Richard Laager <rlaager@pidgin.im>
parents:
13237
diff
changeset
|
689 | toggle = gtk_check_button_new_with_mnemonic(_("\t_Only when someone says your screen name")); |
|
13237
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
690 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
691 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
692 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat_nick")); |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
693 | g_signal_connect(G_OBJECT(toggle), "toggled", |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
694 | G_CALLBACK(type_toggle_cb), "type_chat_nick"); |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
695 | gtk_widget_set_sensitive(toggle, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ref))); |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
696 | g_signal_connect(G_OBJECT(ref), "toggled", |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
697 | G_CALLBACK(gaim_gtk_toggle_sensitive), toggle); |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
698 | |
| 6977 | 699 | toggle = gtk_check_button_new_with_mnemonic(_("_Focused windows")); |
| 700 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 701 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 702 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_focused")); |
| 6977 | 703 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 704 | G_CALLBACK(type_toggle_cb), "type_focused"); |
| 3710 | 705 | |
| 6302 | 706 | /*---------- "Notification Methods" ----------*/ |
| 707 | frame = gaim_gtk_make_frame(ret, _("Notification Methods")); | |
| 708 | vbox = gtk_vbox_new(FALSE, 5); | |
| 709 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 710 | ||
| 6977 | 711 | /* String method button */ |
| 3565 | 712 | hbox = gtk_hbox_new(FALSE, 18); |
| 713 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
| 6302 | 714 | toggle = gtk_check_button_new_with_mnemonic(_("Prepend _string into window title:")); |
| 6977 | 715 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
| 9298 | 716 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_string")); |
| 3565 | 717 | gtk_box_pack_start(GTK_BOX(hbox), toggle, FALSE, FALSE, 0); |
| 6977 | 718 | |
| 6302 | 719 | entry = gtk_entry_new(); |
| 720 | gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 0); | |
| 721 | gtk_entry_set_max_length(GTK_ENTRY(entry), 10); | |
| 6977 | 722 | gtk_widget_set_sensitive(GTK_WIDGET(entry), |
| 9298 | 723 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_string")); |
| 6977 | 724 | gtk_entry_set_text(GTK_ENTRY(entry), |
| 9298 | 725 | gaim_prefs_get_string("/plugins/gtk/X11/notify/title_string")); |
| 6977 | 726 | g_object_set_data(G_OBJECT(toggle), "title-entry", entry); |
| 727 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 9298 | 728 | G_CALLBACK(method_toggle_cb), "method_string"); |
| 6977 | 729 | g_signal_connect(G_OBJECT(entry), "focus-out-event", |
| 9298 | 730 | G_CALLBACK(options_entry_cb), "method_string"); |
| 3374 | 731 | |
| 6977 | 732 | /* Count method button */ |
| 733 | toggle = gtk_check_button_new_with_mnemonic(_("Insert c_ount of new messages into window title")); | |
| 734 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 735 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_count")); |
| 6977 | 736 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |
| 737 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 9298 | 738 | G_CALLBACK(method_toggle_cb), "method_count"); |
| 4035 | 739 | |
| 12959 | 740 | #ifndef _WIN32 |
| 14389 | 741 | /* Count xprop method button */ |
| 742 | toggle = gtk_check_button_new_with_mnemonic(_("Insert count of new message into _X property")); | |
| 743 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 744 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 745 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_count_xprop")); | |
| 746 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 747 | G_CALLBACK(method_toggle_cb), "method_count_xprop"); | |
| 748 | ||
| 6977 | 749 | /* Urgent method button */ |
| 750 | toggle = gtk_check_button_new_with_mnemonic(_("Set window manager \"_URGENT\" hint")); | |
| 751 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 752 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 753 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_urgent")); |
| 754 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 755 | G_CALLBACK(method_toggle_cb), "method_urgent"); | |
| 12959 | 756 | #endif |
| 3710 | 757 | |
| 10606 | 758 | /* Raise window method button */ |
| 759 | toggle = gtk_check_button_new_with_mnemonic(_("R_aise conversation window")); | |
| 760 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 761 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 762 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_raise")); | |
| 763 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 764 | G_CALLBACK(method_toggle_cb), "method_raise"); | |
| 765 | ||
| 6977 | 766 | /*---------- "Notification Removals" ----------*/ |
| 6302 | 767 | frame = gaim_gtk_make_frame(ret, _("Notification Removal")); |
| 768 | vbox = gtk_vbox_new(FALSE, 5); | |
| 769 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 3374 | 770 | |
| 6977 | 771 | /* Remove on focus button */ |
| 772 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when conversation window _gains focus")); | |
| 773 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 774 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 775 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_focus")); |
| 6977 | 776 | g_signal_connect(G_OBJECT(toggle), "toggled", G_CALLBACK(notify_toggle_cb), "notify_focus"); |
| 777 | ||
| 778 | /* Remove on click button */ | |
| 779 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when conversation window _receives click")); | |
| 780 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 781 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 782 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_click")); |
| 6977 | 783 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 784 | G_CALLBACK(notify_toggle_cb), "notify_click"); |
| 3710 | 785 | |
| 6977 | 786 | /* Remove on type button */ |
| 787 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when _typing in conversation window")); | |
| 788 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 789 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 790 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_type")); |
| 6977 | 791 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 792 | G_CALLBACK(notify_toggle_cb), "notify_type"); |
| 4035 | 793 | |
| 6977 | 794 | /* Remove on message send button */ |
| 795 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when a _message gets sent")); | |
| 796 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 797 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 798 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_send")); |
| 6977 | 799 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 800 | G_CALLBACK(notify_toggle_cb), "notify_send"); |
| 3565 | 801 | |
| 6977 | 802 | #if 0 |
| 803 | /* Remove on conversation switch button */ | |
| 9298 | 804 | toggle = gtk_check_button_new_with_mnemonic(_("Remove on switch to conversation ta_b")); |
| 6977 | 805 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |
| 806 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 807 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_switch")); |
| 6977 | 808 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 809 | G_CALLBACK(notify_toggle_cb), "notify_switch"); |
| 6977 | 810 | #endif |
| 811 | ||
| 812 | gtk_widget_show_all(ret); | |
| 813 | return ret; | |
| 3374 | 814 | } |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
815 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
816 | static gboolean |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
817 | plugin_load(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
818 | { |
| 6977 | 819 | GList *convs = gaim_get_conversations(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
820 | void *conv_handle = gaim_conversations_get_handle(); |
| 9298 | 821 | void *gtk_conv_handle = gaim_gtk_conversations_get_handle(); |
| 6302 | 822 | |
| 823 | my_plugin = plugin; | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
824 | |
|
12604
893fbf89317c
[gaim-migrate @ 14939]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12600
diff
changeset
|
825 | gaim_signal_connect(gtk_conv_handle, "displayed-im-msg", plugin, |
| 12968 | 826 | GAIM_CALLBACK(message_displayed_cb), NULL); |
|
12604
893fbf89317c
[gaim-migrate @ 14939]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12600
diff
changeset
|
827 | gaim_signal_connect(gtk_conv_handle, "displayed-chat-msg", plugin, |
| 12968 | 828 | GAIM_CALLBACK(message_displayed_cb), NULL); |
| 829 | gaim_signal_connect(gtk_conv_handle, "conversation-switched", plugin, | |
| 830 | GAIM_CALLBACK(conv_switched), NULL); | |
| 6977 | 831 | gaim_signal_connect(conv_handle, "sent-im-msg", plugin, |
| 9298 | 832 | GAIM_CALLBACK(im_sent_im), NULL); |
| 6977 | 833 | gaim_signal_connect(conv_handle, "sent-chat-msg", plugin, |
| 9298 | 834 | GAIM_CALLBACK(chat_sent_im), NULL); |
| 6977 | 835 | gaim_signal_connect(conv_handle, "conversation-created", plugin, |
| 9298 | 836 | GAIM_CALLBACK(conv_created), NULL); |
| 6977 | 837 | gaim_signal_connect(conv_handle, "chat-joined", plugin, |
| 9298 | 838 | GAIM_CALLBACK(conv_created), NULL); |
| 6977 | 839 | gaim_signal_connect(conv_handle, "deleting-conversation", plugin, |
| 9298 | 840 | GAIM_CALLBACK(deleting_conv), NULL); |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
841 | #if 0 |
|
11447
23594a754163
[gaim-migrate @ 13686]
Daniel Atallah <datallah@pidgin.im>
parents:
11338
diff
changeset
|
842 | gaim_signal_connect(gtk_conv_handle, "conversation-dragging", plugin, |
|
23594a754163
[gaim-migrate @ 13686]
Daniel Atallah <datallah@pidgin.im>
parents:
11338
diff
changeset
|
843 | GAIM_CALLBACK(conversation_dragging), NULL); |
|
9303
e257ad08c77c
[gaim-migrate @ 10107]
Mark Doliner <markdoliner@pidgin.im>
parents:
9298
diff
changeset
|
844 | #endif |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
845 | |
| 6977 | 846 | while (convs) { |
| 847 | GaimConversation *conv = (GaimConversation *)convs->data; | |
| 6302 | 848 | |
| 849 | /* attach signals */ | |
| 6977 | 850 | attach_signals(conv); |
| 6302 | 851 | |
| 6977 | 852 | convs = convs->next; |
| 6302 | 853 | } |
| 854 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
855 | return TRUE; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
856 | } |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
857 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
858 | static gboolean |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
859 | plugin_unload(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
860 | { |
| 6977 | 861 | GList *convs = gaim_get_conversations(); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
862 | |
| 6977 | 863 | while (convs) { |
| 864 | GaimConversation *conv = (GaimConversation *)convs->data; | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
865 | |
| 6302 | 866 | /* kill signals */ |
| 6977 | 867 | detach_signals(conv); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
868 | |
| 6977 | 869 | convs = convs->next; |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
870 | } |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
871 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
872 | return TRUE; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
873 | } |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
874 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
875 | static GaimGtkPluginUiInfo ui_info = |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
876 | { |
|
12600
7ecd4441fdc7
[gaim-migrate @ 14934]
Richard Laager <rlaager@pidgin.im>
parents:
12397
diff
changeset
|
877 | get_config_frame, |
|
7ecd4441fdc7
[gaim-migrate @ 14934]
Richard Laager <rlaager@pidgin.im>
parents:
12397
diff
changeset
|
878 | 0 /* page_num (Reserved) */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
879 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
880 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
881 | static GaimPluginInfo info = |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
882 | { |
| 9943 | 883 | GAIM_PLUGIN_MAGIC, |
| 884 | GAIM_MAJOR_VERSION, | |
| 885 | GAIM_MINOR_VERSION, | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
886 | GAIM_PLUGIN_STANDARD, /**< type */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
887 | GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
888 | 0, /**< flags */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
889 | NULL, /**< dependencies */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
890 | GAIM_PRIORITY_DEFAULT, /**< priority */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
891 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
892 | NOTIFY_PLUGIN_ID, /**< id */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
893 | N_("Message Notification"), /**< name */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
894 | VERSION, /**< version */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
895 | /** summary */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
896 | N_("Provides a variety of ways of notifying you of unread messages."), |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
897 | /** description */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
898 | N_("Provides a variety of ways of notifying you of unread messages."), |
| 14389 | 899 | /**< author */ |
| 9298 | 900 | "Etan Reisner <deryni@eden.rutgers.edu>\n\t\t\tBrian Tarricone <bjt23@cornell.edu>", |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
901 | GAIM_WEBSITE, /**< homepage */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
902 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
903 | plugin_load, /**< load */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
904 | plugin_unload, /**< unload */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
905 | NULL, /**< destroy */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
906 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
907 | &ui_info, /**< ui_info */ |
| 8993 | 908 | NULL, /**< extra_info */ |
| 909 | NULL, | |
| 910 | NULL | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
911 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
912 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
913 | static void |
|
5920
963bfdefee02
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
914 | init_plugin(GaimPlugin *plugin) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
915 | { |
| 6302 | 916 | gaim_prefs_add_none("/plugins/gtk"); |
| 917 | gaim_prefs_add_none("/plugins/gtk/X11"); | |
| 918 | gaim_prefs_add_none("/plugins/gtk/X11/notify"); | |
| 919 | ||
| 6464 | 920 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_im", TRUE); |
| 921 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_chat", FALSE); | |
|
13237
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
922 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_chat_nick", FALSE); |
| 6464 | 923 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_focused", FALSE); |
| 6302 | 924 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_string", FALSE); |
| 925 | gaim_prefs_add_string("/plugins/gtk/X11/notify/title_string", "(*)"); | |
| 926 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_urgent", FALSE); | |
| 927 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_count", FALSE); | |
| 14389 | 928 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_count_xprop", FALSE); |
| 10492 | 929 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_raise", FALSE); |
| 14778 | 930 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_focus", TRUE); |
| 6302 | 931 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_click", FALSE); |
| 932 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_type", TRUE); | |
| 6464 | 933 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_send", TRUE); |
| 934 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_switch", TRUE); | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
935 | } |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
936 | |
| 6063 | 937 | GAIM_INIT_PLUGIN(notify, init_plugin, info) |