aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-node.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-11 04:57:14 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-11 04:57:14 +0800
commit39e1b868fe021ab8fe04ade6774d04ed87c05a81 (patch)
treebd87552b218755815cc17acda43c3513ef316d2f /lib/ephy-node.c
parentb6ccb049d514886311520d3c16c8b592dfcde3a3 (diff)
downloadgsoc2013-epiphany-39e1b868fe021ab8fe04ade6774d04ed87c05a81.tar
gsoc2013-epiphany-39e1b868fe021ab8fe04ade6774d04ed87c05a81.tar.gz
gsoc2013-epiphany-39e1b868fe021ab8fe04ade6774d04ed87c05a81.tar.bz2
gsoc2013-epiphany-39e1b868fe021ab8fe04ade6774d04ed87c05a81.tar.lz
gsoc2013-epiphany-39e1b868fe021ab8fe04ade6774d04ed87c05a81.tar.xz
gsoc2013-epiphany-39e1b868fe021ab8fe04ade6774d04ed87c05a81.tar.zst
gsoc2013-epiphany-39e1b868fe021ab8fe04ade6774d04ed87c05a81.zip
Implement a way to disallow dragging from resp. dropping on certain nodes.
2005-07-10 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-node-common.h: * lib/ephy-node.c: (ephy_node_new_with_id), (ephy_node_signal_disconnect), (ephy_node_set_is_drag_source), (ephy_node_get_is_drag_source), (ephy_node_set_is_drag_dest), (ephy_node_get_is_drag_dest): * lib/ephy-node.h: * lib/widgets/ephy-node-view.c: (drag_motion_cb), (drag_data_received_cb): Implement a way to disallow dragging from resp. dropping on certain nodes. * src/bookmarks/ephy-bookmarks-editor.c: (ephy_bookmarks_editor_update_menu): * src/bookmarks/ephy-bookmarks.c: (save_filter), (save_filter_local), (ephy_bookmarks_save), (update_bookmark_keywords), (bookmark_is_categorized), (resolve_cb), (browse_cb), (ephy_local_bookmarks_init), (ephy_local_bookmarks_stop), (ephy_bookmarks_init), (ephy_bookmarks_finalize), (ephy_bookmarks_get_topic_uri), (ephy_bookmarks_find_keyword), (ephy_bookmarks_get_favorites), (ephy_bookmarks_get_local): * src/bookmarks/ephy-bookmarks.h: Implement "Local Sites" topic, filled with zeroconf-discovered bookmarks. Patch by Bastien Nocera, fixes bug #144969.
Diffstat (limited to 'lib/ephy-node.c')
-rw-r--r--lib/ephy-node.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index 9e98ccd8c..67889893b 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -69,6 +69,8 @@ struct _EphyNode
int signal_id;
guint emissions;
guint invalidated_signals;
+ guint is_drag_source : 1;
+ guint is_drag_dest : 1;
EphyNodeDb *db;
};
@@ -365,6 +367,8 @@ ephy_node_new_with_id (EphyNodeDb *db, guint reserved_id)
node->signal_id = 0;
node->emissions = 0;
node->invalidated_signals = 0;
+ node->is_drag_source = TRUE;
+ node->is_drag_dest = TRUE;
_ephy_node_db_add_id (db, reserved_id, node);
@@ -1273,6 +1277,32 @@ ephy_node_signal_disconnect (EphyNode *node,
}
}
+void
+ephy_node_set_is_drag_source (EphyNode *node,
+ gboolean allow)
+{
+ node->is_drag_source = allow != FALSE;
+}
+
+gboolean
+ephy_node_get_is_drag_source (EphyNode *node)
+{
+ return node->is_drag_source;
+}
+
+void
+ephy_node_set_is_drag_dest (EphyNode *node,
+ gboolean allow)
+{
+ node->is_drag_dest = allow != FALSE;
+}
+
+gboolean
+ephy_node_get_is_drag_dest (EphyNode *node)
+{
+ return node->is_drag_dest;
+}
+
GType
ephy_node_get_type (void)
{