diff options
author | David Robillard <d@drobilla.net> | 2006-09-10 03:42:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-10 03:42:59 +0000 |
commit | 8854610aac91caaf6bb8db782cc4c9bd2ca53c52 (patch) | |
tree | b92d385755eec2404309aba384850396bedf0184 /src/progs | |
parent | a90181962d3f9eca3e00f665465bbd66bdd79927 (diff) | |
download | ingen-8854610aac91caaf6bb8db782cc4c9bd2ca53c52.tar.gz ingen-8854610aac91caaf6bb8db782cc4c9bd2ca53c52.tar.bz2 ingen-8854610aac91caaf6bb8db782cc4c9bd2ca53c52.zip |
GUI redesigning.
git-svn-id: http://svn.drobilla.net/lad/ingen@125 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r-- | src/progs/ingenuity/BreadCrumb.h | 23 | ||||
-rw-r--r-- | src/progs/ingenuity/Makefile.am | 4 | ||||
-rw-r--r-- | src/progs/ingenuity/NewSubpatchWindow.cpp | 4 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchView.cpp | 72 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchView.h | 30 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchWindow.cpp | 166 | ||||
-rw-r--r-- | src/progs/ingenuity/PatchWindow.h | 22 | ||||
-rw-r--r-- | src/progs/ingenuity/ingenuity.glade | 431 |
8 files changed, 409 insertions, 343 deletions
diff --git a/src/progs/ingenuity/BreadCrumb.h b/src/progs/ingenuity/BreadCrumb.h index 9b4c25cd..66e6d40a 100644 --- a/src/progs/ingenuity/BreadCrumb.h +++ b/src/progs/ingenuity/BreadCrumb.h @@ -17,10 +17,12 @@ #ifndef BREADCRUMB_H #define BREADCRUMB_H +// FIXME: remove +#include <iostream> +using std::cerr; using std::endl; + #include <gtkmm.h> -#include "PatchWindow.h" -#include "PatchController.h" -#include "PatchModel.h" +#include "util/Path.h" namespace Ingenuity { @@ -32,19 +34,14 @@ namespace Ingenuity { class BreadCrumb : public Gtk::ToggleButton { public: - BreadCrumb(PatchWindow* window, const Path& path) - : m_window(window) - , m_path(path) + BreadCrumb(const Path& path) + : m_path(path) { set_border_width(0); set_path(path); - signal_clicked().connect(sigc::bind(sigc::mem_fun( - m_window, &PatchWindow::breadcrumb_clicked), this)); show_all(); } - //PatchController* patch() { return m_patch; } - void set_path(const Path& path) { remove(); @@ -55,12 +52,10 @@ public: add(*lab); } - Path& path() { return m_path; } + const Path& path() { return m_path; } private: - PatchWindow* m_window; - Path m_path; - //PatchController* m_patch; + Path m_path; }; } // namespace Ingenuity diff --git a/src/progs/ingenuity/Makefile.am b/src/progs/ingenuity/Makefile.am index a014286c..7cc405c1 100644 --- a/src/progs/ingenuity/Makefile.am +++ b/src/progs/ingenuity/Makefile.am @@ -22,6 +22,9 @@ ingenuity_SOURCES = \ cmdline.h \ cmdline.c \ main.cpp \ + BreadCrumb.h \ + BreadCrumbBox.h \ + BreadCrumbBox.cpp \ ConnectWindow.h \ ConnectWindow.cpp \ App.h \ @@ -58,7 +61,6 @@ ingenuity_SOURCES = \ PatchView.cpp \ PatchWindow.h \ PatchWindow.cpp \ - BreadCrumb.h \ OmFlowCanvas.h \ OmFlowCanvas.cpp \ ../../common/types.h \ diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp index 49122a21..0b94e3d2 100644 --- a/src/progs/ingenuity/NewSubpatchWindow.cpp +++ b/src/progs/ingenuity/NewSubpatchWindow.cpp @@ -63,8 +63,8 @@ void NewSubpatchWindow::name_changed() { string name = m_name_entry->get_text(); - if (name.find("/") != string::npos) { - m_message_label->set_text("Name may not contain '/'"); + 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_controller->patch_model()->get_node(name)) { m_message_label->set_text("An object already exists with that name."); diff --git a/src/progs/ingenuity/PatchView.cpp b/src/progs/ingenuity/PatchView.cpp index 644e0253..eb1fc1ce 100644 --- a/src/progs/ingenuity/PatchView.cpp +++ b/src/progs/ingenuity/PatchView.cpp @@ -35,19 +35,21 @@ namespace Ingenuity { PatchView::PatchView(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) : Gtk::Box(cobject), - m_patch(NULL), - m_canvas(NULL), - m_enable_signal(true) + _patch(NULL), + _canvas(NULL), + _breadcrumb_container(NULL), + _enable_signal(true) { property_visible() = false; - xml->get_widget("patch_canvas_scrolledwindow", m_canvas_scrolledwindow); - xml->get_widget("patch_zoom_scale", m_zoom_slider); - xml->get_widget("patch_polyphony_label", m_polyphony_label); - xml->get_widget("patch_process_checkbutton", m_process_checkbutton); + xml->get_widget("patch_view_scrolledwindow", _canvas_scrolledwindow); + xml->get_widget("patch_view_zoom_full_but", _zoom_full_but); + xml->get_widget("patch_view_zoom_normal_but", _zoom_normal_but); + xml->get_widget("patch_view_poly_spin", _poly_spin); + xml->get_widget("patch_view_process_but", _process_but); + xml->get_widget("patch_view_breadcrumb_container", _breadcrumb_container); - m_zoom_slider->signal_value_changed().connect( sigc::mem_fun(this, &PatchView::zoom_changed)); - m_process_checkbutton->signal_toggled().connect(sigc::mem_fun(this, &PatchView::process_toggled)); + _process_but->signal_toggled().connect(sigc::mem_fun(this, &PatchView::process_toggled)); } @@ -59,19 +61,17 @@ void PatchView::patch_controller(PatchController* pc) { //m_patch = new PatchController(pm, controller); - m_patch = pc; + _patch = pc; - m_canvas = new OmFlowCanvas(pc, 1600*2, 1200*2); + _canvas = new OmFlowCanvas(pc, 1600*2, 1200*2); - m_canvas_scrolledwindow->add(*m_canvas); - //m_canvas->show(); - //m_canvas_scrolledwindow->show(); + _canvas_scrolledwindow->add(*_canvas); + //_canvas->show(); + //_canvas_scrolledwindow->show(); - char txt[4]; - snprintf(txt, 8, "%zd", pc->patch_model()->poly()); - m_polyphony_label->set_text(txt); + _poly_spin->set_value(pc->patch_model()->poly()); - //m_description_window->patch_model(pc->model()); + //_description_window->patch_model(pc->model()); pc->patch_model()->enabled_sig.connect(sigc::mem_fun(this, &PatchView::enable)); pc->patch_model()->disabled_sig.connect(sigc::mem_fun(this, &PatchView::disable)); @@ -81,31 +81,23 @@ PatchView::patch_controller(PatchController* pc) void PatchView::show_control_window() { - if (m_patch != NULL) - m_patch->show_control_window(); -} - - -void -PatchView::zoom_changed() -{ - float z = m_zoom_slider->get_value(); - m_canvas->zoom(z); + if (_patch != NULL) + _patch->show_control_window(); } void PatchView::process_toggled() { - if (!m_enable_signal) + if (!_enable_signal) return; - if (m_process_checkbutton->get_active()) { - App::instance().engine()->enable_patch(m_patch->model()->path()); - App::instance().patch_tree()->patch_enabled(m_patch->model()->path()); + if (_process_but->get_active()) { + App::instance().engine()->enable_patch(_patch->model()->path()); + App::instance().patch_tree()->patch_enabled(_patch->model()->path()); } else { - App::instance().engine()->disable_patch(m_patch->model()->path()); - App::instance().patch_tree()->patch_disabled(m_patch->model()->path()); + App::instance().engine()->disable_patch(_patch->model()->path()); + App::instance().patch_tree()->patch_disabled(_patch->model()->path()); } } @@ -113,18 +105,18 @@ PatchView::process_toggled() void PatchView::enable() { - m_enable_signal = false; - m_process_checkbutton->set_active(true); - m_enable_signal = true; + _enable_signal = false; + _process_but->set_active(true); + _enable_signal = true; } void PatchView::disable() { - m_enable_signal = false; - m_process_checkbutton->set_active(false); - m_enable_signal = true; + _enable_signal = false; + _process_but->set_active(false); + _enable_signal = true; } diff --git a/src/progs/ingenuity/PatchView.h b/src/progs/ingenuity/PatchView.h index 9772154b..7f91f6cf 100644 --- a/src/progs/ingenuity/PatchView.h +++ b/src/progs/ingenuity/PatchView.h @@ -59,26 +59,32 @@ public: void patch_controller(PatchController* pc); - OmFlowCanvas* canvas() const { return m_canvas; } - PatchController* patch_controller() const { return m_patch; } - + OmFlowCanvas* canvas() const { return _canvas; } + PatchController* patch_controller() const { return _patch; } + Gtk::Viewport* breadcrumb_container() const { return _breadcrumb_container; } void show_control_window(); - void zoom_changed(); void process_toggled(); void enable(); void disable(); private: - PatchController* m_patch; - OmFlowCanvas* m_canvas; - - Gtk::ScrolledWindow* m_canvas_scrolledwindow; - Gtk::HScale* m_zoom_slider; - Gtk::Label* m_polyphony_label; - Gtk::CheckButton* m_process_checkbutton; + PatchController* _patch; + OmFlowCanvas* _canvas; - bool m_enable_signal; + Gtk::ScrolledWindow* _canvas_scrolledwindow; + + Gtk::ToggleToolButton* _process_but; + Gtk::SpinButton* _poly_spin; + Gtk::ToolButton* _clear_but; + Gtk::ToolButton* _destroy_but; + Gtk::ToolButton* _refresh_but; + Gtk::ToolButton* _save_but; + Gtk::ToolButton* _zoom_normal_but; + Gtk::ToolButton* _zoom_full_but; + Gtk::Viewport* _breadcrumb_container; + + bool _enable_signal; }; diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp index 60fa966b..2dfcded0 100644 --- a/src/progs/ingenuity/PatchWindow.cpp +++ b/src/progs/ingenuity/PatchWindow.cpp @@ -33,7 +33,7 @@ #include "ConfigWindow.h" #include "MessagesWindow.h" #include "PatchTreeWindow.h" -#include "BreadCrumb.h" +#include "BreadCrumbBox.h" #include "Store.h" #include "ConnectWindow.h" #include "Loader.h" @@ -49,13 +49,13 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad m_enable_signal(true), m_position_stored(false), m_x(0), - m_y(0) + m_y(0), + m_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_breadcrumb_box", m_breadcrumb_box); //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); @@ -71,9 +71,6 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad 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_add_plugin_menuitem", m_menu_add_plugin); - xml->get_widget("patch_add_new_subpatch_menuitem", m_menu_new_subpatch); - xml->get_widget("patch_add_subpatch_from_file_menuitem", m_menu_load_subpatch);*/ 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); @@ -83,7 +80,6 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad xml->get_widget_derived("load_patch_win", m_load_patch_window); xml->get_widget_derived("load_subpatch_win", m_load_subpatch_window); - //m_load_plugin_window->set_transient_for(*this); m_new_subpatch_window->set_transient_for(*this); m_load_patch_window->set_transient_for(*this); m_load_subpatch_window->set_transient_for(*this); @@ -118,12 +114,6 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad sigc::mem_fun(this, &PatchWindow::event_destroy)); m_menu_clear->signal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_clear)); - /*m_menu_add_plugin->signal_activate().connect( - sigc::mem_fun<void>(m_load_plugin_window, &LoadPluginWindow::present)); - m_menu_new_subpatch->signal_activate().connect( - sigc::mem_fun<void>(m_new_subpatch_window, &NewSubpatchWindow::present)); - m_menu_load_subpatch->signal_activate().connect( - sigc::mem_fun<void>(m_load_subpatch_window, &LoadSubpatchWindow::present));*/ m_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( @@ -133,6 +123,9 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad if (App::instance().about_dialog() != NULL) m_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::patch)); App::instance().add_patch_window(this); } @@ -149,6 +142,32 @@ PatchWindow::~PatchWindow() } +/** Set the patch controller from a Path (for BreadCrumbs) + */ +void +PatchWindow::patch(const Path& path) +{ + CountedPtr<PatchModel> model = App::instance().store()->object(path); + if (!model) + return; // can't really do anything useful.. + + PatchController* pc = dynamic_cast<PatchController*>(model->controller()); + + if (!pc) { + pc = new PatchController(model); + model->set_controller(pc); + } + + assert(pc); + + if (pc->window() != NULL && pc->window()->is_visible()) { + pc->show_patch_window(); + } else { + patch_controller(pc); + } +} + + /** Sets the patch controller for this window and initializes everything. * * This function MUST be called before using the window in any way! @@ -156,9 +175,12 @@ PatchWindow::~PatchWindow() void PatchWindow::patch_controller(PatchController* pc) { + if (!pc || pc == m_patch) + return; + m_enable_signal = false; - assert(pc != NULL); + assert(pc); assert(m_patch != pc); assert(m_patch == NULL || pc->model()->path() != m_patch->model()->path()); @@ -174,11 +196,19 @@ PatchWindow::patch_controller(PatchController* pc) if (pc->view() == NULL) pc->create_view(); - assert(pc->view() != NULL); + assert(pc->view()); PatchView* const patch_view = pc->view(); assert(patch_view != NULL); patch_view->reparent(*m_viewport); + + if (m_breadcrumb_box->get_parent()) + m_breadcrumb_box->reparent(*patch_view->breadcrumb_container()); + else + patch_view->breadcrumb_container()->add(*m_breadcrumb_box); + + m_breadcrumb_box->build(pc->model()->path()); + m_breadcrumb_box->show(); pc->window(this); show_all(); @@ -204,26 +234,6 @@ PatchWindow::patch_controller(PatchController* pc) //m_properties_window->patch_model(pc->patch_model()); - - // Setup breadcrumbs box - // FIXME: this is filthy - - // Moving to a parent patch, depress correct button - if (old_pc != NULL && - old_pc->model()->path().substr(0, pc->model()->path().length()) - == pc->model()->path()) { - for (list<BreadCrumb*>::iterator i = m_breadcrumbs.begin(); i != m_breadcrumbs.end(); ++i) { - if ((*i)->path() == pc->path()) - (*i)->set_active(true); - else if ((*i)->path() == old_pc->path()) - (*i)->set_active(false); - } - - // Rebuild breadcrumbs from scratch (yeah, laziness..) - } else { - rebuild_breadcrumbs(); - } - if (pc->model()->path() == "/") m_menu_destroy_patch->set_sensitive(false); else @@ -237,71 +247,6 @@ PatchWindow::patch_controller(PatchController* pc) } -/** Destroys current breadcrumbs and rebuilds from scratch. - * - * (Needs to be called when a patch is cleared to eliminate children crumbs) - */ -void -PatchWindow::rebuild_breadcrumbs() -{ - // Empty existing breadcrumbs - for (list<BreadCrumb*>::iterator i = m_breadcrumbs.begin(); i != m_breadcrumbs.end(); ++i) - m_breadcrumb_box->remove(**i); - m_breadcrumbs.clear(); - - // Add new ones - string path = m_patch->path(); // To be chopped up, starting at the left - string but_name; // Name on breadcrumb button - string but_path; // Full path breadcrumb represents - - // Add root - assert(path[0] == '/'); - BreadCrumb* but = manage(new BreadCrumb(this, "/")); - m_breadcrumb_box->pack_start(*but, false, false, 1); - m_breadcrumbs.push_back(but); - path = path.substr(1); // hack off leading slash - - // Add the rest - while (path.length() > 0) { - if (path.find("/") != string::npos) { - but_name = path.substr(0, path.find("/")); - but_path += string("/") + path.substr(0, path.find("/")); - path = path.substr(path.find("/")+1); - } else { - but_name = path; - but_path += string("/") + path; - path = ""; - } - BreadCrumb* but = manage(new BreadCrumb(this, but_path));//Store::instance().patch(but_path))); - m_breadcrumb_box->pack_start(*but, false, false, 1); - m_breadcrumbs.push_back(but); - } - (*m_breadcrumbs.back()).set_active(true); - -} - - -void -PatchWindow::breadcrumb_clicked(BreadCrumb* crumb) -{ - if (m_enable_signal) { - // FIXME: check to be sure PatchModel exists, then controller - maybe - // even make a controller if there isn't one? - PatchController* const pc = dynamic_cast<PatchController*>( - App::instance().store()->object(crumb->path())->controller()); - assert(pc != NULL); - - if (pc == m_patch) { - crumb->set_active(true); - } else if (pc->window() != NULL && pc->window()->is_visible()) { - pc->show_patch_window(); - crumb->set_active(false); - } else { - patch_controller(pc); - } - } -} - void PatchWindow::event_show_engine() @@ -336,6 +281,8 @@ PatchWindow::event_show_properties() void PatchWindow::node_removed(const string& name) { + throw; // FIXME +/* for (list<BreadCrumb*>::iterator i = m_breadcrumbs.begin(); i != m_breadcrumbs.end(); ++i) { if ((*i)->path() == m_patch->model()->base_path() + name) { for (list<BreadCrumb*>::iterator j = i; j != m_breadcrumbs.end(); ) { @@ -345,7 +292,7 @@ PatchWindow::node_removed(const string& name) } break; } - } + }*/ } @@ -354,10 +301,12 @@ PatchWindow::node_removed(const string& name) void PatchWindow::node_renamed(const string& old_path, const string& new_path) { + throw; // FIXME + /* for (list<BreadCrumb*>::iterator i = m_breadcrumbs.begin(); i != m_breadcrumbs.end(); ++i) { if ((*i)->path() == old_path) (*i)->set_path(new_path); - } + }*/ } @@ -366,11 +315,13 @@ PatchWindow::node_renamed(const string& old_path, const string& new_path) void PatchWindow::patch_renamed(const string& new_path) { + throw; // FIXME + /* set_title(new_path); for (list<BreadCrumb*>::iterator i = m_breadcrumbs.begin(); i != m_breadcrumbs.end(); ++i) { if ((*i)->path() == m_patch->path()) (*i)->set_path(new_path); - } + }*/ } /* @@ -474,6 +425,7 @@ PatchWindow::on_show() void PatchWindow::on_hide() { + claim_breadcrumbs(); m_position_stored = true; get_position(m_x, m_y); Gtk::Window::on_hide(); @@ -568,7 +520,7 @@ PatchWindow::event_clear() void PatchWindow::event_fullscreen_toggled() { - // FIXME: ugh, use GTK signals to track state and now for sure + // FIXME: ugh, use GTK signals to track state and know for sure static bool is_fullscreen = false; if (!is_fullscreen) { @@ -580,5 +532,11 @@ PatchWindow::event_fullscreen_toggled() } } +void +PatchWindow::claim_breadcrumbs() +{ + m_breadcrumb_box->reparent(m_breadcrumb_bin); +} + } // namespace Ingenuity diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h index 291ea56b..07a3e92e 100644 --- a/src/progs/ingenuity/PatchWindow.h +++ b/src/progs/ingenuity/PatchWindow.h @@ -22,6 +22,7 @@ #include <gtkmm.h> #include <libglademm/xml.h> #include <libglademm.h> +#include "util/Path.h" using std::string; using std::list; @@ -49,7 +50,7 @@ class NodeControlWindow; class PatchDescriptionWindow; class SubpatchModule; class OmPort; -class BreadCrumb; +class BreadCrumbBox; /** A window for a patch. @@ -62,6 +63,7 @@ public: PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml); ~PatchWindow(); + void patch(const Path& path); void patch_controller(PatchController* pc); PatchController* patch_controller() const { return m_patch; } @@ -73,11 +75,11 @@ public: void node_removed(const string& name); void node_renamed(const string& old_path, const string& new_path); void patch_renamed(const string& new_path); - void rebuild_breadcrumbs(); - void breadcrumb_clicked(BreadCrumb* crumb); - + Gtk::MenuItem* menu_view_control_window() { return m_menu_view_control_window; } + void claim_breadcrumbs(); + protected: void on_show(); void on_hide(); @@ -85,7 +87,6 @@ protected: bool on_key_press_event(GdkEventKey* event); private: - //void event_open(); void event_import(); void event_save(); void event_save_as(); @@ -109,7 +110,6 @@ private: int m_x; int m_y; - //Gtk::MenuItem* m_menu_open; Gtk::MenuItem* m_menu_import; Gtk::MenuItem* m_menu_save; Gtk::MenuItem* m_menu_save_as; @@ -122,18 +122,18 @@ private: 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_add_plugin; - Gtk::MenuItem* m_menu_new_subpatch; - Gtk::MenuItem* m_menu_load_subpatch;*/ Gtk::MenuItem* m_menu_view_messages_window; Gtk::MenuItem* m_menu_view_patch_tree_window; Gtk::MenuItem* m_menu_help_about; Gtk::VBox* m_vbox; Gtk::Viewport* m_viewport; - Gtk::HBox* m_breadcrumb_box; - list<BreadCrumb*> m_breadcrumbs; + BreadCrumbBox* m_breadcrumb_box; + //Gtk::Statusbar* m_status_bar; + + /** Invisible bin used to store breadcrumbs when not shown by a view */ + Gtk::Alignment m_breadcrumb_bin; }; diff --git a/src/progs/ingenuity/ingenuity.glade b/src/progs/ingenuity/ingenuity.glade index 178eac88..84540c7c 100644 --- a/src/progs/ingenuity/ingenuity.glade +++ b/src/progs/ingenuity/ingenuity.glade @@ -4,8 +4,7 @@ <glade-interface> <widget class="GtkWindow" id="patch_win"> - <property name="border_width">1</property> - <property name="title" translatable="yes">Om</property> + <property name="title" translatable="yes">Ingen</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> @@ -390,23 +389,6 @@ </child> <child> - <widget class="GtkHBox" id="patch_win_breadcrumb_box"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> <widget class="GtkScrolledWindow" id="patch_win_scrolledwin"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -1633,7 +1615,7 @@ <child> <widget class="GtkTable" id="table8"> <property name="visible">True</property> - <property name="n_rows">2</property> + <property name="n_rows">3</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">0</property> @@ -1782,212 +1764,343 @@ <property name="spacing">0</property> <child> - <widget class="GtkScrolledWindow" id="patch_canvas_scrolledwindow"> - <property name="border_width">1</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> - <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> - - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - - <child> <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkCheckButton" id="patch_process_checkbutton"> + <widget class="GtkToolbar" id="toolbar4"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Enable audio processing for this patch</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Run</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> + <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property> + <property name="toolbar_style">GTK_TOOLBAR_BOTH</property> + <property name="tooltips">True</property> + <property name="show_arrow">False</property> + + <child> + <widget class="GtkToolItem" id="toolitem4"> + <property name="visible">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + + <child> + <widget class="GtkViewport" id="patch_view_breadcrumb_container"> + <property name="visible">True</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <placeholder/> + </child> + </widget> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> + + <child> + <widget class="GtkSeparatorToolItem" id="separatortoolitem12"> + <property name="visible">True</property> + <property name="draw">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> </packing> </child> <child> - <widget class="GtkSeparatorToolItem" id="separatortoolitem2"> + <widget class="GtkToolbar" id="toolbar2"> <property name="visible">True</property> - <property name="draw">True</property> - <property name="visible_horizontal">False</property> - <property name="visible_vertical">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property> + <property name="toolbar_style">GTK_TOOLBAR_ICONS</property> + <property name="tooltips">True</property> + <property name="show_arrow">False</property> - <child> - <widget class="GtkHBox" id="hbox26"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <child> + <widget class="GtkSeparatorToolItem" id="separatortoolitem14"> + <property name="visible">True</property> + <property name="draw">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> <child> - <widget class="GtkLabel" id="label33"> + <widget class="GtkToggleToolButton" id="patch_view_process_but"> <property name="visible">True</property> - <property name="label" translatable="yes">Polyphony: </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="tooltip" translatable="yes">Enable DSP processing</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="stock_id">gtk-execute</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + <property name="active">True</property> </widget> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="homogeneous">True</property> </packing> </child> <child> - <widget class="GtkLabel" id="patch_polyphony_label"> + <widget class="GtkSeparatorToolItem" id="separatortoolitem6"> <property name="visible">True</property> - <property name="label" translatable="yes">?</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="draw">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> </widget> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="homogeneous">False</property> </packing> </child> - </widget> - <packing> - <property name="padding">10</property> - <property name="expand">True</property> - <property name="fill">False</property> - </packing> - </child> - <child> - <widget class="GtkSeparatorToolItem" id="separatortoolitem3"> - <property name="visible">True</property> - <property name="draw">True</property> - <property name="visible_horizontal">False</property> - <property name="visible_vertical">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkToolItem" id="toolitem2"> + <property name="visible">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> - <child> - <widget class="GtkHBox" id="hbox2"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <child> + <widget class="GtkImage" id="image1934"> + <property name="visible">True</property> + <property name="stock">gtk-copy</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">4</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> <child> - <widget class="GtkLabel" id="label77"> + <widget class="GtkToolItem" id="toolitem1"> <property name="visible">True</property> - <property name="label" translatable="yes">Zoom: </property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.469999998808</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + + <child> + <widget class="GtkSpinButton" id="patch_view_poly_spin"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Polyphony (Patch must be disabled to modify)</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 1 999 1 10 10</property> + </widget> + </child> </widget> <packing> - <property name="padding">2</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="homogeneous">False</property> </packing> </child> <child> - <widget class="GtkHScale" id="patch_zoom_scale"> - <property name="width_request">90</property> + <widget class="GtkSeparatorToolItem" id="separatortoolitem7"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="draw_value">False</property> - <property name="value_pos">GTK_POS_RIGHT</property> - <property name="digits">1</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">1.10638296604 0.25 2 0.25 0 0</property> + <property name="draw">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> </widget> <packing> - <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="homogeneous">False</property> + </packing> + </child> + + <child> + <widget class="GtkToolButton" id="patch_view_clear_but"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Destroy all children nodes (twice to clear ports as well)</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="stock_id">gtk-clear</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + + <child> + <widget class="GtkToolButton" id="patch_view_destroy_but"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Destroy patch</property> + <property name="stock_id">gtk-delete</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + + <child> + <widget class="GtkSeparatorToolItem" id="separatortoolitem8"> + <property name="visible">True</property> + <property name="draw">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> + + <child> + <widget class="GtkToolButton" id="patch_view_refresh_but"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Refresh view</property> + <property name="stock_id">gtk-refresh</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + + <child> + <widget class="GtkToolButton" id="patch_view_save_but"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Save patch to a file</property> + <property name="stock_id">gtk-save</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + + <child> + <widget class="GtkSeparatorToolItem" id="separatortoolitem10"> + <property name="visible">True</property> + <property name="draw">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">False</property> + </packing> + </child> + + <child> + <widget class="GtkToolButton" id="patch_view_zoom_normal_but"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Zoom to normal size</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="stock_id">gtk-zoom-100</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> + </packing> + </child> + + <child> + <widget class="GtkToolButton" id="patch_view_zoom_full_but"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Fit patch in window</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="stock_id">gtk-zoom-fit</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="homogeneous">True</property> </packing> </child> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">True</property> + <property name="fill">False</property> </packing> </child> </widget> <packing> - <property name="padding">0</property> + <property name="padding">1</property> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> + + <child> + <widget class="GtkScrolledWindow" id="patch_view_scrolledwindow"> + <property name="border_width">1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> </widget> <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="x_options">fill</property> </packing> </child> |