From 8c1f0e839c5e34dd13f6d7b33f004841250d1b68 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 5 Apr 2012 01:02:23 +0000 Subject: Remove use of Glibmm variant wrapper which is inexplicably recent (fix #827). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4142 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/Port.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gui/Port.cpp') diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 3e021840..a6b72ace 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -138,17 +138,14 @@ Port::moved() } void -Port::on_value_changed(const Glib::VariantBase& value) +Port::on_value_changed(GVariant* value) { - if (!value.is_of_type(Glib::VARIANT_TYPE_DOUBLE)) { + if (!g_variant_is_of_type(value, G_VARIANT_TYPE_DOUBLE)) { Raul::warn << "TODO: Non-float port value changed." << std::endl; return; } - const Glib::Variant& fvalue = Glib::VariantBase::cast_dynamic - < Glib::Variant >(value); - - const Raul::Atom atom = _app.forge().make((float)fvalue.get()); + const Raul::Atom atom = _app.forge().make(float(g_variant_get_double(value))); if (atom != model()->value()) { Ingen::Shared::World* const world = _app.world(); _app.engine()->set_property(model()->path(), -- cgit v1.2.1