[empathy] Stop live search when main window gets hidden
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Stop live search when main window gets hidden
- Date: Thu, 26 May 2011 10:50:19 +0000 (UTC)
commit e54915d63afa880d8fd3bb8764652efcb4a59165
Author: Xavier Claessens <xclaesse gmail com>
Date: Thu May 26 12:45:30 2011 +0200
Stop live search when main window gets hidden
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 be3f1e3..bc7cfb1 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]