summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-07 03:22:42 +0000
committerDavid Robillard <d@drobilla.net>2007-02-07 03:22:42 +0000
commit39d5400b39c8089287d5d294becae1268d232d31 (patch)
tree0cf73ef86233121bc7f0408ca536aad196d3166c /src/progs
parente135edf1e65ac978f86f4849bd3667299dd69c7e (diff)
downloadingen-39d5400b39c8089287d5d294becae1268d232d31.tar.gz
ingen-39d5400b39c8089287d5d294becae1268d232d31.tar.bz2
ingen-39d5400b39c8089287d5d294becae1268d232d31.zip
Mad sed-fu for consistent private member naming.
git-svn-id: http://svn.drobilla.net/lad/ingen@286 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/ingenuity/App.cpp2
-rw-r--r--src/progs/ingenuity/ConfigWindow.cpp30
-rw-r--r--src/progs/ingenuity/ConfigWindow.h10
-rw-r--r--src/progs/ingenuity/Configuration.cpp28
-rw-r--r--src/progs/ingenuity/Configuration.h18
-rw-r--r--src/progs/ingenuity/Connection.h6
-rw-r--r--src/progs/ingenuity/ControlGroups.cpp234
-rw-r--r--src/progs/ingenuity/ControlGroups.h54
-rw-r--r--src/progs/ingenuity/ControlPanel.cpp78
-rw-r--r--src/progs/ingenuity/ControlPanel.h20
-rw-r--r--src/progs/ingenuity/DSSIController.cpp24
-rw-r--r--src/progs/ingenuity/DSSIController.h6
-rw-r--r--src/progs/ingenuity/DSSIModule.cpp2
-rw-r--r--src/progs/ingenuity/LashController.cpp34
-rw-r--r--src/progs/ingenuity/LashController.h4
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.cpp44
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.h22
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.cpp228
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.h68
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.cpp64
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.h22
-rw-r--r--src/progs/ingenuity/MessagesWindow.cpp20
-rw-r--r--src/progs/ingenuity/MessagesWindow.h6
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.cpp50
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.h14
-rw-r--r--src/progs/ingenuity/NodeControlWindow.cpp48
-rw-r--r--src/progs/ingenuity/NodeControlWindow.h16
-rw-r--r--src/progs/ingenuity/NodeMenu.cpp40
-rw-r--r--src/progs/ingenuity/NodeMenu.h4
-rw-r--r--src/progs/ingenuity/NodeModule.cpp20
-rw-r--r--src/progs/ingenuity/NodeModule.h6
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.cpp22
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.h12
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp104
-rw-r--r--src/progs/ingenuity/PatchCanvas.h28
-rw-r--r--src/progs/ingenuity/PatchPortModule.cpp14
-rw-r--r--src/progs/ingenuity/PatchPortModule.h8
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.cpp34
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.h10
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.cpp112
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.h16
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp194
-rw-r--r--src/progs/ingenuity/PatchWindow.h64
-rw-r--r--src/progs/ingenuity/Port.cpp2
-rw-r--r--src/progs/ingenuity/RenameWindow.cpp56
-rw-r--r--src/progs/ingenuity/RenameWindow.h10
-rw-r--r--src/progs/ingenuity/SubpatchModule.cpp16
-rw-r--r--src/progs/ingenuity/SubpatchModule.h4
-rw-r--r--src/progs/ingenuity/ingenuity.glade4
49 files changed, 966 insertions, 966 deletions
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 00f4cee4..86f6145c 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -200,7 +200,7 @@ App::event_save_session_as()
if (fin.is_open()) { // File exists
string msg = "File already exists! Are you sure you want to overwrite ";
msg += filename + "?";
- Gtk::MessageDialog confir_dialog(*m_main_window,
+ Gtk::MessageDialog confir_dialog(*_main_window,
msg, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_YES_NO, true);
if (confir_dialog.run() == Gtk::RESPONSE_YES)
confirm = true;
diff --git a/src/progs/ingenuity/ConfigWindow.cpp b/src/progs/ingenuity/ConfigWindow.cpp
index a83bfbac..a3fa6308 100644
--- a/src/progs/ingenuity/ConfigWindow.cpp
+++ b/src/progs/ingenuity/ConfigWindow.cpp
@@ -27,16 +27,16 @@ namespace Ingenuity {
ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_configuration(NULL)
+ _configuration(NULL)
{
- xml->get_widget("config_path_entry", m_path_entry);
- xml->get_widget("config_save_button", m_save_button);
- xml->get_widget("config_cancel_button", m_cancel_button);
- xml->get_widget("config_ok_button", m_ok_button);
+ xml->get_widget("config_path_entry", _path_entry);
+ xml->get_widget("config_save_button", _save_button);
+ xml->get_widget("config_cancel_button", _cancel_button);
+ xml->get_widget("config_ok_button", _ok_button);
- m_save_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::save_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &ConfigWindow::cancel_clicked));
- m_ok_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::ok_clicked));
+ _save_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::save_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &ConfigWindow::cancel_clicked));
+ _ok_button->signal_clicked().connect( sigc::mem_fun(this, &ConfigWindow::ok_clicked));
}
@@ -47,8 +47,8 @@ ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
void
ConfigWindow::configuration(Configuration* sm)
{
- m_configuration = sm;
- m_path_entry->set_text(sm->patch_path());
+ _configuration = sm;
+ _path_entry->set_text(sm->patch_path());
}
@@ -59,9 +59,9 @@ ConfigWindow::configuration(Configuration* sm)
void
ConfigWindow::save_clicked()
{
- m_configuration->patch_path(m_path_entry->get_text());
- m_configuration->apply_settings();
- m_configuration->save_settings();
+ _configuration->patch_path(_path_entry->get_text());
+ _configuration->apply_settings();
+ _configuration->save_settings();
}
@@ -75,8 +75,8 @@ ConfigWindow::cancel_clicked()
void
ConfigWindow::ok_clicked()
{
- m_configuration->patch_path(m_path_entry->get_text());
- m_configuration->apply_settings();
+ _configuration->patch_path(_path_entry->get_text());
+ _configuration->apply_settings();
hide();
}
diff --git a/src/progs/ingenuity/ConfigWindow.h b/src/progs/ingenuity/ConfigWindow.h
index 7113416c..63a909ec 100644
--- a/src/progs/ingenuity/ConfigWindow.h
+++ b/src/progs/ingenuity/ConfigWindow.h
@@ -49,12 +49,12 @@ private:
void cancel_clicked();
void ok_clicked();
- Configuration* m_configuration;
+ Configuration* _configuration;
- Gtk::Entry* m_path_entry;
- Gtk::Button* m_save_button;
- Gtk::Button* m_cancel_button;
- Gtk::Button* m_ok_button;
+ Gtk::Entry* _path_entry;
+ Gtk::Button* _save_button;
+ Gtk::Button* _cancel_button;
+ Gtk::Button* _ok_button;
};
diff --git a/src/progs/ingenuity/Configuration.cpp b/src/progs/ingenuity/Configuration.cpp
index c95efca1..dbebcdc4 100644
--- a/src/progs/ingenuity/Configuration.cpp
+++ b/src/progs/ingenuity/Configuration.cpp
@@ -36,10 +36,10 @@ using namespace Ingen::Client;
Configuration::Configuration()
-: m_patch_path("/usr/share/om/patches:/usr/local/share/om/patches"),
- m_audio_port_color( 0x394f66B0),
- m_control_port_color(0x396639B0),
- m_midi_port_color( 0x663939B0)
+: _patch_path("/usr/share/om/patches:/usr/local/share/om/patches"),
+ _audio_port_color( 0x394f66B0),
+ _control_port_color(0x396639B0),
+ _midi_port_color( 0x663939B0)
{
}
@@ -92,7 +92,7 @@ Configuration::load_settings(string filename)
}
is >> s;
- m_patch_path = s;
+ _patch_path = s;
is.close();
}
@@ -118,7 +118,7 @@ Configuration::save_settings(string filename)
}
os << "file_version 1" << endl;
- os << "patch_path " << m_patch_path << endl;
+ os << "patch_path " << _patch_path << endl;
os.close();
}
@@ -131,7 +131,7 @@ void
Configuration::apply_settings()
{
cerr << "FIXME: patch path" << endl;
- //App::instance().loader()->set_patch_path(m_patch_path);
+ //App::instance().loader()->set_patch_path(_patch_path);
}
@@ -141,11 +141,11 @@ Configuration::get_port_color(const PortModel* pi)
assert(pi != NULL);
if (pi->is_control()) {
- return m_control_port_color;
+ return _control_port_color;
} else if (pi->is_audio()) {
- return m_audio_port_color;
+ return _audio_port_color;
} else if (pi->is_midi()) {
- return m_midi_port_color;
+ return _midi_port_color;
}
cerr << "[Configuration] Unknown port type! Port will be bright red, this is an error." << endl;
@@ -156,28 +156,28 @@ Configuration::get_port_color(const PortModel* pi)
Coord
Configuration::get_window_location(const string& id)
{
- return m_window_locations[id];
+ return _window_locations[id];
}
void
Configuration::set_window_location(const string& id, Coord loc)
{
- m_window_locations[id] = loc;
+ _window_locations[id] = loc;
}
Coord
Configuration::get_window_size(const string& id)
{
- return m_window_sizes[id];
+ return _window_sizes[id];
}
void
Configuration::set_window_size(const string& id, Coord size)
{
- m_window_sizes[id] = size;
+ _window_sizes[id] = size;
}*/
diff --git a/src/progs/ingenuity/Configuration.h b/src/progs/ingenuity/Configuration.h
index 9550c41b..8a3b74e3 100644
--- a/src/progs/ingenuity/Configuration.h
+++ b/src/progs/ingenuity/Configuration.h
@@ -48,24 +48,24 @@ public:
void apply_settings();
- string patch_path() { return m_patch_path; }
- void patch_path(const string& path) { m_patch_path = path; }
+ string patch_path() { return _patch_path; }
+ void patch_path(const string& path) { _patch_path = path; }
- const string& patch_folder() { return m_patch_folder; }
- void set_patch_folder(const string& f) { m_patch_folder = f; }
+ const string& patch_folder() { return _patch_folder; }
+ void set_patch_folder(const string& f) { _patch_folder = f; }
int get_port_color(const PortModel* pi);
private:
/** Search path for patch files. Colon delimited, as usual. */
- string m_patch_path;
+ string _patch_path;
/** Most recent patch folder shown in open dialog */
- string m_patch_folder;
+ string _patch_folder;
- int m_audio_port_color;
- int m_control_port_color;
- int m_midi_port_color;
+ int _audio_port_color;
+ int _control_port_color;
+ int _midi_port_color;
};
diff --git a/src/progs/ingenuity/Connection.h b/src/progs/ingenuity/Connection.h
index 1681c061..70c82f1d 100644
--- a/src/progs/ingenuity/Connection.h
+++ b/src/progs/ingenuity/Connection.h
@@ -39,15 +39,15 @@ public:
boost::shared_ptr<LibFlowCanvas::Port> src,
boost::shared_ptr<LibFlowCanvas::Port> dst)
: LibFlowCanvas::Connection(canvas, src, dst)
- , m_connection_model(model)
+ , _connection_model(model)
{}
virtual ~Connection() {}
- SharedPtr<ConnectionModel> model() const { return m_connection_model; }
+ SharedPtr<ConnectionModel> model() const { return _connection_model; }
private:
- SharedPtr<ConnectionModel> m_connection_model;
+ SharedPtr<ConnectionModel> _connection_model;
};
diff --git a/src/progs/ingenuity/ControlGroups.cpp b/src/progs/ingenuity/ControlGroups.cpp
index bbd83ee8..2e2ded78 100644
--- a/src/progs/ingenuity/ControlGroups.cpp
+++ b/src/progs/ingenuity/ControlGroups.cpp
@@ -33,10 +33,10 @@ namespace Ingenuity {
ControlGroup::ControlGroup(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::VBox(cobject),
- m_control_panel(NULL),
- m_has_separator(false),
- m_separator(NULL),
- m_enable_signal(false)
+ _control_panel(NULL),
+ _has_separator(false),
+ _separator(NULL),
+ _enable_signal(false)
{
}
@@ -44,16 +44,16 @@ ControlGroup::ControlGroup(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
void
ControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
{
- m_control_panel = panel;
- m_port_model = pm,
- m_has_separator = separator,
+ _control_panel = panel;
+ _port_model = pm,
+ _has_separator = separator,
- assert(m_port_model);
+ assert(_port_model);
assert(panel);
/*if (separator) {
- m_separator = new Gtk::VSeparator();
- pack_start(*m_separator, false, false, 4);
+ _separator = new Gtk::VSeparator();
+ pack_start(*_separator, false, false, 4);
}
*/
@@ -67,12 +67,12 @@ ControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
SliderControlGroup::SliderControlGroup(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: ControlGroup(cobject, xml),
- m_enabled(true)
+ _enabled(true)
{
- xml->get_widget("control_strip_name_label", m_name_label);
- xml->get_widget("control_strip_min_spinner", m_min_spinner);
- xml->get_widget("control_strip_max_spinner", m_max_spinner);
- xml->get_widget("control_strip_slider", m_slider);
+ xml->get_widget("control_strip_name_label", _name_label);
+ xml->get_widget("control_strip_min_spinner", _min_spinner);
+ xml->get_widget("control_strip_max_spinner", _max_spinner);
+ xml->get_widget("control_strip_slider", _slider);
}
@@ -81,12 +81,12 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool sepa
{
ControlGroup::init(panel, pm, separator);
- assert(m_name_label);
- assert(m_min_spinner);
- assert(m_max_spinner);
- assert(m_slider);
+ assert(_name_label);
+ assert(_min_spinner);
+ assert(_max_spinner);
+ assert(_slider);
- m_slider->set_draw_value(true);
+ _slider->set_draw_value(true);
float min = 0.0f;
float max = 1.0f;
@@ -103,24 +103,24 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool sepa
set_name(pm->path().name());
- m_min_spinner->set_value(min);
- m_min_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::min_changed));
- m_max_spinner->set_value(max);
- m_max_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::max_changed));
+ _min_spinner->set_value(min);
+ _min_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::min_changed));
+ _max_spinner->set_value(max);
+ _max_spinner->signal_value_changed().connect(sigc::mem_fun(*this, &SliderControlGroup::max_changed));
- m_slider->set_value(m_port_model->value());
+ _slider->set_value(_port_model->value());
- m_slider->signal_event().connect(
+ _slider->signal_event().connect(
sigc::mem_fun(*this, &SliderControlGroup::slider_pressed));
- m_slider->signal_value_changed().connect(
+ _slider->signal_value_changed().connect(
sigc::mem_fun(*this, &SliderControlGroup::update_value_from_slider));
- m_slider->set_range(min, max);
+ _slider->set_range(min, max);
set_value(pm->value());
- m_enable_signal = true;
+ _enable_signal = true;
show_all();
}
@@ -129,14 +129,14 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm, bool sepa
void
SliderControlGroup::metadata_update(const string& key, const Atom& value)
{
- m_enable_signal = false;
+ _enable_signal = false;
if ( (key == "min") && value.type() == Atom::FLOAT)
- m_min_spinner->set_value(value.get_float());
+ _min_spinner->set_value(value.get_float());
else if ( (key == "max") && value.type() == Atom::FLOAT)
- m_max_spinner->set_value(value.get_float());
+ _max_spinner->set_value(value.get_float());
- m_enable_signal = true;
+ _enable_signal = true;
}
@@ -145,49 +145,49 @@ SliderControlGroup::set_name(const string& name)
{
string name_label = "<span weight=\"bold\">";
name_label += name + "</span>";
- m_name_label->set_markup(name_label);
+ _name_label->set_markup(name_label);
}
void
SliderControlGroup::enable()
{
- m_slider->property_sensitive() = true;
- m_min_spinner->property_sensitive() = true;
- m_max_spinner->property_sensitive() = true;
+ _slider->property_sensitive() = true;
+ _min_spinner->property_sensitive() = true;
+ _max_spinner->property_sensitive() = true;
//m_value_spinner.property_sensitive() = true;
- m_name_label->property_sensitive() = true;
+ _name_label->property_sensitive() = true;
}
void
SliderControlGroup::disable()
{
- m_slider->property_sensitive() = false;
- m_min_spinner->property_sensitive() = false;
- m_max_spinner->property_sensitive() = false;
+ _slider->property_sensitive() = false;
+ _min_spinner->property_sensitive() = false;
+ _max_spinner->property_sensitive() = false;
//m_value_spinner.property_sensitive() = false;
- m_name_label->property_sensitive() = false;
+ _name_label->property_sensitive() = false;
}
void
SliderControlGroup::min_changed()
{
- double min = m_min_spinner->get_value();
- const double max = m_max_spinner->get_value();
+ double min = _min_spinner->get_value();
+ const double max = _max_spinner->get_value();
if (min >= max) {
min = max - 1.0;
- m_min_spinner->set_value(min);
+ _min_spinner->set_value(min);
}
- m_slider->set_range(min, max);
+ _slider->set_range(min, max);
- if (m_enable_signal) {
+ if (_enable_signal) {
char temp_buf[16];
snprintf(temp_buf, 16, "%f", min);
- App::instance().engine()->set_metadata(m_port_model->path(), "min", temp_buf);
+ App::instance().engine()->set_metadata(_port_model->path(), "min", temp_buf);
}
}
@@ -195,20 +195,20 @@ SliderControlGroup::min_changed()
void
SliderControlGroup::max_changed()
{
- const double min = m_min_spinner->get_value();
- double max = m_max_spinner->get_value();
+ const double min = _min_spinner->get_value();
+ double max = _max_spinner->get_value();
if (max <= min) {
max = min + 1.0;
- m_max_spinner->set_value(max);
+ _max_spinner->set_value(max);
}
- m_slider->set_range(min, max);
+ _slider->set_range(min, max);
- if (m_enable_signal) {
+ if (_enable_signal) {
char temp_buf[16];
snprintf(temp_buf, 16, "%f", max);
- App::instance().engine()->set_metadata(m_port_model->path(), "max", temp_buf);
+ App::instance().engine()->set_metadata(_port_model->path(), "max", temp_buf);
}
}
@@ -216,14 +216,14 @@ SliderControlGroup::max_changed()
void
SliderControlGroup::update_value_from_slider()
{
- if (m_enable_signal) {
- const float value = m_slider->get_value();
+ if (_enable_signal) {
+ const float value = _slider->get_value();
// Prevent spinner signal from doing all this over again (slow)
- m_enable_signal = false;
+ _enable_signal = false;
- m_control_panel->value_changed(m_port_model, value);
+ _control_panel->value_changed(_port_model, value);
- m_enable_signal = true;
+ _enable_signal = true;
}
}
@@ -232,25 +232,25 @@ SliderControlGroup::update_value_from_slider()
void
SliderControlGroup::update_value_from_spinner()
{
- if (m_enable_signal) {
- m_enable_signal = false;
- const float value = m_value_spinner.get_value();
+ if (_enable_signal) {
+ _enable_signal = false;
+ const float value = _value_spinner.get_value();
- if (value < m_min_spinner->get_value()) {
- m_min_spinner->set_value(value);
- m_slider->set_range(m_min_spinner->get_value(), m_max_spinner->get_value());
+ if (value < _min_spinner->get_value()) {
+ _min_spinner->set_value(value);
+ _slider->set_range(_min_spinner->get_value(), _max_spinner->get_value());
}
- if (value > m_max_spinner->get_value()) {
- m_max_spinner->set_value(value);
- m_slider->set_range(m_min_spinner->get_value(), m_max_spinner->get_value());
+ if (value > _max_spinner->get_value()) {
+ _max_spinner->set_value(value);
+ _slider->set_range(_min_spinner->get_value(), _max_spinner->get_value());
}
- m_slider->set_value(m_value_spinner.get_value());
+ _slider->set_value(_value_spinner.get_value());
- m_control_panel->value_changed(m_port_model, value);
+ _control_panel->value_changed(_port_model, value);
//m_port_model->value(value);
- m_enable_signal = true;
+ _enable_signal = true;
}
}
*/
@@ -263,11 +263,11 @@ SliderControlGroup::slider_pressed(GdkEvent* ev)
{
//cerr << "Pressed: " << ev->type << endl;
if (ev->type == GDK_BUTTON_PRESS) {
- m_enabled = false;
+ _enabled = false;
//cerr << "SLIDER FIXME\n";
- //GtkClientInterface::instance()->set_ignore_port(m_port_model->path());
+ //GtkClientInterface::instance()->set_ignore_port(_port_model->path());
} else if (ev->type == GDK_BUTTON_RELEASE) {
- m_enabled = true;
+ _enabled = true;
//cerr << "SLIDER FIXME\n";
//GtkClientInterface::instance()->clear_ignore_port();
}
@@ -281,24 +281,24 @@ SliderControlGroup::slider_pressed(GdkEvent* ev)
#if 0
IntegerControlGroup::IntegerControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: ControlGroup(panel, pm, separator),
- m_enable_signal(false),
- m_alignment(0.5, 0.5, 0.0, 0.0),
- m_name_label(pm->path().name()),
- m_spinner(1.0, 0)
+ _enable_signal(false),
+ _alignment(0.5, 0.5, 0.0, 0.0),
+ _name_label(pm->path().name()),
+ _spinner(1.0, 0)
{
set_name(pm->path().name());
- m_spinner.set_range(-99999, 99999);
- m_spinner.set_value(m_port_model->value());
- m_spinner.signal_value_changed().connect(
+ _spinner.set_range(-99999, 99999);
+ _spinner.set_value(_port_model->value());
+ _spinner.signal_value_changed().connect(
sigc::mem_fun(*this, &IntegerControlGroup::update_value));
- m_spinner.set_increments(1, 10);
+ _spinner.set_increments(1, 10);
- m_alignment.add(m_spinner);
- pack_start(m_name_label);
- pack_start(m_alignment);
+ _alignment.add(_spinner);
+ pack_start(_name_label);
+ pack_start(_alignment);
- m_enable_signal = true;
+ _enable_signal = true;
show_all();
}
@@ -309,7 +309,7 @@ IntegerControlGroup::set_name(const string& name)
{
string name_label = "<span weight=\"bold\">";
name_label += name + "</span>";
- m_name_label->set_markup(name_label);
+ _name_label->set_markup(name_label);
}
@@ -317,34 +317,34 @@ void
IntegerControlGroup::set_value(float val)
{
//cerr << "[IntegerControlGroup] Setting value to " << val << endl;
- m_enable_signal = false;
- m_spinner.set_value(val);
- m_enable_signal = true;
+ _enable_signal = false;
+ _spinner.set_value(val);
+ _enable_signal = true;
}
void
IntegerControlGroup::enable()
{
- m_spinner.property_sensitive() = true;
- m_name_label->property_sensitive() = true;
+ _spinner.property_sensitive() = true;
+ _name_label->property_sensitive() = true;
}
void
IntegerControlGroup::disable()
{
- m_spinner.property_sensitive() = false;
- m_name_label->property_sensitive() = false;
+ _spinner.property_sensitive() = false;
+ _name_label->property_sensitive() = false;
}
void
IntegerControlGroup::update_value()
{
- if (m_enable_signal) {
- float value = m_spinner.get_value();
- m_control_panel->value_changed(m_port_model, value);
+ if (_enable_signal) {
+ float value = _spinner.get_value();
+ _control_panel->value_changed(_port_model, value);
//m_port_model->value(value);
}
}
@@ -355,21 +355,21 @@ IntegerControlGroup::update_value()
ToggleControlGroup::ToggleControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: ControlGroup(panel, pm, separator),
- m_enable_signal(false),
- m_alignment(0.5, 0.5, 0.0, 0.0),
- m_name_label(pm->path().name())
+ _enable_signal(false),
+ _alignment(0.5, 0.5, 0.0, 0.0),
+ _name_label(pm->path().name())
{
set_name(pm->path().name());
- set_value(m_port_model->value());
- m_checkbutton.signal_toggled().connect(
+ set_value(_port_model->value());
+ _checkbutton.signal_toggled().connect(
sigc::mem_fun(*this, &ToggleControlGroup::update_value));
- m_alignment.add(m_checkbutton);
- pack_start(m_name_label);
- pack_start(m_alignment);
+ _alignment.add(_checkbutton);
+ pack_start(_name_label);
+ pack_start(_alignment);
- m_enable_signal = true;
+ _enable_signal = true;
show_all();
}
@@ -380,7 +380,7 @@ ToggleControlGroup::set_name(const string& name)
{
string name_label = "<span weight=\"bold\">";
name_label += name + "</span>";
- m_name_label->set_markup(name_label);
+ _name_label->set_markup(name_label);
}
@@ -388,34 +388,34 @@ void
ToggleControlGroup::set_value(float val)
{
//cerr << "[ToggleControlGroup] Setting value to " << val << endl;
- m_enable_signal = false;
- m_checkbutton.set_active( (val > 0.0f) );
- m_enable_signal = true;
+ _enable_signal = false;
+ _checkbutton.set_active( (val > 0.0f) );
+ _enable_signal = true;
}
void
ToggleControlGroup::enable()
{
- m_checkbutton.property_sensitive() = true;
- m_name_label->property_sensitive() = true;
+ _checkbutton.property_sensitive() = true;
+ _name_label->property_sensitive() = true;
}
void
ToggleControlGroup::disable()
{
- m_checkbutton.property_sensitive() = false;
- m_name_label->property_sensitive() = false;
+ _checkbutton.property_sensitive() = false;
+ _name_label->property_sensitive() = false;
}
void
ToggleControlGroup::update_value()
{
- if (m_enable_signal) {
- float value = m_checkbutton.get_active() ? 1.0f : 0.0f;
- m_control_panel->value_changed(m_port_model, value);
+ if (_enable_signal) {
+ float value = _checkbutton.get_active() ? 1.0f : 0.0f;
+ _control_panel->value_changed(_port_model, value);
//m_port_model->value(value);
}
}
diff --git a/src/progs/ingenuity/ControlGroups.h b/src/progs/ingenuity/ControlGroups.h
index fa43b77e..cb1fb0cb 100644
--- a/src/progs/ingenuity/ControlGroups.h
+++ b/src/progs/ingenuity/ControlGroups.h
@@ -43,12 +43,12 @@ public:
void init(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator);
- ~ControlGroup() { delete m_separator; }
+ ~ControlGroup() { delete _separator; }
- inline const SharedPtr<PortModel> port_model() const { return m_port_model; }
+ inline const SharedPtr<PortModel> port_model() const { return _port_model; }
void remove_separator() {
- assert(m_has_separator); remove(*m_separator); delete m_separator;
+ assert(_has_separator); remove(*_separator); delete _separator;
}
protected:
@@ -56,11 +56,11 @@ protected:
virtual void set_value(float value) = 0;
virtual void metadata_update(const string& key, const Atom& value) = 0;
- ControlPanel* m_control_panel;
- SharedPtr<PortModel> m_port_model;
- bool m_has_separator;
- Gtk::VSeparator* m_separator;
- bool m_enable_signal;
+ ControlPanel* _control_panel;
+ SharedPtr<PortModel> _port_model;
+ bool _has_separator;
+ Gtk::VSeparator* _separator;
+ bool _enable_signal;
};
@@ -95,26 +95,26 @@ private:
bool slider_pressed(GdkEvent* ev);
- bool m_enabled;
+ bool _enabled;
- Gtk::Label* m_name_label;
- Gtk::SpinButton* m_min_spinner;
- Gtk::SpinButton* m_max_spinner;
- //Gtk::SpinButton* m_value_spinner;
- Gtk::VScale* m_slider;
+ Gtk::Label* _name_label;
+ Gtk::SpinButton* _min_spinner;
+ Gtk::SpinButton* _max_spinner;
+ //Gtk::SpinButton* _value_spinner;
+ Gtk::VScale* _slider;
};
inline void
SliderControlGroup::set_value(const float val)
{
- m_enable_signal = false;
- //if (m_enabled) {
- if (m_slider->get_value() != val)
- m_slider->set_value(val);
+ _enable_signal = false;
+ //if (_enabled) {
+ if (_slider->get_value() != val)
+ _slider->set_value(val);
//m_value_spinner->set_value(val);
//}
- m_enable_signal = true;
+ _enable_signal = true;
}
@@ -138,10 +138,10 @@ private:
void update_value();
- bool m_enable_signal;
- Gtk::Alignment m_alignment;
- Gtk::Label m_name_label;
- Gtk::SpinButton m_spinner;
+ bool _enable_signal;
+ Gtk::Alignment _alignment;
+ Gtk::Label _name_label;
+ Gtk::SpinButton _spinner;
};
@@ -163,10 +163,10 @@ private:
void update_value();
- bool m_enable_signal;
- Gtk::Alignment m_alignment;
- Gtk::Label m_name_label;
- Gtk::CheckButton m_checkbutton;
+ bool _enable_signal;
+ Gtk::Alignment _alignment;
+ Gtk::Label _name_label;
+ Gtk::CheckButton _checkbutton;
};
#endif
diff --git a/src/progs/ingenuity/ControlPanel.cpp b/src/progs/ingenuity/ControlPanel.cpp
index 4a96b480..1fde42b9 100644
--- a/src/progs/ingenuity/ControlPanel.cpp
+++ b/src/progs/ingenuity/ControlPanel.cpp
@@ -28,17 +28,17 @@ namespace Ingenuity {
ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::HBox(cobject),
- m_callback_enabled(true)
+ _callback_enabled(true)
{
- xml->get_widget("control_panel_controls_box", m_control_box);
- xml->get_widget("control_panel_voice_controls_box", m_voice_control_box);
- xml->get_widget("control_panel_all_voices_radio", m_all_voices_radio);
- xml->get_widget("control_panel_specific_voice_radio", m_specific_voice_radio);
- xml->get_widget("control_panel_voice_spinbutton", m_voice_spinbutton);
+ xml->get_widget("control_panel_controls_box", _control_box);
+ xml->get_widget("control_panel_voice_controls_box", _voice_control_box);
+ xml->get_widget("control_panel_all_voices_radio", _all_voices_radio);
+ xml->get_widget("control_panel_specific_voice_radio", _specific_voice_radio);
+ xml->get_widget("control_panel_voice_spinbutton", _voice_spinbutton);
- m_all_voices_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::all_voices_selected));
- m_specific_voice_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::specific_voice_selected));
- m_voice_spinbutton->signal_value_changed().connect(sigc::mem_fun(this, &ControlPanel::voice_selected));
+ _all_voices_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::all_voices_selected));
+ _specific_voice_radio->signal_toggled().connect(sigc::mem_fun(this, &ControlPanel::specific_voice_selected));
+ _voice_spinbutton->signal_value_changed().connect(sigc::mem_fun(this, &ControlPanel::voice_selected));
show_all();
}
@@ -46,7 +46,7 @@ ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
ControlPanel::~ControlPanel()
{
- for (vector<ControlGroup*>::iterator i = m_controls.begin(); i != m_controls.end(); ++i)
+ for (vector<ControlGroup*>::iterator i = _controls.begin(); i != _controls.end(); ++i)
delete (*i);
}
@@ -58,23 +58,23 @@ ControlPanel::init(SharedPtr<NodeModel> node, size_t poly)
assert(poly > 0);
if (poly > 1) {
- m_voice_spinbutton->set_range(0, poly - 1);
+ _voice_spinbutton->set_range(0, poly - 1);
} else {
- remove(*m_voice_control_box);
+ remove(*_voice_control_box);
}
for (PortModelList::const_iterator i = node->ports().begin(); i != node->ports().end(); ++i) {
add_port(*i);
}
- m_callback_enabled = true;
+ _callback_enabled = true;
}
ControlGroup*
ControlPanel::find_port(const Path& path) const
{
- for (vector<ControlGroup*>::const_iterator cg = m_controls.begin(); cg != m_controls.end(); ++cg)
+ for (vector<ControlGroup*>::const_iterator cg = _controls.begin(); cg != _controls.end(); ++cg)
if ((*cg)->port_model()->path() == path)
return (*cg);
@@ -95,7 +95,7 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
// Add port
if (pm->is_control() && pm->is_input()) {
- bool separator = (m_controls.size() > 0);
+ bool separator = (_controls.size() > 0);
SliderControlGroup* cg = NULL;
if (pm->is_integer())
cerr << "FIXME: integer\n";
@@ -109,8 +109,8 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
cg->init(this, pm, separator);
}
- m_controls.push_back(cg);
- m_control_box->pack_start(*cg, false, false, 0);
+ _controls.push_back(cg);
+ _control_box->pack_start(*cg, false, false, 0);
/*if (pm->connected())
cg->disable();
@@ -125,17 +125,17 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
}
Gtk::Requisition controls_size;
- m_control_box->size_request(controls_size);
- m_ideal_size.first = controls_size.width;
- m_ideal_size.second = controls_size.height;
+ _control_box->size_request(controls_size);
+ _ideal_size.first = controls_size.width;
+ _ideal_size.second = controls_size.height;
Gtk::Requisition voice_size;
- m_voice_control_box->size_request(voice_size);
- m_ideal_size.first += voice_size.width;
- m_ideal_size.second += voice_size.height;
+ _voice_control_box->size_request(voice_size);
+ _ideal_size.first += voice_size.width;
+ _ideal_size.second += voice_size.height;
- //cerr << "Setting ideal size to " << m_ideal_size.first
- // << " x " << m_ideal_size.second << endl;
+ //cerr << "Setting ideal size to " << _ideal_size.first
+ // << " x " << _ideal_size.second << endl;
}
@@ -145,18 +145,18 @@ void
ControlPanel::remove_port(const Path& path)
{
bool was_first = false;
- for (vector<ControlGroup*>::iterator cg = m_controls.begin(); cg != m_controls.end(); ++cg) {
+ for (vector<ControlGroup*>::iterator cg = _controls.begin(); cg != _controls.end(); ++cg) {
if ((*cg)->port_model()->path() == path) {
- m_control_box->remove(**cg);
- if (cg == m_controls.begin())
+ _control_box->remove(**cg);
+ if (cg == _controls.begin())
was_first = true;
- m_controls.erase(cg);
+ _controls.erase(cg);
break;
}
}
- if (was_first && m_controls.size() > 0)
- (*m_controls.begin())->remove_separator();
+ if (was_first && _controls.size() > 0)
+ (*_controls.begin())->remove_separator();
}
@@ -166,7 +166,7 @@ ControlPanel::remove_port(const Path& path)
void
ControlPanel::rename_port(const Path& old_path, const Path& new_path)
{
- for (vector<ControlGroup*>::iterator cg = m_controls.begin(); cg != m_controls.end(); ++cg) {
+ for (vector<ControlGroup*>::iterator cg = _controls.begin(); cg != _controls.end(); ++cg) {
if ((*cg)->port_model()->path() == old_path) {
(*cg)->set_name(new_path.name());
return;
@@ -183,7 +183,7 @@ ControlPanel::rename_port(const Path& old_path, const Path& new_path)
void
ControlPanel::enable_port(const Path& path)
{
- for (vector<ControlGroup*>::iterator i = m_controls.begin(); i != m_controls.end(); ++i) {
+ for (vector<ControlGroup*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
if ((*i)->port_model()->path() == path) {
(*i)->enable();
return;
@@ -199,7 +199,7 @@ ControlPanel::enable_port(const Path& path)
void
ControlPanel::disable_port(const Path& path)
{
- for (vector<ControlGroup*>::iterator i = m_controls.begin(); i != m_controls.end(); ++i) {
+ for (vector<ControlGroup*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
if ((*i)->port_model()->path() == path) {
(*i)->disable();
return;
@@ -213,17 +213,17 @@ ControlPanel::disable_port(const Path& path)
void
ControlPanel::value_changed(SharedPtr<PortModel> port, float val)
{
- if (m_callback_enabled) {
+ if (_callback_enabled) {
App::instance().engine()->disable_responses();
/* Send the message, but set the client-side model's value to the new
* setting right away (so the value doesn't need to be echoed back) */
- if (m_all_voices_radio->get_active()) {
+ if (_all_voices_radio->get_active()) {
App::instance().engine()->set_port_value(port->path(), val);
port->value(val);
} else {
- int voice = m_voice_spinbutton->get_value_as_int();
+ int voice = _voice_spinbutton->get_value_as_int();
App::instance().engine()->set_port_value(port->path(), voice, val);
port->value(val);
}
@@ -235,14 +235,14 @@ ControlPanel::value_changed(SharedPtr<PortModel> port, float val)
void
ControlPanel::all_voices_selected()
{
- m_voice_spinbutton->property_sensitive() = false;
+ _voice_spinbutton->property_sensitive() = false;
}
void
ControlPanel::specific_voice_selected()
{
- m_voice_spinbutton->property_sensitive() = true;
+ _voice_spinbutton->property_sensitive() = true;
}
diff --git a/src/progs/ingenuity/ControlPanel.h b/src/progs/ingenuity/ControlPanel.h
index f7a1cc5b..dc48dd8d 100644
--- a/src/progs/ingenuity/ControlPanel.h
+++ b/src/progs/ingenuity/ControlPanel.h
@@ -61,8 +61,8 @@ public:
void enable_port(const Path& path);
void disable_port(const Path& path);
- size_t num_controls() const { return m_controls.size(); }
- pair<int,int> ideal_size() const { return m_ideal_size; }
+ size_t num_controls() const { return _controls.size(); }
+ pair<int,int> ideal_size() const { return _ideal_size; }
// Callback for ControlGroup
void value_changed(SharedPtr<PortModel> port_path, float val);
@@ -72,16 +72,16 @@ private:
void specific_voice_selected();
void voice_selected();
- bool m_callback_enabled;
+ bool _callback_enabled;
- pair<int,int> m_ideal_size;
+ pair<int,int> _ideal_size;
- vector<ControlGroup*> m_controls;
- Gtk::HBox* m_control_box;
- Gtk::Box* m_voice_control_box;
- Gtk::RadioButton* m_all_voices_radio;
- Gtk::RadioButton* m_specific_voice_radio;
- Gtk::SpinButton* m_voice_spinbutton;
+ vector<ControlGroup*> _controls;
+ Gtk::HBox* _control_box;
+ Gtk::Box* _voice_control_box;
+ Gtk::RadioButton* _all_voices_radio;
+ Gtk::RadioButton* _specific_voice_radio;
+ Gtk::SpinButton* _voice_spinbutton;
};
diff --git a/src/progs/ingenuity/DSSIController.cpp b/src/progs/ingenuity/DSSIController.cpp
index c7b84b57..32093660 100644
--- a/src/progs/ingenuity/DSSIController.cpp
+++ b/src/progs/ingenuity/DSSIController.cpp
@@ -29,17 +29,17 @@ namespace Ingenuity {
DSSIController::DSSIController(SharedPtr<NodeModel> model)
-: m_banks_dirty(true)
+: _banks_dirty(true)
{
#if 0
assert(model->plugin()->type() == PluginModel::DSSI);
- Gtk::Menu::MenuList& items = m_menu.items();
+ Gtk::Menu::MenuList& items = _menu.items();
items[0].property_sensitive() = true; // "Show Control Window" item
- Gtk::Menu_Helpers::MenuElem program_elem("Select Program", m_program_menu);
+ Gtk::Menu_Helpers::MenuElem program_elem("Select Program", _program_menu);
items.push_front(program_elem);
- m_program_menu_item = program_elem.get_child();
- m_program_menu_item->set_sensitive(false);
+ _program_menu_item = program_elem.get_child();
+ _program_menu_item->set_sensitive(false);
items.push_front(Gtk::Menu_Helpers::MenuElem("Show Plugin GUI",
sigc::mem_fun(this, &DSSIController::show_gui)));
@@ -77,7 +77,7 @@ DSSIController::update_program_menu()
{
cerr << "FIXME: Program menu\n";
#if 0
- m_program_menu.items().clear();
+ _program_menu.items().clear();
const map<int, map<int, string> >& banks = node_model()->get_programs();
std::ostringstream oss;
@@ -88,7 +88,7 @@ DSSIController::update_program_menu()
if (banks.size() > 1)
bank_menu = manage(new Gtk::Menu());
else
- bank_menu = &m_program_menu;
+ bank_menu = &_program_menu;
map<int, string>::const_iterator j;
for (j = i->second.begin(); j != i->second.end(); ++j) {
oss.str("");
@@ -103,18 +103,18 @@ DSSIController::update_program_menu()
if (banks.size() > 1) {
oss.str("");
oss << "Bank " << i->first;
- m_program_menu.items().push_back(
+ _program_menu.items().push_back(
Gtk::Menu_Helpers::MenuElem(oss.str(), *bank_menu));
}
}
// Disable the program menu if there are no programs
if (banks.size() == 0)
- m_program_menu_item->set_sensitive(false);
+ _program_menu_item->set_sensitive(false);
else
- m_program_menu_item->set_sensitive(true);
+ _program_menu_item->set_sensitive(true);
- m_banks_dirty = false;
+ _banks_dirty = false;
#endif
}
@@ -265,7 +265,7 @@ void
DSSIController::show_menu(GdkEventButton* event)
{
#if 0
- if (m_banks_dirty)
+ if (_banks_dirty)
update_program_menu();
NodeController::show_menu(event);
#endif
diff --git a/src/progs/ingenuity/DSSIController.h b/src/progs/ingenuity/DSSIController.h
index 71c1f536..7fb6bad4 100644
--- a/src/progs/ingenuity/DSSIController.h
+++ b/src/progs/ingenuity/DSSIController.h
@@ -62,10 +62,10 @@ public:
private:
void update_program_menu();
- Gtk::Menu m_program_menu;
- Glib::RefPtr<Gtk::MenuItem> m_program_menu_item;
+ Gtk::Menu _program_menu;
+ Glib::RefPtr<Gtk::MenuItem> _program_menu_item;
- bool m_banks_dirty;
+ bool _banks_dirty;
};
diff --git a/src/progs/ingenuity/DSSIModule.cpp b/src/progs/ingenuity/DSSIModule.cpp
index 350c72aa..cbcdedf8 100644
--- a/src/progs/ingenuity/DSSIModule.cpp
+++ b/src/progs/ingenuity/DSSIModule.cpp
@@ -30,7 +30,7 @@ void
DSSIModule::on_double_click(GdkEventButton* ev)
{
/*
- DSSIController* dc = dynamic_cast<DSSIController*>(m_node);
+ DSSIController* dc = dynamic_cast<DSSIController*>(_node);
if (!dc || ! dc->attempt_to_show_gui())
show_control_window();
*/
diff --git a/src/progs/ingenuity/LashController.cpp b/src/progs/ingenuity/LashController.cpp
index 0fed3cf3..d7f46c2d 100644
--- a/src/progs/ingenuity/LashController.cpp
+++ b/src/progs/ingenuity/LashController.cpp
@@ -31,11 +31,11 @@ namespace Ingenuity {
LashController::LashController(lash_args_t* args)
-: m_client(NULL)
+: _client(NULL)
{
- m_client = lash_init(args, PACKAGE_NAME,
+ _client = lash_init(args, PACKAGE_NAME,
/*LASH_Config_Data_Set|*/LASH_Config_File, LASH_PROTOCOL(2, 0));
- if (m_client == NULL) {
+ if (_client == NULL) {
cerr << "[LashController] Failed to connect to LASH. Session management will not function." << endl;
} else {
cout << "[LashController] Lash initialised" << endl;
@@ -43,15 +43,15 @@ LashController::LashController(lash_args_t* args)
lash_event_t* event = lash_event_new_with_type(LASH_Client_Name);
lash_event_set_string(event, "Ingenuity");
- lash_send_event(m_client, event);
+ lash_send_event(_client, event);
}
LashController::~LashController()
{
- if (m_client != NULL) {
+ if (_client != NULL) {
lash_event_t* quit_event = lash_event_new_with_type(LASH_Quit);
- lash_send_event(m_client, quit_event);
+ lash_send_event(_client, quit_event);
}
}
@@ -59,19 +59,19 @@ LashController::~LashController()
void
LashController::process_events()
{
- assert(m_client != NULL);
+ assert(_client != NULL);
lash_event_t* ev = NULL;
lash_config_t* conf = NULL;
// Process events
- while ((ev = lash_get_event(m_client)) != NULL) {
+ while ((ev = lash_get_event(_client)) != NULL) {
handle_event(ev);
lash_event_destroy(ev);
}
// Process configs
- while ((conf = lash_get_config(m_client)) != NULL) {
+ while ((conf = lash_get_config(_client)) != NULL) {
handle_config(conf);
lash_config_destroy(conf);
}
@@ -90,23 +90,23 @@ LashController::handle_event(lash_event_t* ev)
if (type == LASH_Save_File) {
cout << "[LashController] LASH Save File - " << str << endl;
save(str);
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_File));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_File));
} else if (type == LASH_Restore_File) {
cout << "[LashController] LASH Restore File - " << str << endl;
cerr << "LASH RESTORE NOT YET (RE)IMPLEMENTED." << endl;
/*_controller->load_session_blocking(str + "/session");
_controller->lash_restore_finished();
- lash_send_event(m_client, lash_event_new_with_type(LASH_Restore_File));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Restore_File));
*/
/*} else if (type == LASH_Save_Data_Set) {
//cout << "[LashController] LASH Save Data Set - " << endl;
// Tell LASH we're done
- lash_send_event(m_client, lash_event_new_with_type(LASH_Save_Data_Set));
+ lash_send_event(_client, lash_event_new_with_type(LASH_Save_Data_Set));
*/
} else if (type == LASH_Quit) {
cout << "[LashController] LASH Quit" << endl;
- m_client = NULL;
+ _client = NULL;
App::instance().quit();
} else {
cerr << "[LashController] Unhandled LASH event, type: " << static_cast<int>(type) << endl;
@@ -139,15 +139,15 @@ LashController::save(const string& dir)
// Save every patch under dir with it's path as a filename
// (so the dir structure will resemble the patch heirarchy)
- for (map<string,PatchController*>::iterator i = m_app->patches().begin();
- i != m_app->patches().end(); ++i) {
+ for (map<string,PatchController*>::iterator i = _app->patches().begin();
+ i != _app->patches().end(); ++i) {
pc = (*i).second;
pc->model()->filename(dir + pc->model()->path() + ".om");
}
// Create directories
- for (map<string,PatchController*>::iterator i = m_app->patches().begin();
- i != m_app->patches().end(); ++i) {
+ for (map<string,PatchController*>::iterator i = _app->patches().begin();
+ i != _app->patches().end(); ++i) {
pc = (*i).second;
if (pc->model()->parent() != NULL) {
string path = Path::parent(pc->model()->path()).substr(1) + "/";
diff --git a/src/progs/ingenuity/LashController.h b/src/progs/ingenuity/LashController.h
index 0619f32f..21ab5384 100644
--- a/src/progs/ingenuity/LashController.h
+++ b/src/progs/ingenuity/LashController.h
@@ -35,13 +35,13 @@ public:
LashController(lash_args_t* args);
~LashController();
- bool enabled() { return lash_enabled(m_client); }
+ bool enabled() { return lash_enabled(_client); }
void process_events();
private:
void save(const string& dir);
- lash_client_t* m_client;
+ lash_client_t* _client;
void handle_event(lash_event_t* conf);
void handle_config(lash_config_t* conf);
diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/progs/ingenuity/LoadPatchWindow.cpp
index 0588c6b1..b3ef4e45 100644
--- a/src/progs/ingenuity/LoadPatchWindow.cpp
+++ b/src/progs/ingenuity/LoadPatchWindow.cpp
@@ -31,22 +31,22 @@ namespace Ingenuity {
LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::FileChooserDialog(cobject),
- m_replace(true)
+ _replace(true)
{
- xml->get_widget("load_patch_poly_from_current_radio", m_poly_from_current_radio);
- xml->get_widget("load_patch_poly_from_file_radio", m_poly_from_file_radio);
- xml->get_widget("load_patch_poly_from_user_radio", m_poly_from_user_radio);
- xml->get_widget("load_patch_poly_spinbutton", m_poly_spinbutton);
- xml->get_widget("load_patch_ok_button", m_ok_button);
- xml->get_widget("load_patch_cancel_button", m_cancel_button);
+ xml->get_widget("load_patch_poly_from_current_radio", _poly_from_current_radio);
+ xml->get_widget("load_patch_poly_from_file_radio", _poly_from_file_radio);
+ xml->get_widget("load_patch_poly_from_user_radio", _poly_from_user_radio);
+ xml->get_widget("load_patch_poly_spinbutton", _poly_spinbutton);
+ xml->get_widget("load_patch_ok_button", _ok_button);
+ xml->get_widget("load_patch_cancel_button", _cancel_button);
- m_poly_from_current_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
- m_poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
- m_poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_user_selected));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::ok_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::cancel_clicked));
+ _poly_from_current_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
+ _poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
+ _poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadPatchWindow::poly_from_user_selected));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadPatchWindow::cancel_clicked));
- m_poly_from_current_radio->set_active(true);
+ _poly_from_current_radio->set_active(true);
Gtk::FileFilter filt;
filt.add_pattern("*.om");
@@ -68,7 +68,7 @@ void
LoadPatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -80,7 +80,7 @@ LoadPatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
LoadPatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
}
@@ -99,14 +99,14 @@ LoadPatchWindow::on_show()
void
LoadPatchWindow::poly_from_file_selected()
{
- m_poly_spinbutton->property_sensitive() = false;
+ _poly_spinbutton->property_sensitive() = false;
}
void
LoadPatchWindow::poly_from_user_selected()
{
- m_poly_spinbutton->property_sensitive() = true;
+ _poly_spinbutton->property_sensitive() = true;
}
@@ -117,14 +117,14 @@ LoadPatchWindow::ok_clicked()
optional<const string&> name;
optional<size_t> poly;
- if (m_poly_from_user_radio->get_active())
- poly = m_poly_spinbutton->get_value_as_int();
+ if (_poly_from_user_radio->get_active())
+ poly = _poly_spinbutton->get_value_as_int();
- if (m_replace)
- App::instance().engine()->clear_patch(m_patch->path());
+ if (_replace)
+ App::instance().engine()->clear_patch(_patch->path());
App::instance().loader()->load_patch(true, get_filename(), "/",
- m_initial_data, m_patch->parent()->path(), name, poly);
+ _initial_data, _patch->parent()->path(), name, poly);
hide();
}
diff --git a/src/progs/ingenuity/LoadPatchWindow.h b/src/progs/ingenuity/LoadPatchWindow.h
index a1bc228f..113c2a94 100644
--- a/src/progs/ingenuity/LoadPatchWindow.h
+++ b/src/progs/ingenuity/LoadPatchWindow.h
@@ -46,8 +46,8 @@ public:
void set_patch(SharedPtr<PatchModel> patch);
- void set_replace() { m_replace = true; }
- void set_merge() { m_replace = false; }
+ void set_replace() { _replace = true; }
+ void set_merge() { _replace = false; }
void present(SharedPtr<PatchModel> patch, MetadataMap data);
@@ -60,17 +60,17 @@ private:
void ok_clicked();
void cancel_clicked();
- MetadataMap m_initial_data;
+ MetadataMap _initial_data;
- SharedPtr<PatchModel> m_patch;
- bool m_replace;
+ SharedPtr<PatchModel> _patch;
+ bool _replace;
- Gtk::RadioButton* m_poly_from_current_radio;
- Gtk::RadioButton* m_poly_from_file_radio;
- Gtk::RadioButton* m_poly_from_user_radio;
- Gtk::SpinButton* m_poly_spinbutton;
- Gtk::Button* m_ok_button;
- Gtk::Button* m_cancel_button;
+ Gtk::RadioButton* _poly_from_current_radio;
+ Gtk::RadioButton* _poly_from_file_radio;
+ Gtk::RadioButton* _poly_from_user_radio;
+ Gtk::SpinButton* _poly_spinbutton;
+ Gtk::Button* _ok_button;
+ Gtk::Button* _cancel_button;
};
diff --git a/src/progs/ingenuity/LoadPluginWindow.cpp b/src/progs/ingenuity/LoadPluginWindow.cpp
index c5a51d4d..9965470c 100644
--- a/src/progs/ingenuity/LoadPluginWindow.cpp
+++ b/src/progs/ingenuity/LoadPluginWindow.cpp
@@ -34,70 +34,70 @@ namespace Ingenuity {
LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_has_shown(false),
- m_plugin_name_offset(0)
+ _has_shown(false),
+ _plugin_name_offset(0)
{
- xml->get_widget("load_plugin_plugins_treeview", m_plugins_treeview);
- xml->get_widget("load_plugin_polyphonic_checkbutton", m_polyphonic_checkbutton);
- xml->get_widget("load_plugin_name_entry", m_node_name_entry);
- xml->get_widget("load_plugin_clear_button", m_clear_button);
- xml->get_widget("load_plugin_add_button", m_add_button);
- //xml->get_widget("load_plugin_close_button", m_close_button);
- //xml->get_widget("load_plugin_ok_button", m_add_button);
+ xml->get_widget("load_plugin_plugins_treeview", _plugins_treeview);
+ xml->get_widget("load_plugin_polyphonic_checkbutton", _polyphonic_checkbutton);
+ xml->get_widget("load_plugin_name_entry", _node_name_entry);
+ xml->get_widget("load_plugin_clear_button", _clear_button);
+ xml->get_widget("load_plugin_add_button", _add_button);
+ //xml->get_widget("load_plugin_close_button", _close_button);
+ //xml->get_widget("load_plugin_ok_button", _add_button);
- xml->get_widget("load_plugin_filter_combo", m_filter_combo);
- xml->get_widget("load_plugin_search_entry", m_search_entry);
+ xml->get_widget("load_plugin_filter_combo", _filter_combo);
+ xml->get_widget("load_plugin_search_entry", _search_entry);
// Set up the plugins list
- m_plugins_liststore = Gtk::ListStore::create(m_plugins_columns);
- m_plugins_treeview->set_model(m_plugins_liststore);
- m_plugins_treeview->append_column("Name", m_plugins_columns.m_col_name);
- m_plugins_treeview->append_column("Type", m_plugins_columns.m_col_type);
- m_plugins_treeview->append_column("URI", m_plugins_columns.m_col_uri);
- //m_plugins_treeview->append_column("Library", m_plugins_columns.m_col_library);
- //m_plugins_treeview->append_column("Label", m_plugins_columns.m_col_label);
+ _plugins_liststore = Gtk::ListStore::create(_plugins_columns);
+ _plugins_treeview->set_model(_plugins_liststore);
+ _plugins_treeview->append_column("Name", _plugins_columns._col_name);
+ _plugins_treeview->append_column("Type", _plugins_columns._col_type);
+ _plugins_treeview->append_column("URI", _plugins_columns._col_uri);
+ //m_plugins_treeview->append_column("Library", _plugins_columns._col_library);
+ //m_plugins_treeview->append_column("Label", _plugins_columns._col_label);
// This could be nicer.. store the TreeViewColumns locally maybe?
- m_plugins_treeview->get_column(0)->set_sort_column(m_plugins_columns.m_col_name);
- m_plugins_treeview->get_column(1)->set_sort_column(m_plugins_columns.m_col_type);
- m_plugins_treeview->get_column(2)->set_sort_column(m_plugins_columns.m_col_uri);
- //m_plugins_treeview->get_column(3)->set_sort_column(m_plugins_columns.m_col_library);
- //m_plugins_treeview->get_column(4)->set_sort_column(m_plugins_columns.m_col_label);
+ _plugins_treeview->get_column(0)->set_sort_column(_plugins_columns._col_name);
+ _plugins_treeview->get_column(1)->set_sort_column(_plugins_columns._col_type);
+ _plugins_treeview->get_column(2)->set_sort_column(_plugins_columns._col_uri);
+ //m_plugins_treeview->get_column(3)->set_sort_column(_plugins_columns._col_library);
+ //m_plugins_treeview->get_column(4)->set_sort_column(_plugins_columns._col_label);
for (int i=0; i < 3; ++i)
- m_plugins_treeview->get_column(i)->set_resizable(true);
+ _plugins_treeview->get_column(i)->set_resizable(true);
// Set up the search criteria combobox
- m_criteria_liststore = Gtk::ListStore::create(m_criteria_columns);
- m_filter_combo->set_model(m_criteria_liststore);
- Gtk::TreeModel::iterator iter = m_criteria_liststore->append();
+ _criteria_liststore = Gtk::ListStore::create(_criteria_columns);
+ _filter_combo->set_model(_criteria_liststore);
+ Gtk::TreeModel::iterator iter = _criteria_liststore->append();
Gtk::TreeModel::Row row = *iter;
- row[m_criteria_columns.m_col_label] = "Name contains";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::NAME;
- m_filter_combo->set_active(iter);
- iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "Type contains";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::TYPE;
- iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "URI contains";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::URI;
- /*iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "Library contains: ";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::LIBRARY;
- iter = m_criteria_liststore->append(); row = *iter;
- row[m_criteria_columns.m_col_label] = "Label contains: ";
- row[m_criteria_columns.m_col_criteria] = CriteriaColumns::LABEL;*/
-
- m_clear_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::clear_clicked));
- m_add_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
+ row[_criteria_columns._col_label] = "Name contains";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::NAME;
+ _filter_combo->set_active(iter);
+ iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "Type contains";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::TYPE;
+ iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "URI contains";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::URI;
+ /*iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "Library contains: ";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::LIBRARY;
+ iter = _criteria_liststore->append(); row = *iter;
+ row[_criteria_columns._col_label] = "Label contains: ";
+ row[_criteria_columns._col_criteria] = CriteriaColumns::LABEL;*/
+
+ _clear_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::clear_clicked));
+ _add_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
//m_close_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::close_clicked));
//m_add_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPluginWindow::ok_clicked));
- m_plugins_treeview->signal_row_activated().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_activated));
- m_search_entry->signal_activate().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
- m_search_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::filter_changed));
- m_node_name_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::name_changed));
+ _plugins_treeview->signal_row_activated().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_activated));
+ _search_entry->signal_activate().connect( sigc::mem_fun(this, &LoadPluginWindow::add_clicked));
+ _search_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::filter_changed));
+ _node_name_entry->signal_changed().connect( sigc::mem_fun(this, &LoadPluginWindow::name_changed));
- m_selection = m_plugins_treeview->get_selection();
- m_selection->signal_changed().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_selection_changed));
+ _selection = _plugins_treeview->get_selection();
+ _selection->signal_changed().connect(sigc::mem_fun(this, &LoadPluginWindow::plugin_selection_changed));
//m_add_button->grab_default();
}
@@ -107,7 +107,7 @@ void
LoadPluginWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -118,19 +118,19 @@ LoadPluginWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
LoadPluginWindow::name_changed()
{
- string name = m_node_name_entry->get_text();
+ string name = _node_name_entry->get_text();
if (!Path::is_valid_name(name)) {
//m_message_label->set_text("Name contains invalid characters.");
- m_add_button->property_sensitive() = false;
- } else if (m_patch->get_node(name)) {
+ _add_button->property_sensitive() = false;
+ } else if (_patch->get_node(name)) {
//m_message_label->set_text("An object already exists with that name.");
- m_add_button->property_sensitive() = false;
+ _add_button->property_sensitive() = false;
} else if (name.length() == 0) {
//m_message_label->set_text("");
- m_add_button->property_sensitive() = false;
+ _add_button->property_sensitive() = false;
} else {
//m_message_label->set_text("");
- m_add_button->property_sensitive() = true;
+ _add_button->property_sensitive() = true;
}
}
@@ -142,12 +142,12 @@ LoadPluginWindow::name_changed()
void
LoadPluginWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
if (patch->poly() <= 1)
- m_polyphonic_checkbutton->property_sensitive() = false;
+ _polyphonic_checkbutton->property_sensitive() = false;
else
- m_polyphonic_checkbutton->property_sensitive() = true;
+ _polyphonic_checkbutton->property_sensitive() = true;
}
@@ -162,20 +162,20 @@ LoadPluginWindow::set_patch(SharedPtr<PatchModel> patch)
void
LoadPluginWindow::on_show()
{
- if (!m_has_shown) {
+ if (!_has_shown) {
set_plugin_list(App::instance().store()->plugins());
// Center on patch window
- /*int m_w, m_h;
- get_size(m_w, m_h);
+ /*int _w, _h;
+ get_size(_w, _h);
int parent_x, parent_y, parent_w, parent_h;
- m_patch_controller->window()->get_position(parent_x, parent_y);
- m_patch_controller->window()->get_size(parent_w, parent_h);
+ _patch_controller->window()->get_position(parent_x, parent_y);
+ _patch_controller->window()->get_size(parent_w, parent_h);
- move(parent_x + parent_w/2 - m_w/2, parent_y + parent_h/2 - m_h/2);
+ move(parent_x + parent_w/2 - _w/2, parent_y + parent_h/2 - _h/2);
*/
- m_has_shown = true;
+ _has_shown = true;
}
Gtk::Window::on_show();
}
@@ -184,40 +184,40 @@ LoadPluginWindow::on_show()
void
LoadPluginWindow::set_plugin_list(const std::map<string, SharedPtr<PluginModel> >& m)
{
- m_plugins_liststore->clear();
+ _plugins_liststore->clear();
for (std::map<string, SharedPtr<PluginModel> >::const_iterator i = m.begin(); i != m.end(); ++i) {
SharedPtr<PluginModel> plugin = (*i).second;
- Gtk::TreeModel::iterator iter = m_plugins_liststore->append();
+ Gtk::TreeModel::iterator iter = _plugins_liststore->append();
Gtk::TreeModel::Row row = *iter;
- row[m_plugins_columns.m_col_name] = plugin->name();
- //row[m_plugins_columns.m_col_label] = plugin->plug_label();
- row[m_plugins_columns.m_col_type] = plugin->type_uri();
- row[m_plugins_columns.m_col_uri] = plugin->uri();
- row[m_plugins_columns.m_col_label] = plugin->name();
- //row[m_plugins_columns.m_col_library] = plugin->lib_name();
- row[m_plugins_columns.m_col_plugin_model] = plugin;
+ row[_plugins_columns._col_name] = plugin->name();
+ //row[_plugins_columns._col_label] = plugin->plug_label();
+ row[_plugins_columns._col_type] = plugin->type_uri();
+ row[_plugins_columns._col_uri] = plugin->uri();
+ row[_plugins_columns._col_label] = plugin->name();
+ //row[_plugins_columns._col_library] = plugin->lib_name();
+ row[_plugins_columns._col_plugin_model] = plugin;
}
- m_plugins_treeview->columns_autosize();
+ _plugins_treeview->columns_autosize();
}
void
LoadPluginWindow::add_plugin(SharedPtr<PluginModel> plugin)
{
- Gtk::TreeModel::iterator iter = m_plugins_liststore->append();
+ Gtk::TreeModel::iterator iter = _plugins_liststore->append();
Gtk::TreeModel::Row row = *iter;
- row[m_plugins_columns.m_col_name] = plugin->name();
- //row[m_plugins_columns.m_col_label] = plugin->plug_label();
- row[m_plugins_columns.m_col_type] = plugin->type_uri();
- row[m_plugins_columns.m_col_uri] = plugin->uri();
- row[m_plugins_columns.m_col_label] = plugin->name();
- //row[m_plugins_columns.m_col_library] = plugin->lib_name();
- row[m_plugins_columns.m_col_plugin_model] = plugin;
+ row[_plugins_columns._col_name] = plugin->name();
+ //row[_plugins_columns._col_label] = plugin->plug_label();
+ row[_plugins_columns._col_type] = plugin->type_uri();
+ row[_plugins_columns._col_uri] = plugin->uri();
+ row[_plugins_columns._col_label] = plugin->name();
+ //row[_plugins_columns._col_library] = plugin->lib_name();
+ row[_plugins_columns._col_plugin_model] = plugin;
}
@@ -235,13 +235,13 @@ LoadPluginWindow::plugin_activated(const Gtk::TreeModel::Path& path, Gtk::TreeVi
void
LoadPluginWindow::plugin_selection_changed()
{
- m_plugin_name_offset = 0;
+ _plugin_name_offset = 0;
- m_node_name_entry->set_text(generate_module_name());
+ _node_name_entry->set_text(generate_module_name());
- //Gtk::TreeModel::iterator iter = m_selection->get_selected();
+ //Gtk::TreeModel::iterator iter = _selection->get_selected();
//Gtk::TreeModel::Row row = *iter;
- //const PluginModel* plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
+ //const PluginModel* plugin = row.get_value(_plugins_columns._col_plugin_model);
}
@@ -256,11 +256,11 @@ LoadPluginWindow::generate_module_name(int offset)
{
string name = "";
- Gtk::TreeModel::iterator iter = m_selection->get_selected();
+ Gtk::TreeModel::iterator iter = _selection->get_selected();
if (iter) {
Gtk::TreeModel::Row row = *iter;
- SharedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
+ SharedPtr<PluginModel> plugin = row.get_value(_plugins_columns._col_plugin_model);
char num_buf[3];
for (uint i=0; i < 99; ++i) {
name = plugin->default_node_name();
@@ -271,7 +271,7 @@ LoadPluginWindow::generate_module_name(int offset)
name += "_";
name += num_buf;
}
- if (!m_patch->get_node(name))
+ if (!_patch->get_node(name))
break;
else
name = "";
@@ -285,13 +285,13 @@ LoadPluginWindow::generate_module_name(int offset)
void
LoadPluginWindow::add_clicked()
{
- Gtk::TreeModel::iterator iter = m_selection->get_selected();
- bool polyphonic = m_polyphonic_checkbutton->get_active();
+ Gtk::TreeModel::iterator iter = _selection->get_selected();
+ bool polyphonic = _polyphonic_checkbutton->get_active();
if (iter) { // If anything is selected
Gtk::TreeModel::Row row = *iter;
- SharedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
- string name = m_node_name_entry->get_text();
+ SharedPtr<PluginModel> plugin = row.get_value(_plugins_columns._col_plugin_model);
+ string name = _node_name_entry->get_text();
if (name == "") {
name = generate_module_name();
}
@@ -302,10 +302,10 @@ LoadPluginWindow::add_clicked()
dialog.run();
} else {
- Path path = m_patch->path().base() + Path::nameify(name);
- App::instance().engine()->create_node_with_data(plugin->uri(), path, polyphonic, m_initial_data);
- ++m_plugin_name_offset;
- m_node_name_entry->set_text(generate_module_name(m_plugin_name_offset));
+ Path path = _patch->path().base() + Path::nameify(name);
+ App::instance().engine()->create_node_with_data(plugin->uri(), path, polyphonic, _initial_data);
+ ++_plugin_name_offset;
+ _node_name_entry->set_text(generate_module_name(_plugin_name_offset));
// Set the next module location 20 over, for a cascade effect
cerr << "FIXME: cascade\n";
@@ -335,14 +335,14 @@ LoadPluginWindow::ok_clicked()
void
LoadPluginWindow::filter_changed()
{
- m_plugins_liststore->clear();
+ _plugins_liststore->clear();
- string search = m_search_entry->get_text();
+ string search = _search_entry->get_text();
transform(search.begin(), search.end(), search.begin(), toupper);
// Get selected criteria
- const Gtk::TreeModel::Row row = *(m_filter_combo->get_active());
- CriteriaColumns::Criteria criteria = row[m_criteria_columns.m_col_criteria];
+ const Gtk::TreeModel::Row row = *(_filter_combo->get_active());
+ CriteriaColumns::Criteria criteria = row[_criteria_columns._col_criteria];
string field;
@@ -374,22 +374,22 @@ LoadPluginWindow::filter_changed()
transform(field.begin(), field.end(), field.begin(), toupper);
if (field.find(search) != string::npos) {
- model_iter = m_plugins_liststore->append();
+ model_iter = _plugins_liststore->append();
model_row = *model_iter;
- model_row[m_plugins_columns.m_col_name] = plugin->name();
- //model_row[m_plugins_columns.m_col_label] = plugin->plug_label();
- model_row[m_plugins_columns.m_col_type] = plugin->type_uri();
- model_row[m_plugins_columns.m_col_uri] = plugin->uri();
- model_row[m_plugins_columns.m_col_plugin_model] = plugin;
+ model_row[_plugins_columns._col_name] = plugin->name();
+ //model_row[_plugins_columns._col_label] = plugin->plug_label();
+ model_row[_plugins_columns._col_type] = plugin->type_uri();
+ model_row[_plugins_columns._col_uri] = plugin->uri();
+ model_row[_plugins_columns._col_plugin_model] = plugin;
++num_visible;
}
}
if (num_visible == 1) {
- m_selection->unselect_all();
- m_selection->select(model_iter);
+ _selection->unselect_all();
+ _selection->select(model_iter);
}
}
@@ -397,7 +397,7 @@ LoadPluginWindow::filter_changed()
void
LoadPluginWindow::clear_clicked()
{
- m_search_entry->set_text("");
+ _search_entry->set_text("");
set_plugin_list(App::instance().store()->plugins());
}
diff --git a/src/progs/ingenuity/LoadPluginWindow.h b/src/progs/ingenuity/LoadPluginWindow.h
index ec416f15..8e2d6460 100644
--- a/src/progs/ingenuity/LoadPluginWindow.h
+++ b/src/progs/ingenuity/LoadPluginWindow.h
@@ -42,22 +42,22 @@ class ModelColumns : public Gtk::TreeModel::ColumnRecord
{
public:
ModelColumns() {
- add(m_col_name);
- add(m_col_type);
- add(m_col_uri);
- add(m_col_label);
- //add(m_col_library);
- //add(m_col_label);
- add(m_col_plugin_model);
+ add(_col_name);
+ add(_col_type);
+ add(_col_uri);
+ add(_col_label);
+ //add(_col_library);
+ //add(_col_label);
+ add(_col_plugin_model);
}
- Gtk::TreeModelColumn<Glib::ustring> m_col_name;
- Gtk::TreeModelColumn<Glib::ustring> m_col_type;
- Gtk::TreeModelColumn<Glib::ustring> m_col_uri;
+ Gtk::TreeModelColumn<Glib::ustring> _col_name;
+ Gtk::TreeModelColumn<Glib::ustring> _col_type;
+ Gtk::TreeModelColumn<Glib::ustring> _col_uri;
// Not displayed:
- Gtk::TreeModelColumn<Glib::ustring> m_col_label;
- Gtk::TreeModelColumn<SharedPtr<PluginModel> > m_col_plugin_model;
+ Gtk::TreeModelColumn<Glib::ustring> _col_label;
+ Gtk::TreeModelColumn<SharedPtr<PluginModel> > _col_plugin_model;
};
@@ -70,10 +70,10 @@ class CriteriaColumns : public Gtk::TreeModel::ColumnRecord
public:
enum Criteria { NAME, TYPE, URI, };
- CriteriaColumns() { add(m_col_label); add(m_col_criteria); }
+ CriteriaColumns() { add(_col_label); add(_col_criteria); }
- Gtk::TreeModelColumn<Glib::ustring> m_col_label;
- Gtk::TreeModelColumn<Criteria> m_col_criteria;
+ Gtk::TreeModelColumn<Glib::ustring> _col_label;
+ Gtk::TreeModelColumn<Criteria> _col_criteria;
};
@@ -92,7 +92,7 @@ public:
void set_plugin_list(const std::map<string, SharedPtr<PluginModel> >& m);
void add_plugin(SharedPtr<PluginModel> plugin);
- bool has_shown() const { return m_has_shown; }
+ bool has_shown() const { return _has_shown; }
void present(SharedPtr<PatchModel> patch, MetadataMap data);
@@ -112,31 +112,31 @@ private:
void plugin_selection_changed();
string generate_module_name(int offset = 0);
- MetadataMap m_initial_data;
+ MetadataMap _initial_data;
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
- bool m_has_shown; // plugin list only populated on show to speed patch window creation
+ bool _has_shown; // plugin list only populated on show to speed patch window creation
- Glib::RefPtr<Gtk::ListStore> m_plugins_liststore;
- ModelColumns m_plugins_columns;
+ Glib::RefPtr<Gtk::ListStore> _plugins_liststore;
+ ModelColumns _plugins_columns;
- Glib::RefPtr<Gtk::ListStore> m_criteria_liststore;
- CriteriaColumns m_criteria_columns;
+ Glib::RefPtr<Gtk::ListStore> _criteria_liststore;
+ CriteriaColumns _criteria_columns;
- Glib::RefPtr<Gtk::TreeSelection> m_selection;
+ Glib::RefPtr<Gtk::TreeSelection> _selection;
- int m_plugin_name_offset; // see comments for generate_plugin_name
+ int _plugin_name_offset; // see comments for generate_plugin_name
- Gtk::TreeView* m_plugins_treeview;
- Gtk::CheckButton* m_polyphonic_checkbutton;
- Gtk::Entry* m_node_name_entry;
- Gtk::Button* m_clear_button;
- Gtk::Button* m_add_button;
- //Gtk::Button* m_close_button;
- //Gtk::Button* m_ok_button;
- Gtk::ComboBox* m_filter_combo;
- Gtk::Entry* m_search_entry;
+ Gtk::TreeView* _plugins_treeview;
+ Gtk::CheckButton* _polyphonic_checkbutton;
+ Gtk::Entry* _node_name_entry;
+ Gtk::Button* _clear_button;
+ Gtk::Button* _add_button;
+ //Gtk::Button* _close_button;
+ //Gtk::Button* _ok_button;
+ Gtk::ComboBox* _filter_combo;
+ Gtk::Entry* _search_entry;
};
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/progs/ingenuity/LoadSubpatchWindow.cpp
index 9255bcf1..4cbe92f5 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.cpp
+++ b/src/progs/ingenuity/LoadSubpatchWindow.cpp
@@ -34,23 +34,23 @@ namespace Ingenuity {
LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::FileChooserDialog(cobject)
{
- xml->get_widget("load_subpatch_name_from_file_radio", m_name_from_file_radio);
- xml->get_widget("load_subpatch_name_from_user_radio", m_name_from_user_radio);
- xml->get_widget("load_subpatch_name_entry", m_name_entry);
- xml->get_widget("load_subpatch_poly_from_file_radio", m_poly_from_file_radio);
- xml->get_widget("load_subpatch_poly_from_parent_radio", m_poly_from_parent_radio);
- xml->get_widget("load_subpatch_poly_from_user_radio", m_poly_from_user_radio);
- xml->get_widget("load_subpatch_poly_spinbutton", m_poly_spinbutton);
- xml->get_widget("load_subpatch_ok_button", m_ok_button);
- xml->get_widget("load_subpatch_cancel_button", m_cancel_button);
-
- m_name_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_name_entry));
- m_name_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_name_entry));
- m_poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
- m_poly_from_parent_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
- m_poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_poly_spinner));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::ok_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::cancel_clicked));
+ xml->get_widget("load_subpatch_name_from_file_radio", _name_from_file_radio);
+ xml->get_widget("load_subpatch_name_from_user_radio", _name_from_user_radio);
+ xml->get_widget("load_subpatch_name_entry", _name_entry);
+ xml->get_widget("load_subpatch_poly_from_file_radio", _poly_from_file_radio);
+ xml->get_widget("load_subpatch_poly_from_parent_radio", _poly_from_parent_radio);
+ xml->get_widget("load_subpatch_poly_from_user_radio", _poly_from_user_radio);
+ xml->get_widget("load_subpatch_poly_spinbutton", _poly_spinbutton);
+ xml->get_widget("load_subpatch_ok_button", _ok_button);
+ xml->get_widget("load_subpatch_cancel_button", _cancel_button);
+
+ _name_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_name_entry));
+ _name_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_name_entry));
+ _poly_from_file_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
+ _poly_from_parent_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::disable_poly_spinner));
+ _poly_from_user_radio->signal_toggled().connect(sigc::mem_fun(this, &LoadSubpatchWindow::enable_poly_spinner));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &LoadSubpatchWindow::cancel_clicked));
Gtk::FileFilter filt;
filt.add_pattern("*.om");
@@ -72,7 +72,7 @@ void
LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -84,13 +84,13 @@ LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
LoadSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
char temp_buf[4];
snprintf(temp_buf, 4, "%zd", patch->poly());
Glib::ustring txt = "Same as parent (";
txt.append(temp_buf).append(")");
- m_poly_from_parent_radio->set_label(txt);
+ _poly_from_parent_radio->set_label(txt);
}
@@ -110,53 +110,53 @@ LoadSubpatchWindow::on_show()
void
LoadSubpatchWindow::disable_name_entry()
{
- m_name_entry->property_sensitive() = false;
+ _name_entry->property_sensitive() = false;
}
void
LoadSubpatchWindow::enable_name_entry()
{
- m_name_entry->property_sensitive() = true;
+ _name_entry->property_sensitive() = true;
}
void
LoadSubpatchWindow::disable_poly_spinner()
{
- m_poly_spinbutton->property_sensitive() = false;
+ _poly_spinbutton->property_sensitive() = false;
}
void
LoadSubpatchWindow::enable_poly_spinner()
{
- m_poly_spinbutton->property_sensitive() = true;
+ _poly_spinbutton->property_sensitive() = true;
}
void
LoadSubpatchWindow::ok_clicked()
{
- assert(m_patch);
+ assert(_patch);
// If unset load_patch will load values
optional<const string&> name;
optional<size_t> poly;
string name_str = "";
- if (m_name_from_user_radio->get_active()) {
- name_str = m_name_entry->get_text();
+ if (_name_from_user_radio->get_active()) {
+ name_str = _name_entry->get_text();
name = name_str;
}
- if (m_poly_from_user_radio->get_active())
- poly = m_poly_spinbutton->get_value_as_int();
- else if (m_poly_from_parent_radio->get_active())
- poly = m_patch->poly();
+ if (_poly_from_user_radio->get_active())
+ poly = _poly_spinbutton->get_value_as_int();
+ else if (_poly_from_parent_radio->get_active())
+ poly = _patch->poly();
App::instance().loader()->load_patch(false, get_filename(), "/",
- m_initial_data, m_patch->path(), name, poly);
+ _initial_data, _patch->path(), name, poly);
hide();
}
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.h b/src/progs/ingenuity/LoadSubpatchWindow.h
index db178091..ba4f60a9 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.h
+++ b/src/progs/ingenuity/LoadSubpatchWindow.h
@@ -55,19 +55,19 @@ private:
void ok_clicked();
void cancel_clicked();
- MetadataMap m_initial_data;
+ MetadataMap _initial_data;
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
- Gtk::RadioButton* m_name_from_file_radio;
- Gtk::RadioButton* m_name_from_user_radio;
- Gtk::Entry* m_name_entry;
- Gtk::RadioButton* m_poly_from_file_radio;
- Gtk::RadioButton* m_poly_from_parent_radio;
- Gtk::RadioButton* m_poly_from_user_radio;
- Gtk::SpinButton* m_poly_spinbutton;
- Gtk::Button* m_ok_button;
- Gtk::Button* m_cancel_button;
+ Gtk::RadioButton* _name_from_file_radio;
+ Gtk::RadioButton* _name_from_user_radio;
+ Gtk::Entry* _name_entry;
+ Gtk::RadioButton* _poly_from_file_radio;
+ Gtk::RadioButton* _poly_from_parent_radio;
+ Gtk::RadioButton* _poly_from_user_radio;
+ Gtk::SpinButton* _poly_spinbutton;
+ Gtk::Button* _ok_button;
+ Gtk::Button* _cancel_button;
};
diff --git a/src/progs/ingenuity/MessagesWindow.cpp b/src/progs/ingenuity/MessagesWindow.cpp
index 002fb814..8da6e53e 100644
--- a/src/progs/ingenuity/MessagesWindow.cpp
+++ b/src/progs/ingenuity/MessagesWindow.cpp
@@ -24,24 +24,24 @@ using std::string;
MessagesWindow::MessagesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("messages_textview", m_textview);
- glade_xml->get_widget("messages_clear_button", m_clear_button);
- glade_xml->get_widget("messages_close_button", m_close_button);
+ glade_xml->get_widget("messages_textview", _textview);
+ glade_xml->get_widget("messages_clear_button", _clear_button);
+ glade_xml->get_widget("messages_close_button", _close_button);
- m_clear_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::clear_clicked));
- m_close_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::close_clicked));
+ _clear_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::clear_clicked));
+ _close_button->signal_clicked().connect(sigc::mem_fun(this, &MessagesWindow::close_clicked));
}
void
MessagesWindow::post(const string& msg)
{
- Glib::RefPtr<Gtk::TextBuffer> text_buf = m_textview->get_buffer();
+ Glib::RefPtr<Gtk::TextBuffer> text_buf = _textview->get_buffer();
text_buf->insert(text_buf->end(), msg);
text_buf->insert(text_buf->end(), "\n");
- if (!m_clear_button->is_sensitive())
- m_clear_button->set_sensitive(true);
+ if (!_clear_button->is_sensitive())
+ _clear_button->set_sensitive(true);
}
@@ -55,9 +55,9 @@ MessagesWindow::close_clicked()
void
MessagesWindow::clear_clicked()
{
- Glib::RefPtr<Gtk::TextBuffer> text_buf = m_textview->get_buffer();
+ Glib::RefPtr<Gtk::TextBuffer> text_buf = _textview->get_buffer();
text_buf->erase(text_buf->begin(), text_buf->end());
- m_clear_button->set_sensitive(false);
+ _clear_button->set_sensitive(false);
}
diff --git a/src/progs/ingenuity/MessagesWindow.h b/src/progs/ingenuity/MessagesWindow.h
index e9d836f3..50da2d9e 100644
--- a/src/progs/ingenuity/MessagesWindow.h
+++ b/src/progs/ingenuity/MessagesWindow.h
@@ -44,9 +44,9 @@ private:
void clear_clicked();
void close_clicked();
- Gtk::TextView* m_textview;
- Gtk::Button* m_clear_button;
- Gtk::Button* m_close_button;
+ Gtk::TextView* _textview;
+ Gtk::Button* _clear_button;
+ Gtk::Button* _close_button;
};
diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp
index ae609744..2b13e39e 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.cpp
+++ b/src/progs/ingenuity/NewSubpatchWindow.cpp
@@ -27,24 +27,24 @@ namespace Ingenuity {
NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject)
{
- xml->get_widget("new_subpatch_name_entry", m_name_entry);
- xml->get_widget("new_subpatch_message_label", m_message_label);
- xml->get_widget("new_subpatch_polyphony_spinbutton", m_poly_spinbutton);
- xml->get_widget("new_subpatch_ok_button", m_ok_button);
- xml->get_widget("new_subpatch_cancel_button", m_cancel_button);
-
- m_name_entry->signal_changed().connect(sigc::mem_fun(this, &NewSubpatchWindow::name_changed));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::ok_clicked));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::cancel_clicked));
+ xml->get_widget("new_subpatch_name_entry", _name_entry);
+ xml->get_widget("new_subpatch_message_label", _message_label);
+ xml->get_widget("new_subpatch_polyphony_spinbutton", _poly_spinbutton);
+ xml->get_widget("new_subpatch_ok_button", _ok_button);
+ xml->get_widget("new_subpatch_cancel_button", _cancel_button);
+
+ _name_entry->signal_changed().connect(sigc::mem_fun(this, &NewSubpatchWindow::name_changed));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::cancel_clicked));
- m_ok_button->property_sensitive() = false;
+ _ok_button->property_sensitive() = false;
}
void
NewSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
- m_initial_data = data;
+ _initial_data = data;
Gtk::Window::present();
}
@@ -55,7 +55,7 @@ NewSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
void
NewSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
- m_patch = patch;
+ _patch = patch;
}
@@ -65,19 +65,19 @@ NewSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
void
NewSubpatchWindow::name_changed()
{
- string name = m_name_entry->get_text();
+ string name = _name_entry->get_text();
if (!Path::is_valid_name(name)) {
- m_message_label->set_text("Name contains invalid characters.");
- m_ok_button->property_sensitive() = false;
- } else if (m_patch->get_node(name)) {
- m_message_label->set_text("An object already exists with that name.");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("Name contains invalid characters.");
+ _ok_button->property_sensitive() = false;
+ } else if (_patch->get_node(name)) {
+ _message_label->set_text("An object already exists with that name.");
+ _ok_button->property_sensitive() = false;
} else if (name.length() == 0) {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = false;
} else {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = true;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = true;
}
}
@@ -85,10 +85,10 @@ NewSubpatchWindow::name_changed()
void
NewSubpatchWindow::ok_clicked()
{
- const Path path = m_patch->path().base() + Path::nameify(m_name_entry->get_text());
- const size_t poly = m_poly_spinbutton->get_value_as_int();
+ const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
+ const size_t poly = _poly_spinbutton->get_value_as_int();
- App::instance().engine()->create_patch_with_data(path, poly, m_initial_data);
+ App::instance().engine()->create_patch_with_data(path, poly, _initial_data);
App::instance().engine()->enable_patch(path);
hide();
diff --git a/src/progs/ingenuity/NewSubpatchWindow.h b/src/progs/ingenuity/NewSubpatchWindow.h
index 031fa9fd..2208aafc 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.h
+++ b/src/progs/ingenuity/NewSubpatchWindow.h
@@ -48,14 +48,14 @@ private:
void ok_clicked();
void cancel_clicked();
- MetadataMap m_initial_data;
- SharedPtr<PatchModel> m_patch;
+ MetadataMap _initial_data;
+ SharedPtr<PatchModel> _patch;
- Gtk::Entry* m_name_entry;
- Gtk::Label* m_message_label;
- Gtk::SpinButton* m_poly_spinbutton;
- Gtk::Button* m_ok_button;
- Gtk::Button* m_cancel_button;
+ Gtk::Entry* _name_entry;
+ Gtk::Label* _message_label;
+ Gtk::SpinButton* _poly_spinbutton;
+ Gtk::Button* _ok_button;
+ Gtk::Button* _cancel_button;
};
diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/progs/ingenuity/NodeControlWindow.cpp
index 7ee62bc4..f9c3b835 100644
--- a/src/progs/ingenuity/NodeControlWindow.cpp
+++ b/src/progs/ingenuity/NodeControlWindow.cpp
@@ -32,65 +32,65 @@ namespace Ingenuity {
/** Create a node control window and load a new ControlPanel for it.
*/
NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, size_t poly)
-: m_node(node),
- m_position_stored(false),
- m_x(0), m_y(0)
+: _node(node),
+ _position_stored(false),
+ _x(0), _y(0)
{
- assert(m_node != NULL);
+ assert(_node != NULL);
property_resizable() = true;
set_border_width(5);
- set_title(m_node->path() + " Controls");
+ set_title(_node->path() + " Controls");
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("warehouse_win");
- xml->get_widget_derived("control_panel_vbox", m_control_panel);
- m_control_panel->reparent(*this);
+ xml->get_widget_derived("control_panel_vbox", _control_panel);
+ _control_panel->reparent(*this);
- m_control_panel->init(m_node, poly);
+ _control_panel->init(_node, poly);
show_all_children();
resize();
- m_callback_enabled = true;
+ _callback_enabled = true;
}
/** Create a node control window and with an existing ControlPanel.
*/
NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* panel)
-: m_node(node),
- m_control_panel(panel)
+: _node(node),
+ _control_panel(panel)
{
- assert(m_node);
+ assert(_node);
property_resizable() = true;
set_border_width(5);
- set_title(m_node->path() + " Controls");
+ set_title(_node->path() + " Controls");
- m_control_panel->reparent(*this);
+ _control_panel->reparent(*this);
show_all_children();
resize();
- m_callback_enabled = true;
+ _callback_enabled = true;
}
NodeControlWindow::~NodeControlWindow()
{
- delete m_control_panel;
+ delete _control_panel;
}
void
NodeControlWindow::resize()
{
- pair<int,int> controls_size = m_control_panel->ideal_size();
+ pair<int,int> controls_size = _control_panel->ideal_size();
/*int width = 400;
int height = controls_size.second
- + ((m_node->polyphonic()) ? 4 : 40);*/
+ + ((_node->polyphonic()) ? 4 : 40);*/
int width = controls_size.first;
int height = controls_size.second;
@@ -108,14 +108,14 @@ NodeControlWindow::resize()
void
NodeControlWindow::on_show()
{
- for (PortModelList::const_iterator i = m_node->ports().begin();
- i != m_node->ports().end(); ++i)
+ for (PortModelList::const_iterator i = _node->ports().begin();
+ i != _node->ports().end(); ++i)
if ((*i)->is_control() && (*i)->is_input())
App::instance().engine()->request_port_value((*i)->path());
- if (m_position_stored)
- move(m_x, m_y);
+ if (_position_stored)
+ move(_x, _y);
Gtk::Window::on_show();
}
@@ -124,8 +124,8 @@ NodeControlWindow::on_show()
void
NodeControlWindow::on_hide()
{
- m_position_stored = true;
- get_position(m_x, m_y);
+ _position_stored = true;
+ get_position(_x, _y);
Gtk::Window::on_hide();
}
diff --git a/src/progs/ingenuity/NodeControlWindow.h b/src/progs/ingenuity/NodeControlWindow.h
index f975f8c8..d496f230 100644
--- a/src/progs/ingenuity/NodeControlWindow.h
+++ b/src/progs/ingenuity/NodeControlWindow.h
@@ -47,9 +47,9 @@ public:
NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* panel);
virtual ~NodeControlWindow();
- SharedPtr<NodeModel> node() { return m_node; }
+ SharedPtr<NodeModel> node() { return _node; }
- ControlPanel* control_panel() const { return m_control_panel; }
+ ControlPanel* control_panel() const { return _control_panel; }
void resize();
@@ -58,13 +58,13 @@ protected:
void on_hide();
private:
- SharedPtr<NodeModel> m_node;
- ControlPanel* m_control_panel;
- bool m_callback_enabled;
+ SharedPtr<NodeModel> _node;
+ ControlPanel* _control_panel;
+ bool _callback_enabled;
- bool m_position_stored;
- int m_x;
- int m_y;
+ bool _position_stored;
+ int _x;
+ int _y;
};
diff --git a/src/progs/ingenuity/NodeMenu.cpp b/src/progs/ingenuity/NodeMenu.cpp
index 7811e3de..f28b39dc 100644
--- a/src/progs/ingenuity/NodeMenu.cpp
+++ b/src/progs/ingenuity/NodeMenu.cpp
@@ -90,7 +90,7 @@ void
NodeMenu::destroy()
{
cerr << "FIXME: NODE DESTROYED\n";
- //SharedPtr<ObjectModel> model = m_model;
+ //SharedPtr<ObjectModel> model = _model;
//m_model.reset();
}
#endif
@@ -107,15 +107,15 @@ NodeMenu::set_path(const Path& new_path)
i != _node->ports().end(); ++i) {
ObjectController* const pc = (*i)->controller();
assert(pc != NULL);
- pc->set_path(m_model->path().base() + pc->model()->name());
+ pc->set_path(_model->path().base() + pc->model()->name());
}
// Handle bridge port, if this node represents one
- if (m_bridge_port != NULL)
- m_bridge_port->set_path(new_path);
+ if (_bridge_port != NULL)
+ _bridge_port->set_path(new_path);
- if (m_module != NULL)
- m_module->canvas()->rename_module(_node->path().name(), new_path.name());
+ if (_module != NULL)
+ _module->canvas()->rename_module(_node->path().name(), new_path.name());
ObjectController::set_path(new_path);
@@ -127,19 +127,19 @@ NodeMenu::set_path(const Path& new_path)
void
NodeMenu::destroy()
{
- PatchController* pc = ((PatchController*)m_model->parent()->controller());
+ PatchController* pc = ((PatchController*)_model->parent()->controller());
assert(pc != NULL);
//remove_from_store();
- //pc->remove_node(m_model->path().name());
+ //pc->remove_node(_model->path().name());
cerr << "FIXME: remove node\n";
- if (m_bridge_port != NULL)
- m_bridge_port->destroy();
- m_bridge_port = NULL;
+ if (_bridge_port != NULL)
+ _bridge_port->destroy();
+ _bridge_port = NULL;
- //if (m_module != NULL)
- // delete m_module;
+ //if (_module != NULL)
+ // delete _module;
}
#endif
@@ -154,10 +154,10 @@ NodeMenu::add_port(SharedPtr<PortModel> pm)
//cout << "[NodeMenu] Adding port " << pm->path() << endl;
/*
- if (m_module != NULL) {
+ if (_module != NULL) {
// (formerly PortController)
- pc->create_port(m_module);
- m_module->resize();
+ pc->create_port(_module);
+ _module->resize();
// Enable "Controls" menu item on module
if (has_control_inputs())
@@ -179,8 +179,8 @@ NodeMenu::on_menu_clone()
cerr << "FIXME: clone broken\n";
/*
assert(_node);
- //assert(m_parent != NULL);
- //assert(m_parent->model() != NULL);
+ //assert(_parent != NULL);
+ //assert(_parent->model() != NULL);
string clone_name = _node->name();
int i = 2; // postfix number (ie oldname_2)
@@ -249,8 +249,8 @@ NodeMenu::disable_controls_menuitem()
{
_controls_menuitem->property_sensitive() = false;
- //if (m_control_window != NULL)
- // m_control_window->hide();
+ //if (_control_window != NULL)
+ // _control_window->hide();
}
diff --git a/src/progs/ingenuity/NodeMenu.h b/src/progs/ingenuity/NodeMenu.h
index 46b4d2b3..d3b5f94e 100644
--- a/src/progs/ingenuity/NodeMenu.h
+++ b/src/progs/ingenuity/NodeMenu.h
@@ -50,7 +50,7 @@ public:
bool has_control_inputs();
//virtual void show_menu(GdkEventButton* event)
- //{ m_menu.popup(event->button, event->time); }
+ //{ _menu.popup(event->button, event->time); }
protected:
@@ -64,7 +64,7 @@ protected:
void on_menu_learn();
void on_menu_disconnect_all();
- //Gtk::Menu m_menu;
+ //Gtk::Menu _menu;
SharedPtr<NodeModel> _node;
Glib::RefPtr<Gtk::MenuItem> _controls_menuitem;
};
diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/progs/ingenuity/NodeModule.cpp
index 41041b0e..e6cf212e 100644
--- a/src/progs/ingenuity/NodeModule.cpp
+++ b/src/progs/ingenuity/NodeModule.cpp
@@ -35,10 +35,10 @@ namespace Ingenuity {
NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node)
: LibFlowCanvas::Module(canvas, node->path().name()),
- m_node(node),
- m_menu(node)
+ _node(node),
+ _menu(node)
{
- assert(m_node);
+ assert(_node);
if (node->polyphonic()) {
set_border_width(2.0);
@@ -52,7 +52,7 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode
NodeModule::~NodeModule()
{
- NodeControlWindow* win = App::instance().window_factory()->control_window(m_node);
+ NodeControlWindow* win = App::instance().window_factory()->control_window(_node);
if (win) {
// Should remove from window factory via signal
@@ -104,7 +104,7 @@ NodeModule::remove_port(SharedPtr<PortModel> port)
void
NodeModule::show_control_window()
{
- App::instance().window_factory()->present_controls(m_node);
+ App::instance().window_factory()->present_controls(_node);
}
@@ -114,13 +114,13 @@ NodeModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = m_node->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = m_node->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _node->get_metadata("ingenuity:canvas-x");
+ const Atom& existing_y = _node->get_metadata("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(m_node->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(m_node->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-y", Atom(y));
}
}
@@ -128,7 +128,7 @@ NodeModule::store_location()
void
NodeModule::on_right_click(GdkEventButton* event)
{
- m_menu.popup(event->button, event->time);
+ _menu.popup(event->button, event->time);
}
diff --git a/src/progs/ingenuity/NodeModule.h b/src/progs/ingenuity/NodeModule.h
index 2d6802ff..92878288 100644
--- a/src/progs/ingenuity/NodeModule.h
+++ b/src/progs/ingenuity/NodeModule.h
@@ -66,7 +66,7 @@ public:
void show_control_window();
- SharedPtr<NodeModel> node() const { return m_node; }
+ SharedPtr<NodeModel> node() const { return _node; }
protected:
NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node);
@@ -79,8 +79,8 @@ protected:
void add_port(SharedPtr<PortModel> port, bool resize=true);
void remove_port(SharedPtr<PortModel> port);
- SharedPtr<NodeModel> m_node;
- NodeMenu m_menu;
+ SharedPtr<NodeModel> _node;
+ NodeMenu _menu;
};
diff --git a/src/progs/ingenuity/NodePropertiesWindow.cpp b/src/progs/ingenuity/NodePropertiesWindow.cpp
index 5772a608..35f84ea8 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.cpp
+++ b/src/progs/ingenuity/NodePropertiesWindow.cpp
@@ -27,11 +27,11 @@ using std::string;
NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("node_properties_path_label", m_node_path_label);
- glade_xml->get_widget("node_properties_polyphonic_checkbutton", m_node_polyphonic_toggle);
- glade_xml->get_widget("node_properties_plugin_type_label", m_plugin_type_label);
- glade_xml->get_widget("node_properties_plugin_uri_label", m_plugin_uri_label);
- glade_xml->get_widget("node_properties_plugin_name_label", m_plugin_name_label);
+ glade_xml->get_widget("node_properties_path_label", _node_path_label);
+ glade_xml->get_widget("node_properties_polyphonic_checkbutton", _node_polyphonic_toggle);
+ glade_xml->get_widget("node_properties_plugin_type_label", _plugin_type_label);
+ glade_xml->get_widget("node_properties_plugin_uri_label", _plugin_uri_label);
+ glade_xml->get_widget("node_properties_plugin_name_label", _plugin_name_label);
}
@@ -43,19 +43,19 @@ NodePropertiesWindow::set_node(SharedPtr<NodeModel> node_model)
{
assert(node_model);
- m_node_model = node_model;
+ _node_model = node_model;
set_title(node_model->path() + " Properties");
- m_node_path_label->set_text(node_model->path());
- m_node_polyphonic_toggle->set_active(node_model->polyphonic());
+ _node_path_label->set_text(node_model->path());
+ _node_polyphonic_toggle->set_active(node_model->polyphonic());
SharedPtr<PluginModel> pm = node_model->plugin();
if (pm) {
- m_plugin_type_label->set_text(pm->type_uri());
- m_plugin_uri_label->set_text(pm->uri());
- m_plugin_name_label->set_text(pm->name());
+ _plugin_type_label->set_text(pm->type_uri());
+ _plugin_uri_label->set_text(pm->uri());
+ _plugin_name_label->set_text(pm->name());
}
}
diff --git a/src/progs/ingenuity/NodePropertiesWindow.h b/src/progs/ingenuity/NodePropertiesWindow.h
index 3c9322e7..3637597c 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.h
+++ b/src/progs/ingenuity/NodePropertiesWindow.h
@@ -42,12 +42,12 @@ public:
private:
- SharedPtr<NodeModel> m_node_model;
- Gtk::Label* m_node_path_label;
- Gtk::CheckButton* m_node_polyphonic_toggle;
- Gtk::Label* m_plugin_type_label;
- Gtk::Label* m_plugin_uri_label;
- Gtk::Label* m_plugin_name_label;
+ SharedPtr<NodeModel> _node_model;
+ Gtk::Label* _node_path_label;
+ Gtk::CheckButton* _node_polyphonic_toggle;
+ Gtk::Label* _plugin_type_label;
+ Gtk::Label* _plugin_uri_label;
+ Gtk::Label* _plugin_name_label;
};
} // namespace Ingenuity
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index 056d25a6..aab57a4e 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -40,55 +40,55 @@ namespace Ingenuity {
PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
: FlowCanvas(width, height),
- m_patch(patch),
- m_last_click_x(0),
- m_last_click_y(0)
+ _patch(patch),
+ _last_click_x(0),
+ _last_click_y(0)
{
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference();
- xml->get_widget("canvas_menu", m_menu);
+ xml->get_widget("canvas_menu", _menu);
- xml->get_widget("canvas_menu_add_audio_input", m_menu_add_audio_input);
- xml->get_widget("canvas_menu_add_audio_output", m_menu_add_audio_output);
- xml->get_widget("canvas_menu_add_control_input", m_menu_add_control_input);
- xml->get_widget("canvas_menu_add_control_output", m_menu_add_control_output);
- xml->get_widget("canvas_menu_add_midi_input", m_menu_add_midi_input);
- xml->get_widget("canvas_menu_add_midi_output", m_menu_add_midi_output);
- xml->get_widget("canvas_menu_load_plugin", m_menu_load_plugin);
- xml->get_widget("canvas_menu_load_patch", m_menu_load_patch);
- xml->get_widget("canvas_menu_new_patch", m_menu_new_patch);
+ xml->get_widget("canvas_menu_add_audio_input", _menu_add_audio_input);
+ xml->get_widget("canvas_menu_add_audio_output", _menu_add_audio_output);
+ xml->get_widget("canvas_menu_add_control_input", _menu_add_control_input);
+ xml->get_widget("canvas_menu_add_control_output", _menu_add_control_output);
+ xml->get_widget("canvas_menu_add_midi_input", _menu_add_midi_input);
+ xml->get_widget("canvas_menu_add_midi_output", _menu_add_midi_output);
+ xml->get_widget("canvas_menu_load_plugin", _menu_load_plugin);
+ xml->get_widget("canvas_menu_load_patch", _menu_load_patch);
+ xml->get_widget("canvas_menu_new_patch", _menu_new_patch);
// Add port menu items
- m_menu_add_audio_input->signal_activate().connect(
+ _menu_add_audio_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"audio_input", "ingen:audio", false));
- m_menu_add_audio_output->signal_activate().connect(
+ _menu_add_audio_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"audio_output", "ingen:audio", true));
- m_menu_add_control_input->signal_activate().connect(
+ _menu_add_control_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"control_input", "ingen:control", false));
- m_menu_add_control_output->signal_activate().connect(
+ _menu_add_control_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"control_output", "ingen:control", true));
- m_menu_add_midi_input->signal_activate().connect(
+ _menu_add_midi_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"midi_input", "ingen:midi", false));
- m_menu_add_midi_output->signal_activate().connect(
+ _menu_add_midi_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"midi_output", "ingen:midi", true));
// Connect to model signals to track state
- m_patch->new_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_node));
- m_patch->removed_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_node));
- m_patch->new_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_port));
- m_patch->removed_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_port));
- m_patch->new_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::connection));
- m_patch->removed_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::disconnection));
+ _patch->new_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_node));
+ _patch->removed_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_node));
+ _patch->new_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_port));
+ _patch->removed_port_sig.connect(sigc::mem_fun(this, &PatchCanvas::remove_port));
+ _patch->new_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::connection));
+ _patch->removed_connection_sig.connect(sigc::mem_fun(this, &PatchCanvas::disconnection));
// Connect widget signals to do things
- m_menu_load_plugin->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_plugin));
- m_menu_load_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_patch));
- m_menu_new_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_new_patch));
+ _menu_load_plugin->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_plugin));
+ _menu_load_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_patch));
+ _menu_new_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_new_patch));
}
@@ -99,20 +99,20 @@ PatchCanvas::build()
boost::dynamic_pointer_cast<PatchCanvas>(shared_from_this());
// Create modules for nodes
- for (NodeModelMap::const_iterator i = m_patch->nodes().begin();
- i != m_patch->nodes().end(); ++i) {
+ for (NodeModelMap::const_iterator i = _patch->nodes().begin();
+ i != _patch->nodes().end(); ++i) {
add_node((*i).second);
}
// Create pseudo modules for ports (ports on this canvas, not on our module)
- for (PortModelList::const_iterator i = m_patch->ports().begin();
- i != m_patch->ports().end(); ++i) {
+ for (PortModelList::const_iterator i = _patch->ports().begin();
+ i != _patch->ports().end(); ++i) {
add_module(PatchPortModule::create(shared_this, *i));
}
// Create connections
- for (list<SharedPtr<ConnectionModel> >::const_iterator i = m_patch->connections().begin();
- i != m_patch->connections().end(); ++i) {
+ for (list<SharedPtr<ConnectionModel> >::const_iterator i = _patch->connections().begin();
+ i != _patch->connections().end(); ++i) {
connection(*i);
}
}
@@ -163,11 +163,11 @@ PatchCanvas::connection(SharedPtr<ConnectionModel> cm)
const Path& src_parent_path = cm->src_port_path().parent();
const Path& dst_parent_path = cm->dst_port_path().parent();
- const string& src_parent_name = (src_parent_path == m_patch->path())
+ const string& src_parent_name = (src_parent_path == _patch->path())
? cm->src_port_path().name()
: src_parent_path.name();
- const string& dst_parent_name = (dst_parent_path == m_patch->path())
+ const string& dst_parent_name = (dst_parent_path == _patch->path())
? cm->dst_port_path().name()
: dst_parent_path.name();
@@ -192,11 +192,11 @@ PatchCanvas::disconnection(const Path& src_port_path, const Path& dst_port_path)
const Path& src_parent_path = src_port_path.parent();
const Path& dst_parent_path = dst_port_path.parent();
- const string& src_parent_name = (src_parent_path == m_patch->path())
+ const string& src_parent_name = (src_parent_path == _patch->path())
? src_port_path.name()
: src_parent_path.name();
- const string& dst_parent_name = (dst_parent_path == m_patch->path())
+ const string& dst_parent_name = (dst_parent_path == _patch->path())
? dst_port_path.name()
: dst_parent_path.name();
@@ -242,7 +242,7 @@ PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::sha
cerr << "FIXME: MIDI binding" << endl;
#if 0
SharedPtr<PluginModel> pm(new PluginModel(PluginModel::Internal, "", "midi_control_in", ""));
- SharedPtr<NodeModel> nm(new NodeModel(pm, m_patch->path().base()
+ SharedPtr<NodeModel> nm(new NodeModel(pm, _patch->path().base()
+ src->name() + "-" + dst->name(), false));
nm->set_metadata("canvas-x", Atom((float)
(dst->module()->property_x() - dst->module()->width() - 20)));
@@ -289,8 +289,8 @@ PatchCanvas::canvas_event(GdkEvent* event)
case GDK_BUTTON_PRESS:
if (event->button.button == 3) {
- m_last_click_x = (int)event->button.x;
- m_last_click_y = (int)event->button.y;
+ _last_click_x = (int)event->button.x;
+ _last_click_y = (int)event->button.y;
show_menu(event);
}
break;
@@ -312,7 +312,7 @@ PatchCanvas::canvas_event(GdkEvent* event)
void
PatchCanvas::destroy_selection()
{
- for (list<boost::shared_ptr<Module> >::iterator m = m_selected_modules.begin(); m != m_selected_modules.end(); ++m) {
+ for (list<boost::shared_ptr<Module> >::iterator m = _selected_modules.begin(); m != _selected_modules.end(); ++m) {
boost::shared_ptr<NodeModule> module = boost::dynamic_pointer_cast<NodeModule>(*m);
if (module) {
App::instance().engine()->destroy(module->node()->path());
@@ -332,7 +332,7 @@ PatchCanvas::copy_selection()
Serializer serializer;
serializer.start_to_string();
- for (list<boost::shared_ptr<Module> >::iterator m = m_selected_modules.begin(); m != m_selected_modules.end(); ++m) {
+ for (list<boost::shared_ptr<Module> >::iterator m = _selected_modules.begin(); m != _selected_modules.end(); ++m) {
boost::shared_ptr<NodeModule> module = boost::dynamic_pointer_cast<NodeModule>(*m);
if (module) {
serializer.serialize(module->node());
@@ -343,8 +343,8 @@ PatchCanvas::copy_selection()
}
}
- for (list<boost::shared_ptr<LibFlowCanvas::Connection> >::iterator c = m_selected_connections.begin();
- c != m_selected_connections.end(); ++c) {
+ for (list<boost::shared_ptr<LibFlowCanvas::Connection> >::iterator c = _selected_connections.begin();
+ c != _selected_connections.end(); ++c) {
boost::shared_ptr<Connection> connection = boost::dynamic_pointer_cast<Connection>(*c);
if (connection)
serializer.serialize_connection(connection->model());
@@ -366,7 +366,7 @@ PatchCanvas::generate_port_name(const string& base) {
snprintf(num_buf, 5, "%u", i);
name = base + "_";
name += num_buf;
- if (!m_patch->get_port(name))
+ if (!_patch->get_port(name))
break;
}
@@ -379,7 +379,7 @@ PatchCanvas::generate_port_name(const string& base) {
void
PatchCanvas::menu_add_port(const string& name, const string& type, bool is_output)
{
- const Path& path = m_patch->path().base() + generate_port_name(name);
+ const Path& path = _patch->path().base() + generate_port_name(name);
App::instance().engine()->create_port_with_data(path, type, is_output, get_initial_data());
}
@@ -402,8 +402,8 @@ PatchCanvas::get_initial_data()
{
MetadataMap result;
- result["ingenuity:canvas-x"] = Atom((float)m_last_click_x);
- result["ingenuity:canvas-y"] = Atom((float)m_last_click_y);
+ result["ingenuity:canvas-x"] = Atom((float)_last_click_x);
+ result["ingenuity:canvas-y"] = Atom((float)_last_click_y);
return result;
}
@@ -411,21 +411,21 @@ PatchCanvas::get_initial_data()
void
PatchCanvas::menu_load_plugin()
{
- App::instance().window_factory()->present_load_plugin(m_patch, get_initial_data());
+ App::instance().window_factory()->present_load_plugin(_patch, get_initial_data());
}
void
PatchCanvas::menu_load_patch()
{
- App::instance().window_factory()->present_load_subpatch(m_patch, get_initial_data());
+ App::instance().window_factory()->present_load_subpatch(_patch, get_initial_data());
}
void
PatchCanvas::menu_new_patch()
{
- App::instance().window_factory()->present_new_subpatch(m_patch, get_initial_data());
+ App::instance().window_factory()->present_new_subpatch(_patch, get_initial_data());
}
diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h
index 72f79a9b..5d622f08 100644
--- a/src/progs/ingenuity/PatchCanvas.h
+++ b/src/progs/ingenuity/PatchCanvas.h
@@ -73,7 +73,7 @@ public:
void copy_selection();
void show_menu(GdkEvent* event)
- { m_menu->popup(event->button.button, event->button.time); }
+ { _menu->popup(event->button.button, event->button.time); }
private:
string generate_port_name(const string& base);
@@ -92,21 +92,21 @@ private:
void disconnect(boost::shared_ptr<LibFlowCanvas::Port> src,
boost::shared_ptr<LibFlowCanvas::Port> dst);
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
- int m_last_click_x;
- int m_last_click_y;
+ int _last_click_x;
+ int _last_click_y;
- Gtk::Menu* m_menu;
- Gtk::MenuItem* m_menu_add_audio_input;
- Gtk::MenuItem* m_menu_add_audio_output;
- Gtk::MenuItem* m_menu_add_control_input;
- Gtk::MenuItem* m_menu_add_control_output;
- Gtk::MenuItem* m_menu_add_midi_input;
- Gtk::MenuItem* m_menu_add_midi_output;
- Gtk::MenuItem* m_menu_load_plugin;
- Gtk::MenuItem* m_menu_load_patch;
- Gtk::MenuItem* m_menu_new_patch;
+ Gtk::Menu* _menu;
+ Gtk::MenuItem* _menu_add_audio_input;
+ Gtk::MenuItem* _menu_add_audio_output;
+ Gtk::MenuItem* _menu_add_control_input;
+ Gtk::MenuItem* _menu_add_control_output;
+ Gtk::MenuItem* _menu_add_midi_input;
+ Gtk::MenuItem* _menu_add_midi_output;
+ Gtk::MenuItem* _menu_load_plugin;
+ Gtk::MenuItem* _menu_load_patch;
+ Gtk::MenuItem* _menu_new_patch;
};
diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp
index 53b56854..832ebcf5 100644
--- a/src/progs/ingenuity/PatchPortModule.cpp
+++ b/src/progs/ingenuity/PatchPortModule.cpp
@@ -31,7 +31,7 @@ namespace Ingenuity {
PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port)
: LibFlowCanvas::Module(canvas, port->path().name(), 0, 0, false), // FIXME: coords?
- m_port(port)
+ _port(port)
{
/*if (port_model()->polyphonic() && port_model()->parent() != NULL
&& port_model()->parent_patch()->poly() > 1) {
@@ -68,8 +68,8 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
new PatchPortModule(canvas, port));
assert(ret);
- ret->m_patch_port = boost::shared_ptr<Port>(new Port(ret, port, true, true));
- ret->add_port(ret->m_patch_port);
+ ret->_patch_port = boost::shared_ptr<Port>(new Port(ret, port, true, true));
+ ret->add_port(ret->_patch_port);
ret->resize();
@@ -86,13 +86,13 @@ PatchPortModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = m_port->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = m_port->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _port->get_metadata("ingenuity:canvas-x");
+ const Atom& existing_y = _port->get_metadata("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(m_port->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(m_port->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-y", Atom(y));
}
}
diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h
index e6f30bec..3cfccae1 100644
--- a/src/progs/ingenuity/PatchPortModule.h
+++ b/src/progs/ingenuity/PatchPortModule.h
@@ -54,9 +54,9 @@ public:
virtual void store_location();
- //void on_right_click(GdkEventButton* event) { m_port->show_menu(event); }
+ //void on_right_click(GdkEventButton* event) { _port->show_menu(event); }
- SharedPtr<PortModel> port() const { return m_port; }
+ SharedPtr<PortModel> port() const { return _port; }
protected:
PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port);
@@ -66,8 +66,8 @@ protected:
void metadata_update(const string& key, const Raul::Atom& value);
- SharedPtr<PortModel> m_port;
- boost::shared_ptr<Port> m_patch_port; ///< Port on this 'anonymous' module
+ SharedPtr<PortModel> _port;
+ boost::shared_ptr<Port> _patch_port; ///< Port on this 'anonymous' module
};
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.cpp b/src/progs/ingenuity/PatchPropertiesWindow.cpp
index 86d7ccd3..ac021cda 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.cpp
+++ b/src/progs/ingenuity/PatchPropertiesWindow.cpp
@@ -25,13 +25,13 @@ using std::string;
PatchPropertiesWindow::PatchPropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("properties_author_entry", m_author_entry);
- glade_xml->get_widget("properties_description_textview", m_textview);
- glade_xml->get_widget("properties_cancel_button", m_cancel_button);
- glade_xml->get_widget("properties_ok_button", m_ok_button);
+ glade_xml->get_widget("properties_author_entry", _author_entry);
+ glade_xml->get_widget("properties_description_textview", _textview);
+ glade_xml->get_widget("properties_cancel_button", _cancel_button);
+ glade_xml->get_widget("properties_ok_button", _ok_button);
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::cancel_clicked));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::ok_clicked));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::cancel_clicked));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &PatchPropertiesWindow::ok_clicked));
}
@@ -44,14 +44,14 @@ void
PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
{
property_title() = patch_model->path() + " Properties";
- m_patch_model = patch_model;
+ _patch_model = patch_model;
- const Atom& author_atom = m_patch_model->get_metadata("author");
- m_author_entry->set_text(
+ const Atom& author_atom = _patch_model->get_metadata("author");
+ _author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = m_patch_model->get_metadata("description");
- m_textview->get_buffer()->set_text(
+ const Atom& desc_atom = _patch_model->get_metadata("description");
+ _textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
}
@@ -59,12 +59,12 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
void
PatchPropertiesWindow::cancel_clicked()
{
- const Atom& author_atom = m_patch_model->get_metadata("author");
- m_author_entry->set_text(
+ const Atom& author_atom = _patch_model->get_metadata("author");
+ _author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = m_patch_model->get_metadata("description");
- m_textview->get_buffer()->set_text(
+ const Atom& desc_atom = _patch_model->get_metadata("description");
+ _textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
hide();
@@ -76,8 +76,8 @@ PatchPropertiesWindow::ok_clicked()
{
cerr << "FIXME: properties\n";
- //m_patch_model->set_metadata("author", Atom(m_author_entry->get_text().c_str()));
- //m_patch_model->set_metadata("description", Atom(m_textview->get_buffer()->get_text().c_str()));
+ //m_patch_model->set_metadata("author", Atom(_author_entry->get_text().c_str()));
+ //m_patch_model->set_metadata("description", Atom(_textview->get_buffer()->get_text().c_str()));
hide();
}
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.h b/src/progs/ingenuity/PatchPropertiesWindow.h
index 54e8391a..0b6909b5 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.h
+++ b/src/progs/ingenuity/PatchPropertiesWindow.h
@@ -47,12 +47,12 @@ public:
void ok_clicked();
private:
- SharedPtr<PatchModel> m_patch_model;
+ SharedPtr<PatchModel> _patch_model;
- Gtk::Entry* m_author_entry;
- Gtk::TextView* m_textview;
- Gtk::Button* m_cancel_button;
- Gtk::Button* m_ok_button;
+ Gtk::Entry* _author_entry;
+ Gtk::TextView* _textview;
+ Gtk::Button* _cancel_button;
+ Gtk::Button* _ok_button;
};
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp
index 5fd17abd..c39349d0 100644
--- a/src/progs/ingenuity/PatchTreeWindow.cpp
+++ b/src/progs/ingenuity/PatchTreeWindow.cpp
@@ -31,36 +31,36 @@ namespace Ingenuity {
PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_enable_signal(true)
+ _enable_signal(true)
{
- xml->get_widget_derived("patches_treeview", m_patches_treeview);
+ xml->get_widget_derived("patches_treeview", _patches_treeview);
- m_patch_treestore = Gtk::TreeStore::create(m_patch_tree_columns);
- m_patches_treeview->set_window(this);
- m_patches_treeview->set_model(m_patch_treestore);
+ _patch_treestore = Gtk::TreeStore::create(_patch_tree_columns);
+ _patches_treeview->set_window(this);
+ _patches_treeview->set_model(_patch_treestore);
Gtk::TreeViewColumn* name_col = Gtk::manage(new Gtk::TreeViewColumn(
- "Patch", m_patch_tree_columns.name_col));
+ "Patch", _patch_tree_columns.name_col));
Gtk::TreeViewColumn* enabled_col = Gtk::manage(new Gtk::TreeViewColumn(
- "Run", m_patch_tree_columns.enabled_col));
+ "Run", _patch_tree_columns.enabled_col));
name_col->set_resizable(true);
name_col->set_expand(true);
- m_patches_treeview->append_column(*name_col);
- m_patches_treeview->append_column(*enabled_col);
+ _patches_treeview->append_column(*name_col);
+ _patches_treeview->append_column(*enabled_col);
Gtk::CellRendererToggle* enabled_renderer = dynamic_cast<Gtk::CellRendererToggle*>(
- m_patches_treeview->get_column_cell_renderer(1));
+ _patches_treeview->get_column_cell_renderer(1));
enabled_renderer->property_activatable() = true;
- m_patch_tree_selection = m_patches_treeview->get_selection();
+ _patch_tree_selection = _patches_treeview->get_selection();
//m_patch_tree_selection->signal_changed().connect(
// sigc::mem_fun(this, &PatchTreeWindow::event_patch_selected));
- m_patches_treeview->signal_row_activated().connect(
+ _patches_treeview->signal_row_activated().connect(
sigc::mem_fun(this, &PatchTreeWindow::event_patch_activated));
enabled_renderer->signal_toggled().connect(
sigc::mem_fun(this, &PatchTreeWindow::event_patch_enabled_toggled));
- m_patches_treeview->columns_autosize();
+ _patches_treeview->columns_autosize();
}
@@ -84,7 +84,7 @@ void
PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
{
if (!pm->parent()) {
- Gtk::TreeModel::iterator iter = m_patch_treestore->append();
+ Gtk::TreeModel::iterator iter = _patch_treestore->append();
Gtk::TreeModel::Row row = *iter;
if (pm->path() == "/") {
SharedPtr<OSCEngineSender> osc_sender = PtrCast<OSCEngineSender>(App::instance().engine());
@@ -93,24 +93,24 @@ PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
//if (root_name.substr(root_name.length()-1,1) == "/")
// root_name = root_name.substr(0, root_name.length()-1);
//root_name.append(":/");
- row[m_patch_tree_columns.name_col] = root_name;
+ row[_patch_tree_columns.name_col] = root_name;
} else {
- row[m_patch_tree_columns.name_col] = pm->path().name();
+ row[_patch_tree_columns.name_col] = pm->path().name();
}
- row[m_patch_tree_columns.enabled_col] = false;
- row[m_patch_tree_columns.patch_model_col] = pm;
- m_patches_treeview->expand_row(m_patch_treestore->get_path(iter), true);
+ row[_patch_tree_columns.enabled_col] = false;
+ row[_patch_tree_columns.patch_model_col] = pm;
+ _patches_treeview->expand_row(_patch_treestore->get_path(iter), true);
} else {
- Gtk::TreeModel::Children children = m_patch_treestore->children();
+ Gtk::TreeModel::Children children = _patch_treestore->children();
Gtk::TreeModel::iterator c = find_patch(children, pm->parent()->path());
if (c != children.end()) {
- Gtk::TreeModel::iterator iter = m_patch_treestore->append(c->children());
+ Gtk::TreeModel::iterator iter = _patch_treestore->append(c->children());
Gtk::TreeModel::Row row = *iter;
- row[m_patch_tree_columns.name_col] = pm->path().name();
- row[m_patch_tree_columns.enabled_col] = false;
- row[m_patch_tree_columns.patch_model_col] = pm;
- m_patches_treeview->expand_row(m_patch_treestore->get_path(iter), true);
+ row[_patch_tree_columns.name_col] = pm->path().name();
+ row[_patch_tree_columns.enabled_col] = false;
+ row[_patch_tree_columns.patch_model_col] = pm;
+ _patches_treeview->expand_row(_patch_treestore->get_path(iter), true);
}
}
@@ -122,9 +122,9 @@ PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
void
PatchTreeWindow::remove_patch(const Path& path)
{
- Gtk::TreeModel::iterator i = find_patch(m_patch_treestore->children(), path);
- if (i != m_patch_treestore->children().end())
- m_patch_treestore->erase(i);
+ Gtk::TreeModel::iterator i = find_patch(_patch_treestore->children(), path);
+ if (i != _patch_treestore->children().end())
+ _patch_treestore->erase(i);
}
@@ -132,7 +132,7 @@ Gtk::TreeModel::iterator
PatchTreeWindow::find_patch(Gtk::TreeModel::Children root, const Path& path)
{
for (Gtk::TreeModel::iterator c = root.begin(); c != root.end(); ++c) {
- SharedPtr<PatchModel> pm = (*c)[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = (*c)[_patch_tree_columns.patch_model_col];
if (pm->path() == path) {
return c;
} else if ((*c)->children().size() > 0) {
@@ -148,10 +148,10 @@ PatchTreeWindow::find_patch(Gtk::TreeModel::Children root, const Path& path)
void
PatchTreeWindow::event_patch_selected()
{
- Gtk::TreeModel::iterator active = m_patch_tree_selection->get_selected();
+ Gtk::TreeModel::iterator active = _patch_tree_selection->get_selected();
if (active) {
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
}
}
*/
@@ -162,10 +162,10 @@ PatchTreeWindow::event_patch_selected()
void
PatchTreeWindow::show_patch_menu(GdkEventButton* ev)
{
- Gtk::TreeModel::iterator active = m_patch_tree_selection->get_selected();
+ Gtk::TreeModel::iterator active = _patch_tree_selection->get_selected();
if (active) {
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
if (pm)
cerr << "FIXME: patch menu\n";
//pm->show_menu(ev);
@@ -176,9 +176,9 @@ PatchTreeWindow::show_patch_menu(GdkEventButton* ev)
void
PatchTreeWindow::event_patch_activated(const Gtk::TreeModel::Path& path, Gtk::TreeView::Column* col)
{
- Gtk::TreeModel::iterator active = m_patch_treestore->get_iter(path);
+ Gtk::TreeModel::iterator active = _patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
App::instance().window_factory()->present_patch(pm);
}
@@ -188,22 +188,22 @@ void
PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
{
Gtk::TreeModel::Path path(path_str);
- Gtk::TreeModel::iterator active = m_patch_treestore->get_iter(path);
+ Gtk::TreeModel::iterator active = _patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
- SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
Glib::ustring patch_path = pm->path();
assert(pm);
if ( ! pm->enabled()) {
- if (m_enable_signal)
+ if (_enable_signal)
App::instance().engine()->enable_patch(patch_path);
- //row[m_patch_tree_columns.enabled_col] = true;
+ //row[_patch_tree_columns.enabled_col] = true;
} else {
- if (m_enable_signal)
+ if (_enable_signal)
App::instance().engine()->disable_patch(patch_path);
- //row[m_patch_tree_columns.enabled_col] = false;
+ //row[_patch_tree_columns.enabled_col] = false;
}
}
@@ -211,57 +211,57 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
void
PatchTreeWindow::patch_enabled(const Path& path)
{
- m_enable_signal = false;
+ _enable_signal = false;
Gtk::TreeModel::iterator i
- = find_patch(m_patch_treestore->children(), path);
+ = find_patch(_patch_treestore->children(), path);
- if (i != m_patch_treestore->children().end()) {
+ if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;
- row[m_patch_tree_columns.enabled_col] = true;
+ row[_patch_tree_columns.enabled_col] = true;
} else {
cerr << "[PatchTreeWindow] Unable to find patch " << path << endl;
}
- m_enable_signal = true;
+ _enable_signal = true;
}
void
PatchTreeWindow::patch_disabled(const Path& path)
{
- m_enable_signal = false;
+ _enable_signal = false;
Gtk::TreeModel::iterator i
- = find_patch(m_patch_treestore->children(), path);
+ = find_patch(_patch_treestore->children(), path);
- if (i != m_patch_treestore->children().end()) {
+ if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;
- row[m_patch_tree_columns.enabled_col] = false;
+ row[_patch_tree_columns.enabled_col] = false;
} else {
cerr << "[PatchTreeWindow] Unable to find patch " << path << endl;
}
- m_enable_signal = true;
+ _enable_signal = true;
}
void
PatchTreeWindow::patch_renamed(const Path& old_path, const Path& new_path)
{
- m_enable_signal = false;
+ _enable_signal = false;
Gtk::TreeModel::iterator i
- = find_patch(m_patch_treestore->children(), old_path);
+ = find_patch(_patch_treestore->children(), old_path);
- if (i != m_patch_treestore->children().end()) {
+ if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;
- row[m_patch_tree_columns.name_col] = new_path.name();
+ row[_patch_tree_columns.name_col] = new_path.name();
} else {
cerr << "[PatchTreeWindow] Unable to find patch " << old_path << endl;
}
- m_enable_signal = true;
+ _enable_signal = true;
}
diff --git a/src/progs/ingenuity/PatchTreeWindow.h b/src/progs/ingenuity/PatchTreeWindow.h
index ab18d526..83236d1a 100644
--- a/src/progs/ingenuity/PatchTreeWindow.h
+++ b/src/progs/ingenuity/PatchTreeWindow.h
@@ -60,7 +60,7 @@ protected:
Gtk::TreeModel::iterator find_patch(Gtk::TreeModel::Children root, const Path& path);
- PatchTreeView* m_patches_treeview;
+ PatchTreeView* _patches_treeview;
struct PatchTreeModelColumns : public Gtk::TreeModel::ColumnRecord
{
@@ -72,10 +72,10 @@ protected:
Gtk::TreeModelColumn<SharedPtr<PatchModel> > patch_model_col;
};
- bool m_enable_signal;
- PatchTreeModelColumns m_patch_tree_columns;
- Glib::RefPtr<Gtk::TreeStore> m_patch_treestore;
- Glib::RefPtr<Gtk::TreeSelection> m_patch_tree_selection;
+ bool _enable_signal;
+ PatchTreeModelColumns _patch_tree_columns;
+ Glib::RefPtr<Gtk::TreeStore> _patch_treestore;
+ Glib::RefPtr<Gtk::TreeSelection> _patch_tree_selection;
};
@@ -87,19 +87,19 @@ public:
: Gtk::TreeView(cobject)
{}
- void set_window(PatchTreeWindow* win) { m_window = win; }
+ void set_window(PatchTreeWindow* win) { _window = win; }
bool on_button_press_event(GdkEventButton* ev) {
bool ret = Gtk::TreeView::on_button_press_event(ev);
if ((ev->type == GDK_BUTTON_PRESS) && (ev->button == 3))
- m_window->show_patch_menu(ev);
+ _window->show_patch_menu(ev);
return ret;
}
private:
- PatchTreeWindow* m_window;
+ PatchTreeWindow* _window;
}; // struct PatchTreeView
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index 06693735..a095dd5b 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -43,81 +43,81 @@ namespace Ingenuity {
PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
- m_enable_signal(true),
- m_position_stored(false),
- m_x(0),
- m_y(0),
- m_breadcrumb_box(NULL)
+ _enable_signal(true),
+ _position_stored(false),
+ _x(0),
+ _y(0),
+ _breadcrumb_box(NULL)
{
property_visible() = false;
- xml->get_widget("patch_win_vbox", m_vbox);
- xml->get_widget("patch_win_viewport", m_viewport);
- //xml->get_widget("patch_win_status_bar", m_status_bar);
- //xml->get_widget("patch_open_menuitem", m_menu_open);
- xml->get_widget("patch_import_menuitem", m_menu_import);
- //xml->get_widget("patch_open_into_menuitem", m_menu_open_into);
- xml->get_widget("patch_save_menuitem", m_menu_save);
- xml->get_widget("patch_save_as_menuitem", m_menu_save_as);
- xml->get_widget("patch_cut_menuitem", m_menu_cut);
- xml->get_widget("patch_copy_menuitem", m_menu_copy);
- xml->get_widget("patch_paste_menuitem", m_menu_paste);
- xml->get_widget("patch_delete_menuitem", m_menu_delete);
- xml->get_widget("patch_close_menuitem", m_menu_close);
- xml->get_widget("patch_configuration_menuitem", m_menu_configuration);
- xml->get_widget("patch_quit_menuitem", m_menu_quit);
- xml->get_widget("patch_view_control_window_menuitem", m_menu_view_control_window);
- xml->get_widget("patch_view_engine_window_menuitem", m_menu_view_engine_window);
- xml->get_widget("patch_properties_menuitem", m_menu_view_patch_properties);
- xml->get_widget("patch_fullscreen_menuitem", m_menu_fullscreen);
- xml->get_widget("patch_clear_menuitem", m_menu_clear);
- xml->get_widget("patch_destroy_menuitem", m_menu_destroy_patch);
- xml->get_widget("patch_view_messages_window_menuitem", m_menu_view_messages_window);
- xml->get_widget("patch_view_patch_tree_window_menuitem", m_menu_view_patch_tree_window);
- xml->get_widget("patch_help_about_menuitem", m_menu_help_about);
-
- m_menu_view_control_window->property_sensitive() = false;
+ xml->get_widget("patch_win_vbox", _vbox);
+ xml->get_widget("patch_win_viewport", _viewport);
+ //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_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_cut_menuitem", _menu_cut);
+ xml->get_widget("patch_copy_menuitem", _menu_copy);
+ xml->get_widget("patch_paste_menuitem", _menu_paste);
+ xml->get_widget("patch_delete_menuitem", _menu_delete);
+ xml->get_widget("patch_close_menuitem", _menu_close);
+ xml->get_widget("patch_configuration_menuitem", _menu_configuration);
+ xml->get_widget("patch_quit_menuitem", _menu_quit);
+ xml->get_widget("patch_view_control_window_menuitem", _menu_view_control_window);
+ xml->get_widget("patch_view_engine_window_menuitem", _menu_view_engine_window);
+ xml->get_widget("patch_properties_menuitem", _menu_view_patch_properties);
+ xml->get_widget("patch_fullscreen_menuitem", _menu_fullscreen);
+ xml->get_widget("patch_clear_menuitem", _menu_clear);
+ xml->get_widget("patch_destroy_menuitem", _menu_destroy_patch);
+ xml->get_widget("patch_view_messages_window_menuitem", _menu_view_messages_window);
+ xml->get_widget("patch_view_patch_tree_window_menuitem", _menu_view_patch_tree_window);
+ xml->get_widget("patch_help_about_menuitem", _menu_help_about);
+
+ _menu_view_control_window->property_sensitive() = false;
//m_status_bar->push(App::instance().engine()->engine_url());
//m_status_bar->pack_start(*Gtk::manage(new Gtk::Image(Gtk::Stock::CONNECT, Gtk::ICON_SIZE_MENU)), false, false);
- /*m_menu_open->signal_activate().connect(
+ /*_menu_open->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_open));*/
- m_menu_import->signal_activate().connect(
+ _menu_import->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_import));
- m_menu_save->signal_activate().connect(
+ _menu_save->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_save));
- m_menu_save_as->signal_activate().connect(
+ _menu_save_as->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_save_as));
- m_menu_copy->signal_activate().connect(
+ _menu_copy->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_copy));
- m_menu_delete->signal_activate().connect(
+ _menu_delete->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_delete));
- m_menu_quit->signal_activate().connect(
+ _menu_quit->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_quit));
- m_menu_configuration->signal_activate().connect(
+ _menu_configuration->signal_activate().connect(
sigc::mem_fun(App::instance().configuration_dialog(), &ConfigWindow::show));
- m_menu_fullscreen->signal_activate().connect(
+ _menu_fullscreen->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_fullscreen_toggled));
- m_menu_view_engine_window->signal_activate().connect(
+ _menu_view_engine_window->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_show_engine));
- m_menu_view_control_window->signal_activate().connect(
+ _menu_view_control_window->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_show_controls));
- m_menu_view_patch_properties->signal_activate().connect(
+ _menu_view_patch_properties->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_show_properties));
- m_menu_destroy_patch->signal_activate().connect(
+ _menu_destroy_patch->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_destroy));
- m_menu_clear->signal_activate().connect(
+ _menu_clear->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_clear));
- m_menu_view_messages_window->signal_activate().connect(
+ _menu_view_messages_window->signal_activate().connect(
sigc::mem_fun<void>(App::instance().messages_dialog(), &MessagesWindow::present));
- m_menu_view_patch_tree_window->signal_activate().connect(
+ _menu_view_patch_tree_window->signal_activate().connect(
sigc::mem_fun<void>(App::instance().patch_tree(), &PatchTreeWindow::present));
- m_menu_help_about->signal_activate().connect(
+ _menu_help_about->signal_activate().connect(
sigc::mem_fun<void>(App::instance().about_dialog(), &Gtk::Dialog::present));
- m_breadcrumb_box = new BreadCrumbBox();
- m_breadcrumb_box->signal_patch_selected.connect(sigc::mem_fun(this, &PatchWindow::set_patch_from_path));
+ _breadcrumb_box = new BreadCrumbBox();
+ _breadcrumb_box->signal_patch_selected.connect(sigc::mem_fun(this, &PatchWindow::set_patch_from_path));
}
@@ -126,7 +126,7 @@ PatchWindow::~PatchWindow()
// Prevents deletion
//m_patch->claim_patch_view();
- delete m_breadcrumb_box;
+ delete _breadcrumb_box;
}
@@ -153,67 +153,67 @@ PatchWindow::set_patch_from_path(const Path& path, SharedPtr<PatchView> view)
void
PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
{
- if (!patch || patch == m_patch)
+ if (!patch || patch == _patch)
return;
- m_enable_signal = false;
+ _enable_signal = false;
- m_patch = patch;
+ _patch = patch;
- m_view = m_breadcrumb_box->view(patch->path());
+ _view = _breadcrumb_box->view(patch->path());
- if (!m_view)
- m_view = PatchView::create(patch);
+ if (!_view)
+ _view = PatchView::create(patch);
else
- assert(!view || m_view == view);
+ assert(!view || _view == view);
- assert(m_view);
+ assert(_view);
// Add view to ourself
- if (m_view->get_parent())
- m_view->get_parent()->remove(*m_view);
+ if (_view->get_parent())
+ _view->get_parent()->remove(*_view);
- m_viewport->remove();
- m_viewport->add(*m_view.get());
+ _viewport->remove();
+ _viewport->add(*_view.get());
// Add our breadcrumbs to the view
- if (m_breadcrumb_box->get_parent())
- m_breadcrumb_box->get_parent()->remove(*m_breadcrumb_box);
+ if (_breadcrumb_box->get_parent())
+ _breadcrumb_box->get_parent()->remove(*_breadcrumb_box);
- m_view->breadcrumb_container()->remove();
- m_view->breadcrumb_container()->add(*m_breadcrumb_box);
+ _view->breadcrumb_container()->remove();
+ _view->breadcrumb_container()->add(*_breadcrumb_box);
- m_breadcrumb_box->build(patch->path(), m_view);
- m_breadcrumb_box->show();
+ _breadcrumb_box->build(patch->path(), _view);
+ _breadcrumb_box->show();
//m_menu_view_control_window->property_sensitive() = patch->has_control_inputs();
int width, height;
get_size(width, height);
- m_view->canvas()->scroll_to(
- ((int)m_view->canvas()->width() - width)/2,
- ((int)m_view->canvas()->height() - height)/2);
+ _view->canvas()->scroll_to(
+ ((int)_view->canvas()->width() - width)/2,
+ ((int)_view->canvas()->height() - height)/2);
- set_title(m_patch->path());
+ set_title(_patch->path());
//m_properties_window->patch_model(pc->patch_model());
if (patch->path() == "/")
- m_menu_destroy_patch->set_sensitive(false);
+ _menu_destroy_patch->set_sensitive(false);
else
- m_menu_destroy_patch->set_sensitive(true);
+ _menu_destroy_patch->set_sensitive(true);
show_all();
- m_enable_signal = true;
+ _enable_signal = true;
}
void
PatchWindow::event_show_engine()
{
- if (m_patch)
+ if (_patch)
App::instance().connect_window()->show();
}
@@ -221,31 +221,31 @@ PatchWindow::event_show_engine()
void
PatchWindow::event_show_controls()
{
- App::instance().window_factory()->present_controls(m_patch);
+ App::instance().window_factory()->present_controls(_patch);
}
void
PatchWindow::event_show_properties()
{
- App::instance().window_factory()->present_properties(m_patch);
+ App::instance().window_factory()->present_properties(_patch);
}
void
PatchWindow::event_import()
{
- App::instance().window_factory()->present_load_patch(m_patch);
+ App::instance().window_factory()->present_load_patch(_patch);
}
void
PatchWindow::event_save()
{
- if (m_patch->filename() == "")
+ if (_patch->filename() == "")
event_save_as();
else
- App::instance().loader()->save_patch(m_patch, m_patch->filename(), false);
+ App::instance().loader()->save_patch(_patch, _patch->filename(), false);
}
@@ -266,7 +266,7 @@ PatchWindow::event_save_as()
dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
// Set current folder to most sensible default
- const string& current_filename = m_patch->filename();
+ const string& current_filename = _patch->filename();
if (current_filename.length() > 0)
dialog.set_filename(current_filename);
else if (App::instance().configuration()->patch_folder().length() > 0)
@@ -300,7 +300,7 @@ PatchWindow::event_save_as()
fin.close();
if (confirm) {
- App::instance().loader()->save_patch(m_patch, filename, recursive);
+ App::instance().loader()->save_patch(_patch, filename, recursive);
//m_patch->set_metadata("filename", Atom(filename.c_str()));
}
}
@@ -311,24 +311,24 @@ PatchWindow::event_save_as()
void
PatchWindow::event_copy()
{
- if (m_view)
- m_view->canvas()->copy_selection();
+ if (_view)
+ _view->canvas()->copy_selection();
}
void
PatchWindow::event_delete()
{
- if (m_view)
- m_view->canvas()->destroy_selection();
+ if (_view)
+ _view->canvas()->destroy_selection();
}
void
PatchWindow::on_show()
{
- if (m_position_stored)
- move(m_x, m_y);
+ if (_position_stored)
+ move(_x, _y);
Gtk::Window::on_show();
}
@@ -337,8 +337,8 @@ PatchWindow::on_show()
void
PatchWindow::on_hide()
{
- m_position_stored = true;
- get_position(m_x, m_y);
+ _position_stored = true;
+ get_position(_x, _y);
Gtk::Window::on_hide();
}
@@ -349,9 +349,9 @@ PatchWindow::on_key_press_event(GdkEventKey* event)
if (event->keyval == GDK_Delete) {
cerr << "FIXME: delete key\n";
/*
- if (m_patch && m_patch->get_view()) {
- assert(m_patch->get_view()->canvas());
- m_patch->get_view()->canvas()->destroy_selected();
+ if (_patch && _patch->get_view()) {
+ assert(_patch->get_view()->canvas());
+ _patch->get_view()->canvas()->destroy_selected();
}*/
return true;
} else {
@@ -391,14 +391,14 @@ PatchWindow::event_quit()
void
PatchWindow::event_destroy()
{
- App::instance().engine()->destroy(m_patch->path());
+ App::instance().engine()->destroy(_patch->path());
}
void
PatchWindow::event_clear()
{
- App::instance().engine()->clear_patch(m_patch->path());
+ App::instance().engine()->clear_patch(_patch->path());
}
void
diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h
index 2cfbbb9b..1f848bd7 100644
--- a/src/progs/ingenuity/PatchWindow.h
+++ b/src/progs/ingenuity/PatchWindow.h
@@ -68,9 +68,9 @@ public:
void set_patch_from_path(const Path& path, SharedPtr<PatchView> view);
void set_patch(SharedPtr<PatchModel> pc, SharedPtr<PatchView> view);
- SharedPtr<PatchModel> patch() const { return m_patch; }
+ SharedPtr<PatchModel> patch() const { return _patch; }
- Gtk::MenuItem* menu_view_control_window() { return m_menu_view_control_window; }
+ Gtk::MenuItem* menu_view_control_window() { return _menu_view_control_window; }
protected:
void on_show();
@@ -91,42 +91,42 @@ private:
void event_show_controls();
void event_show_engine();
- SharedPtr<PatchModel> m_patch;
- SharedPtr<PatchView> m_view;
+ SharedPtr<PatchModel> _patch;
+ SharedPtr<PatchView> _view;
- bool m_enable_signal;
- bool m_position_stored;
- int m_x;
- int m_y;
+ bool _enable_signal;
+ bool _position_stored;
+ int _x;
+ int _y;
- Gtk::MenuItem* m_menu_import;
- Gtk::MenuItem* m_menu_save;
- Gtk::MenuItem* m_menu_save_as;
- Gtk::MenuItem* m_menu_cut;
- Gtk::MenuItem* m_menu_copy;
- Gtk::MenuItem* m_menu_paste;
- Gtk::MenuItem* m_menu_delete;
- Gtk::MenuItem* m_menu_configuration;
- Gtk::MenuItem* m_menu_close;
- Gtk::MenuItem* m_menu_quit;
- Gtk::MenuItem* m_menu_fullscreen;
- Gtk::MenuItem* m_menu_clear;
- Gtk::MenuItem* m_menu_destroy_patch;
- Gtk::MenuItem* m_menu_view_engine_window;
- Gtk::MenuItem* m_menu_view_control_window;
- Gtk::MenuItem* m_menu_view_patch_properties;
- Gtk::MenuItem* m_menu_view_messages_window;
- Gtk::MenuItem* m_menu_view_patch_tree_window;
- Gtk::MenuItem* m_menu_help_about;
+ Gtk::MenuItem* _menu_import;
+ Gtk::MenuItem* _menu_save;
+ Gtk::MenuItem* _menu_save_as;
+ Gtk::MenuItem* _menu_cut;
+ Gtk::MenuItem* _menu_copy;
+ Gtk::MenuItem* _menu_paste;
+ Gtk::MenuItem* _menu_delete;
+ Gtk::MenuItem* _menu_configuration;
+ Gtk::MenuItem* _menu_close;
+ Gtk::MenuItem* _menu_quit;
+ Gtk::MenuItem* _menu_fullscreen;
+ Gtk::MenuItem* _menu_clear;
+ Gtk::MenuItem* _menu_destroy_patch;
+ Gtk::MenuItem* _menu_view_engine_window;
+ Gtk::MenuItem* _menu_view_control_window;
+ Gtk::MenuItem* _menu_view_patch_properties;
+ Gtk::MenuItem* _menu_view_messages_window;
+ Gtk::MenuItem* _menu_view_patch_tree_window;
+ Gtk::MenuItem* _menu_help_about;
- Gtk::VBox* m_vbox;
- Gtk::Viewport* m_viewport;
- BreadCrumbBox* m_breadcrumb_box;
+ Gtk::VBox* _vbox;
+ Gtk::Viewport* _viewport;
+ BreadCrumbBox* _breadcrumb_box;
- //Gtk::Statusbar* m_status_bar;
+ //Gtk::Statusbar* _status_bar;
/** Invisible bin used to store breadcrumbs when not shown by a view */
- Gtk::Alignment m_breadcrumb_bin;
+ Gtk::Alignment _breadcrumb_bin;
};
diff --git a/src/progs/ingenuity/Port.cpp b/src/progs/ingenuity/Port.cpp
index e8e795d0..625d0d71 100644
--- a/src/progs/ingenuity/Port.cpp
+++ b/src/progs/ingenuity/Port.cpp
@@ -43,7 +43,7 @@ Port::Port(boost::shared_ptr<LibFlowCanvas::Module> module, SharedPtr<PortModel>
assert(_port_model);
if (destroyable)
- m_menu.items().push_back(Gtk::Menu_Helpers::MenuElem("Destroy",
+ _menu.items().push_back(Gtk::Menu_Helpers::MenuElem("Destroy",
sigc::mem_fun(this, &Port::on_menu_destroy)));
}
diff --git a/src/progs/ingenuity/RenameWindow.cpp b/src/progs/ingenuity/RenameWindow.cpp
index ba08fef6..33071a45 100644
--- a/src/progs/ingenuity/RenameWindow.cpp
+++ b/src/progs/ingenuity/RenameWindow.cpp
@@ -29,16 +29,16 @@ namespace Ingenuity {
RenameWindow::RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
- glade_xml->get_widget("rename_name_entry", m_name_entry);
- glade_xml->get_widget("rename_message_label", m_message_label);
- glade_xml->get_widget("rename_cancel_button", m_cancel_button);
- glade_xml->get_widget("rename_ok_button", m_ok_button);
+ glade_xml->get_widget("rename_name_entry", _name_entry);
+ glade_xml->get_widget("rename_message_label", _message_label);
+ glade_xml->get_widget("rename_cancel_button", _cancel_button);
+ glade_xml->get_widget("rename_ok_button", _ok_button);
- m_name_entry->signal_changed().connect(sigc::mem_fun(this, &RenameWindow::name_changed));
- m_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::cancel_clicked));
- m_ok_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::ok_clicked));
+ _name_entry->signal_changed().connect(sigc::mem_fun(this, &RenameWindow::name_changed));
+ _cancel_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::cancel_clicked));
+ _ok_button->signal_clicked().connect(sigc::mem_fun(this, &RenameWindow::ok_clicked));
- m_ok_button->property_sensitive() = false;
+ _ok_button->property_sensitive() = false;
}
@@ -48,8 +48,8 @@ RenameWindow::RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
void
RenameWindow::set_object(SharedPtr<ObjectModel> object)
{
- m_object = object;
- m_name_entry->set_text(object->path().name());
+ _object = object;
+ _name_entry->set_text(object->path().name());
}
@@ -59,25 +59,25 @@ RenameWindow::set_object(SharedPtr<ObjectModel> object)
void
RenameWindow::name_changed()
{
- assert(m_name_entry);
- assert(m_message_label);
- assert(m_object);
- assert(m_object->parent());
+ assert(_name_entry);
+ assert(_message_label);
+ assert(_object);
+ assert(_object->parent());
- string name = m_name_entry->get_text();
+ string name = _name_entry->get_text();
if (name.find("/") != string::npos) {
- m_message_label->set_text("Name may not contain '/'");
- m_ok_button->property_sensitive() = false;
- //} else if (m_object->parent()->patch_model()->get_node(name) != NULL) {
- } else if (App::instance().store()->object(m_object->parent()->path().base() + name)) {
- m_message_label->set_text("An object already exists with that name.");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("Name may not contain '/'");
+ _ok_button->property_sensitive() = false;
+ //} else if (_object->parent()->patch_model()->get_node(name) != NULL) {
+ } else if (App::instance().store()->object(_object->parent()->path().base() + name)) {
+ _message_label->set_text("An object already exists with that name.");
+ _ok_button->property_sensitive() = false;
} else if (name.length() == 0) {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = false;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = false;
} else {
- m_message_label->set_text("");
- m_ok_button->property_sensitive() = true;
+ _message_label->set_text("");
+ _ok_button->property_sensitive() = true;
}
}
@@ -86,7 +86,7 @@ void
RenameWindow::cancel_clicked()
{
cout << "cancel\n";
- m_name_entry->set_text("");
+ _name_entry->set_text("");
hide();
}
@@ -100,11 +100,11 @@ RenameWindow::cancel_clicked()
void
RenameWindow::ok_clicked()
{
- string name = m_name_entry->get_text();
+ string name = _name_entry->get_text();
assert(name.length() > 0);
assert(name.find("/") == string::npos);
- App::instance().engine()->rename(m_object->path(), name);
+ App::instance().engine()->rename(_object->path(), name);
hide();
}
diff --git a/src/progs/ingenuity/RenameWindow.h b/src/progs/ingenuity/RenameWindow.h
index a00e1e73..3bb430a3 100644
--- a/src/progs/ingenuity/RenameWindow.h
+++ b/src/progs/ingenuity/RenameWindow.h
@@ -44,12 +44,12 @@ private:
void cancel_clicked();
void ok_clicked();
- SharedPtr<ObjectModel> m_object;
+ SharedPtr<ObjectModel> _object;
- Gtk::Entry* m_name_entry;
- Gtk::Label* m_message_label;
- Gtk::Button* m_cancel_button;
- Gtk::Button* m_ok_button;
+ Gtk::Entry* _name_entry;
+ Gtk::Label* _message_label;
+ Gtk::Button* _cancel_button;
+ Gtk::Button* _ok_button;
};
} // namespace Ingenuity
diff --git a/src/progs/ingenuity/SubpatchModule.cpp b/src/progs/ingenuity/SubpatchModule.cpp
index d67f7e26..cead93e4 100644
--- a/src/progs/ingenuity/SubpatchModule.cpp
+++ b/src/progs/ingenuity/SubpatchModule.cpp
@@ -33,7 +33,7 @@ namespace Ingenuity {
SubpatchModule::SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PatchModel> patch)
: NodeModule(canvas, patch),
- m_patch(patch)
+ _patch(patch)
{
assert(canvas);
assert(patch);
@@ -43,15 +43,15 @@ SubpatchModule::SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<
void
SubpatchModule::on_double_click(GdkEventButton* event)
{
- assert(m_patch);
+ assert(_patch);
- SharedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
+ SharedPtr<PatchModel> parent = PtrCast<PatchModel>(_patch->parent());
PatchWindow* const preferred = ( (parent && (event->state & GDK_SHIFT_MASK))
? NULL
: App::instance().window_factory()->patch_window(parent) );
- App::instance().window_factory()->present_patch(m_patch, preferred);
+ App::instance().window_factory()->present_patch(_patch, preferred);
}
@@ -62,15 +62,15 @@ SubpatchModule::on_double_click(GdkEventButton* event)
void
SubpatchModule::browse_to_patch()
{
- assert(m_patch->parent());
+ assert(_patch->parent());
- SharedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
+ SharedPtr<PatchModel> parent = PtrCast<PatchModel>(_patch->parent());
PatchWindow* const preferred = ( (parent)
? App::instance().window_factory()->patch_window(parent)
: NULL );
- App::instance().window_factory()->present_patch(m_patch, preferred);
+ App::instance().window_factory()->present_patch(_patch, preferred);
}
@@ -86,7 +86,7 @@ SubpatchModule::show_dialog()
void
SubpatchModule::menu_remove()
{
- App::instance().engine()->destroy(m_patch->path());
+ App::instance().engine()->destroy(_patch->path());
}
} // namespace Ingenuity
diff --git a/src/progs/ingenuity/SubpatchModule.h b/src/progs/ingenuity/SubpatchModule.h
index 9ae1bea3..7c80f27a 100644
--- a/src/progs/ingenuity/SubpatchModule.h
+++ b/src/progs/ingenuity/SubpatchModule.h
@@ -56,10 +56,10 @@ public:
void browse_to_patch();
void menu_remove();
- SharedPtr<PatchModel> patch() { return m_patch; }
+ SharedPtr<PatchModel> patch() { return _patch; }
protected:
- SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> _patch;
};
diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade
index de785fad..b0cd6684 100644
--- a/src/progs/ingenuity/ingenuity.glade
+++ b/src/progs/ingenuity/ingenuity.glade
@@ -2092,7 +2092,7 @@
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">1 0 99999 1 10 10</property>
+ <property name="adjustment">1 -99999 99999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -2181,7 +2181,7 @@
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
<property name="snap_to_ticks">False</property>
<property name="wrap">False</property>
- <property name="adjustment">1 0 99999 1 10 10</property>
+ <property name="adjustment">1 -99999 99999 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>