aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-05 20:53:29 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-05 20:53:29 +0800
commitb3b66a73fca6da255a313862b68a147ec7fcf707 (patch)
treeaa0e5b1152c4533063e3429d0b8c75e41a6ac570 /src/bookmarks
parent1a09e5e82379afe72911f7f1cdf407bed57813e9 (diff)
downloadgsoc2013-epiphany-b3b66a73fca6da255a313862b68a147ec7fcf707.tar
gsoc2013-epiphany-b3b66a73fca6da255a313862b68a147ec7fcf707.tar.gz
gsoc2013-epiphany-b3b66a73fca6da255a313862b68a147ec7fcf707.tar.bz2
gsoc2013-epiphany-b3b66a73fca6da255a313862b68a147ec7fcf707.tar.lz
gsoc2013-epiphany-b3b66a73fca6da255a313862b68a147ec7fcf707.tar.xz
gsoc2013-epiphany-b3b66a73fca6da255a313862b68a147ec7fcf707.tar.zst
gsoc2013-epiphany-b3b66a73fca6da255a313862b68a147ec7fcf707.zip
Have a decent size for popups that doesnt specify it. Do not allow to drag
2003-04-05 Marco Pesenti Gritti <marco@it.gnome.org> * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-node-view.c: (drag_motion_cb), (drag_drop_cb), (drag_data_received_cb): * src/ephy-window.c: (ephy_window_show): Have a decent size for popups that doesnt specify it. Do not allow to drag on special topics.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks.h2
-rw-r--r--src/bookmarks/ephy-node-view.c25
2 files changed, 22 insertions, 5 deletions
diff --git a/src/bookmarks/ephy-bookmarks.h b/src/bookmarks/ephy-bookmarks.h
index 4c521fa2d..e31831c6f 100644
--- a/src/bookmarks/ephy-bookmarks.h
+++ b/src/bookmarks/ephy-bookmarks.h
@@ -52,7 +52,7 @@ typedef enum
EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY,
EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY,
EPHY_BOOKMARKS_KEYWORD_NORMAL_PRIORITY
-} EphBookmarksKeywordPriority;
+} EphyBookmarksKeywordPriority;
struct EphyBookmarks
{
diff --git a/src/bookmarks/ephy-node-view.c b/src/bookmarks/ephy-node-view.c
index 62184dd2e..d03de5a09 100644
--- a/src/bookmarks/ephy-node-view.c
+++ b/src/bookmarks/ephy-node-view.c
@@ -752,18 +752,34 @@ drag_motion_cb (GtkWidget *widget,
guint time,
EphyNodeView *view)
{
+ EphyNode *node;
GtkTreePath *path = NULL;
GtkTreeViewDropPosition pos;
+ gboolean res;
+ EphyBookmarksKeywordPriority priority;
g_signal_stop_emission_by_name (widget, "drag_motion");
- if (gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
- x, y, &path, &pos))
+ res = gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
+ x, y, &path, &pos);
+ if (!res) return TRUE;
+
+ node = get_node_from_path (view, path);
+
+ priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY);
+
+ if (priority != EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY &&
+ priority != EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY)
+
{
gtk_tree_view_set_drag_dest_row (GTK_TREE_VIEW (widget), path,
GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
gdk_drag_status (context, context->suggested_action, time);
}
+ else
+ {
+ gdk_drag_status (context, 0, time);
+ }
return TRUE;
}
@@ -778,6 +794,8 @@ drag_drop_cb (GtkWidget *widget,
{
GdkAtom target;
+ g_signal_stop_emission_by_name (widget, "drag_drop");
+
target = gtk_drag_dest_find_target (widget, context,
view->priv->drag_targets);
@@ -786,8 +804,6 @@ drag_drop_cb (GtkWidget *widget,
gtk_drag_get_data (widget, context, target, time);
}
- g_signal_stop_emission_by_name (widget, "drag_drop");
-
return TRUE;
}
@@ -822,6 +838,7 @@ drag_data_received_cb (GtkWidget *widget,
node, src_nodes);
g_list_free (src_nodes);
+
}
return TRUE;