summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity')
-rw-r--r--src/progs/ingenuity/OmFlowCanvas.cpp21
-rw-r--r--src/progs/ingenuity/OmFlowCanvas.h1
-rw-r--r--src/progs/ingenuity/ingenuity.glade10
3 files changed, 26 insertions, 6 deletions
diff --git a/src/progs/ingenuity/OmFlowCanvas.cpp b/src/progs/ingenuity/OmFlowCanvas.cpp
index 57b66998..fc9ec9ef 100644
--- a/src/progs/ingenuity/OmFlowCanvas.cpp
+++ b/src/progs/ingenuity/OmFlowCanvas.cpp
@@ -172,10 +172,27 @@ OmFlowCanvas::destroy_selected()
}
+string
+OmFlowCanvas::generate_port_name(const string& base) {
+ string name = base;
+
+ char num_buf[5];
+ for (uint i=1; i < 9999; ++i) {
+ snprintf(num_buf, 5, "%d", i);
+ name = base + "_";
+ name += num_buf;
+ if (!m_patch_controller->patch_model()->get_port(name))
+ break;
+ }
+
+ return name;
+}
+
+
void
OmFlowCanvas::menu_add_port(const string& name, const string& type, bool is_output)
{
- const Path& path = m_patch_controller->path().base_path() + name;
+ const Path& path = m_patch_controller->path().base_path() + generate_port_name(name);
Controller::instance().create_port(path, type, is_output);
char temp_buf[16];
@@ -184,6 +201,8 @@ OmFlowCanvas::menu_add_port(const string& name, const string& type, bool is_outp
snprintf(temp_buf, 16, "%d", m_last_click_y);
Controller::instance().set_metadata(path, "module-y", temp_buf);
}
+
+
/*
void
OmFlowCanvas::menu_add_audio_input()
diff --git a/src/progs/ingenuity/OmFlowCanvas.h b/src/progs/ingenuity/OmFlowCanvas.h
index 47cb9b2d..d14c79d3 100644
--- a/src/progs/ingenuity/OmFlowCanvas.h
+++ b/src/progs/ingenuity/OmFlowCanvas.h
@@ -53,6 +53,7 @@ public:
{ m_menu->popup(event->button.button, event->button.time); }
private:
+ string generate_port_name(const string& base);
void menu_add_port(const string& name, const string& type, bool is_output);
/*void menu_add_audio_input();
void menu_add_audio_output();
diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade
index 17736ce2..67286660 100644
--- a/src/progs/ingenuity/ingenuity.glade
+++ b/src/progs/ingenuity/ingenuity.glade
@@ -3022,14 +3022,14 @@
<widget class="GtkAboutDialog" id="about_win">
<property name="destroy_with_parent">True</property>
- <property name="name" translatable="yes">OmGtk</property>
+ <property name="name" translatable="yes">Ingenuity</property>
<property name="copyright" translatable="yes">Copyright (C) 2005-2006 Dave Robillard</property>
- <property name="comments" translatable="yes">A client for the Om modular synthesizer</property>
+ <property name="comments" translatable="yes">A graphical client for the Ingen audio processor</property>
<property name="license" translatable="yes">Licensed under the GNU GPL, Version 2.
-See COPYING file included with Om, or http://www.gnu.org/licenses/gpl.txt for more information</property>
- <property name="wrap_license">False</property>
- <property name="website">http://om-synth.nongnu.org</property>
+See COPYING file included with this distribution, or http://www.gnu.org/licenses/gpl.txt for more information</property>
+ <property name="wrap_license">True</property>
+ <property name="website">http://codeson.net/software/ingen</property>
<property name="website_label" translatable="yes"></property>
<property name="authors">Author:
Dave Robillard &lt;drobilla@connect.carelton.ca&gt;