diff options
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 19 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-view.h | 2 |
2 files changed, 17 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__ */ |