From ecfdea2940a9726987c7992873d78d8ec465ee88 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Oct 2006 01:58:06 +0000 Subject: Minor flowcanvas visual touchups. Work at completing Ingen serialization (connections still aren't right). Patchage Jack command line configuration (via ~/.jackdrc) git-svn-id: http://svn.drobilla.net/lad/patchage@177 a436a847-0d15-0410-975c-d299462d15a1 --- src/Makefile.am | 3 +- src/Patchage.cpp | 18 ++- src/Patchage.h | 3 + src/patchage.glade | 332 ++++++++++++++++++++++++++++++++++++++++++++--------- 4 files changed, 301 insertions(+), 55 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 27d23df..0942c18 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,9 +8,10 @@ dist_sharefiles_DATA = patchage.glade bin_PROGRAMS = patchage patchage_SOURCES = \ - main.cpp \ + main.cpp \ Patchage.h \ Patchage.cpp \ + JackSettingsDialog.h \ StateManager.h \ StateManager.cpp \ PatchageModule.h \ diff --git a/src/Patchage.cpp b/src/Patchage.cpp index cff1f07..09c115b 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -24,6 +24,7 @@ #include "PatchageFlowCanvas.h" #include "AlsaDriver.h" #include "JackDriver.h" +#include "JackSettingsDialog.h" #ifdef HAVE_LASH #include "LashDriver.h" #endif @@ -87,7 +88,9 @@ Patchage::Patchage(int argc, char** argv) } xml->get_widget("patchage_win", m_main_window); + xml->get_widget_derived("jack_settings_win", m_jack_settings_dialog); xml->get_widget("about_win", m_about_window); + xml->get_widget("jack_settings_menuitem", m_menu_jack_settings); xml->get_widget("launch_jack_menuitem", m_menu_jack_launch); xml->get_widget("connect_to_jack_menuitem", m_menu_jack_connect); xml->get_widget("disconnect_from_jack_menuitem", m_menu_jack_disconnect); @@ -118,8 +121,14 @@ Patchage::Patchage(int argc, char** argv) static_cast(m_canvas->height()/2 - 240)); // FIXME: hardcoded m_zoom_slider->signal_value_changed().connect(sigc::mem_fun(this, &Patchage::zoom_changed)); + m_zoom_normal_button->signal_clicked().connect(sigc::bind( sigc::mem_fun(this, &Patchage::zoom), 1.0)); + + m_zoom_full_button->signal_clicked().connect(sigc::mem_fun(m_canvas.get(), &PatchageFlowCanvas::zoom_full)); + + m_menu_jack_settings->signal_activate().connect( + sigc::hide_return(sigc::mem_fun(m_jack_settings_dialog, &JackSettingsDialog::run))); m_menu_jack_launch->signal_activate().connect(sigc::bind( sigc::mem_fun(m_jack_driver, &JackDriver::attach), true)); @@ -220,15 +229,20 @@ Patchage::idle_callback() void Patchage::zoom(double z) { - m_canvas->set_zoom(z); m_state_manager->set_zoom(z); + m_canvas->set_zoom(z); } void Patchage::zoom_changed() { - zoom(m_zoom_slider->get_value()); + static bool enable_signal = true; + if (enable_signal) { + enable_signal = false; + zoom(m_zoom_slider->get_value()); + enable_signal = true; + } } diff --git a/src/Patchage.h b/src/Patchage.h index 24f741a..c317b97 100644 --- a/src/Patchage.h +++ b/src/Patchage.h @@ -29,6 +29,7 @@ class JackDriver; class AlsaDriver; class LashDriver; class StateManager; +class JackSettingsDialog; class Patchage @@ -99,7 +100,9 @@ protected: bool m_refresh; Gtk::Window* m_main_window; + JackSettingsDialog* m_jack_settings_dialog; Gtk::AboutDialog* m_about_window; + Gtk::MenuItem* m_menu_jack_settings; Gtk::MenuItem* m_menu_jack_launch; Gtk::MenuItem* m_menu_jack_connect; Gtk::MenuItem* m_menu_jack_disconnect; diff --git a/src/patchage.glade b/src/patchage.glade index da089a3..f0bb790 100644 --- a/src/patchage.glade +++ b/src/patchage.glade @@ -52,7 +52,7 @@ - + True gtk-open 1 @@ -74,7 +74,7 @@ - + True gtk-save 1 @@ -96,7 +96,7 @@ - + True gtk-save-as 1 @@ -116,17 +116,18 @@ - + True - Launch LASH + Store the current module positions as the defaults + _Store Positions True - - + + - + True - gtk-execute + gtk-save 1 0.5 0.5 @@ -138,39 +139,45 @@ - + True - Connect to _LASH - True - - + + - - - True - gtk-connect - 1 - 0.5 - 0.5 - 0 - 0 - - + + + True + gtk-quit + True + + + + + + + + + True + _System + True + + + - + True - Disconnect from LASH + Jack _Settings True - - + + - + True - gtk-disconnect + gtk-preferences 1 0.5 0.5 @@ -182,7 +189,7 @@ - + True @@ -196,7 +203,7 @@ - + True gtk-execute 1 @@ -218,7 +225,7 @@ - + True gtk-connect 1 @@ -240,7 +247,7 @@ - + True gtk-disconnect 1 @@ -268,7 +275,7 @@ - + True gtk-connect 1 @@ -290,7 +297,7 @@ - + True gtk-disconnect 1 @@ -304,23 +311,23 @@ - + True - + True - _Store Positions + Launch LASH True - - + + - + True - gtk-save + gtk-execute 1 0.5 0.5 @@ -332,17 +339,46 @@ - + True + Connect to _LASH + True + + + + + + True + gtk-connect + 1 + 0.5 + 0.5 + 0 + 0 + + - + True - gtk-quit - True - + Disconnect from LASH + True + + + + + + True + gtk-disconnect + 1 + 0.5 + 0.5 + 0 + 0 + + @@ -380,7 +416,7 @@ - + True gtk-refresh 1 @@ -511,11 +547,11 @@ - 150 + 200 True True False - GTK_POS_RIGHT + GTK_POS_TOP 1 GTK_UPDATE_CONTINUOUS False @@ -646,4 +682,196 @@ along with Patchage; if not, write to the Free Software Foundation, Inc., translator-credits + + 8 + 400 + 200 + JACK Settings + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + 400 + 200 + True + True + patchage-icon.svg + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + -6 + + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + -5 + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + False + 0 + + + + True + <b>Command Line</b> + False + True + GTK_JUSTIFY_LEFT + True + False + 0 + 0.5 + 0 + 6 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + False + 0 + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + True + True + 0 + + True + * + True + + + 0 + True + True + + + + + 0 + False + False + + + + + + 323 + 200 + True + Note: This will change your default setting in ~/.jackdrc + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 12 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + True + True + + + + + 0 + True + True + + + + + + -- cgit v1.2.1