[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 27/37: Always select the first item in the treeview

noreply at xfce.org noreply at xfce.org
Mon Mar 23 23:30:22 CET 2020


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-clipman-plugin.

commit 63ed41c2d6ecd68a4f0eb68b787d630b0c1cb878
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sun Mar 22 00:30:55 2020 +0100

    Always select the first item in the treeview
---
 panel-plugin/xfce4-clipman-history.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/xfce4-clipman-history.c b/panel-plugin/xfce4-clipman-history.c
index 1a1b7a5..1f36f6b 100644
--- a/panel-plugin/xfce4-clipman-history.c
+++ b/panel-plugin/xfce4-clipman-history.c
@@ -142,7 +142,8 @@ clipman_history_treeview_init (MyPlugin *plugin)
   GtkCellRenderer *renderer;
   GtkTreeViewColumn *column;
   GtkListStore *liststore;
-  GtkTreeIter  iter;
+  GtkTreeIter iter;
+  GtkTreePath *path;
   GtkWidget *entry, *scroll, *treeview, *box;
   gboolean reverse_order = FALSE;
 
@@ -245,6 +246,9 @@ clipman_history_treeview_init (MyPlugin *plugin)
       g_slist_free (list);
     }
 
+  path = gtk_tree_path_new_from_indices (0, -1);
+  gtk_tree_selection_select_path (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)), path);
+  gtk_tree_path_free (path);
 
   return box;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list