comparison src/gtkblist.c @ 10315:deec4b58d516

[gaim-migrate @ 11515] Login Window 1998 -- 2004 committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 04 Dec 2004 18:51:56 +0000
parents b7566fc34c6c
children 61852117568f
comparison
equal deleted inserted replaced
10314:0a561b6ef7ec 10315:deec4b58d516
4419 4419
4420 void gaim_gtk_blist_docklet_toggle() { 4420 void gaim_gtk_blist_docklet_toggle() {
4421 /* Useful for the docklet plugin and also for the win32 tray icon*/ 4421 /* Useful for the docklet plugin and also for the win32 tray icon*/
4422 /* This is called when one of those is clicked--it will show/hide the 4422 /* This is called when one of those is clicked--it will show/hide the
4423 buddy list/login window--depending on which is active */ 4423 buddy list/login window--depending on which is active */
4424 if (gaim_connections_get_all()) { 4424 if (gtkblist && gtkblist->window) {
4425 if (gtkblist && gtkblist->window) { 4425 if (GTK_WIDGET_VISIBLE(gtkblist->window)) {
4426 if (GTK_WIDGET_VISIBLE(gtkblist->window)) { 4426 gaim_blist_set_visible(GAIM_WINDOW_ICONIFIED(gtkblist->window) || gaim_gtk_blist_obscured);
4427 gaim_blist_set_visible(GAIM_WINDOW_ICONIFIED(gtkblist->window) || gaim_gtk_blist_obscured);
4428 } else {
4429 #if _WIN32
4430 wgaim_systray_maximize(gtkblist->window);
4431 #endif
4432 gaim_blist_set_visible(TRUE);
4433 }
4434 } else {
4435 /* we're logging in or something... do nothing */
4436 /* or should I make the blist? */
4437 gaim_debug_warning("gtkblist",
4438 "docklet_toggle called with gaim_connections_get_all() "
4439 "but no blist!\n");
4440 }
4441 } else if (mainwindow) {
4442 if (GTK_WIDGET_VISIBLE(mainwindow)) {
4443 if (GAIM_WINDOW_ICONIFIED(mainwindow)) {
4444 gtk_window_present(GTK_WINDOW(mainwindow));
4445 } else {
4446 #if _WIN32
4447 wgaim_systray_minimize(mainwindow);
4448 #endif
4449 gtk_widget_hide(mainwindow);
4450 }
4451 } else { 4427 } else {
4452 #if _WIN32 4428 #if _WIN32
4453 wgaim_systray_maximize(mainwindow); 4429 wgaim_systray_maximize(gtkblist->window);
4454 #endif 4430 #endif
4455 show_login(); 4431 gaim_blist_set_visible(TRUE);
4456 } 4432 }
4457 } else { 4433 } else {
4458 show_login(); 4434 /* we're logging in or something... do nothing */
4435 /* or should I make the blist? */
4436 gaim_debug_warning("gtkblist",
4437 "docklet_toggle called with gaim_connections_get_all() "
4438 "but no blist!\n");
4459 } 4439 }
4460 } 4440 }
4461 4441
4462 void gaim_gtk_blist_docklet_add() 4442 void gaim_gtk_blist_docklet_add()
4463 { 4443 {
4466 4446
4467 void gaim_gtk_blist_docklet_remove() 4447 void gaim_gtk_blist_docklet_remove()
4468 { 4448 {
4469 docklet_count--; 4449 docklet_count--;
4470 if (!docklet_count) { 4450 if (!docklet_count) {
4471 if (gaim_connections_get_all())
4472 gaim_blist_set_visible(TRUE); 4451 gaim_blist_set_visible(TRUE);
4473 else if (mainwindow)
4474 gtk_window_present(GTK_WINDOW(mainwindow));
4475 else
4476 show_login();
4477 } 4452 }
4478 } 4453 }
4479 4454
4480 static GaimBlistUiOps blist_ui_ops = 4455 static GaimBlistUiOps blist_ui_ops =
4481 { 4456 {