Mercurial > pidgin
comparison plugins/docklet/docklet.c @ 6310:f14718d7082e
[gaim-migrate @ 6809]
Robot101 is a fancy bastard. Regarding my fix for "Make Gaim not crash when
you unload the system tray icon when there are messages queued," he writes:
The correct fix for this is to use &handle as the function data, I have
a function that removes callbacks with that data pointer that gets
called at unload.
Fancy.
In other news, we now send a BR tag instead of \n for newlines for AIM.
And for ICQ we send CR/LF instead of \n. This is more correct, and should
make messages with new lines sent from Gaim to Miranda show up correctly for
Miranda users.
ICQ Lite sends CR/LF to Gaim for newlines, but I would rather use a BR
tag, and it seems to work with no problems.
In still other news, de purk und beans mit sauerkrauten.
In yet still other news, I don't have anything else to add.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 26 Jul 2003 20:40:44 +0000 |
parents | bf63ddea431f |
children | 8f94cce8faa5 |
comparison
equal
deleted
inserted
replaced
6309:bf63ddea431f | 6310:f14718d7082e |
---|---|
52 /* globals */ | 52 /* globals */ |
53 | 53 |
54 GaimPlugin *handle = NULL; | 54 GaimPlugin *handle = NULL; |
55 static struct docklet_ui_ops *ui_ops = NULL; | 55 static struct docklet_ui_ops *ui_ops = NULL; |
56 static enum docklet_status status = offline; | 56 static enum docklet_status status = offline; |
57 static guint blinktimer = 0; | |
58 #ifdef _WIN32 | 57 #ifdef _WIN32 |
59 __declspec(dllimport) GSList *unread_message_queue; | 58 __declspec(dllimport) GSList *unread_message_queue; |
60 __declspec(dllimport) GSList *away_messages; | 59 __declspec(dllimport) GSList *away_messages; |
61 __declspec(dllimport) struct away_message *awaymessage; | 60 __declspec(dllimport) struct away_message *awaymessage; |
62 __declspec(dllimport) GSList *message_queue; | 61 __declspec(dllimport) GSList *message_queue; |
262 if (ui_ops->update_icon) | 261 if (ui_ops->update_icon) |
263 ui_ops->update_icon(status); | 262 ui_ops->update_icon(status); |
264 | 263 |
265 /* and schedule the blinker function if messages are pending */ | 264 /* and schedule the blinker function if messages are pending */ |
266 if (status == online_pending || status == away_pending) { | 265 if (status == online_pending || status == away_pending) { |
267 blinktimer = g_timeout_add(500, docklet_blink_icon, NULL); | 266 g_timeout_add(500, docklet_blink_icon, &handle); |
268 } | 267 } |
269 } | 268 } |
270 | 269 |
271 return FALSE; /* for when we're called by the glib idle handler */ | 270 return FALSE; /* for when we're called by the glib idle handler */ |
272 } | 271 } |
438 } | 437 } |
439 | 438 |
440 static gboolean | 439 static gboolean |
441 plugin_unload(GaimPlugin *plugin) | 440 plugin_unload(GaimPlugin *plugin) |
442 { | 441 { |
443 if (blinktimer != 0) | |
444 g_source_remove(blinktimer); | |
445 | |
446 if (ui_ops->destroy) | 442 if (ui_ops->destroy) |
447 ui_ops->destroy(); | 443 ui_ops->destroy(); |
448 | 444 |
449 /* XXX: do this while gaim has no other way to toggle the global mute */ | 445 /* XXX: do this while gaim has no other way to toggle the global mute */ |
450 gaim_gtk_sound_set_mute(FALSE); | 446 gaim_gtk_sound_set_mute(FALSE); |