[empathy] Roster: Hide search-bar on hitting Enter on selected individual



commit 75f2647273711e9c3af162a12d3fb58737e91c9b
Author: Chandni Verma <chandniverma2112 gmail com>
Date:   Mon Jul 22 15:12:54 2013 +0530

    Roster: Hide search-bar on hitting Enter on selected individual
    
    https://bugzilla.gnome.org/show_bug.cgi?id=643183

 src/empathy-roster-window.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 600d196..74d9c42 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -331,6 +331,14 @@ roster_window_load_events_idle_cb (gpointer user_data)
 }
 
 static void
+hide_search_bar (EmpathyRosterWindow *roster_window)
+{
+  if (EMPATHY_IS_LIVE_SEARCH (roster_window->priv->search_bar) &&
+      gtk_widget_is_visible (roster_window->priv->search_bar))
+    gtk_widget_hide (roster_window->priv->search_bar);
+}
+
+static void
 individual_activated_cb (EmpathyRosterView *self,
     FolksIndividual *individual,
     gpointer user_data)
@@ -348,6 +356,9 @@ individual_activated_cb (EmpathyRosterView *self,
   empathy_chat_with_contact (contact, gtk_get_current_event_time ());
 
   g_object_unref (contact);
+
+  /* Hide the search-bar upon hitting "Enter" on an individual */
+  hide_search_bar (EMPATHY_ROSTER_WINDOW (user_data));
 }
 
 static void
@@ -357,6 +368,9 @@ event_activated_cb (EmpathyRosterView *self,
     gpointer user_data)
 {
   empathy_event_activate (event);
+
+  /* Hide the search-bar upon an event activation */
+  hide_search_bar (EMPATHY_ROSTER_WINDOW (user_data));
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]