aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-10-18 21:22:46 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-10-18 21:22:46 +0800
commit0446279dbf79a85718ca7a71bb6588d389ed15f5 (patch)
tree5cca1866f7b2b40debd0e480bc6e99d632a8721a
parentd91cd1d110fa660385574d3a9128b83287fc9a92 (diff)
parentb3a5b441b884c25198b77ae014cde3b73d396257 (diff)
downloadgsoc2013-empathy-0446279dbf79a85718ca7a71bb6588d389ed15f5.tar
gsoc2013-empathy-0446279dbf79a85718ca7a71bb6588d389ed15f5.tar.gz
gsoc2013-empathy-0446279dbf79a85718ca7a71bb6588d389ed15f5.tar.bz2
gsoc2013-empathy-0446279dbf79a85718ca7a71bb6588d389ed15f5.tar.lz
gsoc2013-empathy-0446279dbf79a85718ca7a71bb6588d389ed15f5.tar.xz
gsoc2013-empathy-0446279dbf79a85718ca7a71bb6588d389ed15f5.tar.zst
gsoc2013-empathy-0446279dbf79a85718ca7a71bb6588d389ed15f5.zip
Merge remote branch 'vminko/fix-632024-v2'
-rw-r--r--libempathy-gtk/empathy-individual-view.c19
-rw-r--r--libempathy-gtk/empathy-individual-view.h2
-rw-r--r--src/empathy-main-window.c10
-rw-r--r--src/empathy-main-window.ui7
4 files changed, 34 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 2f2aae90a..2ad0fc0e0 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1223,10 +1223,7 @@ individual_view_start_search_cb (EmpathyIndividualView *view,
if (priv->search_widget == NULL)
return FALSE;
- if (gtk_widget_get_visible (GTK_WIDGET (priv->search_widget)))
- gtk_widget_grab_focus (GTK_WIDGET (priv->search_widget));
- else
- gtk_widget_show (GTK_WIDGET (priv->search_widget));
+ empathy_individual_view_start_search (view);
return TRUE;
}
@@ -2572,3 +2569,17 @@ empathy_individual_view_set_store (EmpathyIndividualView *self,
G_CALLBACK (individual_view_store_row_deleted_cb), self, 0);
}
}
+
+void
+empathy_individual_view_start_search (EmpathyIndividualView *self)
+{
+ EmpathyIndividualViewPriv *priv = GET_PRIV (self);
+
+ g_return_if_fail (EMPATHY_IS_INDIVIDUAL_VIEW (self));
+ g_return_if_fail (priv->search_widget != NULL);
+
+ if (gtk_widget_get_visible (GTK_WIDGET (priv->search_widget)))
+ gtk_widget_grab_focus (GTK_WIDGET (priv->search_widget));
+ else
+ gtk_widget_show (GTK_WIDGET (priv->search_widget));
+}
diff --git a/libempathy-gtk/empathy-individual-view.h b/libempathy-gtk/empathy-individual-view.h
index 94ec8ccfd..6d72e4d0c 100644
--- a/libempathy-gtk/empathy-individual-view.h
+++ b/libempathy-gtk/empathy-individual-view.h
@@ -130,5 +130,7 @@ EmpathyIndividualStore *empathy_individual_view_get_store (
void empathy_individual_view_set_store (EmpathyIndividualView *self,
EmpathyIndividualStore *store);
+void empathy_individual_view_start_search (EmpathyIndividualView *self);
+
G_END_DECLS
#endif /* __EMPATHY_INDIVIDUAL_VIEW_H__ */
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index a89ba1cf1..cc49db934 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -956,6 +956,15 @@ main_window_notify_contact_list_size_cb (GSettings *gsettings,
}
static void
+main_window_edit_search_contacts_cb (GtkCheckMenuItem *item,
+ EmpathyMainWindow *window)
+{
+ EmpathyMainWindowPriv *priv = GET_PRIV (window);
+
+ empathy_individual_view_start_search (priv->individual_view);
+}
+
+static void
main_window_view_show_map_cb (GtkCheckMenuItem *item,
EmpathyMainWindow *window)
{
@@ -1607,6 +1616,7 @@ empathy_main_window_init (EmpathyMainWindow *window)
"edit_accounts", "activate", main_window_edit_accounts_cb,
"edit_personal_information", "activate", main_window_edit_personal_information_cb,
"edit_preferences", "activate", main_window_edit_preferences_cb,
+ "edit_search_contacts", "activate", main_window_edit_search_contacts_cb,
"help_about", "activate", main_window_help_about_cb,
"help_debug", "activate", main_window_help_debug_cb,
"help_contents", "activate", main_window_help_contents_cb,
diff --git a/src/empathy-main-window.ui b/src/empathy-main-window.ui
index 1d06b3edd..6a86da721 100644
--- a/src/empathy-main-window.ui
+++ b/src/empathy-main-window.ui
@@ -107,6 +107,12 @@
</object>
</child>
<child>
+ <object class="GtkAction" id="edit_search_contacts">
+ <property name="name">edit_search_contacts</property>
+ <property name="label" translatable="yes">Find in Contact _List</property>
+ </object>
+ </child>
+ <child>
<object class="GtkAction" id="view">
<property name="name">view</property>
<property name="label" translatable="yes">_View</property>
@@ -236,6 +242,7 @@
<menuitem action="edit_personal_information"/>
<separator/>
<menuitem action="edit_preferences"/>
+ <menuitem action="edit_search_contacts"/>
</menu>
<menu action="view">
<menuitem action="view_show_offline"/>