summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk-gui.c4
-rw-r--r--libdivecomputer.c2
-rw-r--r--libdivecomputer.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 3994387ac..754a77772 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -616,8 +616,8 @@ void import_dialog(GtkWidget *w, gpointer data)
hbox = gtk_hbox_new(FALSE, 6);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, TRUE, 3);
- devicedata.progress->bar = gtk_progress_bar_new();
- gtk_container_add(GTK_CONTAINER(hbox), devicedata.progress->bar);
+ devicedata.progress.bar = gtk_progress_bar_new();
+ gtk_container_add(GTK_CONTAINER(hbox), devicedata.progress.bar);
gtk_widget_show_all(dialog);
result = gtk_dialog_run(GTK_DIALOG(dialog));
diff --git a/libdivecomputer.c b/libdivecomputer.c
index cf8b048c9..f645bff14 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -369,7 +369,7 @@ static void event_cb(device_t *device, device_event_t event, const void *data, v
printf("Event: waiting for user action\n");
break;
case DEVICE_EVENT_PROGRESS:
- update_progressbar(devdata->progress,
+ update_progressbar(&devdata->progress,
(double) progress->current / (double) progress->maximum);
break;
case DEVICE_EVENT_DEVINFO:
diff --git a/libdivecomputer.h b/libdivecomputer.h
index 205f28e7c..abb09e2c4 100644
--- a/libdivecomputer.h
+++ b/libdivecomputer.h
@@ -22,7 +22,7 @@
typedef struct device_data_t {
device_type_t type;
const char *name, *devname;
- progressbar_t *progress;
+ progressbar_t progress;
device_devinfo_t devinfo;
device_clock_t clock;
} device_data_t;