Mercurial > pidgin.yaz
comparison plugins/docklet/docklet.c @ 5584:cade2082f760
[gaim-migrate @ 5988]
(01:09:43) LSchiere: Robot101: you still don't have the docklet compiling
(01:10:05) Robot101: http://people.debian.org/~robot101/docklet-ping.diff
(01:10:59) LSchiere: commit message?
(01:11:15) Sean: why bother?
(01:11:27) Robot101: yes
(01:11:30) Sean: It still doesn't work.
(01:11:34) Robot101: that's why I didn't ask anyone to commit that yet. =)
(01:11:37) Robot101: it will work
(01:11:50) Robot101: it will just not show connecting icons or an auto-login menu entry
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 31 May 2003 05:12:24 +0000 |
parents | 7b36d02031a2 |
children | eeba9205dd0f |
comparison
equal
deleted
inserted
replaced
5583:e46efd264489 | 5584:cade2082f760 |
---|---|
84 menu = gtk_menu_new(); | 84 menu = gtk_menu_new(); |
85 | 85 |
86 switch (status) { | 86 switch (status) { |
87 case offline: | 87 case offline: |
88 case offline_connecting: | 88 case offline_connecting: |
89 /* XXX CHIP KILLED AUTO CONNECTING */ | |
90 #if 0 | |
89 gaim_new_item_from_stock(menu, _("Auto-login"), GAIM_STOCK_SIGN_ON, G_CALLBACK(auto_login), NULL, 0, 0, NULL); | 91 gaim_new_item_from_stock(menu, _("Auto-login"), GAIM_STOCK_SIGN_ON, G_CALLBACK(auto_login), NULL, 0, 0, NULL); |
92 #endif | |
90 break; | 93 break; |
91 default: | 94 default: |
92 gaim_new_item_from_stock(menu, _("New Message.."), GAIM_STOCK_IM, G_CALLBACK(show_im_dialog), NULL, 0, 0, NULL); | 95 gaim_new_item_from_stock(menu, _("New Message.."), GAIM_STOCK_IM, G_CALLBACK(show_im_dialog), NULL, 0, 0, NULL); |
93 gaim_new_item_from_stock(menu, _("Join A Chat..."), GAIM_STOCK_CHAT, G_CALLBACK(join_chat), NULL, 0, 0, NULL); | 96 gaim_new_item_from_stock(menu, _("Join A Chat..."), GAIM_STOCK_CHAT, G_CALLBACK(join_chat), NULL, 0, 0, NULL); |
94 break; | 97 break; |
244 static gboolean docklet_update_status() { | 247 static gboolean docklet_update_status() { |
245 enum docklet_status oldstatus; | 248 enum docklet_status oldstatus; |
246 | 249 |
247 oldstatus = status; | 250 oldstatus = status; |
248 | 251 |
249 if (connections) { | 252 if (gaim_connections_get_all()) { |
250 if (unread_message_queue) { | 253 if (unread_message_queue) { |
251 status = online_pending; | 254 status = online_pending; |
252 } else if (awaymessage) { | 255 } else if (awaymessage) { |
253 if (message_queue) { | 256 if (message_queue) { |
254 status = away_pending; | 257 status = away_pending; |
255 } else { | 258 } else { |
256 status = away; | 259 status = away; |
257 } | 260 } |
261 /* XXX Chip killed my dog... */ | |
262 #if 0 | |
258 } else if (connecting_count) { | 263 } else if (connecting_count) { |
259 status = online_connecting; | 264 status = online_connecting; |
265 #endif | |
260 } else { | 266 } else { |
261 status = online; | 267 status = online; |
262 } | 268 } |
263 } else { | 269 } else { |
270 /* XXX ... and my pet goldfish ... */ | |
271 #if 0 | |
264 if (connecting_count) { | 272 if (connecting_count) { |
265 status = offline_connecting; | 273 status = offline_connecting; |
266 } else { | 274 } else { |
275 #endif | |
267 status = offline; | 276 status = offline; |
277 /* XXX ... both of them. */ | |
278 #if 0 | |
268 } | 279 } |
280 #endif | |
269 } | 281 } |
270 | 282 |
271 /* update the icon if we changed status */ | 283 /* update the icon if we changed status */ |
272 if (status != oldstatus) { | 284 if (status != oldstatus) { |
273 icon = status; | 285 icon = status; |
344 gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: created\n"); | 356 gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: created\n"); |
345 | 357 |
346 return FALSE; /* for when we're called by the glib idle handler */ | 358 return FALSE; /* for when we're called by the glib idle handler */ |
347 } | 359 } |
348 | 360 |
349 static void gaim_signon(struct gaim_connection *gc, void *data) { | 361 static void gaim_signon(GaimConnection *gc, void *data) { |
350 docklet_update_status(); | 362 docklet_update_status(); |
351 } | 363 } |
352 | 364 |
353 static void gaim_signoff(struct gaim_connection *gc, void *data) { | 365 static void gaim_signoff(GaimConnection *gc, void *data) { |
354 /* do this when idle so that if the prpl was connecting | 366 /* do this when idle so that if the prpl was connecting |
355 and was cancelled, we register that connecting_count | 367 and was cancelled, we register that connecting_count |
356 has returned to 0 */ | 368 has returned to 0 */ |
357 g_idle_add(docklet_update_status, &docklet); | 369 g_idle_add(docklet_update_status, &docklet); |
358 } | 370 } |
359 | 371 |
360 static void gaim_connecting(struct gaim_account *account, void *data) { | 372 static void gaim_connecting(GaimAccount *account, void *data) { |
361 docklet_update_status(); | 373 docklet_update_status(); |
362 } | 374 } |
363 | 375 |
364 static void gaim_away(struct gaim_connection *gc, char *state, char *message, void *data) { | 376 static void gaim_away(GaimConnection *gc, char *state, char *message, void *data) { |
365 /* we only support global away. this is the way it is, ok? */ | 377 /* we only support global away. this is the way it is, ok? */ |
366 docklet_update_status(); | 378 docklet_update_status(); |
367 } | 379 } |
368 | 380 |
369 static void gaim_im_recv(struct gaim_connection *gc, char **who, char **what, void *data) { | 381 static void gaim_im_recv(GaimConnection *gc, char **who, char **what, void *data) { |
370 /* if message queuing while away is enabled, this event could be the first | 382 /* if message queuing while away is enabled, this event could be the first |
371 message so we need to see if the status (and hence icon) needs changing. | 383 message so we need to see if the status (and hence icon) needs changing. |
372 do this when idle so that all message processing is completed, queuing | 384 do this when idle so that all message processing is completed, queuing |
373 etc, before we run. */ | 385 etc, before we run. */ |
374 g_idle_add(docklet_update_status, &docklet); | 386 g_idle_add(docklet_update_status, &docklet); |
375 } | 387 } |
376 | 388 |
377 /* static void gaim_buddy_signon(struct gaim_connection *gc, char *who, void *data) { | 389 /* static void gaim_buddy_signon(GaimConnection *gc, char *who, void *data) { |
378 } | 390 } |
379 | 391 |
380 static void gaim_buddy_signoff(struct gaim_connection *gc, char *who, void *data) { | 392 static void gaim_buddy_signoff(GaimConnection *gc, char *who, void *data) { |
381 } | 393 } |
382 | 394 |
383 static void gaim_buddy_away(struct gaim_connection *gc, char *who, void *data) { | 395 static void gaim_buddy_away(GaimConnection *gc, char *who, void *data) { |
384 } | 396 } |
385 | 397 |
386 static void gaim_buddy_back(struct gaim_connection *gc, char *who, void *data) { | 398 static void gaim_buddy_back(GaimConnection *gc, char *who, void *data) { |
387 } | 399 } |
388 | 400 |
389 static void gaim_new_conversation(char *who, void *data) { | 401 static void gaim_new_conversation(char *who, void *data) { |
390 } */ | 402 } */ |
391 | 403 |