]> spindle.queued.net Git - midori/commitdiff
Store address of bookmarks for tooltip as a string in the model
authorChristian Dywan <christian@twotoasts.de>
Fri, 30 Jul 2010 23:21:50 +0000 (01:21 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 30 Jul 2010 23:21:50 +0000 (01:21 +0200)
katze/katze-utils.c
panels/midori-bookmarks.c
panels/midori-history.c

index 39c705834bb0b05c19523e81cba776048882b34c..dc7f7946ec55232f253dbc8a823e91b9caf7669c 100644 (file)
@@ -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
         {
index 1f94c897ce6be2761d46b9e8396ee5ae7732b58c..b572a98c4c590b68e95c1b6a11fb24658f2476ba 100644 (file)
@@ -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);
index 1af9542999d73f149b4673af8c7b343b99efa8fd..d8aed73fc93b634c896dbc126097b4ec6441e502 100644 (file)
@@ -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);