diff options
author | David Robillard <d@drobilla.net> | 2010-03-05 04:46:06 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-03-05 04:46:06 +0000 |
commit | 6a92ee5fbc7d47998fc399efe424e451cf75657c (patch) | |
tree | 108e144fbb142f6592f20e3c08ff7f22eeef7016 /src/gui | |
parent | 78eb8c2b49a7858ace15adcfbb59505cb6a2cb71 (diff) | |
download | ingen-6a92ee5fbc7d47998fc399efe424e451cf75657c.tar.gz ingen-6a92ee5fbc7d47998fc399efe424e451cf75657c.tar.bz2 ingen-6a92ee5fbc7d47998fc399efe424e451cf75657c.zip |
Shrink extensions (to .ing.lv2 and .ing.ttl) and move definitions to central place so they aren't littered everywhere.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2525 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/LoadPatchWindow.cpp | 9 | ||||
-rw-r--r-- | src/gui/PatchWindow.cpp | 11 | ||||
-rw-r--r-- | src/gui/ThreadedLoader.cpp | 2 | ||||
-rw-r--r-- | src/gui/UploadPatchWindow.cpp | 3 |
4 files changed, 14 insertions, 11 deletions
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp index 3a06843b..0fbc38c4 100644 --- a/src/gui/LoadPatchWindow.cpp +++ b/src/gui/LoadPatchWindow.cpp @@ -26,6 +26,7 @@ #include "client/PatchModel.hpp" #include "client/ClientStore.hpp" #include "shared/runtime_paths.hpp" +#include "serialisation/names.hpp" #include "App.hpp" #include "LoadPatchWindow.hpp" #include "PatchView.hpp" @@ -74,10 +75,10 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno sigc::mem_fun(this, &LoadPatchWindow::selection_changed)); Gtk::FileFilter filt; - filt.add_pattern("*.ingen.ttl"); - filt.set_name("Ingen patch files (*.ingen.ttl)"); - filt.add_pattern("*.ingen.lv2"); - filt.set_name("Ingen bundles (*.ingen.lv2)"); + filt.add_pattern("*" INGEN_PATCH_FILE_EXT); + filt.set_name("Ingen patch files (*" INGEN_PATCH_FILE_EXT ")"); + filt.add_pattern("*" INGEN_BUNDLE_EXT); + filt.set_name("Ingen bundles (*" INGEN_BUNDLE_EXT ")"); filt.add_pattern("*.om"); filt.set_name("Om patch files (*.om)"); diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index 84d86f2b..61ca446d 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -26,6 +26,7 @@ #include "shared/LV2URIMap.hpp" #include "client/PatchModel.hpp" #include "client/ClientStore.hpp" +#include "serialisation/names.hpp" #include "App.hpp" #include "PatchCanvas.hpp" #include "LoadPluginWindow.hpp" @@ -428,7 +429,7 @@ PatchWindow::event_save_as() save_button->property_has_default() = true; Gtk::FileFilter filt; - filt.add_pattern("*.ingen.lv2"); + filt.add_pattern("*" INGEN_BUNDLE_EXT); filt.set_name("Ingen bundles"); dialog.set_filter(filt); @@ -446,11 +447,11 @@ PatchWindow::event_save_as() std::string basename = Glib::path_get_basename(filename); if (basename.find('.') == string::npos) { - filename += ".ingen.lv2"; - basename += ".ingen.lv2"; - } else if (filename.substr(filename.length() - 10) != ".ingen.lv2") { + filename += INGEN_BUNDLE_EXT; + basename += INGEN_BUNDLE_EXT; + } else if (filename.substr(filename.length() - 10) != INGEN_BUNDLE_EXT) { Gtk::MessageDialog error_dialog(*this, -"<b>" "Ingen patches must be saved to Ingen bundles (*.ingen.lv2)." "</b>", +"<b>" "Ingen patches must be saved to Ingen bundles (*" INGEN_BUNDLE_EXT ")." "</b>", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); error_dialog.run(); continue; diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 6da5bcd0..9b991555 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -137,7 +137,7 @@ ThreadedLoader::save_patch_event(SharedPtr<PatchModel> model, const string& file { if (App::instance().serialiser()) { Serialiser::Record r(model, filename); - if (filename.find(".ingen") != string::npos) + if (filename.find(".ing.lv2") != string::npos) App::instance().serialiser()->write_bundle(r); else App::instance().serialiser()->to_file(r); diff --git a/src/gui/UploadPatchWindow.cpp b/src/gui/UploadPatchWindow.cpp index 1804ff06..3d7afe11 100644 --- a/src/gui/UploadPatchWindow.cpp +++ b/src/gui/UploadPatchWindow.cpp @@ -27,6 +27,7 @@ #include "client/ClientStore.hpp" #include "interface/EngineInterface.hpp" #include "serialisation/Serialiser.hpp" +#include "serialisation/names.hpp" #include "client/PatchModel.hpp" #include "UploadPatchWindow.hpp" #include "App.hpp" @@ -254,7 +255,7 @@ UploadPatchWindow::upload_clicked() Serialiser s(*App::instance().world(), App::instance().store()); const string uri = string("http://rdf.drobilla.net/ingen_patches/") - .append(symbol).append(".ingen.ttl"); + .append(symbol).append(INGEN_PATCH_FILE_EXT); const string str = s.to_string(_patch, uri, extra_rdf); |