Store address of bookmarks for tooltip as a string in the model
This commit is contained in:
parent
1550c9d9f2
commit
5b640c7f46
3 changed files with 7 additions and 3 deletions
|
@ -1138,8 +1138,10 @@ katze_bookmark_populate_tree_view (KatzeArray* array,
|
||||||
{
|
{
|
||||||
if (KATZE_ITEM_IS_BOOKMARK (child))
|
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,
|
gtk_tree_store_insert_with_values (model, NULL, parent,
|
||||||
0, 0, child, -1);
|
0, 0, child, 1, tooltip, -1);
|
||||||
|
g_free (tooltip);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -941,9 +941,10 @@ midori_bookmarks_init (MidoriBookmarks* bookmarks)
|
||||||
gtk_box_pack_start (GTK_BOX (bookmarks), box, FALSE, FALSE, 5);
|
gtk_box_pack_start (GTK_BOX (bookmarks), box, FALSE, FALSE, 5);
|
||||||
|
|
||||||
/* Create the treeview */
|
/* 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));
|
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_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
|
||||||
|
gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (treeview), 1);
|
||||||
column = gtk_tree_view_column_new ();
|
column = gtk_tree_view_column_new ();
|
||||||
renderer_pixbuf = gtk_cell_renderer_pixbuf_new ();
|
renderer_pixbuf = gtk_cell_renderer_pixbuf_new ();
|
||||||
gtk_tree_view_column_pack_start (column, renderer_pixbuf, FALSE);
|
gtk_tree_view_column_pack_start (column, renderer_pixbuf, FALSE);
|
||||||
|
|
|
@ -892,9 +892,10 @@ midori_history_init (MidoriHistory* history)
|
||||||
gtk_box_pack_start (GTK_BOX (history), box, FALSE, FALSE, 5);
|
gtk_box_pack_start (GTK_BOX (history), box, FALSE, FALSE, 5);
|
||||||
|
|
||||||
/* Create the treeview */
|
/* 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));
|
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_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
|
||||||
|
gtk_tree_view_set_tooltip_column (GTK_TREE_VIEW (treeview), 1);
|
||||||
column = gtk_tree_view_column_new ();
|
column = gtk_tree_view_column_new ();
|
||||||
renderer_pixbuf = gtk_cell_renderer_pixbuf_new ();
|
renderer_pixbuf = gtk_cell_renderer_pixbuf_new ();
|
||||||
gtk_tree_view_column_pack_start (column, renderer_pixbuf, FALSE);
|
gtk_tree_view_column_pack_start (column, renderer_pixbuf, FALSE);
|
||||||
|
|
Loading…
Reference in a new issue