summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dive.h2
-rw-r--r--gtk-gui.c16
-rw-r--r--main.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/dive.h b/dive.h
index 2fae0c92e..cf11e1f89 100644
--- a/dive.h
+++ b/dive.h
@@ -287,7 +287,7 @@ extern void add_event(struct dive *dive, int time, int type, int flags, int valu
/* UI related protopypes */
-extern void init_ui(int argc, char **argv);
+extern void init_ui(int *argcp, char ***argvp);
extern void run_ui(void);
diff --git a/gtk-gui.c b/gtk-gui.c
index dd79f7311..c78d7e667 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -694,23 +694,21 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source,
return GTK_NOTEBOOK(notebook);
}
-static void drag_cb(GtkWidget *widget, GdkDragContext *context,
+static gboolean drag_cb(GtkWidget *widget, GdkDragContext *context,
gint x, gint y, guint time,
gpointer user_data)
{
GtkWidget *source;
notebook_data_t *nbdp;
+ gtk_drag_finish(context, TRUE, TRUE, time);
source = gtk_drag_get_source_widget(context);
if (nbd[0].name && ! strcmp(nbd[0].name,gtk_widget_get_name(source)))
nbdp = nbd;
else if (nbd[1].name && ! strcmp(nbd[1].name,gtk_widget_get_name(source)))
nbdp = nbd + 1;
- else
- /* HU? */
- return;
-
- gtk_drag_finish(context, TRUE, TRUE, time);
+ else /* just on ourselves */
+ return TRUE;
/* we no longer need the widget - but getting rid of this is hard;
* remove the signal handler, remove the notebook from the box
@@ -722,6 +720,8 @@ static void drag_cb(GtkWidget *widget, GdkDragContext *context,
nbdp->widget = NULL;
free(nbdp->name);
nbdp->name = NULL;
+
+ return TRUE;
}
#ifdef WIN32
@@ -739,7 +739,7 @@ static int get_from_registry(HKEY hkey, const char *key)
}
#endif
-void init_ui(int argc, char **argv)
+void init_ui(int *argcp, char ***argvp)
{
GtkWidget *win;
GtkWidget *notebook;
@@ -756,7 +756,7 @@ void init_ui(int argc, char **argv)
"GTK_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, 0
};
- gtk_init(&argc, &argv);
+ gtk_init(argcp, argvp);
settings = gtk_settings_get_default();
gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "subsurface setting");
diff --git a/main.c b/main.c
index 680bf2171..9aaa5d1f4 100644
--- a/main.c
+++ b/main.c
@@ -218,7 +218,7 @@ int main(int argc, char **argv)
parse_xml_init();
- init_ui(argc, argv);
+ init_ui(&argc, &argv);
for (i = 1; i < argc; i++) {
const char *a = argv[i];