From 533402f16f6a7e6a9aa6df4186055690bce8e3ac Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Apr 2007 01:50:59 +0000 Subject: 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 --- src/progs/ingenuity/PatchWindow.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/progs/ingenuity/PatchWindow.cpp') 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::RefPtrget_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::RefPtrsignal_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( @@ -252,6 +255,13 @@ PatchWindow::event_import() } +void +PatchWindow::event_import_location() +{ + App::instance().window_factory()->present_load_remote_patch(_patch); +} + + void PatchWindow::event_save() { @@ -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; -- cgit v1.2.1