From 6a92ee5fbc7d47998fc399efe424e451cf75657c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 5 Mar 2010 04:46:06 +0000 Subject: 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 --- src/gui/PatchWindow.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gui/PatchWindow.cpp') 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, -"" "Ingen patches must be saved to Ingen bundles (*.ingen.lv2)." "", +"" "Ingen patches must be saved to Ingen bundles (*" INGEN_BUNDLE_EXT ")." "", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); error_dialog.run(); continue; -- cgit v1.2.1