From 75f2647273711e9c3af162a12d3fb58737e91c9b Mon Sep 17 00:00:00 2001 From: Chandni Verma Date: Mon, 22 Jul 2013 15:12:54 +0530 Subject: 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 file changed, 14 insertions(+) diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index 600d19610..74d9c42c1 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -330,6 +330,14 @@ roster_window_load_events_idle_cb (gpointer user_data) return FALSE; } +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, @@ -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 -- cgit v1.2.3