summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-09-27 19:47:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-09-27 19:47:19 -0700
commitd37d7211ca7ab810987e7eae785ec25484c1e34c (patch)
treef206f5fcc2c4e3af85788a4c27a576b5314c559d /gtk-gui.c
parent79a866f5b4d51efc15286059ac7e4322b6008eb3 (diff)
downloadsubsurface-d37d7211ca7ab810987e7eae785ec25484c1e34c.tar.gz
The notebook pages can only be dropped back into the main notebook
Disable the secondary notebooks that are created when ripping off a page (dive_list or dive_profile) as drop targets for other pages. Also fix the incorrect arguments for the drag callback function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 140129f60..87cd8bf87 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -502,6 +502,8 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source,
notebook = gtk_notebook_new();
gtk_notebook_set_group(GTK_NOTEBOOK(notebook), GRP_ID);
gtk_widget_set_name(notebook, nbdp->name);
+ /* disallow drop events */
+ gtk_drag_dest_set(notebook, 0, NULL, 0, 0);
gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 6);
gtk_widget_set_size_request(notebook, 450, 350);
@@ -510,19 +512,12 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source,
}
static void drag_cb(GtkWidget *widget, GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data,
- guint info, guint time,
+ gint x, gint y, guint time,
gpointer user_data)
{
GtkWidget *source;
notebook_data_t *nbdp;
- /*
- * We don't actually really *use* this yet, but Dirk wants to
- * do all the tabs as detatched tabs, and we'd need to use
- * this all to figure out which window we're talking about.
- */
source = gtk_drag_get_source_widget(context);
if (nbd[0].name && ! strcmp(nbd[0].name,gtk_widget_get_name(source)))
nbdp = nbd;