diff options
author | David Robillard <d@drobilla.net> | 2020-11-29 18:11:08 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-29 18:11:08 +0100 |
commit | 4265b9a78dac2b7f26f505c7b90b0d88494e93c2 (patch) | |
tree | cf0a12834ac371df57b954b7306949108b6cb35f | |
parent | fc8d0597a1ec0a1e2fcfd75adff7e2e9f5ba8c30 (diff) | |
download | patchage-4265b9a78dac2b7f26f505c7b90b0d88494e93c2.tar.gz patchage-4265b9a78dac2b7f26f505c7b90b0d88494e93c2.tar.bz2 patchage-4265b9a78dac2b7f26f505c7b90b0d88494e93c2.zip |
Clean up Patchage class
-rw-r--r-- | src/Patchage.cpp | 6 | ||||
-rw-r--r-- | src/Patchage.hpp | 24 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 94dfd34..1eaeb6c 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -768,6 +768,12 @@ Patchage::save() } void +Patchage::quit() +{ + _main_win->hide(); +} + +void Patchage::on_quit() { if (_alsa_driver) { diff --git a/src/Patchage.hpp b/src/Patchage.hpp index ef0e20a..cba8204 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -51,21 +51,18 @@ #include <memory> #include <mutex> #include <queue> -#include <set> #include <string> class AudioDriver; class PatchageCanvas; class Configuration; -namespace Ganv { -class Module; -} // namespace Ganv - +/// Main application class class Patchage { public: explicit Patchage(Options options); + ~Patchage(); Patchage(const Patchage&) = delete; @@ -76,17 +73,10 @@ public: const std::unique_ptr<PatchageCanvas>& canvas() const { return _canvas; } - Gtk::Window* window() { return _main_win.get(); } - ILog& log() { return _log; } - Metadata& metadata() { return _metadata; } - const Configuration& conf() const { return _conf; } - Configuration& conf() { return _conf; } - void attach(); - void save(); - void quit() { _main_win->hide(); } - void refresh(); + void save(); + void quit(); void driver_attached(ClientType type); void driver_detached(ClientType type); @@ -101,6 +91,12 @@ public: bool sort_ports() const { return _menu_view_sort_ports->get_active(); } + Gtk::Window* window() { return _main_win.get(); } + ILog& log() { return _log; } + Metadata& metadata() { return _metadata; } + const Configuration& conf() const { return _conf; } + Configuration& conf() { return _conf; } + protected: class BufferSizeColumns : public Gtk::TreeModel::ColumnRecord { |