[empathy] Bug 628133 — Linking dialog's live search should copy the one from the roster
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Bug 628133 — Linking dialog's live search should copy the one from the roster
- Date: Thu, 2 Sep 2010 10:22:35 +0000 (UTC)
commit ba5f02669144bd3e9728ddf85f1ea8fcd3994332
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Sep 1 18:30:08 2010 +0100
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
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 2f47f84..573cef6 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]