+static void drag_cb(GtkWidget *widget, GdkDragContext *context,
+ gint x, gint y,
+ GtkSelectionData *selection_data,
+ guint info, guint time,
+ gpointer user_data)
+{
+ GtkWidget *source, *target;
+ GtkWidget *tab;
+
+ /*
+ * 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);
+ target = (GtkWidget *) user_data;
+ tab = *(GtkWidget **)selection_data->data;
+
+ gtk_drag_finish(context, TRUE, TRUE, time);
+
+ /*
+ * Horrible, horrible hack. We hide the old divelist window, and
+ * set it to NULL. So if we drag the thing back out, we'll create
+ * a new window. Ugh.
+ *
+ * Actually destroying the divelist window triggers the whole
+ * destroy callback, which we don't want.
+ */
+ if (source != target) {
+ gtk_widget_hide(divelist_window);
+ divelist_window = NULL;
+ }
+}
+