diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/App.cpp | 14 | ||||
-rw-r--r-- | src/gui/App.hpp | 12 | ||||
-rw-r--r-- | src/gui/GraphBox.cpp | 16 | ||||
-rw-r--r-- | src/gui/GraphPortModule.cpp | 2 | ||||
-rw-r--r-- | src/gui/LoadGraphWindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/NodeModule.cpp | 6 | ||||
-rw-r--r-- | src/gui/Port.cpp | 4 | ||||
-rw-r--r-- | src/gui/Style.cpp (renamed from src/gui/Configuration.cpp) | 14 | ||||
-rw-r--r-- | src/gui/Style.hpp (renamed from src/gui/Configuration.hpp) | 19 | ||||
-rw-r--r-- | src/gui/wscript | 2 |
10 files changed, 45 insertions, 52 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index ec7321b7..30c31f64 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -36,14 +36,14 @@ #include "raul/Path.hpp" #include "App.hpp" -#include "Configuration.hpp" #include "ConnectWindow.hpp" +#include "GraphTreeWindow.hpp" +#include "GraphWindow.hpp" #include "LoadPluginWindow.hpp" #include "MessagesWindow.hpp" #include "NodeModule.hpp" -#include "GraphTreeWindow.hpp" -#include "GraphWindow.hpp" #include "Port.hpp" +#include "Style.hpp" #include "SubgraphModule.hpp" #include "ThreadedLoader.hpp" #include "WidgetFactory.hpp" @@ -66,7 +66,7 @@ class Port; Gtk::Main* App::_main = 0; App::App(Ingen::World* world) - : _configuration(new Configuration(*this)) + : _style(new Style(*this)) , _about_dialog(NULL) , _window_factory(new WindowFactory(*this)) , _world(world) @@ -90,7 +90,7 @@ App::App(Ingen::World* world) App::~App() { - delete _configuration; + delete _style; delete _window_factory; } @@ -107,8 +107,8 @@ App::create(Ingen::World* world) App* app = new App(world); // Load configuration settings - app->configuration()->load_settings(); - app->configuration()->apply_settings(); + app->style()->load_settings(); + app->style()->apply_settings(); // Set default window icon app->_about_dialog->property_program_name() = "Ingen"; diff --git a/src/gui/App.hpp b/src/gui/App.hpp index 8cf2b61e..2b27de25 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -54,15 +54,15 @@ namespace Ingen { namespace GUI { -class MessagesWindow; +class ConnectWindow; class GraphCanvas; class GraphTreeView; class GraphTreeWindow; -class ConnectWindow; -class Configuration; +class MessagesWindow; +class Port; +class Style; class ThreadedLoader; class WindowFactory; -class Port; /** Ingen Gtk Application. * \ingroup GUI @@ -103,7 +103,7 @@ public: ConnectWindow* connect_window() const { return _connect_window; } MessagesWindow* messages_dialog() const { return _messages_window; } GraphTreeWindow* graph_tree() const { return _graph_tree_window; } - Configuration* configuration() const { return _configuration; } + Style* style() const { return _style; } WindowFactory* window_factory() const { return _window_factory; } Glib::RefPtr<Gdk::Pixbuf> icon_from_path(const std::string& path, int size); @@ -156,7 +156,7 @@ protected: SharedPtr<Client::ClientStore> _store; SharedPtr<ThreadedLoader> _loader; - Configuration* _configuration; + Style* _style; ConnectWindow* _connect_window; MessagesWindow* _messages_window; diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 2fd796d8..a2f76100 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -30,16 +30,16 @@ #include "App.hpp" #include "BreadCrumbs.hpp" -#include "Configuration.hpp" #include "ConnectWindow.hpp" -#include "LoadGraphWindow.hpp" -#include "LoadPluginWindow.hpp" -#include "MessagesWindow.hpp" -#include "NewSubgraphWindow.hpp" #include "GraphCanvas.hpp" #include "GraphTreeWindow.hpp" #include "GraphView.hpp" #include "GraphWindow.hpp" +#include "LoadGraphWindow.hpp" +#include "LoadPluginWindow.hpp" +#include "MessagesWindow.hpp" +#include "NewSubgraphWindow.hpp" +#include "Style.hpp" #include "ThreadedLoader.hpp" #include "WidgetFactory.hpp" #include "WindowFactory.hpp" @@ -477,8 +477,8 @@ GraphBox::event_save_as() const Raul::Atom& document = _graph->get_property(uris.ingen_document); if (document.type() == uris.forge.URI) dialog.set_uri(document.get_uri()); - else if (_app->configuration()->graph_folder().length() > 0) - dialog.set_current_folder(_app->configuration()->graph_folder()); + else if (_app->style()->graph_folder().length() > 0) + dialog.set_current_folder(_app->style()->graph_folder()); if (dialog.run() != Gtk::RESPONSE_OK) break; @@ -552,7 +552,7 @@ GraphBox::event_save_as() STATUS_CONTEXT_GRAPH); } - _app->configuration()->set_graph_folder(dialog.get_current_folder()); + _app->style()->set_graph_folder(dialog.get_current_folder()); break; } } diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp index c3c3bda3..d819a68a 100644 --- a/src/gui/GraphPortModule.cpp +++ b/src/gui/GraphPortModule.cpp @@ -24,7 +24,7 @@ #include "ingen/client/GraphModel.hpp" #include "App.hpp" -#include "Configuration.hpp" +#include "Style.hpp" #include "GraphCanvas.hpp" #include "GraphPortModule.hpp" #include "GraphWindow.hpp" diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp index b5297c86..a7daf90f 100644 --- a/src/gui/LoadGraphWindow.cpp +++ b/src/gui/LoadGraphWindow.cpp @@ -28,9 +28,9 @@ #include "ingen/runtime_paths.hpp" #include "App.hpp" -#include "Configuration.hpp" -#include "LoadGraphWindow.hpp" #include "GraphView.hpp" +#include "LoadGraphWindow.hpp" +#include "Style.hpp" #include "ThreadedLoader.hpp" using namespace std; @@ -125,8 +125,8 @@ LoadGraphWindow::set_graph(SharedPtr<const GraphModel> graph) void LoadGraphWindow::on_show() { - if (_app->configuration()->graph_folder().length() > 0) - set_current_folder(_app->configuration()->graph_folder()); + if (_app->style()->graph_folder().length() > 0) + set_current_folder(_app->style()->graph_folder()); Gtk::FileChooserDialog::on_show(); } diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 144bd1be..d70e4fe1 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -31,13 +31,13 @@ #include "raul/Atom.hpp" #include "App.hpp" -#include "Configuration.hpp" -#include "NodeMenu.hpp" -#include "NodeModule.hpp" #include "GraphCanvas.hpp" #include "GraphWindow.hpp" +#include "NodeMenu.hpp" +#include "NodeModule.hpp" #include "Port.hpp" #include "RenameWindow.hpp" +#include "Style.hpp" #include "SubgraphModule.hpp" #include "WidgetFactory.hpp" #include "WindowFactory.hpp" diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 843f0816..0027e480 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -25,10 +25,10 @@ #include "ingen/client/PortModel.hpp" #include "App.hpp" -#include "Configuration.hpp" #include "GraphWindow.hpp" #include "Port.hpp" #include "PortMenu.hpp" +#include "Style.hpp" #include "WidgetFactory.hpp" #include "WindowFactory.hpp" @@ -72,7 +72,7 @@ Port::Port(App& app, bool flip) : Ganv::Port(module, name, flip ? (!pm->is_input()) : pm->is_input(), - app.configuration()->get_port_color(pm.get())) + app.style()->get_port_color(pm.get())) , _app(app) , _port_model(pm) , _pressed(false) diff --git a/src/gui/Configuration.cpp b/src/gui/Style.cpp index 0932c2ee..3c004a20 100644 --- a/src/gui/Configuration.cpp +++ b/src/gui/Style.cpp @@ -27,7 +27,7 @@ #include "ingen/serialisation/Parser.hpp" #include "App.hpp" -#include "Configuration.hpp" +#include "Style.hpp" #include "Port.hpp" using namespace std; @@ -37,7 +37,7 @@ namespace GUI { using namespace Ingen::Client; -Configuration::Configuration(App& app) +Style::Style(App& app) // Colours from the Tango palette with modified V : _app(app) , _audio_port_color(0x4A8A0EFF) // Green @@ -48,7 +48,7 @@ Configuration::Configuration(App& app) { } -Configuration::~Configuration() +Style::~Style() { } @@ -56,7 +56,7 @@ Configuration::~Configuration() * the default location. */ void -Configuration::load_settings(string filename) +Style::load_settings(string filename) { /* ... */ } @@ -65,7 +65,7 @@ Configuration::load_settings(string filename) * default location. */ void -Configuration::save_settings(string filename) +Style::save_settings(string filename) { /* ... */ } @@ -74,13 +74,13 @@ Configuration::save_settings(string filename) * need updating. */ void -Configuration::apply_settings() +Style::apply_settings() { /* ... */ } uint32_t -Configuration::get_port_color(const Client::PortModel* p) +Style::get_port_color(const Client::PortModel* p) { assert(p != NULL); const URIs& uris = _app.uris(); diff --git a/src/gui/Configuration.hpp b/src/gui/Style.hpp index 0a9a81f7..e1bfaeb1 100644 --- a/src/gui/Configuration.hpp +++ b/src/gui/Style.hpp @@ -14,8 +14,8 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INGEN_GUI_CONFIGURATION_HPP -#define INGEN_GUI_CONFIGURATION_HPP +#ifndef INGEN_GUI_STYLE_HPP +#define INGEN_GUI_STYLE_HPP #include <stdint.h> @@ -31,18 +31,11 @@ namespace GUI { class App; class Port; -/** Singleton state manager for the entire app. - * - * Stores settings like color preferences, search paths, etc. - * (ie any user-defined preferences to be stoed in the rc file). - * - * \ingroup GUI - */ -class Configuration +class Style { public: - explicit Configuration(App& app); - ~Configuration(); + explicit Style(App& app); + ~Style(); void load_settings(std::string filename = ""); void save_settings(std::string filename = ""); @@ -70,5 +63,5 @@ private: } // namespace GUI } // namespace Ingen -#endif // INGEN_GUI_CONFIGURATION_HPP +#endif // INGEN_GUI_STYLE_HPP diff --git a/src/gui/wscript b/src/gui/wscript index 7d022b27..4732e56f 100644 --- a/src/gui/wscript +++ b/src/gui/wscript @@ -29,7 +29,6 @@ def build(bld): obj.source = ''' App.cpp BreadCrumbs.cpp - Configuration.cpp ConnectWindow.cpp Edge.cpp GraphBox.cpp @@ -50,6 +49,7 @@ def build(bld): PortPropertiesWindow.cpp PropertiesWindow.cpp RenameWindow.cpp + Style.cpp SubgraphModule.cpp ThreadedLoader.cpp WidgetFactory.cpp |