aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-notebook.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-22 03:02:28 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-22 03:02:28 +0800
commit7fe7ce744bf7337232d55161d00fb1d1c89f6e99 (patch)
treefc75db140363dee08f9e381901f2d2c990c38862 /src/ephy-notebook.c
parent058908f9152b3ade2ad73427d1018c5479295bdb (diff)
downloadgsoc2013-epiphany-7fe7ce744bf7337232d55161d00fb1d1c89f6e99.tar
gsoc2013-epiphany-7fe7ce744bf7337232d55161d00fb1d1c89f6e99.tar.gz
gsoc2013-epiphany-7fe7ce744bf7337232d55161d00fb1d1c89f6e99.tar.bz2
gsoc2013-epiphany-7fe7ce744bf7337232d55161d00fb1d1c89f6e99.tar.lz
gsoc2013-epiphany-7fe7ce744bf7337232d55161d00fb1d1c89f6e99.tar.xz
gsoc2013-epiphany-7fe7ce744bf7337232d55161d00fb1d1c89f6e99.tar.zst
gsoc2013-epiphany-7fe7ce744bf7337232d55161d00fb1d1c89f6e99.zip
Implement our own drag dest on the embed. Dnd of multiple urls on embed
2003-05-21 Marco Pesenti Gritti <marco@it.gnome.org> * src/ephy-notebook.c: (child_realize_cb), (ephy_notebook_insert_page): Implement our own drag dest on the embed. Dnd of multiple urls on embed now open them in tabs.
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r--src/ephy-notebook.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 2e8766683..71a2a2039 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -926,6 +926,16 @@ update_tabs_visibility (EphyNotebook *nb, gboolean before_inserting)
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), show_tabs);
}
+static void
+child_realize_cb (GtkWidget *child, EphyNotebook *nb)
+{
+ g_signal_connect (GTK_BIN (child)->child, "drag_data_received",
+ G_CALLBACK(notebook_drag_data_received_cb), child);
+ gtk_drag_dest_set (GTK_BIN (child)->child, GTK_DEST_DEFAULT_ALL,
+ url_drag_types,n_url_drag_types,
+ GDK_ACTION_MOVE | GDK_ACTION_COPY);
+}
+
void
ephy_notebook_insert_page (EphyNotebook *nb,
GtkWidget *child,
@@ -971,6 +981,10 @@ ephy_notebook_insert_page (EphyNotebook *nb,
url_drag_types,n_url_drag_types,
GDK_ACTION_MOVE | GDK_ACTION_COPY);
+ /* embed->child is setup on widget realize */
+ g_signal_connect_object (child, "realize",
+ G_CALLBACK (child_realize_cb), nb, 0);
+
if (jump_to)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (nb),