summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2019-07-09 09:10:05 +0200
committerMarcus Meissner <marcus@jet.franken.de>2019-07-09 09:10:05 +0200
commit9864bf95e880f2d72b706b2c8ab9197ba8641c6b (patch)
treebfc40902007f89c0d0871a0c8e40d3f25d3d10c3
parentf124228ff6bc592cc80aa0afe943ab0aa37373ee (diff)
downloadlibgphoto2-9864bf95e880f2d72b706b2c8ab9197ba8641c6b.tar.gz
added also movie start/stop code
-rw-r--r--camlibs/lumix/lumix.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/camlibs/lumix/lumix.c b/camlibs/lumix/lumix.c
index cb374576b..a1cccf950 100644
--- a/camlibs/lumix/lumix.c
+++ b/camlibs/lumix/lumix.c
@@ -1187,9 +1187,16 @@ camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (widget, "12800");
gp_widget_append (section, widget);
+ valset = 2;
gp_widget_new (GP_WIDGET_TOGGLE, _("Bulb"), &widget);
gp_widget_set_name (widget, "bulb");
- gp_widget_set_value (widget, 2);
+ gp_widget_set_value (widget, &valset);
+ gp_widget_append (section, widget);
+
+ valset = 2;
+ gp_widget_new (GP_WIDGET_TOGGLE, _("Movie"), &widget);
+ gp_widget_set_name (widget, "movie");
+ gp_widget_set_value (widget, &valset);
gp_widget_append (section, widget);
@@ -1360,6 +1367,18 @@ camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
stopCapture(camera);
}
}
+ if ((GP_OK == gp_widget_get_child_by_name(window, "movie", &widget)) && gp_widget_changed (widget)) {
+ int val;
+
+ if (GP_OK != (ret = gp_widget_get_value (widget, &val)))
+ return ret;
+
+ if (val) {
+ startMovie (camera);
+ } else {
+ stopMovie(camera);
+ }
+ }
return GP_OK;
}