[Xfce4-commits] <midori:master> Store address of bookmarks for tooltip as a string in the model

Christian Dywan noreply at xfce.org
Sun Aug 1 17:14:04 CEST 2010


Updating branch refs/heads/master
         to 5b640c7f46ce454c71011e3f123478933cb42c98 (commit)
       from 1550c9d9f237587482c71a979dfe6d7b50421c0c (commit)

commit 5b640c7f46ce454c71011e3f123478933cb42c98
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Jul 31 01:21:50 2010 +0200

    Store address of bookmarks for tooltip as a string in the model

 katze/katze-utils.c       |    4 +++-
 panels/midori-bookmarks.c |    3 ++-
 panels/midori-history.c   |    3 ++-
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/katze/katze-utils.c b/katze/katze-utils.c
index 39c7058..dc7f794 100644
--- a/katze/katze-utils.c
+++ b/katze/katze-utils.c
@@ -1138,8 +1138,10 @@ katze_bookmark_populate_tree_view (KatzeArray*   array,
     {
         if (KATZE_ITEM_IS_BOOKMARK (child))
         {
+            gchar* tooltip = g_markup_escape_text (katze_item_get_uri (child), -1);
             gtk_tree_store_insert_with_values (model, NULL, parent,
-                                               0, 0, child, -1);
+                                               0, 0, child, 1, tooltip, -1);
+            g_free (tooltip);
         }
         else
         {
diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c
index 1f94c89..b572a98 100644
--- a/panels/midori-bookmarks.c
+++ b/panels/midori-bookmarks.c
@@ -941,9 +941,10 @@ midori_bookmarks_init (MidoriBookmarks* bookmarks)
     gtk_box_pack_start (GTK_BOX (bookmarks), box, FALSE, FALSE, 5);
 
     /* Create the treeview */
-    model = gtk_tree_store_new (1, KATZE_TYPE_ITEM);
+    model = gtk_tree_store_new (2, KATZE_TYPE_ITEM, G_TYPE_STRING);
     treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
     gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
+    gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (treeview), 1);
     column = gtk_tree_view_column_new ();
     renderer_pixbuf = gtk_cell_renderer_pixbuf_new ();
     gtk_tree_view_column_pack_start (column, renderer_pixbuf, FALSE);
diff --git a/panels/midori-history.c b/panels/midori-history.c
index 1af9542..d8aed73 100644
--- a/panels/midori-history.c
+++ b/panels/midori-history.c
@@ -892,9 +892,10 @@ midori_history_init (MidoriHistory* history)
     gtk_box_pack_start (GTK_BOX (history), box, FALSE, FALSE, 5);
 
     /* Create the treeview */
-    model = gtk_tree_store_new (1, KATZE_TYPE_ITEM);
+    model = gtk_tree_store_new (2, KATZE_TYPE_ITEM, G_TYPE_STRING);
     treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
     gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
+    gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (treeview), 1);
     column = gtk_tree_view_column_new ();
     renderer_pixbuf = gtk_cell_renderer_pixbuf_new ();
     gtk_tree_view_column_pack_start (column, renderer_pixbuf, FALSE);



More information about the Xfce4-commits mailing list