aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Persch <chpe@stud.uni-saarland.de>2003-04-05 06:32:04 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-05 06:32:04 +0800
commit1a09e5e82379afe72911f7f1cdf407bed57813e9 (patch)
tree01a4ff0d4498b72e88942db0f717eb368e25e4c5 /src
parentd95d1dfa398383b0b6446d63b96dc4e2e3a972ff (diff)
downloadgsoc2013-epiphany-1a09e5e82379afe72911f7f1cdf407bed57813e9.tar
gsoc2013-epiphany-1a09e5e82379afe72911f7f1cdf407bed57813e9.tar.gz
gsoc2013-epiphany-1a09e5e82379afe72911f7f1cdf407bed57813e9.tar.bz2
gsoc2013-epiphany-1a09e5e82379afe72911f7f1cdf407bed57813e9.tar.lz
gsoc2013-epiphany-1a09e5e82379afe72911f7f1cdf407bed57813e9.tar.xz
gsoc2013-epiphany-1a09e5e82379afe72911f7f1cdf407bed57813e9.tar.zst
gsoc2013-epiphany-1a09e5e82379afe72911f7f1cdf407bed57813e9.zip
Set drag source on the event box, to avoid conflicts with toolbars drag
2003-04-05 Christian Persch <chpe@stud.uni-saarland.de> * src/ephy-favicon-action.c: (create_tool_item), (connect_proxy): Set drag source on the event box, to avoid conflicts with toolbars drag and drop.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-favicon-action.c63
-rwxr-xr-xsrc/toolbar.c5
2 files changed, 37 insertions, 31 deletions
diff --git a/src/ephy-favicon-action.c b/src/ephy-favicon-action.c
index 4fa4a510a..1609f77c3 100644
--- a/src/ephy-favicon-action.c
+++ b/src/ephy-favicon-action.c
@@ -80,28 +80,6 @@ ephy_favicon_action_get_type (void)
return type;
}
-static GtkWidget *
-create_tool_item (EggAction *action)
-{
- GtkWidget *image;
- GtkWidget *ebox;
- GtkWidget *item;
-
- item = GTK_WIDGET (egg_tool_item_new ());
-
- ebox = gtk_event_box_new ();
- image = gtk_image_new ();
- gtk_container_add (GTK_CONTAINER (ebox), image);
- gtk_container_set_border_width (GTK_CONTAINER (ebox), 2);
- gtk_container_add (GTK_CONTAINER (item), ebox);
- gtk_widget_show (image);
- gtk_widget_show (ebox);
-
- g_object_set_data (G_OBJECT (item), "image", image);
-
- return item;
-}
-
static void
each_url_get_data_binder (EphyDragEachSelectedItemDataGet iteratee,
gpointer iterator_context, gpointer data)
@@ -131,6 +109,38 @@ favicon_drag_data_get_cb (GtkWidget *widget,
info, time, window, each_url_get_data_binder);
}
+static GtkWidget *
+create_tool_item (EggAction *action)
+{
+ GtkWidget *image;
+ GtkWidget *ebox;
+ GtkWidget *item;
+
+ item = GTK_WIDGET (egg_tool_item_new ());
+
+ ebox = gtk_event_box_new ();
+ image = gtk_image_new ();
+ gtk_container_add (GTK_CONTAINER (ebox), image);
+ gtk_container_set_border_width (GTK_CONTAINER (ebox), 2);
+ gtk_container_add (GTK_CONTAINER (item), ebox);
+ gtk_widget_show (image);
+ gtk_widget_show (ebox);
+
+ g_object_set_data (G_OBJECT (item), "image", image);
+
+ gtk_drag_source_set (ebox,
+ GDK_BUTTON1_MASK,
+ url_drag_types,
+ n_url_drag_types,
+ GDK_ACTION_COPY);
+ g_signal_connect (ebox,
+ "drag_data_get",
+ G_CALLBACK (favicon_drag_data_get_cb),
+ EPHY_FAVICON_ACTION (action)->priv->window);
+
+ return item;
+}
+
static void
ephy_favicon_action_sync_icon (EggAction *action, GParamSpec *pspec,
GtkWidget *proxy)
@@ -164,16 +174,7 @@ ephy_favicon_action_sync_icon (EggAction *action, GParamSpec *pspec,
static void
connect_proxy (EggAction *action, GtkWidget *proxy)
{
- gtk_drag_source_set (proxy,
- GDK_BUTTON1_MASK,
- url_drag_types,
- n_url_drag_types,
- GDK_ACTION_COPY);
ephy_favicon_action_sync_icon (action, NULL, proxy);
- g_signal_connect (proxy,
- "drag_data_get",
- G_CALLBACK (favicon_drag_data_get_cb),
- EPHY_FAVICON_ACTION (action)->priv->window);
g_signal_connect_object (action, "notify::icon",
G_CALLBACK (ephy_favicon_action_sync_icon),
proxy, 0);
diff --git a/src/toolbar.c b/src/toolbar.c
index 146282058..ff28353a0 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -405,6 +405,11 @@ toolbar_init (Toolbar *t)
t->priv->ui_merge = NULL;
t->priv->visibility = TRUE;
+ egg_editable_toolbar_add_drag_type (EGG_EDITABLE_TOOLBAR (t),
+ EPHY_DND_TOPIC_TYPE);
+ egg_editable_toolbar_add_drag_type (EGG_EDITABLE_TOOLBAR (t),
+ EPHY_DND_URL_TYPE);
+
if (group == NULL)
{
char *user;