aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChandni Verma <chandniverma2112@gmail.com>2013-07-22 17:42:54 +0800
committerChandni Verma <chandniverma2112@gmail.com>2013-08-23 23:03:13 +0800
commit75f2647273711e9c3af162a12d3fb58737e91c9b (patch)
tree07652c48e159aa3dbce4ff0e184677b6bd0373ff /src
parenta2461f80c26b11e689f462142d10cb4862d38e38 (diff)
downloadgsoc2013-empathy-75f2647273711e9c3af162a12d3fb58737e91c9b.tar.gz
gsoc2013-empathy-75f2647273711e9c3af162a12d3fb58737e91c9b.tar.zst
gsoc2013-empathy-75f2647273711e9c3af162a12d3fb58737e91c9b.zip
Roster: Hide search-bar on hitting Enter on selected individual
https://bugzilla.gnome.org/show_bug.cgi?id=643183
Diffstat (limited to 'src')
-rw-r--r--src/empathy-roster-window.c14
1 files changed, 14 insertions, 0 deletions
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
@@ -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