aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-individual-view.c')
-rw-r--r--libempathy-gtk/empathy-individual-view.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 2f47f843c..573cef6f9 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -48,6 +48,7 @@
#include "empathy-individual-menu.h"
#include "empathy-individual-store.h"
#include "empathy-images.h"
+#include "empathy-linking-dialog.h"
#include "empathy-cell-renderer-expander.h"
#include "empathy-cell-renderer-text.h"
#include "empathy-cell-renderer-activatable.h"
@@ -2356,6 +2357,19 @@ individual_view_remove_activate_cb (GtkMenuItem *menuitem,
}
}
+static void
+individual_menu_link_contacts_activated_cb (EmpathyIndividualMenu *menu,
+ EmpathyLinkingDialog *linking_dialog,
+ EmpathyIndividualView *self)
+{
+ EmpathyIndividualViewPriv *priv = GET_PRIV (self);
+ EmpathyIndividualLinker *linker;
+
+ linker = empathy_linking_dialog_get_individual_linker (linking_dialog);
+ empathy_individual_linker_set_search_text (linker,
+ empathy_live_search_get_text (EMPATHY_LIVE_SEARCH (priv->search_widget)));
+}
+
GtkWidget *
empathy_individual_view_get_individual_menu (EmpathyIndividualView *view)
{
@@ -2403,6 +2417,12 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view)
G_CALLBACK (individual_view_remove_activate_cb), view);
}
+ /* Connect to EmpathyIndividualMenu::link-contacts-activated so that we can
+ * set the live search text on the new linking dialogue to be the same as
+ * our own. */
+ g_signal_connect (menu, "link-contacts-activated",
+ (GCallback) individual_menu_link_contacts_activated_cb, view);
+
g_object_unref (individual);
return menu;