Mon, 04 Dec 2006 03:49:34 +0000
[gaim-migrate @ 17889]
Fix some leakage in the perl loader bindings by using a special typedef to handle functions that return g_malloc()-ed values. Thanks to the Gtk-Perl folks for any easy way to do this.
Fix gaim_gtk_sound_get_event_label() to correctly indicate that the retval is a constant.
| 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 |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
548 | XWMHints *hints; |
|
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
549 | |
| 11581 | 550 | g_return_if_fail(win != NULL); |
| 551 | g_return_if_fail(win->window != NULL); | |
| 552 | g_return_if_fail(win->window->window != NULL); | |
| 9298 | 553 | |
| 11581 | 554 | hints = XGetWMHints(GDK_WINDOW_XDISPLAY(win->window->window), |
| 555 | GDK_WINDOW_XWINDOW(win->window->window)); | |
|
12184
168ebf98a1c8
[gaim-migrate @ 14486]
Casey Harkins <charkins@pidgin.im>
parents:
11728
diff
changeset
|
556 | if(!hints) |
|
168ebf98a1c8
[gaim-migrate @ 14486]
Casey Harkins <charkins@pidgin.im>
parents:
11728
diff
changeset
|
557 | hints = XAllocWMHints(); |
| 12286 | 558 | |
| 14389 | 559 | if (set) |
| 6977 | 560 | hints->flags |= XUrgencyHint; |
| 561 | else | |
| 562 | hints->flags &= ~XUrgencyHint; | |
| 11581 | 563 | XSetWMHints(GDK_WINDOW_XDISPLAY(win->window->window), |
| 564 | GDK_WINDOW_XWINDOW(win->window->window), hints); | |
| 4218 | 565 | XFree(hints); |
| 12959 | 566 | #endif |
| 4035 | 567 | } |
| 568 | ||
| 6977 | 569 | static void |
| 11581 | 570 | handle_raise(GaimGtkWindow *gaimwin) |
| 10606 | 571 | { |
| 11581 | 572 | gaim_gtk_conv_window_raise(gaimwin); |
| 10606 | 573 | } |
| 574 | ||
| 575 | static void | |
| 6977 | 576 | type_toggle_cb(GtkWidget *widget, gpointer data) |
| 577 | { | |
| 578 | gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); | |
| 579 | gchar pref[256]; | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
580 | |
| 14389 | 581 | g_snprintf(pref, sizeof(pref), "/plugins/gtk/X11/notify/%s", |
| 582 | (char *)data); | |
|
4359
cf899ee07d1d
[gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents:
4218
diff
changeset
|
583 | |
| 6977 | 584 | gaim_prefs_set_bool(pref, on); |
| 3374 | 585 | } |
| 586 | ||
| 6977 | 587 | static void |
| 588 | method_toggle_cb(GtkWidget *widget, gpointer data) | |
| 589 | { | |
| 590 | gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); | |
| 591 | gchar pref[256]; | |
| 592 | ||
| 14389 | 593 | g_snprintf(pref, sizeof(pref), "/plugins/gtk/X11/notify/%s", |
| 594 | (char *)data); | |
| 3374 | 595 | |
| 6977 | 596 | gaim_prefs_set_bool(pref, on); |
| 597 | ||
| 598 | if (!strcmp(data, "method_string")) { | |
| 599 | GtkWidget *entry = g_object_get_data(G_OBJECT(widget), "title-entry"); | |
| 600 | gtk_widget_set_sensitive(entry, on); | |
| 601 | ||
| 14448 | 602 | gaim_prefs_set_string("/plugins/gtk/X11/notify/title_string", |
| 603 | gtk_entry_get_text(GTK_ENTRY(entry))); | |
| 6977 | 604 | } |
| 605 | ||
| 606 | apply_method(); | |
| 3374 | 607 | } |
| 608 | ||
| 6977 | 609 | static void |
| 610 | notify_toggle_cb(GtkWidget *widget, gpointer data) | |
| 611 | { | |
| 612 | gboolean on = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); | |
| 613 | gchar pref[256]; | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
614 | |
| 14389 | 615 | g_snprintf(pref, sizeof(pref), "/plugins/gtk/X11/notify/%s", |
| 616 | (char *)data); | |
| 3374 | 617 | |
| 6977 | 618 | gaim_prefs_set_bool(pref, on); |
| 619 | ||
| 620 | apply_notify(); | |
| 3374 | 621 | } |
| 622 | ||
| 6977 | 623 | static gboolean |
| 624 | options_entry_cb(GtkWidget *widget, GdkEventFocus *evt, gpointer data) | |
| 625 | { | |
| 626 | if (data == NULL) | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6977
diff
changeset
|
627 | return FALSE; |
| 6302 | 628 | |
| 6977 | 629 | if (!strcmp(data, "method_string")) { |
| 14389 | 630 | gaim_prefs_set_string("/plugins/gtk/X11/notify/title_string", |
| 631 | gtk_entry_get_text(GTK_ENTRY(widget))); | |
| 3374 | 632 | } |
| 6302 | 633 | |
| 6977 | 634 | apply_method(); |
| 6302 | 635 | |
| 636 | return FALSE; | |
| 637 | } | |
| 638 | ||
| 6977 | 639 | static void |
| 14389 | 640 | apply_method() |
| 641 | { | |
|
13664
fdc3b588f248
[gaim-migrate @ 16065]
Richard Laager <rlaager@pidgin.im>
parents:
13550
diff
changeset
|
642 | GList *convs; |
| 14385 | 643 | GaimGtkWindow *gaimwin = NULL; |
| 6977 | 644 | |
| 14389 | 645 | for (convs = gaim_get_conversations(); convs != NULL; |
| 646 | convs = convs->next) { | |
| 14385 | 647 | GaimConversation *conv = (GaimConversation *)convs->data; |
| 6302 | 648 | |
| 6977 | 649 | /* remove notifications */ |
| 9298 | 650 | unnotify(conv, FALSE); |
| 651 | ||
| 14385 | 652 | gaimwin = GAIM_GTK_CONVERSATION(conv)->win; |
| 653 | if (GPOINTER_TO_INT(gaim_conversation_get_data(conv, "notify-message-count")) != 0) | |
| 6977 | 654 | /* reattach appropriate notifications */ |
| 14385 | 655 | notify(conv, FALSE); |
| 6977 | 656 | } |
| 3374 | 657 | } |
| 658 | ||
| 6977 | 659 | static void |
| 660 | apply_notify() | |
| 661 | { | |
| 662 | GList *convs = gaim_get_conversations(); | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
663 | |
| 6977 | 664 | while (convs) { |
| 665 | GaimConversation *conv = (GaimConversation *)convs->data; | |
| 4203 | 666 | |
| 6977 | 667 | /* detach signals */ |
| 668 | detach_signals(conv); | |
| 669 | /* reattach appropriate signals */ | |
| 670 | attach_signals(conv); | |
| 4035 | 671 | |
| 6977 | 672 | convs = convs->next; |
| 4035 | 673 | } |
| 674 | } | |
| 675 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
676 | static GtkWidget * |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
677 | get_config_frame(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
678 | { |
| 6977 | 679 | GtkWidget *ret = NULL, *frame = NULL; |
| 680 | GtkWidget *vbox = NULL, *hbox = NULL; | |
|
13237
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
681 | GtkWidget *toggle = NULL, *entry = NULL, *ref; |
| 6302 | 682 | |
| 3565 | 683 | ret = gtk_vbox_new(FALSE, 18); |
| 6302 | 684 | gtk_container_set_border_width(GTK_CONTAINER (ret), 12); |
| 3392 | 685 | |
| 6302 | 686 | /*---------- "Notify For" ----------*/ |
| 687 | frame = gaim_gtk_make_frame(ret, _("Notify For")); | |
| 688 | vbox = gtk_vbox_new(FALSE, 5); | |
| 689 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 690 | ||
| 3710 | 691 | toggle = gtk_check_button_new_with_mnemonic(_("_IM windows")); |
| 692 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 6977 | 693 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
| 9298 | 694 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_im")); |
| 6977 | 695 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 696 | G_CALLBACK(type_toggle_cb), "type_im"); |
| 3710 | 697 | |
| 6977 | 698 | toggle = gtk_check_button_new_with_mnemonic(_("C_hat windows")); |
| 3710 | 699 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |
| 6977 | 700 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
| 9298 | 701 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_chat")); |
| 6977 | 702 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 703 | G_CALLBACK(type_toggle_cb), "type_chat"); |
| 6977 | 704 | |
|
13237
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
705 | ref = toggle; |
|
13550
55c77cece2d0
[gaim-migrate @ 15926]
Richard Laager <rlaager@pidgin.im>
parents:
13237
diff
changeset
|
706 | 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
|
707 | 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
|
708 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
709 | 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
|
710 | g_signal_connect(G_OBJECT(toggle), "toggled", |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
711 | G_CALLBACK(type_toggle_cb), "type_chat_nick"); |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
712 | 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
|
713 | g_signal_connect(G_OBJECT(ref), "toggled", |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
714 | G_CALLBACK(gaim_gtk_toggle_sensitive), toggle); |
|
9556cdf38196
[gaim-migrate @ 15602]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
13234
diff
changeset
|
715 | |
| 6977 | 716 | toggle = gtk_check_button_new_with_mnemonic(_("_Focused windows")); |
| 717 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 718 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 719 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/type_focused")); |
| 6977 | 720 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 721 | G_CALLBACK(type_toggle_cb), "type_focused"); |
| 3710 | 722 | |
| 6302 | 723 | /*---------- "Notification Methods" ----------*/ |
| 724 | frame = gaim_gtk_make_frame(ret, _("Notification Methods")); | |
| 725 | vbox = gtk_vbox_new(FALSE, 5); | |
| 726 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 727 | ||
| 6977 | 728 | /* String method button */ |
| 3565 | 729 | hbox = gtk_hbox_new(FALSE, 18); |
| 730 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
| 6302 | 731 | toggle = gtk_check_button_new_with_mnemonic(_("Prepend _string into window title:")); |
| 6977 | 732 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), |
| 9298 | 733 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_string")); |
| 3565 | 734 | gtk_box_pack_start(GTK_BOX(hbox), toggle, FALSE, FALSE, 0); |
| 6977 | 735 | |
| 6302 | 736 | entry = gtk_entry_new(); |
| 737 | gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 0); | |
| 738 | gtk_entry_set_max_length(GTK_ENTRY(entry), 10); | |
| 6977 | 739 | gtk_widget_set_sensitive(GTK_WIDGET(entry), |
| 9298 | 740 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_string")); |
| 6977 | 741 | gtk_entry_set_text(GTK_ENTRY(entry), |
| 9298 | 742 | gaim_prefs_get_string("/plugins/gtk/X11/notify/title_string")); |
| 6977 | 743 | g_object_set_data(G_OBJECT(toggle), "title-entry", entry); |
| 744 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 9298 | 745 | G_CALLBACK(method_toggle_cb), "method_string"); |
| 6977 | 746 | g_signal_connect(G_OBJECT(entry), "focus-out-event", |
| 9298 | 747 | G_CALLBACK(options_entry_cb), "method_string"); |
| 3374 | 748 | |
| 6977 | 749 | /* Count method button */ |
| 750 | toggle = gtk_check_button_new_with_mnemonic(_("Insert c_ount of new messages into window title")); | |
| 751 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 752 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_count")); |
| 6977 | 753 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |
| 754 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 9298 | 755 | G_CALLBACK(method_toggle_cb), "method_count"); |
| 4035 | 756 | |
| 12959 | 757 | #ifndef _WIN32 |
| 14389 | 758 | /* Count xprop method button */ |
| 759 | toggle = gtk_check_button_new_with_mnemonic(_("Insert count of new message into _X property")); | |
| 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_count_xprop")); | |
| 763 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 764 | G_CALLBACK(method_toggle_cb), "method_count_xprop"); | |
| 765 | ||
| 6977 | 766 | /* Urgent method button */ |
| 767 | toggle = gtk_check_button_new_with_mnemonic(_("Set window manager \"_URGENT\" hint")); | |
| 768 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 769 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 770 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_urgent")); |
| 771 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 772 | G_CALLBACK(method_toggle_cb), "method_urgent"); | |
| 12959 | 773 | #endif |
| 3710 | 774 | |
| 10606 | 775 | /* Raise window method button */ |
| 776 | toggle = gtk_check_button_new_with_mnemonic(_("R_aise conversation window")); | |
| 777 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 778 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 779 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/method_raise")); | |
| 780 | g_signal_connect(G_OBJECT(toggle), "toggled", | |
| 781 | G_CALLBACK(method_toggle_cb), "method_raise"); | |
| 782 | ||
| 6977 | 783 | /*---------- "Notification Removals" ----------*/ |
| 6302 | 784 | frame = gaim_gtk_make_frame(ret, _("Notification Removal")); |
| 785 | vbox = gtk_vbox_new(FALSE, 5); | |
| 786 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 3374 | 787 | |
| 6977 | 788 | /* Remove on focus button */ |
| 789 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when conversation window _gains focus")); | |
| 790 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 791 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 792 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_focus")); |
| 6977 | 793 | g_signal_connect(G_OBJECT(toggle), "toggled", G_CALLBACK(notify_toggle_cb), "notify_focus"); |
| 794 | ||
| 795 | /* Remove on click button */ | |
| 796 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when conversation window _receives click")); | |
| 797 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 798 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 799 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_click")); |
| 6977 | 800 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 801 | G_CALLBACK(notify_toggle_cb), "notify_click"); |
| 3710 | 802 | |
| 6977 | 803 | /* Remove on type button */ |
| 804 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when _typing in conversation window")); | |
| 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_type")); |
| 6977 | 808 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 809 | G_CALLBACK(notify_toggle_cb), "notify_type"); |
| 4035 | 810 | |
| 6977 | 811 | /* Remove on message send button */ |
| 812 | toggle = gtk_check_button_new_with_mnemonic(_("Remove when a _message gets sent")); | |
| 813 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | |
| 814 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 815 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_send")); |
| 6977 | 816 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 817 | G_CALLBACK(notify_toggle_cb), "notify_send"); |
| 3565 | 818 | |
| 6977 | 819 | #if 0 |
| 820 | /* Remove on conversation switch button */ | |
| 9298 | 821 | toggle = gtk_check_button_new_with_mnemonic(_("Remove on switch to conversation ta_b")); |
| 6977 | 822 | gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |
| 823 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), | |
| 9298 | 824 | gaim_prefs_get_bool("/plugins/gtk/X11/notify/notify_switch")); |
| 6977 | 825 | g_signal_connect(G_OBJECT(toggle), "toggled", |
| 9298 | 826 | G_CALLBACK(notify_toggle_cb), "notify_switch"); |
| 6977 | 827 | #endif |
| 828 | ||
| 829 | gtk_widget_show_all(ret); | |
| 830 | return ret; | |
| 3374 | 831 | } |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
832 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
833 | static gboolean |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
834 | plugin_load(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
835 | { |
| 6977 | 836 | GList *convs = gaim_get_conversations(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6464
diff
changeset
|
837 | void *conv_handle = gaim_conversations_get_handle(); |
| 9298 | 838 | void *gtk_conv_handle = gaim_gtk_conversations_get_handle(); |
| 6302 | 839 | |
| 840 | my_plugin = plugin; | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
841 | |
|
12604
893fbf89317c
[gaim-migrate @ 14939]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12600
diff
changeset
|
842 | gaim_signal_connect(gtk_conv_handle, "displayed-im-msg", plugin, |
| 12968 | 843 | GAIM_CALLBACK(message_displayed_cb), NULL); |
|
12604
893fbf89317c
[gaim-migrate @ 14939]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12600
diff
changeset
|
844 | gaim_signal_connect(gtk_conv_handle, "displayed-chat-msg", plugin, |
| 12968 | 845 | GAIM_CALLBACK(message_displayed_cb), NULL); |
| 846 | gaim_signal_connect(gtk_conv_handle, "conversation-switched", plugin, | |
| 847 | GAIM_CALLBACK(conv_switched), NULL); | |
| 6977 | 848 | gaim_signal_connect(conv_handle, "sent-im-msg", plugin, |
| 9298 | 849 | GAIM_CALLBACK(im_sent_im), NULL); |
| 6977 | 850 | gaim_signal_connect(conv_handle, "sent-chat-msg", plugin, |
| 9298 | 851 | GAIM_CALLBACK(chat_sent_im), NULL); |
| 6977 | 852 | gaim_signal_connect(conv_handle, "conversation-created", plugin, |
| 9298 | 853 | GAIM_CALLBACK(conv_created), NULL); |
| 6977 | 854 | gaim_signal_connect(conv_handle, "chat-joined", plugin, |
| 9298 | 855 | GAIM_CALLBACK(conv_created), NULL); |
| 6977 | 856 | gaim_signal_connect(conv_handle, "deleting-conversation", plugin, |
| 9298 | 857 | GAIM_CALLBACK(deleting_conv), NULL); |
|
10971
4c823ffab27a
[gaim-migrate @ 12796]
Mark Doliner <markdoliner@pidgin.im>
parents:
10841
diff
changeset
|
858 | #if 0 |
|
11447
23594a754163
[gaim-migrate @ 13686]
Daniel Atallah <datallah@pidgin.im>
parents:
11338
diff
changeset
|
859 | gaim_signal_connect(gtk_conv_handle, "conversation-dragging", plugin, |
|
23594a754163
[gaim-migrate @ 13686]
Daniel Atallah <datallah@pidgin.im>
parents:
11338
diff
changeset
|
860 | GAIM_CALLBACK(conversation_dragging), NULL); |
|
9303
e257ad08c77c
[gaim-migrate @ 10107]
Mark Doliner <markdoliner@pidgin.im>
parents:
9298
diff
changeset
|
861 | #endif |
|
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; | |
| 6302 | 865 | |
| 866 | /* attach signals */ | |
| 6977 | 867 | attach_signals(conv); |
| 6302 | 868 | |
| 6977 | 869 | convs = convs->next; |
| 6302 | 870 | } |
| 871 | ||
|
5205
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 gboolean |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
876 | plugin_unload(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
877 | { |
| 6977 | 878 | GList *convs = gaim_get_conversations(); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
879 | |
| 6977 | 880 | while (convs) { |
| 881 | GaimConversation *conv = (GaimConversation *)convs->data; | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
882 | |
| 6302 | 883 | /* kill signals */ |
| 6977 | 884 | detach_signals(conv); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
885 | |
| 6977 | 886 | convs = convs->next; |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
887 | } |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
888 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
889 | return TRUE; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
890 | } |
|
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 | static GaimGtkPluginUiInfo ui_info = |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
893 | { |
|
12600
7ecd4441fdc7
[gaim-migrate @ 14934]
Richard Laager <rlaager@pidgin.im>
parents:
12397
diff
changeset
|
894 | get_config_frame, |
|
7ecd4441fdc7
[gaim-migrate @ 14934]
Richard Laager <rlaager@pidgin.im>
parents:
12397
diff
changeset
|
895 | 0 /* page_num (Reserved) */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
896 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
897 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
898 | static GaimPluginInfo info = |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
899 | { |
| 9943 | 900 | GAIM_PLUGIN_MAGIC, |
| 901 | GAIM_MAJOR_VERSION, | |
| 902 | GAIM_MINOR_VERSION, | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
903 | GAIM_PLUGIN_STANDARD, /**< type */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
904 | GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
905 | 0, /**< flags */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
906 | NULL, /**< dependencies */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
907 | GAIM_PRIORITY_DEFAULT, /**< priority */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
908 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
909 | NOTIFY_PLUGIN_ID, /**< id */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
910 | N_("Message Notification"), /**< name */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
911 | VERSION, /**< version */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
912 | /** summary */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
913 | 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
|
914 | /** description */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
915 | N_("Provides a variety of ways of notifying you of unread messages."), |
| 14389 | 916 | /**< author */ |
| 9298 | 917 | "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
|
918 | GAIM_WEBSITE, /**< homepage */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
919 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
920 | plugin_load, /**< load */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
921 | plugin_unload, /**< unload */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
922 | NULL, /**< destroy */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
923 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
924 | &ui_info, /**< ui_info */ |
| 8993 | 925 | NULL, /**< extra_info */ |
| 926 | NULL, | |
| 927 | NULL | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
928 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
929 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
930 | static void |
|
5920
963bfdefee02
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
931 | init_plugin(GaimPlugin *plugin) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
932 | { |
| 6302 | 933 | gaim_prefs_add_none("/plugins/gtk"); |
| 934 | gaim_prefs_add_none("/plugins/gtk/X11"); | |
| 935 | gaim_prefs_add_none("/plugins/gtk/X11/notify"); | |
| 936 | ||
| 6464 | 937 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_im", TRUE); |
| 938 | 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
|
939 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_chat_nick", FALSE); |
| 6464 | 940 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/type_focused", FALSE); |
| 6302 | 941 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_string", FALSE); |
| 942 | gaim_prefs_add_string("/plugins/gtk/X11/notify/title_string", "(*)"); | |
| 943 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_urgent", FALSE); | |
| 944 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_count", FALSE); | |
| 14389 | 945 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_count_xprop", FALSE); |
| 10492 | 946 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/method_raise", FALSE); |
| 14778 | 947 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_focus", TRUE); |
| 6302 | 948 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_click", FALSE); |
| 949 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_type", TRUE); | |
| 6464 | 950 | gaim_prefs_add_bool("/plugins/gtk/X11/notify/notify_send", TRUE); |
| 951 | 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
|
952 | } |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
5021
diff
changeset
|
953 | |
| 6063 | 954 | GAIM_INIT_PLUGIN(notify, init_plugin, info) |