summaryrefslogtreecommitdiffstats
path: root/src/gui/LoadPatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-22 03:08:06 +0000
committerDavid Robillard <d@drobilla.net>2011-10-22 03:08:06 +0000
commitac1d6d135bda8d739fdb8bf564f89c38b664c097 (patch)
treed750da79dd88b64ab2a88cca1651c2a5a240bd72 /src/gui/LoadPatchWindow.cpp
parent143968e38cc2f058dd7c500e984904a39864d652 (diff)
downloadingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.tar.gz
ingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.tar.bz2
ingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.zip
De-singleton-ify GUI.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3584 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/LoadPatchWindow.cpp')
-rw-r--r--src/gui/LoadPatchWindow.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index 1a96cc63..8c121b5e 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -42,6 +42,7 @@ namespace GUI {
LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gtk::Builder>& xml)
: Gtk::FileChooserDialog(cobject)
+ , _app(NULL)
, _merge_ports(false)
{
xml->get_widget("load_patch_symbol_label", _symbol_label);
@@ -124,8 +125,8 @@ LoadPatchWindow::set_patch(SharedPtr<const PatchModel> patch)
void
LoadPatchWindow::on_show()
{
- if (App::instance().configuration()->patch_folder().length() > 0)
- set_current_folder(App::instance().configuration()->patch_folder());
+ if (_app->configuration()->patch_folder().length() > 0)
+ set_current_folder(_app->configuration()->patch_folder());
Gtk::FileChooserDialog::on_show();
}
@@ -149,7 +150,7 @@ LoadPatchWindow::ok_clicked()
return;
}
- const URIs& uris = App::instance().uris();
+ const URIs& uris = _app->uris();
if (_poly_voices_radio->get_active())
_initial_data.insert(make_pair(
@@ -168,7 +169,7 @@ LoadPatchWindow::ok_clicked()
symbol = _patch->symbol();
}
- App::instance().loader()->load_patch(true, get_uri(),
+ _app->loader()->load_patch(true, get_uri(),
parent, symbol, _initial_data);
} else {
@@ -186,7 +187,7 @@ LoadPatchWindow::ok_clicked()
symbol = avoid_symbol_clash(symbol);
- App::instance().loader()->load_patch(false, *i,
+ _app->loader()->load_patch(false, *i,
_patch->path(), symbol, _initial_data);
}
}
@@ -213,7 +214,7 @@ LoadPatchWindow::symbol_from_filename(const Glib::ustring& filename)
Raul::Symbol
LoadPatchWindow::avoid_symbol_clash(const Raul::Symbol& symbol)
{
- unsigned offset = App::instance().store()->child_name_offset(
+ unsigned offset = _app->store()->child_name_offset(
_patch->path(), symbol);
if (offset != 0) {