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

This commit is contained in:
Christian Dywan 2010-07-31 01:21:50 +02:00
parent 1550c9d9f2
commit 5b640c7f46
3 changed files with 7 additions and 3 deletions

View 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
{

View 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);

View 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);