diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-09-02 01:30:08 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-09-02 18:16:24 +0800 |
commit | ba5f02669144bd3e9728ddf85f1ea8fcd3994332 (patch) | |
tree | ff98561b1c32d3208e8057f288c3e3a7f1c3dc34 | |
parent | f32eb6e690caf29430e14fddb410491732d89800 (diff) | |
download | gsoc2013-empathy-ba5f02669144bd3e9728ddf85f1ea8fcd3994332.tar gsoc2013-empathy-ba5f02669144bd3e9728ddf85f1ea8fcd3994332.tar.gz gsoc2013-empathy-ba5f02669144bd3e9728ddf85f1ea8fcd3994332.tar.bz2 gsoc2013-empathy-ba5f02669144bd3e9728ddf85f1ea8fcd3994332.tar.lz gsoc2013-empathy-ba5f02669144bd3e9728ddf85f1ea8fcd3994332.tar.xz gsoc2013-empathy-ba5f02669144bd3e9728ddf85f1ea8fcd3994332.tar.zst gsoc2013-empathy-ba5f02669144bd3e9728ddf85f1ea8fcd3994332.zip |
Bug 628133 — Linking dialog's live search should copy the one from the roster
When launching a linking dialogue from EmpathyIndividualView, copy the view's
live search text to the EmpathyIndividualView in the linking dialogue.
Closes: bgo#628133
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 20 |
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; |