diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-04-29 16:50:19 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-04-29 16:50:19 +0800 |
commit | 56b18a72cbde121e7999846d99bb3e8eb91d4068 (patch) | |
tree | ee9ad4aa70d426a2d2c9060c2bc189a43e416698 /lib | |
parent | fefbbb55910beadb0e568e917d3736cd5c62d31a (diff) | |
download | gsoc2013-epiphany-56b18a72cbde121e7999846d99bb3e8eb91d4068.tar gsoc2013-epiphany-56b18a72cbde121e7999846d99bb3e8eb91d4068.tar.gz gsoc2013-epiphany-56b18a72cbde121e7999846d99bb3e8eb91d4068.tar.bz2 gsoc2013-epiphany-56b18a72cbde121e7999846d99bb3e8eb91d4068.tar.lz gsoc2013-epiphany-56b18a72cbde121e7999846d99bb3e8eb91d4068.tar.xz gsoc2013-epiphany-56b18a72cbde121e7999846d99bb3e8eb91d4068.tar.zst gsoc2013-epiphany-56b18a72cbde121e7999846d99bb3e8eb91d4068.zip |
Remove add_icon_column func and add the functionality to the normal
2003-04-29 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/widgets/ephy-node-view.c: (ephy_node_view_add_column):
* lib/widgets/ephy-node-view.h:
Remove add_icon_column func and add the functionality to the
normal add_column. The icon will be packed in the same column.
* src/bookmarks/ephy-bookmarks-editor.c:
(entry_selection_changed_cb), (add_entry_monitor),
(add_text_renderer_monitor), (cmd_add_topic), (cmd_rename),
(build_search_box), (ephy_bookmarks_editor_construct),
(toolbar_items_changed_cb), (ephy_bookmarks_editor_init):
Fix for api change.
Deal with 2 more sensitivity cases:
bookmarks added by dnd to the toolbar and treeview text
renderers.
Remove hints until we have more columns.
* src/ephy-history-window.c: (ephy_history_window_construct):
Fix for new api
* src/ephy-toolbars-model.c: (impl_add_item):
Dont check if normal items are already in the toolbar:
fix warnings.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/widgets/ephy-node-view.c | 42 | ||||
-rw-r--r-- | lib/widgets/ephy-node-view.h | 6 |
2 files changed, 20 insertions, 28 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c index 18b6cd29c..5b94a5069 100644 --- a/lib/widgets/ephy-node-view.c +++ b/lib/widgets/ephy-node-view.c @@ -739,11 +739,14 @@ ephy_node_view_add_column (EphyNodeView *view, GType value_type, int prop_id, int priority_prop_id, - EphyNodeViewFlags flags) + EphyNodeViewFlags flags, + EphyTreeModelNodeValueFunc icon_func) + { GtkTreeViewColumn *gcolumn; GtkCellRenderer *renderer; int column; + int icon_column; g_return_val_if_fail (!(flags & EPHY_NODE_VIEW_EDITABLE) || view->priv->editable_renderer == NULL, NULL); @@ -752,6 +755,19 @@ ephy_node_view_add_column (EphyNodeView *view, (view->priv->nodemodel, value_type, prop_id); gcolumn = (GtkTreeViewColumn *) gtk_tree_view_column_new (); + + if (icon_func) + { + icon_column = ephy_tree_model_node_add_func_column + (view->priv->nodemodel, GDK_TYPE_PIXBUF, icon_func, NULL); + + renderer = gtk_cell_renderer_pixbuf_new (); + gtk_tree_view_column_pack_start (gcolumn, renderer, FALSE); + gtk_tree_view_column_set_attributes (gcolumn, renderer, + "pixbuf", icon_column, + NULL); + } + renderer = gtk_cell_renderer_text_new (); if (flags & EPHY_NODE_VIEW_EDITABLE) @@ -767,6 +783,7 @@ ephy_node_view_add_column (EphyNodeView *view, gtk_tree_view_column_set_attributes (gcolumn, renderer, "text", column, NULL); + if (priority_prop_id >= 0) { int wcol; @@ -824,29 +841,6 @@ ephy_node_view_add_column (EphyNodeView *view, return gcolumn; } -void -ephy_node_view_add_icon_column (EphyNodeView *view, - EphyTreeModelNodeValueFunc func) -{ - GtkTreeViewColumn *gcolumn; - GtkCellRenderer *renderer; - int column; - - column = ephy_tree_model_node_add_func_column - (view->priv->nodemodel, GDK_TYPE_PIXBUF, func, NULL); - - gcolumn = (GtkTreeViewColumn *) gtk_tree_view_column_new (); - renderer = gtk_cell_renderer_pixbuf_new (); - gtk_tree_view_column_pack_start (gcolumn, renderer, TRUE); - gtk_tree_view_column_set_attributes (gcolumn, renderer, - "pixbuf", column, - NULL); - gtk_tree_view_column_set_sizing (gcolumn, - GTK_TREE_VIEW_COLUMN_GROW_ONLY); - gtk_tree_view_append_column (GTK_TREE_VIEW (view), - gcolumn); -} - static void ephy_node_view_init (EphyNodeView *view) { diff --git a/lib/widgets/ephy-node-view.h b/lib/widgets/ephy-node-view.h index f19f8cc30..100f8fc25 100644 --- a/lib/widgets/ephy-node-view.h +++ b/lib/widgets/ephy-node-view.h @@ -81,10 +81,8 @@ GtkTreeViewColumn *ephy_node_view_add_column (EphyNodeView *view, GType value_type, int prop_id, int priority_prop_id, - EphyNodeViewFlags flags); - -void ephy_node_view_add_icon_column (EphyNodeView *view, - EphyTreeModelNodeValueFunc func); + EphyNodeViewFlags flags, + EphyTreeModelNodeValueFunc icon_func); void ephy_node_view_remove (EphyNodeView *view); |