comparison plugins/docklet/docklet.c @ 5227:6d1707dc8c3d

[gaim-migrate @ 5597] debug_printf -> gaim_debug committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 26 Apr 2003 17:36:52 +0000
parents fefad67de2c7
children 890b29f00b68
comparison
equal deleted inserted replaced
5226:a2199ef77cbc 5227:6d1707dc8c3d
286 286
287 return FALSE; /* for when we're called by the glib idle handler */ 287 return FALSE; /* for when we're called by the glib idle handler */
288 } 288 }
289 289
290 static void docklet_embedded(GtkWidget *widget, void *data) { 290 static void docklet_embedded(GtkWidget *widget, void *data) {
291 debug_printf("Tray Icon: embedded\n"); 291 gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: embedded\n");
292 gaim_gtk_blist_docklet_add(); 292 gaim_gtk_blist_docklet_add();
293 } 293 }
294 294
295 static void docklet_remove_callbacks() { 295 static void docklet_remove_callbacks() {
296 debug_printf("Tray Icon: removing callbacks"); 296 gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: removing callbacks");
297 297
298 while (g_source_remove_by_user_data(&docklet)) { 298 while (g_source_remove_by_user_data(&docklet)) {
299 debug_printf("."); 299 gaim_debug(GAIM_DEBUG_INFO, NULL, ".");
300 } 300 }
301 301
302 debug_printf("\n"); 302 gaim_debug(GAIM_DEBUG_INFO, NULL, "\n");
303 } 303 }
304 304
305 static void docklet_destroyed(GtkWidget *widget, void *data) { 305 static void docklet_destroyed(GtkWidget *widget, void *data) {
306 debug_printf("Tray Icon: destroyed\n"); 306 gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: destroyed\n");
307 307
308 gaim_gtk_blist_docklet_remove(); 308 gaim_gtk_blist_docklet_remove();
309 309
310 docklet_flush_queue(); 310 docklet_flush_queue();
311 311
322 322
323 if (docklet) { 323 if (docklet) {
324 /* if this is being called when a tray icon exists, it's because 324 /* if this is being called when a tray icon exists, it's because
325 something messed up. try destroying it before we proceed, 325 something messed up. try destroying it before we proceed,
326 although docklet_refcount may be all hosed. hopefully won't happen. */ 326 although docklet_refcount may be all hosed. hopefully won't happen. */
327 debug_printf("Tray Icon: trying to create icon but it already exists?\n"); 327 gaim_debug(GAIM_DEBUG_WARNING, "docklet",
328 "Tray Icon: trying to create icon but it already exists?\n");
328 plugin_unload(NULL); 329 plugin_unload(NULL);
329 } 330 }
330 331
331 docklet = egg_tray_icon_new("Gaim"); 332 docklet = egg_tray_icon_new("Gaim");
332 box = gtk_event_box_new(); 333 box = gtk_event_box_new();
343 /* ref the docklet before we bandy it about the place */ 344 /* ref the docklet before we bandy it about the place */
344 g_object_ref(G_OBJECT(docklet)); 345 g_object_ref(G_OBJECT(docklet));
345 docklet_update_status(); 346 docklet_update_status();
346 docklet_update_icon(); 347 docklet_update_icon();
347 348
348 debug_printf("Tray Icon: created\n"); 349 gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: created\n");
349 350
350 return FALSE; /* for when we're called by the glib idle handler */ 351 return FALSE; /* for when we're called by the glib idle handler */
351 } 352 }
352 353
353 static void gaim_signon(struct gaim_connection *gc, void *data) { 354 static void gaim_signon(struct gaim_connection *gc, void *data) {
430 docklet = NULL; 431 docklet = NULL;
431 432
432 /* do this while gaim has no other way to toggle the global mute */ 433 /* do this while gaim has no other way to toggle the global mute */
433 gaim_sound_set_mute(FALSE); 434 gaim_sound_set_mute(FALSE);
434 435
435 debug_printf("Tray Icon: removed\n"); 436 gaim_debug(GAIM_DEBUG_INFO, "docklet", "Tray Icon: removed\n");
436 437
437 return TRUE; 438 return TRUE;
438 } 439 }
439 440
440 static GtkWidget * 441 static GtkWidget *