aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c4
-rw-r--r--src/bookmarks/ephy-node-view.c11
-rw-r--r--src/bookmarks/ephy-node-view.h3
3 files changed, 17 insertions, 1 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index bac2591cd..2a0ba3352 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -690,7 +690,8 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
node = ephy_bookmarks_get_keywords (editor->priv->bookmarks);
/* Keywords View */
- key_view = ephy_node_view_new (node, NULL);
+ key_view = ephy_node_view_new (node, NULL);
+ ephy_node_view_enable_drag_source (key_view);
ephy_node_view_set_browse_mode (key_view);
ephy_node_view_add_column (key_view, _("Topics"),
EPHY_TREE_MODEL_NODE_COL_KEYWORD, TRUE);
@@ -717,6 +718,7 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor)
/* Bookmarks View */
bm_view = ephy_node_view_new (node, editor->priv->bookmarks_filter);
+ ephy_node_view_set_hinted (bm_view, TRUE);
ephy_node_view_enable_drag_source (bm_view);
ephy_node_view_add_icon_column (bm_view, EPHY_TREE_MODEL_NODE_COL_ICON);
ephy_node_view_add_column (bm_view, _("Bookmarks"),
diff --git a/src/bookmarks/ephy-node-view.c b/src/bookmarks/ephy-node-view.c
index b738adc7b..2782e2a37 100644
--- a/src/bookmarks/ephy-node-view.c
+++ b/src/bookmarks/ephy-node-view.c
@@ -258,6 +258,9 @@ ephy_node_view_button_press_cb (GtkTreeView *treeview,
if (event->button == 3)
{
g_signal_emit (G_OBJECT (view), ephy_node_view_signals[SHOW_POPUP], 0);
+ /* the event is handled, don't propagate it further (we avoid
+ * changing the view with the right click this way) */
+ return TRUE;
}
return FALSE;
@@ -636,3 +639,11 @@ ephy_node_view_enable_drag_source (EphyNodeView *view)
egg_tree_multi_drag_add_drag_support (GTK_TREE_VIEW (view->priv->treeview));
ephy_dnd_enable_model_drag_source (GTK_WIDGET (view->priv->treeview));
}
+
+void
+ephy_node_view_set_hinted (EphyNodeView *view, gboolean hinted)
+{
+ g_return_if_fail (view != NULL);
+
+ gtk_tree_view_set_rules_hint (view->priv->treeview, hinted);
+}
diff --git a/src/bookmarks/ephy-node-view.h b/src/bookmarks/ephy-node-view.h
index 3fa1690d9..89a84f72c 100644
--- a/src/bookmarks/ephy-node-view.h
+++ b/src/bookmarks/ephy-node-view.h
@@ -80,6 +80,9 @@ void ephy_node_view_select_node (EphyNodeView *view,
void ephy_node_view_enable_drag_source (EphyNodeView *view);
+void ephy_node_view_set_hinted (EphyNodeView *view,
+ gboolean hinted);
+
G_END_DECLS
#endif /* EPHY_NODE_VIEW_H */