]> git.0d.be Git - empathy.git/commitdiff
RosterWindow: Connect to signal "menu-item-activated" from EmpathyIndividualMenu
authorChandni Verma <chandniverma2112@gmail.com>
Mon, 22 Jul 2013 17:40:41 +0000 (23:10 +0530)
committerChandni Verma <chandniverma2112@gmail.com>
Fri, 23 Aug 2013 15:03:14 +0000 (20:33 +0530)
https://bugzilla.gnome.org/show_bug.cgi?id=643183

src/empathy-roster-window.c

index 74d9c42c1f8fb1503d177fac07adcbb2a4efcc2b..63c2c9cfa52ddb28dc7f5994dccfb2ccb5cdf247 100644 (file)
@@ -1962,6 +1962,15 @@ menu_deactivate_cb (GtkMenuShell *menushell,
   gtk_menu_detach (GTK_MENU (menushell));
 }
 
+static void
+menu_item_activated_cb (GtkMenuShell *menushell,
+    gpointer user_data)
+{
+    EmpathyRosterWindow *roster_window = EMPATHY_ROSTER_WINDOW (user_data);
+
+    hide_search_bar (roster_window);
+}
+
 static void
 popup_individual_menu_cb (EmpathyRosterView *view,
     const gchar *active_group,
@@ -1992,6 +2001,8 @@ popup_individual_menu_cb (EmpathyRosterView *view,
    * during the whole lifetime of Empathy. */
   g_signal_connect (menu, "deactivate", G_CALLBACK (menu_deactivate_cb),
       NULL);
+  g_signal_connect (menu, "menu-item-activated",
+      G_CALLBACK (menu_item_activated_cb), user_data);
 
   gtk_menu_attach_to_widget (GTK_MENU (menu), GTK_WIDGET (view), NULL);
   gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, time);