diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2011-05-26 18:45:30 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2011-05-26 18:49:48 +0800 |
commit | e54915d63afa880d8fd3bb8764652efcb4a59165 (patch) | |
tree | 3dae201bb1ed2f1dcdf470fe1e68463d46eebe82 /libempathy-gtk/empathy-live-search.c | |
parent | 984e946f6bb2c385394db123f1b2edea05d9209b (diff) | |
download | gsoc2013-empathy-e54915d63afa880d8fd3bb8764652efcb4a59165.tar gsoc2013-empathy-e54915d63afa880d8fd3bb8764652efcb4a59165.tar.gz gsoc2013-empathy-e54915d63afa880d8fd3bb8764652efcb4a59165.tar.bz2 gsoc2013-empathy-e54915d63afa880d8fd3bb8764652efcb4a59165.tar.lz gsoc2013-empathy-e54915d63afa880d8fd3bb8764652efcb4a59165.tar.xz gsoc2013-empathy-e54915d63afa880d8fd3bb8764652efcb4a59165.tar.zst gsoc2013-empathy-e54915d63afa880d8fd3bb8764652efcb4a59165.zip |
Stop live search when main window gets hidden
Diffstat (limited to 'libempathy-gtk/empathy-live-search.c')
-rw-r--r-- | libempathy-gtk/empathy-live-search.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-live-search.c b/libempathy-gtk/empathy-live-search.c index be3f1e3c6..bc7cfb10f 100644 --- a/libempathy-gtk/empathy-live-search.c +++ b/libempathy-gtk/empathy-live-search.c @@ -484,12 +484,17 @@ live_search_set_property (GObject *object, } static void -live_search_hide (GtkWidget *widget) +live_search_unmap (GtkWidget *widget) { EmpathyLiveSearch *self = EMPATHY_LIVE_SEARCH (widget); EmpathyLiveSearchPriv *priv = GET_PRIV (self); - GTK_WIDGET_CLASS (empathy_live_search_parent_class)->hide (widget); + GTK_WIDGET_CLASS (empathy_live_search_parent_class)->unmap (widget); + + /* unmap can happen if a parent gets hidden, in that case we want to hide + * the live search as well, so when it gets mapped again, the live search + * won't be shown. */ + gtk_widget_hide (widget); gtk_entry_set_text (GTK_ENTRY (priv->search_entry), ""); gtk_widget_grab_focus (priv->hook_widget); @@ -532,7 +537,7 @@ empathy_live_search_class_init (EmpathyLiveSearchClass *klass) object_class->get_property = live_search_get_property; object_class->set_property = live_search_set_property; - widget_class->hide = live_search_hide; + widget_class->unmap = live_search_unmap; widget_class->show = live_search_show; widget_class->grab_focus = live_search_grab_focus; |