summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/App.cpp4
-rw-r--r--src/libs/gui/App.hpp7
-rw-r--r--src/libs/gui/ConfigWindow.cpp88
-rw-r--r--src/libs/gui/ConfigWindow.hpp65
-rw-r--r--src/libs/gui/Configuration.cpp98
-rw-r--r--src/libs/gui/Configuration.hpp6
-rw-r--r--src/libs/gui/DSSIController.cpp9
-rw-r--r--src/libs/gui/Makefile.am2
-rw-r--r--src/libs/gui/NodeMenu.cpp90
-rw-r--r--src/libs/gui/NodeMenu.hpp4
-rw-r--r--src/libs/gui/PatchCanvas.cpp2
-rw-r--r--src/libs/gui/PatchWindow.cpp5
-rw-r--r--src/libs/gui/PatchWindow.hpp1
-rw-r--r--src/libs/gui/ingen_gui.glade23
14 files changed, 16 insertions, 388 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp
index c2d835f3..b36c5c07 100644
--- a/src/libs/gui/App.cpp
+++ b/src/libs/gui/App.cpp
@@ -35,7 +35,6 @@
#include "LoadPluginWindow.hpp"
#include "PatchWindow.hpp"
#include "MessagesWindow.hpp"
-#include "ConfigWindow.hpp"
#include "GladeFactory.hpp"
#include "PatchTreeWindow.hpp"
#include "Configuration.hpp"
@@ -75,7 +74,6 @@ App::App(Ingen::Shared::World* world)
glade_xml->get_widget_derived("connect_win", _connect_window);
glade_xml->get_widget_derived("messages_win", _messages_window);
glade_xml->get_widget_derived("patch_tree_win", _patch_tree_window);
- glade_xml->get_widget_derived("config_win", _config_window);
glade_xml->get_widget("about_win", _about_dialog);
Raul::RDF::World& rdf_world = *world->rdf_world;
@@ -87,8 +85,6 @@ App::App(Ingen::Shared::World* world)
rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#");
rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#");
- _config_window->configuration(_configuration);
-
#ifdef HAVE_SLV2
PluginModel::set_slv2_world(world->slv2_world);
#endif
diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp
index ea549c09..a300d04e 100644
--- a/src/libs/gui/App.hpp
+++ b/src/libs/gui/App.hpp
@@ -54,7 +54,6 @@ namespace Ingen {
namespace GUI {
class MessagesWindow;
-class ConfigWindow;
class PatchCanvas;
class PatchTreeView;
class PatchTreeWindow;
@@ -85,9 +84,8 @@ public:
void quit();
- ConnectWindow* connect_window() const { return _connect_window; }
- Gtk::AboutDialog* about_dialog() const { return _about_dialog; }
- ConfigWindow* configuration_dialog() const { return _config_window; }
+ ConnectWindow* connect_window() const { return _connect_window; }
+ Gtk::AboutDialog* about_dialog() const { return _about_dialog; }
MessagesWindow* messages_dialog() const { return _messages_window; }
PatchTreeWindow* patch_tree() const { return _patch_tree_window; }
Configuration* configuration() const { return _configuration; }
@@ -122,7 +120,6 @@ protected:
ConnectWindow* _connect_window;
MessagesWindow* _messages_window;
PatchTreeWindow* _patch_tree_window;
- ConfigWindow* _config_window;
Gtk::AboutDialog* _about_dialog;
WindowFactory* _window_factory;
diff --git a/src/libs/gui/ConfigWindow.cpp b/src/libs/gui/ConfigWindow.cpp
deleted file mode 100644
index 3fb44626..00000000
--- a/src/libs/gui/ConfigWindow.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <iostream>
-#include <cassert>
-#include <algorithm>
-#include <cctype>
-#include "client/NodeModel.hpp"
-#include "ConfigWindow.hpp"
-
-using namespace std;
-
-namespace Ingen {
-namespace GUI {
-
-
-ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
-: Gtk::Window(cobject),
- _configuration(NULL)
-{
- 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);
-
- _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));
-}
-
-
-/** Sets the state manager for this window and initializes everything.
- *
- * This function MUST be called before using the window in any way!
- */
-void
-ConfigWindow::configuration(Configuration* sm)
-{
- _configuration = sm;
- _path_entry->set_text(sm->patch_path());
-}
-
-
-
-///// Event Handlers //////
-
-
-void
-ConfigWindow::save_clicked()
-{
- _configuration->patch_path(_path_entry->get_text());
- _configuration->apply_settings();
- _configuration->save_settings();
-}
-
-
-void
-ConfigWindow::cancel_clicked()
-{
- hide();
-}
-
-
-void
-ConfigWindow::ok_clicked()
-{
- _configuration->patch_path(_path_entry->get_text());
- _configuration->apply_settings();
- hide();
-}
-
-
-} // namespace GUI
-} // namespace Ingen
diff --git a/src/libs/gui/ConfigWindow.hpp b/src/libs/gui/ConfigWindow.hpp
deleted file mode 100644
index dce40218..00000000
--- a/src/libs/gui/ConfigWindow.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef CONFIGWINDOW_H
-#define CONFIGWINDOW_H
-
-#include <list>
-#include <libglademm/xml.h>
-#include <libglademm.h>
-#include <gtkmm.h>
-#include "client/PluginModel.hpp"
-#include "Configuration.hpp"
-
-using std::list;
-using Ingen::Client::PluginModel;
-
-namespace Ingen {
-namespace GUI {
-
-
-/** 'Configuration' window.
- *
- * Loaded by glade as a derived object.
- *
- * \ingroup GUI
- */
-class ConfigWindow : public Gtk::Window
-{
-public:
- ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
-
- void configuration(Configuration* sm);
-
-private:
- void save_clicked();
- void cancel_clicked();
- void ok_clicked();
-
- Configuration* _configuration;
-
- Gtk::Entry* _path_entry;
- Gtk::Button* _save_button;
- Gtk::Button* _cancel_button;
- Gtk::Button* _ok_button;
-};
-
-
-} // namespace GUI
-} // namespace Ingen
-
-#endif // CONFIGWINDOW_H
diff --git a/src/libs/gui/Configuration.cpp b/src/libs/gui/Configuration.cpp
index afeba77e..ffef8137 100644
--- a/src/libs/gui/Configuration.cpp
+++ b/src/libs/gui/Configuration.cpp
@@ -38,9 +38,8 @@ using namespace Ingen::Client;
Configuration::Configuration()
- : _patch_path("/usr/share/ingen/patches:/usr/local/share/ingen/patches")
// Agave FTW
- , _audio_port_color( 0x0D597FFF)
+ : _audio_port_color( 0x0D597FFF)
, _control_port_color(0x2F7F0DFF)
, _midi_port_color( 0x7F240DFF)
, _osc_port_color( 0x5D0D7FFF)
@@ -58,49 +57,8 @@ Configuration::~Configuration()
*/
void
Configuration::load_settings(string filename)
-{
-#if 0
- if (filename == "")
- filename = string(getenv("HOME")).append("/.omgtkrc");
-
- std::ifstream is;
- is.open(filename.c_str(), std::ios::in);
-
- if ( ! is.good()) {
- cout << "[Configuration] Unable to open settings file " << filename << endl;
- return;
- } else {
- cout << "[Configuration] Loading settings from " << filename << endl;
- }
-
- string s;
-
- is >> s;
- if (s != "file_version") {
- cerr << "[Configuration] Corrupt settings file, load aborted." << endl;
- is.close();
- return;
- }
-
- is >> s;
- if (s != "1") {
- cerr << "[Configuration] Unknown settings file version number, load aborted." << endl;
- is.close();
- return;
- }
-
- is >> s;
- if (s != "patch_path") {
- cerr << "[Configuration] Corrupt settings file, load aborted." << endl;
- is.close();
- return;
- }
-
- is >> s;
- _patch_path = s;
-
- is.close();
-#endif
+{
+ /* ... */
}
@@ -110,25 +68,7 @@ Configuration::load_settings(string filename)
void
Configuration::save_settings(string filename)
{
-#if 0
- if (filename == "")
- filename = string(getenv("HOME")).append("/.omgtkrc");
-
- std::ofstream os;
- os.open(filename.c_str(), std::ios::out);
-
- if ( ! os.good()) {
- cout << "[Configuration] Unable to write to setting file " << filename << endl;
- return;
- } else {
- cout << "[Configuration] Saving settings to " << filename << endl;
- }
-
- os << "file_version 1" << endl;
- os << "patch_path " << _patch_path << endl;
-
- os.close();
-#endif
+ /* ... */
}
@@ -138,7 +78,7 @@ Configuration::save_settings(string filename)
void
Configuration::apply_settings()
{
- //App::instance().loader()->set_patch_path(_patch_path);
+ /* ... */
}
@@ -163,34 +103,6 @@ Configuration::get_port_color(const PortModel* pi)
return 0xFF0000B0;
}
-/*
-Coord
-Configuration::get_window_location(const string& id)
-{
- return _window_locations[id];
-}
-
-
-void
-Configuration::set_window_location(const string& id, Coord loc)
-{
- _window_locations[id] = loc;
-}
-
-
-Coord
-Configuration::get_window_size(const string& id)
-{
- return _window_sizes[id];
-}
-
-
-void
-Configuration::set_window_size(const string& id, Coord size)
-{
- _window_sizes[id] = size;
-}*/
-
} // namespace GUI
} // namespace Ingen
diff --git a/src/libs/gui/Configuration.hpp b/src/libs/gui/Configuration.hpp
index 9f7cbb08..ab96cc80 100644
--- a/src/libs/gui/Configuration.hpp
+++ b/src/libs/gui/Configuration.hpp
@@ -50,18 +50,12 @@ public:
void apply_settings();
- string patch_path() { return _patch_path; }
- void patch_path(const string& path) { _patch_path = path; }
-
const string& patch_folder() { return _patch_folder; }
void set_patch_folder(const string& f) { _patch_folder = f; }
uint32_t get_port_color(const PortModel* pi);
private:
- /** Search path for patch files. Colon delimited, as usual. */
- string _patch_path;
-
/** Most recent patch folder shown in open dialog */
string _patch_folder;
diff --git a/src/libs/gui/DSSIController.cpp b/src/libs/gui/DSSIController.cpp
index b5537f82..9bb037ba 100644
--- a/src/libs/gui/DSSIController.cpp
+++ b/src/libs/gui/DSSIController.cpp
@@ -229,11 +229,11 @@ DSSIController::attempt_to_show_gui()
}
if ((S_ISREG(buf.st_mode) || S_ISLNK(buf.st_mode)) &&
- (buf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
+ (buf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
if (verbose) {
fprintf(stderr, "%s: trying to execute GUI at \"%s\"\n",
- myName, filename);
+ myName, filename);
}
if (fork() == 0) {
@@ -267,8 +267,9 @@ void
DSSIController::show_menu(GdkEventButton* event)
{
#if 0
- if (_banks_dirty)
- update_program_menu();
+ if (_banks_dirty)
+ update_program_menu();
+
NodeController::show_menu(event);
#endif
}
diff --git a/src/libs/gui/Makefile.am b/src/libs/gui/Makefile.am
index f3b2e3ae..944df91f 100644
--- a/src/libs/gui/Makefile.am
+++ b/src/libs/gui/Makefile.am
@@ -38,8 +38,6 @@ libingen_gui_la_SOURCES = \
BreadCrumb.hpp \
BreadCrumbBox.cpp \
BreadCrumbBox.hpp \
- ConfigWindow.cpp \
- ConfigWindow.hpp \
Configuration.cpp \
Configuration.hpp \
ConnectWindow.cpp \
diff --git a/src/libs/gui/NodeMenu.cpp b/src/libs/gui/NodeMenu.cpp
index 4b00a13b..a4f91e95 100644
--- a/src/libs/gui/NodeMenu.cpp
+++ b/src/libs/gui/NodeMenu.cpp
@@ -93,91 +93,6 @@ NodeMenu::NodeMenu(SharedPtr<NodeModel> node)
//model->destroyed_sig.connect(sigc::mem_fun(this, &NodeMenu::destroy));
}
-#if 0
-NodeMenu::~NodeMenu()
-{
- cerr << "~NodeMenu()\n";
-}
-
-void
-NodeMenu::destroy()
-{
- cerr << "FIXME: NODE DESTROYED\n";
- //SharedPtr<ObjectModel> model = _model;
- //m_model.reset();
-}
-#endif
-
-void
-NodeMenu::set_path(const Path& new_path)
-{
- cerr << "FIXME: rename\n";
- /*
- remove_from_store();
-
- // Rename ports
- for (list<PortModel*>::const_iterator i = _node->ports().begin();
- i != _node->ports().end(); ++i) {
- ObjectController* const pc = (*i)->controller();
- assert(pc != NULL);
- pc->set_path(_model->path().base() + pc->model()->name());
- }
-
- // Handle bridge port, if this node represents one
- if (_bridge_port != NULL)
- _bridge_port->set_path(new_path);
-
- if (_module != NULL)
- _module->canvas()->rename_module(_node->path().name(), new_path.name());
-
- ObjectController::set_path(new_path);
-
- add_to_store();
- */
-}
-
-#if 0
-void
-NodeMenu::destroy()
-{
- PatchController* pc = ((PatchController*)_model->parent()->controller());
- assert(pc != NULL);
-
- //remove_from_store();
- //pc->remove_node(_model->path().name());
- cerr << "FIXME: remove node\n";
-
- if (_bridge_port != NULL)
- _bridge_port->destroy();
- _bridge_port = NULL;
-
- //if (_module != NULL)
- // delete _module;
-}
-#endif
-
-#if 0
-void
-NodeMenu::add_port(SharedPtr<PortModel> pm)
-{
- assert(pm->parent().get() == _node.get());
- assert(pm->parent() == _node);
- assert(_node->get_port(pm->path().name()) == pm);
-
- //cout << "[NodeMenu] Adding port " << pm->path() << endl;
-
- /*
- if (_module != NULL) {
- // (formerly PortController)
- pc->create_port(_module);
- _module->resize();
-
- // Enable "Controls" menu item on module
- if (has_control_inputs())
- enable_controls_menuitem();
- }*/
-}
-#endif
void
NodeMenu::on_menu_destroy()
@@ -206,7 +121,7 @@ NodeMenu::polyphonic_changed(bool polyphonic)
void
NodeMenu::on_menu_clone()
{
- cerr << "FIXME: clone broken\n";
+ cerr << "[NodeMenu] FIXME: clone broken\n";
/*
assert(_node);
//assert(_parent != NULL);
@@ -278,9 +193,6 @@ void
NodeMenu::disable_controls_menuitem()
{
_controls_menuitem->property_sensitive() = false;
-
- //if (_control_window != NULL)
- // _control_window->hide();
}
diff --git a/src/libs/gui/NodeMenu.hpp b/src/libs/gui/NodeMenu.hpp
index e6f63d73..dd31c4ee 100644
--- a/src/libs/gui/NodeMenu.hpp
+++ b/src/libs/gui/NodeMenu.hpp
@@ -44,8 +44,6 @@ class NodeMenu : public Gtk::Menu
public:
NodeMenu(SharedPtr<NodeModel> node);
- void set_path(const Path& new_path);
-
virtual void program_add(int bank, int program, const string& name) {}
virtual void program_remove(int bank, int program) {}
@@ -56,8 +54,6 @@ protected:
virtual void enable_controls_menuitem();
virtual void disable_controls_menuitem();
- //virtual void add_port(SharedPtr<PortModel> pm);
-
void on_menu_destroy();
void on_menu_polyphonic();
void on_menu_clone();
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index 0992ba81..dc1504ef 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -346,7 +346,7 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
// Midi binding/learn shortcut
if (src->model()->is_midi() && dst->model()->is_control())
{
- cerr << "FIXME: MIDI binding" << endl;
+ cerr << "[PatchCanvas] FIXME: MIDI binding shortcut" << endl;
#if 0
SharedPtr<PluginModel> pm(new PluginModel(PluginModel::Internal, "", "midi_control_in", ""));
SharedPtr<NodeModel> nm(new NodeModel(pm, _patch->path().base()
diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp
index c3e9149f..76e94b44 100644
--- a/src/libs/gui/PatchWindow.cpp
+++ b/src/libs/gui/PatchWindow.cpp
@@ -30,7 +30,7 @@
#include "LoadSubpatchWindow.hpp"
#include "NodeControlWindow.hpp"
#include "PatchPropertiesWindow.hpp"
-#include "ConfigWindow.hpp"
+#include "Configuration.hpp"
#include "MessagesWindow.hpp"
#include "PatchTreeWindow.hpp"
#include "BreadCrumbBox.hpp"
@@ -68,7 +68,6 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
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);
@@ -103,8 +102,6 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
sigc::mem_fun(this, &PatchWindow::event_delete));
_menu_quit->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_quit));
- _menu_configuration->signal_activate().connect(
- sigc::mem_fun(App::instance().configuration_dialog(), &ConfigWindow::show));
_menu_fullscreen->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_fullscreen_toggled));
_menu_arrange->signal_activate().connect(
diff --git a/src/libs/gui/PatchWindow.hpp b/src/libs/gui/PatchWindow.hpp
index 08048bd3..5120ba5a 100644
--- a/src/libs/gui/PatchWindow.hpp
+++ b/src/libs/gui/PatchWindow.hpp
@@ -119,7 +119,6 @@ private:
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;
diff --git a/src/libs/gui/ingen_gui.glade b/src/libs/gui/ingen_gui.glade
index e5229e0b..849f5f8a 100644
--- a/src/libs/gui/ingen_gui.glade
+++ b/src/libs/gui/ingen_gui.glade
@@ -102,27 +102,6 @@
</widget>
</child>
<child>
- <widget class="GtkSeparatorMenuItem" id="separator10">
- <property name="visible">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkImageMenuItem" id="patch_configuration_menuitem">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Configure OmGtk</property>
- <property name="label" translatable="yes">Confi_guration...</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_patch_configuration_menuitem_activate"/>
- <child internal-child="image">
- <widget class="GtkImage" id="image2127">
- <property name="visible">True</property>
- <property name="stock">gtk-preferences</property>
- <property name="icon_size">1</property>
- </widget>
- </child>
- </widget>
- </child>
- <child>
<widget class="GtkSeparatorMenuItem" id="separator11">
<property name="visible">True</property>
</widget>
@@ -1391,7 +1370,7 @@
<widget class="GtkSpinButton" id="patch_view_poly_spin">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="adjustment">1 1 100 1 10 10</property>
+ <property name="adjustment">1 1 512 1 10 10</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
</widget>