diff --git a/meson.build b/meson.build index b97d9c9..9f8397c 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,10 @@ -project( - 'vipsdisp', 'c', +project('vipsdisp', 'c', version: '3.1.0', license: 'MIT', meson_version: '>=0.56', default_options: [ - 'c_std=c11', + # glib uses this, so we do too + 'c_std=gnu11', # do a release (optimised) build by default 'buildtype=release', # turn off asserts etc. in release mode diff --git a/src/imageui.c b/src/imageui.c index f4fcc00..b10e5fa 100644 --- a/src/imageui.c +++ b/src/imageui.c @@ -157,6 +157,8 @@ imageui_set_property(GObject *object, { Imageui *imageui = (Imageui *) object; + double zoom; + #ifdef DEBUG_VERBOSE { g_autofree char *str = g_strdup_value_contents(value); @@ -179,7 +181,7 @@ imageui_set_property(GObject *object, case PROP_ZOOM: /* Scale by the zoom factor (SVG etc. zoom) we picked on load. */ - double zoom = g_value_get_double(value); + zoom = g_value_get_double(value); zoom /= imageui->tilesource->zoom; g_object_set(imageui->imagedisplay, @@ -209,6 +211,8 @@ imageui_get_property(GObject *object, { Imageui *imageui = IMAGEUI(object); + double zoom; + switch (prop_id) { case PROP_TILESOURCE: g_value_set_object(value, imageui->tilesource); @@ -220,8 +224,6 @@ imageui_get_property(GObject *object, break; case PROP_ZOOM: - double zoom; - g_object_get(imageui->imagedisplay, "zoom", &zoom, NULL); diff --git a/src/tilesource.c b/src/tilesource.c index 8aa5b9a..9e5316f 100644 --- a/src/tilesource.c +++ b/src/tilesource.c @@ -783,6 +783,7 @@ tilesource_set_property(GObject *object, int i; double d; gboolean b; + TilesourceMode mode; #ifdef DEBUG { @@ -794,7 +795,7 @@ tilesource_set_property(GObject *object, switch (prop_id) { case PROP_MODE: - TilesourceMode mode = g_value_get_enum(value); + mode = g_value_get_enum(value); if (mode >= 0 && mode < TILESOURCE_MODE_LAST && tilesource->mode != mode) {