aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorVitaly Minko <vitaly.minko@gmail.com>2010-10-18 19:32:37 +0800
committerVitaly Minko <vitaly.minko@gmail.com>2010-10-18 19:32:37 +0800
commit2d25c8605b4e6a2cb832955de7f6e12080a658e0 (patch)
treea25f1563499bb17649800818e52d9a0725eedb0d /libempathy-gtk
parentcddc09f1ca10d13de7d71fa199b1ae4d5a7c8784 (diff)
downloadgsoc2013-empathy-2d25c8605b4e6a2cb832955de7f6e12080a658e0.tar
gsoc2013-empathy-2d25c8605b4e6a2cb832955de7f6e12080a658e0.tar.gz
gsoc2013-empathy-2d25c8605b4e6a2cb832955de7f6e12080a658e0.tar.bz2
gsoc2013-empathy-2d25c8605b4e6a2cb832955de7f6e12080a658e0.tar.lz
gsoc2013-empathy-2d25c8605b4e6a2cb832955de7f6e12080a658e0.tar.xz
gsoc2013-empathy-2d25c8605b4e6a2cb832955de7f6e12080a658e0.tar.zst
gsoc2013-empathy-2d25c8605b4e6a2cb832955de7f6e12080a658e0.zip
Add an entry in the View menu to search for contacts (#632024).
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-view.c19
-rw-r--r--libempathy-gtk/empathy-individual-view.h2
2 files changed, 17 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index ebc71a10a..b75e2a1e6 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;
}
@@ -2579,3 +2576,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 51a487d94..79f279f94 100644
--- a/libempathy-gtk/empathy-individual-view.h
+++ b/libempathy-gtk/empathy-individual-view.h
@@ -133,5 +133,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__ */