From decff9a96b928b19c4b5a55b532cfbfaa4486e42 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Apr 2007 21:48:28 +0000 Subject: Updated Jack version checked by configure. Patch uploading. git-svn-id: http://svn.drobilla.net/lad/ingen@447 a436a847-0d15-0410-975c-d299462d15a1 --- src/progs/ingenuity/LoadRemotePatchWindow.cpp | 8 +- src/progs/ingenuity/Makefile.am | 2 + src/progs/ingenuity/PatchWindow.cpp | 10 + src/progs/ingenuity/PatchWindow.h | 2 + src/progs/ingenuity/WindowFactory.cpp | 15 ++ src/progs/ingenuity/WindowFactory.h | 3 + src/progs/ingenuity/ingenuity.glade | 343 ++++++++++++++++++++++++-- src/progs/ingenuity/ingenuity.gladep | 4 +- 8 files changed, 367 insertions(+), 20 deletions(-) (limited to 'src/progs') diff --git a/src/progs/ingenuity/LoadRemotePatchWindow.cpp b/src/progs/ingenuity/LoadRemotePatchWindow.cpp index 19e206aa..ec49f70f 100644 --- a/src/progs/ingenuity/LoadRemotePatchWindow.cpp +++ b/src/progs/ingenuity/LoadRemotePatchWindow.cpp @@ -67,15 +67,15 @@ LoadRemotePatchWindow::present(SharedPtr patch, MetadataMap data) Namespaces namespaces; namespaces["ingen"] = "http://drobilla.net/ns/ingen#"; namespaces["rdfs"] = "http://www.w3.org/2000/01/rdf-schema#"; + namespaces["doap"] = "http://usefulinc.com/ns/doap#"; RDFQuery query(namespaces, Glib::ustring( "SELECT DISTINCT ?name ?uri FROM <> WHERE {" - " ?patch a ingen:Patch ;" - " rdfs:seeAlso ?uri ;" - " ingen:name ?name ." + " ?uri a ingen:Patch ;" + " doap:name ?name ." "}")); - RDFQuery::Results results = query.run("http://drobilla.net/ingen/index.ttl"); + RDFQuery::Results results = query.run("http://rdf.drobilla.net/ingen_patches/index.ttl"); for (RDFQuery::Results::iterator i = results.begin(); i != results.end(); ++i) { Gtk::TreeModel::iterator iter = _liststore->append(); diff --git a/src/progs/ingenuity/Makefile.am b/src/progs/ingenuity/Makefile.am index 91066d8e..44b37c67 100644 --- a/src/progs/ingenuity/Makefile.am +++ b/src/progs/ingenuity/Makefile.am @@ -49,6 +49,8 @@ ingenuity_SOURCES = \ LoadPatchWindow.cpp \ LoadRemotePatchWindow.h \ LoadRemotePatchWindow.cpp \ + UploadPatchWindow.h \ + UploadPatchWindow.cpp \ MessagesWindow.h \ MessagesWindow.cpp \ LoadSubpatchWindow.h \ diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp index d9677317..606674bb 100644 --- a/src/progs/ingenuity/PatchWindow.cpp +++ b/src/progs/ingenuity/PatchWindow.cpp @@ -61,6 +61,7 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtrget_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); + xml->get_widget("patch_upload_menuitem", _menu_upload); xml->get_widget("patch_cut_menuitem", _menu_cut); xml->get_widget("patch_copy_menuitem", _menu_copy); xml->get_widget("patch_paste_menuitem", _menu_paste); @@ -93,6 +94,8 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtrsignal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_save_as)); + _menu_upload->signal_activate().connect( + sigc::mem_fun(this, &PatchWindow::event_upload)); _menu_copy->signal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_copy)); _menu_delete->signal_activate().connect( @@ -334,6 +337,13 @@ PatchWindow::event_save_as() } +void +PatchWindow::event_upload() +{ + App::instance().window_factory()->present_upload_patch(_patch); +} + + void PatchWindow::event_copy() { diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h index e6131581..a5ce150d 100644 --- a/src/progs/ingenuity/PatchWindow.h +++ b/src/progs/ingenuity/PatchWindow.h @@ -82,6 +82,7 @@ private: void event_import_location(); void event_save(); void event_save_as(); + void event_upload(); void event_copy(); void event_delete(); void event_quit(); @@ -105,6 +106,7 @@ private: Gtk::MenuItem* _menu_import_location; Gtk::MenuItem* _menu_save; Gtk::MenuItem* _menu_save_as; + Gtk::MenuItem* _menu_upload; Gtk::MenuItem* _menu_cut; Gtk::MenuItem* _menu_copy; Gtk::MenuItem* _menu_paste; diff --git a/src/progs/ingenuity/WindowFactory.cpp b/src/progs/ingenuity/WindowFactory.cpp index 3b773227..14a7554f 100644 --- a/src/progs/ingenuity/WindowFactory.cpp +++ b/src/progs/ingenuity/WindowFactory.cpp @@ -25,6 +25,7 @@ #include "LoadPluginWindow.h" #include "LoadPatchWindow.h" #include "LoadRemotePatchWindow.h" +#include "UploadPatchWindow.h" #include "LoadSubpatchWindow.h" #include "RenameWindow.h" #include "NewSubpatchWindow.h" @@ -36,6 +37,7 @@ WindowFactory::WindowFactory() : _load_plugin_win(NULL) , _load_patch_win(NULL) , _load_remote_patch_win(NULL) +, _upload_patch_win(NULL) , _new_subpatch_win(NULL) , _load_subpatch_win(NULL) , _node_properties_win(NULL) @@ -46,6 +48,7 @@ WindowFactory::WindowFactory() xml->get_widget_derived("load_plugin_win", _load_plugin_win); xml->get_widget_derived("load_patch_win", _load_patch_win); xml->get_widget_derived("load_remote_patch_win", _load_remote_patch_win); + xml->get_widget_derived("upload_patch_win", _upload_patch_win); xml->get_widget_derived("new_subpatch_win", _new_subpatch_win); xml->get_widget_derived("load_subpatch_win", _load_subpatch_win); xml->get_widget_derived("node_properties_win", _node_properties_win); @@ -278,6 +281,18 @@ WindowFactory::present_load_remote_patch(SharedPtr patch, MetadataMa } +void +WindowFactory::present_upload_patch(SharedPtr patch) +{ + PatchWindowMap::iterator w = _patch_windows.find(patch->path()); + + if (w != _patch_windows.end()) + _upload_patch_win->set_transient_for(*w->second); + + _upload_patch_win->present(patch); +} + + void WindowFactory::present_new_subpatch(SharedPtr patch, MetadataMap data) { diff --git a/src/progs/ingenuity/WindowFactory.h b/src/progs/ingenuity/WindowFactory.h index 8bc22ff5..9c6cfa0a 100644 --- a/src/progs/ingenuity/WindowFactory.h +++ b/src/progs/ingenuity/WindowFactory.h @@ -33,6 +33,7 @@ class NodePropertiesWindow; class PatchPropertiesWindow; class LoadPatchWindow; class LoadRemotePatchWindow; +class UploadPatchWindow; class RenameWindow; @@ -61,6 +62,7 @@ public: void present_load_plugin(SharedPtr patch, MetadataMap data = MetadataMap()); void present_load_patch(SharedPtr patch, MetadataMap data = MetadataMap()); void present_load_remote_patch(SharedPtr patch, MetadataMap data = MetadataMap()); + void present_upload_patch(SharedPtr patch); void present_new_subpatch(SharedPtr patch, MetadataMap data = MetadataMap()); void present_load_subpatch(SharedPtr patch, MetadataMap data = MetadataMap()); void present_rename(SharedPtr object); @@ -86,6 +88,7 @@ private: LoadPluginWindow* _load_plugin_win; LoadPatchWindow* _load_patch_win; LoadRemotePatchWindow* _load_remote_patch_win; + UploadPatchWindow* _upload_patch_win; NewSubpatchWindow* _new_subpatch_win; LoadSubpatchWindow* _load_subpatch_win; NodePropertiesWindow* _node_properties_win; diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade index 6d06f738..6c80dc08 100644 --- a/src/progs/ingenuity/ingenuity.glade +++ b/src/progs/ingenuity/ingenuity.glade @@ -52,7 +52,7 @@ - + True gtk-open 1 @@ -75,7 +75,7 @@ - + True gtk-open 1 @@ -113,7 +113,7 @@ - + True gtk-save-as 1 @@ -126,6 +126,28 @@ + + + True + _Upload... + True + + + + + + True + gtk-network + 1 + 0.5 + 0.5 + 0 + 0 + + + + + True @@ -141,7 +163,7 @@ - + True gtk-preferences 1 @@ -274,7 +296,7 @@ - + True gtk-sort-ascending 1 @@ -297,7 +319,7 @@ - + True gtk-preferences 1 @@ -320,7 +342,7 @@ - + True gtk-properties 1 @@ -352,7 +374,7 @@ - + True gtk-delete 1 @@ -389,7 +411,7 @@ - + True gtk-connect 1 @@ -412,7 +434,7 @@ - + True gtk-index 1 @@ -435,7 +457,7 @@ - + True gtk-dialog-error 1 @@ -470,7 +492,7 @@ - + True gtk-info 1 @@ -3987,7 +4009,7 @@ Contributors: 8 - dialog1 + Load Remote Patch GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -4139,7 +4161,7 @@ Contributors: 0 - True + False True @@ -4154,4 +4176,297 @@ Contributors: + + 8 + Upload Patch + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 9 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + -7 + + + + + + True + False + True + True + True + GTK_RELIEF_NORMAL + True + -5 + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-ok + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Upload + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + 2 + 2 + False + 8 + 0 + + + + True + Enter a short name suitable for use as an identifier or filename. + +The first character must be one of _, a-z or A-Z and subsequenct characters can be from _, a-z, A-Z or 0-9. + + True + True + True + 0 + + True + * + True + + + 1 + 2 + 0 + 1 + + + + + + + True + Enter a short name for this patch, e.g. "Mega Synth" + True + True + True + 0 + + True + * + True + + + 1 + 2 + 1 + 2 + + + + + + + True + Symbol: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + Short Name: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + 0 + True + True + + + + + + True + Succesfully uploaded patches will be available immediately in the remote patch browser. + +By uploading patches, you agree to license them under the Creative Commons Attribution-Share Alike 3.0 License. + +Thank you for contributing. + False + False + GTK_JUSTIFY_LEFT + True + False + 0.5 + 0.5 + 0 + 4 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Upload progress + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + + + + + + diff --git a/src/progs/ingenuity/ingenuity.gladep b/src/progs/ingenuity/ingenuity.gladep index a8bd18bd..7cd9c6ce 100644 --- a/src/progs/ingenuity/ingenuity.gladep +++ b/src/progs/ingenuity/ingenuity.gladep @@ -2,8 +2,8 @@ - OmGtk - om_gtk + Ingenuity + ingenuity C++ FALSE -- cgit v1.2.1