summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-12 06:59:48 +0000
committerDavid Robillard <d@drobilla.net>2012-03-12 06:59:48 +0000
commit81e9fb3245bd461ebfee4cfa16d1792e48533f9e (patch)
treeeb1b30d79cba70dda9d832100dd7c14b08085b03 /src/gui
parente9d9569271ee962c09ab66c6babed1ca5655a6c6 (diff)
downloadingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.gz
ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.bz2
ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.zip
Centralise atom creation in forge object.
Aside from being more greppable and making realtime violations more obvious, this is a step towards using LV2 atoms internally (which needs a factory since the type numbers are dynamic). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4054 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.hpp1
-rw-r--r--src/gui/ConnectWindow.cpp77
-rw-r--r--src/gui/ControlPanel.hpp2
-rw-r--r--src/gui/Controls.cpp7
-rw-r--r--src/gui/LoadPatchWindow.cpp10
-rw-r--r--src/gui/LoadPluginWindow.cpp7
-rw-r--r--src/gui/NewSubpatchWindow.cpp4
-rw-r--r--src/gui/NodeMenu.cpp8
-rw-r--r--src/gui/NodeModule.cpp19
-rw-r--r--src/gui/ObjectMenu.cpp7
-rw-r--r--src/gui/PatchCanvas.cpp27
-rw-r--r--src/gui/PatchPortModule.cpp10
-rw-r--r--src/gui/PatchTreeWindow.cpp6
-rw-r--r--src/gui/PatchView.cpp14
-rw-r--r--src/gui/PatchWindow.cpp4
-rw-r--r--src/gui/Port.cpp4
-rw-r--r--src/gui/PortMenu.cpp8
-rw-r--r--src/gui/PortPropertiesWindow.cpp8
-rw-r--r--src/gui/PropertiesWindow.cpp10
-rw-r--r--src/gui/RenameWindow.cpp4
-rw-r--r--src/gui/SubpatchModule.cpp4
21 files changed, 141 insertions, 100 deletions
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index 5ca767e9..9953a993 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -102,6 +102,7 @@ public:
Glib::RefPtr<Gdk::Pixbuf> icon_from_path(const std::string& path, int size);
+ Raul::Forge& forge() const { return _world->forge(); }
SharedPtr<Ingen::ServerInterface> engine() const { return _world->engine(); }
SharedPtr<Client::SigClientInterface> client() const { return _client; }
SharedPtr<Client::ClientStore> store() const { return _store; }
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 0bfa1999..b14e388e 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -104,13 +104,13 @@ ConnectWindow::set_connected_to(SharedPtr<ServerInterface> engine)
else
_internal_radio->set_sensitive(false);
- _server_radio->set_sensitive(true);
- _launch_radio->set_sensitive(true);
+ _server_radio->set_sensitive(true);
+ _launch_radio->set_sensitive(true);
- if (_mode == CONNECT_REMOTE )
- _url_entry->set_sensitive(true);
- else if (_mode == LAUNCH_REMOTE )
- _port_spinbutton->set_sensitive(true);
+ if (_mode == CONNECT_REMOTE )
+ _url_entry->set_sensitive(true);
+ else if (_mode == LAUNCH_REMOTE )
+ _port_spinbutton->set_sensitive(true);
_progress_label->set_text(string("Disconnected"));
}
@@ -194,7 +194,7 @@ ConnectWindow::connect(bool existing)
_app->register_callbacks();
Glib::signal_timeout().connect(
- sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
+ sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
} else {
error << "Failed to launch ingen process." << endl;
@@ -205,22 +205,22 @@ ConnectWindow::connect(bool existing)
} else
#endif // defined(HAVE_LIBLO) || defined(HAVE_SOUP)
- if (_mode == INTERNAL) {
- if (!world->local_engine())
- world->load_module("server");
+ if (_mode == INTERNAL) {
+ if (!world->local_engine())
+ world->load_module("server");
- SharedPtr<SigClientInterface> client(new SigClientInterface());
+ SharedPtr<SigClientInterface> client(new SigClientInterface());
- world->load_module("jack");
+ world->load_module("jack");
- world->local_engine()->activate();
+ world->local_engine()->activate();
- _app->attach(client);
- _app->register_callbacks();
+ _app->attach(client);
+ _app->register_callbacks();
- Glib::signal_timeout().connect(
- sigc::mem_fun(this, &ConnectWindow::gtk_callback), 10);
- }
+ Glib::signal_timeout().connect(
+ sigc::mem_fun(this, &ConnectWindow::gtk_callback), 10);
+ }
}
void
@@ -247,16 +247,16 @@ void
ConnectWindow::activate()
{
_app->engine()->set_property("ingen:driver",
- "ingen:enabled",
- true);
+ "ingen:enabled",
+ _app->forge().make(true));
}
void
ConnectWindow::deactivate()
{
_app->engine()->set_property("ingen:driver",
- "ingen:enabled",
- false);
+ "ingen:enabled",
+ _app->forge().make(false));
}
void
@@ -288,20 +288,27 @@ ConnectWindow::load_widgets()
_xml->get_widget("connect_connect_button", _connect_button);
_xml->get_widget("connect_quit_button", _quit_button);
- _server_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::server_toggled));
- _launch_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::launch_toggled));
- _internal_radio->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::internal_toggled));
- _activate_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::activate));
- _deactivate_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::deactivate));
- _disconnect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::disconnect));
- _connect_button->signal_clicked().connect(sigc::bind(
- sigc::mem_fun(this, &ConnectWindow::connect), false));
- _quit_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::quit_clicked));
+ _server_radio->signal_toggled().connect(
+ sigc::mem_fun(this, &ConnectWindow::server_toggled));
+ _launch_radio->signal_toggled().connect(
+ sigc::mem_fun(this, &ConnectWindow::launch_toggled));
+ _internal_radio->signal_clicked().connect(
+ sigc::mem_fun(this, &ConnectWindow::internal_toggled));
+ _activate_button->signal_clicked().connect(
+ sigc::mem_fun(this, &ConnectWindow::activate));
+ _deactivate_button->signal_clicked().connect(
+ sigc::mem_fun(this, &ConnectWindow::deactivate));
+ _disconnect_button->signal_clicked().connect(
+ sigc::mem_fun(this, &ConnectWindow::disconnect));
+ _connect_button->signal_clicked().connect(
+ sigc::bind(sigc::mem_fun(this, &ConnectWindow::connect), false));
+ _quit_button->signal_clicked().connect(
+ sigc::mem_fun(this, &ConnectWindow::quit_clicked));
_progress_bar->set_pulse_step(0.01);
_widgets_loaded = true;
- server_toggled();
+ server_toggled();
}
void
@@ -360,7 +367,7 @@ ConnectWindow::gtk_callback()
// Show if attempted connection goes on for a noticeable amount of time
if (!is_visible()) {
const float ms_since_start = (now.tv_sec - start.tv_sec) * 1000.0f +
- (now.tv_usec - start.tv_usec) * 0.001f;
+ (now.tv_usec - start.tv_usec) * 0.001f;
if (ms_since_start > 500) {
present();
set_connecting_widget_states();
@@ -370,7 +377,7 @@ ConnectWindow::gtk_callback()
if (_connect_stage == 0) {
_attached = false;
_app->client()->signal_response().connect(
- sigc::mem_fun(this, &ConnectWindow::ingen_response));
+ sigc::mem_fun(this, &ConnectWindow::ingen_response));
_ping_id = abs(rand()) / 2 * 2; // avoid -1
_app->engine()->respond_to(_app->client().get(), _ping_id);
@@ -388,7 +395,7 @@ ConnectWindow::gtk_callback()
++_connect_stage;
} else {
const float ms_since_last = (now.tv_sec - last.tv_sec) * 1000.0f +
- (now.tv_usec - last.tv_usec) * 0.001f;
+ (now.tv_usec - last.tv_usec) * 0.001f;
if (ms_since_last > 1000) {
_app->engine()->respond_to(_app->client().get(), _ping_id);
_app->engine()->ping();
diff --git a/src/gui/ControlPanel.hpp b/src/gui/ControlPanel.hpp
index 3e5aa8b6..4892947c 100644
--- a/src/gui/ControlPanel.hpp
+++ b/src/gui/ControlPanel.hpp
@@ -70,7 +70,7 @@ public:
template <typename T>
void value_changed(SharedPtr<const PortModel> port, T val) {
- this->value_changed_atom(port, Raul::Atom(val));
+ this->value_changed_atom(port, _app->forge().make(val));
}
private:
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index d4a0575b..eba36d1d 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -267,7 +267,7 @@ SliderControl::update_value_from_spinner()
_enable_signal = false;
const float value = _value_spinner->get_value();
- set_value(value);
+ set_value(_app->forge().make(value));
_control_panel->value_changed(_port_model, value);
@@ -391,8 +391,9 @@ void
StringControl::activated()
{
if (_enable_signal)
- _control_panel->value_changed_atom(_port_model,
- Raul::Atom(_entry->get_text().c_str()));
+ _control_panel->value_changed_atom(
+ _port_model,
+ _app->forge().make(_entry->get_text().c_str()));
}
} // namespace GUI
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index 7a45f9bb..66c64495 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -149,9 +149,9 @@ LoadPatchWindow::ok_clicked()
const URIs& uris = _app->uris();
if (_poly_voices_radio->get_active())
- _initial_data.insert(make_pair(
- uris.ingen_polyphony,
- _poly_spinbutton->get_value_as_int()));
+ _initial_data.insert(
+ make_pair(uris.ingen_polyphony,
+ _app->forge().make(_poly_spinbutton->get_value_as_int())));
if (get_uri() == "")
return;
@@ -173,9 +173,9 @@ LoadPatchWindow::ok_clicked()
for (std::list<Glib::ustring>::iterator i = uri_list.begin(); i != uri_list.end(); ++i) {
// Cascade
Atom& x = _initial_data.find(uris.ingen_canvasX)->second;
- x = Atom(x.get_float() + 20.0f);
+ x = _app->forge().make(x.get_float() + 20.0f);
Atom& y = _initial_data.find(uris.ingen_canvasY)->second;
- y = Atom(y.get_float() + 20.0f);
+ y = _app->forge().make(y.get_float() + 20.0f);
Raul::Symbol symbol(symbol_from_filename(*i));
if (uri_list.size() == 1 && _symbol_entry->get_text() != "")
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index 44add7e8..f6b6e5e9 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -345,7 +345,7 @@ LoadPluginWindow::load_plugin(const Gtk::TreeModel::iterator& iter)
Resource::Properties props = _initial_data;
props.insert(make_pair(uris.rdf_type, uris.ingen_Node));
props.insert(make_pair(uris.rdf_instanceOf, plugin->uri()));
- props.insert(make_pair(uris.ingen_polyphonic, polyphonic));
+ props.insert(make_pair(uris.ingen_polyphonic, _app->forge().make(polyphonic)));
_app->engine()->put(path, props);
if (_selection->get_selected_rows().size() == 1) {
@@ -355,9 +355,9 @@ LoadPluginWindow::load_plugin(const Gtk::TreeModel::iterator& iter)
// Cascade next node
Atom& x = _initial_data.find(uris.ingen_canvasX)->second;
- x = Atom(x.get_float() + 20.0f);
+ x = _app->forge().make(x.get_float() + 20.0f);
Atom& y = _initial_data.find(uris.ingen_canvasY)->second;
- y = Atom(y.get_float() + 20.0f);
+ y = _app->forge().make(y.get_float() + 20.0f);
}
}
@@ -373,7 +373,6 @@ LoadPluginWindow::filter_changed()
{
_rows.clear();
_plugins_liststore->clear();
-
string search = _search_entry->get_text();
transform(search.begin(), search.end(), search.begin(), ::toupper);
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index 504bc506..ad0b6e42 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -99,8 +99,8 @@ NewSubpatchWindow::ok_clicked()
// Create patch
Resource::Properties props;
props.insert(make_pair(_app->uris().rdf_type, _app->uris().ingen_Patch));
- props.insert(make_pair(_app->uris().ingen_polyphony, Atom(int32_t(poly))));
- props.insert(make_pair(_app->uris().ingen_enabled, Atom(bool(true))));
+ props.insert(make_pair(_app->uris().ingen_polyphony, _app->forge().make(int32_t(poly))));
+ props.insert(make_pair(_app->uris().ingen_enabled, _app->forge().make(bool(true))));
_app->engine()->put(path, props, Resource::INTERNAL);
// Set external (node perspective) properties
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 88674f4f..2ceb4a66 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -144,8 +144,10 @@ NodeMenu::on_menu_randomize()
float min = 0.0f, max = 1.0f;
nm->port_value_range(*i, min, max, _app->sample_rate());
const float val = ((rand() / (float)RAND_MAX) * (max - min) + min);
- _app->engine()->set_property((*i)->path(),
- _app->uris().ingen_value, val);
+ _app->engine()->set_property(
+ (*i)->path(),
+ _app->uris().ingen_value,
+ _app->forge().make(val));
}
}
@@ -192,7 +194,7 @@ NodeMenu::on_preset_activated(const std::string& uri)
_app->engine()->set_property(
node->path().base() + lilv_node_as_string(sym),
_app->uris().ingen_value,
- lilv_node_as_float(val));
+ _app->forge().make(lilv_node_as_float(val)));
}
}
_app->engine()->bundle_end();
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index bef84b2d..36c3b67b 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -228,7 +228,9 @@ NodeModule::embed_gui(bool embed)
for (NodeModel::Ports::const_iterator p = _node->ports().begin();
p != _node->ports().end(); ++p)
if ((*p)->is_output() && app().can_control(p->get()))
- app().engine()->set_property((*p)->path(), uris.ingen_broadcast, true);
+ app().engine()->set_property((*p)->path(),
+ uris.ingen_broadcast,
+ app().forge().make(true));
}
} else { // un-embed
@@ -240,8 +242,8 @@ NodeModule::embed_gui(bool embed)
p != _node->ports().end(); ++p)
if ((*p)->is_output() && app().can_control(p->get()))
app().engine()->set_property((*p)->path(),
- uris.ingen_broadcast,
- false);
+ uris.ingen_broadcast,
+ app().forge().make(false));
}
if (embed) {
@@ -372,8 +374,8 @@ NodeModule::on_event(GdkEvent* ev)
void
NodeModule::store_location(double ax, double ay)
{
- const Atom x(static_cast<float>(ax));
- const Atom y(static_cast<float>(ay));
+ const Atom x(app().forge().make(static_cast<float>(ax)));
+ const Atom y(app().forge().make(static_cast<float>(ay)));
const URIs& uris = app().uris();
@@ -442,8 +444,11 @@ NodeModule::set_selected(gboolean b)
}
}
}
- if (app().signal())
- app().engine()->set_property(_node->path(), uris.ingen_selected, b);
+ if (app().signal()) {
+ app().engine()->set_property(_node->path(),
+ uris.ingen_selected,
+ app().forge().make(b));
+ }
}
}
diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp
index 10dffa6d..4c3804bd 100644
--- a/src/gui/ObjectMenu.cpp
+++ b/src/gui/ObjectMenu.cpp
@@ -113,9 +113,10 @@ void
ObjectMenu::on_menu_polyphonic()
{
if (_enable_signal)
- _app->engine()->set_property(_object->path(),
- _app->uris().ingen_polyphonic,
- bool(_polyphonic_menuitem->get_active()));
+ _app->engine()->set_property(
+ _object->path(),
+ _app->uris().ingen_polyphonic,
+ _app->forge().make(bool(_polyphonic_menuitem->get_active())));
}
void
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 6690e93f..61e30e04 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -706,7 +706,7 @@ PatchCanvas::paste()
props.insert(make_pair(uris.rdf_type,
uris.ingen_Patch));
props.insert(make_pair(uris.ingen_polyphony,
- Raul::Atom(int32_t(_patch->internal_poly()))));
+ _app.forge().make(int32_t(_patch->internal_poly()))));
clipboard.put(Path(), props);
size_t first_slash;
while (to_create != "/" && !to_create.empty()
@@ -739,14 +739,17 @@ PatchCanvas::paste()
GraphObject::Properties::iterator x = props.find(uris.ingen_canvasX);
if (x != i->second->properties().end())
- x->second = x->second.get_float() + (20.0f * _paste_count);
+ x->second = _app.forge().make(
+ x->second.get_float() + (20.0f * _paste_count));
GraphObject::Properties::iterator y = props.find(uris.ingen_canvasY);
if (y != i->second->properties().end())
- y->second = y->second.get_float() + (20.0f * _paste_count);
+ y->second = _app.forge().make(
+ y->second.get_float() + (20.0f * _paste_count));
if (i->first.parent().is_root())
- i->second->set_property(uris.ingen_selected, true);
+ i->second->set_property(uris.ingen_selected,
+ _app.forge().make(true));
builder.build(i->second);
}
@@ -793,9 +796,9 @@ PatchCanvas::menu_add_port(const string& sym_base, const string& name_base,
props.insert(make_pair(uris.rdf_type,
is_output ? uris.lv2_OutputPort : uris.lv2_InputPort));
props.insert(make_pair(uris.lv2_index,
- Atom(int32_t(_patch->num_ports()))));
+ _app.forge().make(int32_t(_patch->num_ports()))));
props.insert(make_pair(uris.lv2_name,
- Atom(name.c_str())));
+ _app.forge().make(name.c_str())));
_app.engine()->put(path, props);
}
@@ -841,10 +844,14 @@ PatchCanvas::get_initial_data(Resource::Graph ctx)
{
GraphObject::Properties result;
const URIs& uris = _app.uris();
- result.insert(make_pair(uris.ingen_canvasX,
- Resource::Property((float)_last_click_x, ctx)));
- result.insert(make_pair(uris.ingen_canvasY,
- Resource::Property((float)_last_click_y, ctx)));
+ result.insert(
+ make_pair(uris.ingen_canvasX,
+ Resource::Property(_app.forge().make((float)_last_click_x),
+ ctx)));
+ result.insert(
+ make_pair(uris.ingen_canvasY,
+ Resource::Property(_app.forge().make((float)_last_click_y),
+ ctx)));
return result;
}
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index 991103ac..be8008da 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -88,8 +88,8 @@ PatchPortModule::show_menu(GdkEventButton* ev)
void
PatchPortModule::store_location(double ax, double ay)
{
- const Atom x(static_cast<float>(ax));
- const Atom y(static_cast<float>(ay));
+ const Atom x(app().forge().make(static_cast<float>(ax)));
+ const Atom y(app().forge().make(static_cast<float>(ay)));
const URIs& uris = app().uris();
@@ -166,8 +166,10 @@ PatchPortModule::set_selected(gboolean b)
if (b != get_selected()) {
Module::set_selected(b);
if (app().signal())
- app().engine()->set_property(_model->path(),
- app().uris().ingen_selected, b);
+ app().engine()->set_property(
+ _model->path(),
+ app().uris().ingen_selected,
+ app().forge().make(b));
}
}
diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp
index c728fd2b..36bc78ea 100644
--- a/src/gui/PatchTreeWindow.cpp
+++ b/src/gui/PatchTreeWindow.cpp
@@ -186,8 +186,10 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
assert(pm);
if (_enable_signal)
- _app->engine()->set_property(pm->path(),
- _app->uris().ingen_enabled, (bool)!pm->enabled());
+ _app->engine()->set_property(
+ pm->path(),
+ _app->uris().ingen_enabled,
+ _app->forge().make((bool)!pm->enabled()));
}
void
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index 4b920368..e2a650fa 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -188,17 +188,19 @@ PatchView::process_toggled()
if (!_enable_signal)
return;
- _app->engine()->set_property(_patch->path(),
- _app->uris().ingen_enabled,
- (bool)_process_but->get_active());
+ _app->engine()->set_property(
+ _patch->path(),
+ _app->uris().ingen_enabled,
+ _app->forge().make((bool)_process_but->get_active()));
}
void
PatchView::poly_changed()
{
- _app->engine()->set_property(_patch->path(),
- _app->uris().ingen_polyphony,
- _poly_spin->get_value_as_int());
+ _app->engine()->set_property(
+ _patch->path(),
+ _app->uris().ingen_polyphony,
+ _app->forge().make(_poly_spin->get_value_as_int()));
}
void
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp
index bdda7b54..748bec74 100644
--- a/src/gui/PatchWindow.cpp
+++ b/src/gui/PatchWindow.cpp
@@ -533,7 +533,9 @@ more files and/or directories, recursively. Existing files will be overwritten.
const Glib::ustring uri = Glib::filename_to_uri(filename);
_app->loader()->save_patch(_patch, uri);
const_cast<PatchModel*>(_patch.get())->set_property(
- uris.ingen_document, Atom(Atom::URI, uri.c_str()), Resource::EXTERNAL);
+ uris.ingen_document,
+ _app->forge().alloc(Atom::URI, uri.c_str()),
+ Resource::EXTERNAL);
_status_bar->push(
(boost::format("Saved %1% to %2%") % _patch->path().chop_scheme()
% filename).str(),
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 06d79c11..7c9de28b 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -152,11 +152,11 @@ Port::on_value_changed(const Glib::VariantBase& value)
Ingen::Shared::World* const world = _app.world();
_app.engine()->set_property(model()->path(),
world->uris()->ingen_value,
- Atom(fval));
+ _app.forge().make(fval));
PatchWindow* pw = get_patch_window();
if (pw) {
- pw->show_port_status(model().get(), fval);
+ pw->show_port_status(model().get(), _app.forge().make(fval));
}
}
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 3656a97d..c757d917 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -128,10 +128,14 @@ PortMenu::on_menu_reset_range()
parent->default_port_value_range(model, min, max);
if (!std::isnan(min))
- _app->engine()->set_property(_object->path(), uris.lv2_minimum, min);
+ _app->engine()->set_property(_object->path(),
+ uris.lv2_minimum,
+ _app->forge().make(min));
if (!std::isnan(max))
- _app->engine()->set_property(_object->path(), uris.lv2_maximum, max);
+ _app->engine()->set_property(_object->path(),
+ uris.lv2_maximum,
+ _app->forge().make(max));
}
} // namespace GUI
diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp
index cca61ecd..13dd4781 100644
--- a/src/gui/PortPropertiesWindow.cpp
+++ b/src/gui/PortPropertiesWindow.cpp
@@ -153,8 +153,12 @@ PortPropertiesWindow::ok()
{
const Shared::URIs& uris = _app->uris();
Resource::Properties props;
- props.insert(make_pair(uris.lv2_minimum, float(_min_spinner->get_value())));
- props.insert(make_pair(uris.lv2_maximum, float(_max_spinner->get_value())));
+ props.insert(
+ make_pair(uris.lv2_minimum,
+ _app->forge().make(float(_min_spinner->get_value()))));
+ props.insert(
+ make_pair(uris.lv2_maximum,
+ _app->forge().make(float(_max_spinner->get_value()))));
_app->engine()->put(_port_model->path(), props);
hide();
}
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index 6e4841d0..1543398b 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -247,23 +247,23 @@ PropertiesWindow::value_edited(const Raul::URI& predicate)
if (type == Atom::INT) {
Gtk::SpinButton* widget = dynamic_cast<Gtk::SpinButton*>(record.value_widget->get_child());
if (!widget) goto bad_type;
- record.value = Atom(widget->get_value_as_int());
+ record.value = _app->forge().make(widget->get_value_as_int());
} else if (type == Atom::FLOAT) {
Gtk::SpinButton* widget = dynamic_cast<Gtk::SpinButton*>(record.value_widget->get_child());
if (!widget) goto bad_type;
- record.value = Atom(static_cast<float>(widget->get_value()));
+ record.value = _app->forge().make(static_cast<float>(widget->get_value()));
} else if (type == Atom::BOOL) {
Gtk::CheckButton* widget = dynamic_cast<Gtk::CheckButton*>(record.value_widget->get_child());
if (!widget) goto bad_type;
- record.value = Atom(widget->get_active());
+ record.value = _app->forge().make(widget->get_active());
} else if (type == Atom::URI) {
Gtk::Entry* widget = dynamic_cast<Gtk::Entry*>(record.value_widget->get_child());
if (!widget) goto bad_type;
- record.value = Atom(Atom::URI, widget->get_text());
+ record.value = _app->forge().alloc(Atom::URI, widget->get_text());
} else if (type == Atom::STRING) {
Gtk::Entry* widget = dynamic_cast<Gtk::Entry*>(record.value_widget->get_child());
if (!widget) goto bad_type;
- record.value = Atom(Atom::URI, widget->get_text());
+ record.value = _app->forge().alloc(Atom::URI, widget->get_text());
}
return;
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index 7e5d8ed2..6b3a5f20 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -131,7 +131,9 @@ RenameWindow::ok_clicked()
}
if (!label.empty() && (!name_atom.is_valid() || label != name_atom.get_string())) {
- _app->engine()->set_property(path, uris.lv2_name, Atom(label));
+ _app->engine()->set_property(path,
+ uris.lv2_name,
+ _app->forge().alloc(label));
}
hide();
diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp
index 21ad0dd8..e71dcbc8 100644
--- a/src/gui/SubpatchModule.cpp
+++ b/src/gui/SubpatchModule.cpp
@@ -63,8 +63,8 @@ SubpatchModule::on_double_click(GdkEventButton* event)
void
SubpatchModule::store_location(double ax, double ay)
{
- const Atom x(static_cast<float>(ax));
- const Atom y(static_cast<float>(ay));
+ const Atom x(app().forge().make(static_cast<float>(ax)));
+ const Atom y(app().forge().make(static_cast<float>(ay)));
const URIs& uris = app().uris();