Mercurial > pidgin
comparison src/gtkblist.c @ 12479:53e2dc07d9e2
[gaim-migrate @ 14790]
SF Patch #1379776 from charkins
"This is a small fix to the blist visibility stuff. When
the blist is set hidden and there is no visibility
manager, the blist gets minimized. However, if there
was previously a visibility manager and the blist was
already hidden, it doesn't get shown before it is
iconified. This patch fixes that.
In addition, I added two debug statements to track the
count of visibility managers. This will be helpful for
diagnosing visibility issues if users send in debug logs."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 13 Dec 2005 23:35:46 +0000 |
parents | 8489040cf97b |
children | e63a80be5227 |
comparison
equal
deleted
inserted
replaced
12478:8489040cf97b | 12479:53e2dc07d9e2 |
---|---|
4227 } else { | 4227 } else { |
4228 if(visibility_manager_count) { | 4228 if(visibility_manager_count) { |
4229 gaim_signal_emit(gaim_gtk_blist_get_handle(), "gtkblist-hiding", gtkblist); | 4229 gaim_signal_emit(gaim_gtk_blist_get_handle(), "gtkblist-hiding", gtkblist); |
4230 gtk_widget_hide(gtkblist->window); | 4230 gtk_widget_hide(gtkblist->window); |
4231 } else { | 4231 } else { |
4232 if (!GTK_WIDGET_VISIBLE(gtkblist->window)) | |
4233 gtk_widget_show(gtkblist->window); | |
4232 gtk_window_iconify(GTK_WINDOW(gtkblist->window)); | 4234 gtk_window_iconify(GTK_WINDOW(gtkblist->window)); |
4233 } | 4235 } |
4234 } | 4236 } |
4235 } | 4237 } |
4236 | 4238 |
4874 | 4876 |
4875 void | 4877 void |
4876 gaim_gtk_blist_visibility_manager_add() | 4878 gaim_gtk_blist_visibility_manager_add() |
4877 { | 4879 { |
4878 visibility_manager_count++; | 4880 visibility_manager_count++; |
4881 gaim_debug_info("gtkblist", "added visibility manager: %d\n", visibility_manager_count); | |
4879 } | 4882 } |
4880 | 4883 |
4881 void | 4884 void |
4882 gaim_gtk_blist_visibility_manager_remove() | 4885 gaim_gtk_blist_visibility_manager_remove() |
4883 { | 4886 { |
4884 if (visibility_manager_count) | 4887 if (visibility_manager_count) |
4885 visibility_manager_count--; | 4888 visibility_manager_count--; |
4886 if (!visibility_manager_count) | 4889 if (!visibility_manager_count) |
4887 gaim_blist_set_visible(gaim_prefs_get_bool("/gaim/gtk/blist/list_visible")); | 4890 gaim_blist_set_visible(gaim_prefs_get_bool("/gaim/gtk/blist/list_visible")); |
4891 gaim_debug_info("gtkblist", "removed visibility manager: %d\n", visibility_manager_count); | |
4888 } | 4892 } |
4889 | 4893 |
4890 | 4894 |
4891 static GaimBlistUiOps blist_ui_ops = | 4895 static GaimBlistUiOps blist_ui_ops = |
4892 { | 4896 { |