diff options
author | David Robillard <d@drobilla.net> | 2012-04-05 01:02:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-05 01:02:23 +0000 |
commit | 8c1f0e839c5e34dd13f6d7b33f004841250d1b68 (patch) | |
tree | db0a120ace8b15652ea2dba0fb2114e1991ab28f | |
parent | 0dc0913b72007da6f9d62213fe0515a9505fc137 (diff) | |
download | ingen-8c1f0e839c5e34dd13f6d7b33f004841250d1b68.tar.gz ingen-8c1f0e839c5e34dd13f6d7b33f004841250d1b68.tar.bz2 ingen-8c1f0e839c5e34dd13f6d7b33f004841250d1b68.zip |
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
-rw-r--r-- | src/gui/Port.cpp | 9 | ||||
-rw-r--r-- | src/gui/Port.hpp | 2 |
2 files changed, 4 insertions, 7 deletions
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<double>& fvalue = Glib::VariantBase::cast_dynamic - < Glib::Variant<double> >(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(), diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 5d02dc51..bbf4e7c7 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -75,7 +75,7 @@ private: void property_changed(const Raul::URI& key, const Raul::Atom& value); void moved(); - void on_value_changed(const Glib::VariantBase& value); + void on_value_changed(GVariant* value); bool on_event(GdkEvent* ev); //static ArtVpathDash* _dash; |