[empathy] keep the selected contact visible after search
- From: Felix Kaser <kaserf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] keep the selected contact visible after search
- Date: Thu, 29 Jul 2010 15:08:37 +0000 (UTC)
commit f49028633f80ab1c641f29f85ae39e2184894f93
Author: Felix Kaser <f kaser gmx net>
Date: Wed Jul 28 14:43:05 2010 +0200
keep the selected contact visible after search
empathy will scroll automatically to the cell which is selected, when the search is hidden.
libempathy-gtk/empathy-individual-view.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index e6ee2e1..dceae87 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1289,6 +1289,7 @@ individual_view_search_hide_cb (EmpathyLiveSearch *search,
{
EmpathyIndividualViewPriv *priv = GET_PRIV (view);
GtkTreeModel *model;
+ GtkTreePath *cursor_path;
GtkTreeIter iter;
gboolean valid = FALSE;
@@ -1340,6 +1341,12 @@ individual_view_search_hide_cb (EmpathyLiveSearch *search,
individual_view_row_expand_or_collapse_cb, GINT_TO_POINTER (TRUE));
g_signal_handlers_unblock_by_func (view,
individual_view_row_expand_or_collapse_cb, GINT_TO_POINTER (FALSE));
+
+ /* keep the selected contact visible */
+ gtk_tree_view_get_cursor (GTK_TREE_VIEW (view), &cursor_path, NULL);
+ gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (view), cursor_path, NULL,
+ FALSE, 0, 0);
+ gtk_tree_path_free (cursor_path);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]