summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/PatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-12 01:50:59 +0000
committerDavid Robillard <d@drobilla.net>2007-04-12 01:50:59 +0000
commit533402f16f6a7e6a9aa6df4186055690bce8e3ac (patch)
tree8b5f9cc0fb349929476344f3502dadb262fbe56f /src/progs/ingenuity/PatchWindow.cpp
parent099e01628ef57f07efa69954893b0873bbb7f367 (diff)
downloadingen-533402f16f6a7e6a9aa6df4186055690bce8e3ac.tar.gz
ingen-533402f16f6a7e6a9aa6df4186055690bce8e3ac.tar.bz2
ingen-533402f16f6a7e6a9aa6df4186055690bce8e3ac.zip
Updated Raptor dependency to 1.4.14 (for Turtle serialization).
Made patches serialize to Turtle instead of RDF/XML because a) it's pretty and b) I said so. Loading of patches directly from the 'net in Ingenuity (File->Import Location). git-svn-id: http://svn.drobilla.net/lad/ingen@444 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/PatchWindow.cpp')
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index ddcccf10..d9677317 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -57,6 +57,7 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
//xml->get_widget("patch_win_status_bar", _status_bar);
//xml->get_widget("patch_open_menuitem", _menu_open);
xml->get_widget("patch_import_menuitem", _menu_import);
+ xml->get_widget("patch_import_location_menuitem", _menu_import_location);
//xml->get_widget("patch_open_into_menuitem", _menu_open_into);
xml->get_widget("patch_save_menuitem", _menu_save);
xml->get_widget("patch_save_as_menuitem", _menu_save_as);
@@ -86,6 +87,8 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
sigc::mem_fun(this, &PatchWindow::event_open));*/
_menu_import->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_import));
+ _menu_import_location->signal_activate().connect(
+ sigc::mem_fun(this, &PatchWindow::event_import_location));
_menu_save->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_save));
_menu_save_as->signal_activate().connect(
@@ -253,6 +256,13 @@ PatchWindow::event_import()
void
+PatchWindow::event_import_location()
+{
+ App::instance().window_factory()->present_load_remote_patch(_patch);
+}
+
+
+void
PatchWindow::event_save()
{
if (_patch->filename() == "")
@@ -294,8 +304,8 @@ PatchWindow::event_save_as()
if (result == Gtk::RESPONSE_OK) {
string filename = dialog.get_filename();
- if (filename.length() < 7 || filename.substr(filename.length()-6) != ".ingen")
- filename += ".ingen";
+ if (filename.length() < 11 || filename.substr(filename.length()-10) != ".ingen.ttl")
+ filename += ".ingen.ttl";
bool confirm = false;
std::fstream fin;