summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDoug McLain <doug@nostar.net>2006-05-27 01:41:59 +0000
committerDoug McLain <doug@nostar.net>2006-05-27 01:41:59 +0000
commit6d07483a78301b70acc810a083403a1d7ec292ed (patch)
tree0b8b5176f606ab4b6e025320393bc95999dc61da /gtk2_ardour
parentc335c0b23b7eda96452fc1120ba9a05fbd2d49b8 (diff)
Changes to the Configuration object to properly handle radio actions as well as toggleactions. Then add Monitoring, Meter falloff, and Meter Hold under the options menu to the Configuration object, so that they will now be saved and recalled between ardour startups as non session specific items. Also, ardour.rc will be saved now on exit of ardour, wether or not session is saved. Also some text and color tweaks
git-svn-id: svn://localhost/trunk/ardour2@542 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rwxr-xr-xgtk2_ardour/ardev_common.sh2
-rw-r--r--gtk2_ardour/ardour2_ui.rc22
-rw-r--r--gtk2_ardour/ardour_ui.cc2
-rw-r--r--gtk2_ardour/ardour_ui_options.cc52
-rw-r--r--gtk2_ardour/editor.h2
-rw-r--r--gtk2_ardour/editor_actions.cc14
-rw-r--r--gtk2_ardour/editor_ops.cc68
-rw-r--r--gtk2_ardour/mixer_strip.cc10
8 files changed, 135 insertions, 37 deletions
diff --git a/gtk2_ardour/ardev_common.sh b/gtk2_ardour/ardev_common.sh
index a705101adb..9483ae2971 100755
--- a/gtk2_ardour/ardev_common.sh
+++ b/gtk2_ardour/ardev_common.sh
@@ -1,6 +1,6 @@
#export G_DEBUG=fatal_criticals
-export ARDOUR_PATH=./glade:./pixmaps:.:..
+export ARDOUR_PATH=./glade:./pixmaps:.
export LD_LIBRARY_PATH=../libs/surfaces/control_protocol:../libs/ardour:../libs/midi++2:../libs/pbd3:../libs/soundtouch:../libs/gtkmm2ext:../libs/sigc++2:../libs/glibmm2:../libs/gtkmm2/atk:../libs/gtkmm2/pango:../libs/gtkmm2/gdk:../libs/gtkmm2/gtk:../libs/libgnomecanvasmm:../libs/libglademm:$LD_LIBRARY_PATH
diff --git a/gtk2_ardour/ardour2_ui.rc b/gtk2_ardour/ardour2_ui.rc
index 0e3f067b57..8ec32b695f 100644
--- a/gtk2_ardour/ardour2_ui.rc
+++ b/gtk2_ardour/ardour2_ui.rc
@@ -81,16 +81,20 @@ style "time_axis_view_item_name"
style "default_base" = "medium_text"
{
GtkWidget::cursor_color = {1.0, 1.0, 1.0 }
+ GtkButton::default_border = { 0, 0, 0, 0 }
+ GtkButton::default_outside_border = { 0, 0, 0, 0 }
+ GtkTreeView::vertical-padding = 0
+ GtkTreeView::horizontal-padding = 0
fg[NORMAL] = { 0.80, 0.80, 0.80 }
fg[ACTIVE] = { 0.80, 0.80, 0.80 }
- fg[PRELIGHT] = { 0.50, 1.0, 1.0 }
+ fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
fg[INSENSITIVE] = { 0.80, 0.80, 0.80 }
fg[SELECTED] = { 0.80, 0.80, 0.80 }
bg[NORMAL] = { 0.40, 0.40, 0.40 }
bg[ACTIVE] = { 0.40, 0.40, 0.40 }
- bg[PRELIGHT] = { 0.40, 0.40, 0.40 }
+ bg[PRELIGHT] = "#565690"
bg[INSENSITIVE] = { 0.10, 0.10, 0.10 }
bg[SELECTED] = { 0, 0.40, 0.60 }
@@ -105,6 +109,7 @@ style "default_base" = "medium_text"
base[PRELIGHT] = { 0.20, 0.20, 0.20 }
base[INSENSITIVE] = "#4c5159"
base[SELECTED] = { 0.25, 0.25, 0.25 }
+
}
style "base_frame"
@@ -131,11 +136,11 @@ style "black_mackie_menu_bar" = "medium_bold_text"
style "default_buttons_menus"
{
font_name = "sans 8"
- fg[ACTIVE] = { 0, 0, 0 }
+ fg[ACTIVE] = { 1.0, 1.0, 1.0 }
- bg[NORMAL] = { 0.25, 0.25, 0.25 }
- bg[ACTIVE] = { 0.50, 1.0, 1.0 }
- bg[PRELIGHT] = { 0.15, 0.15, 0.15 }
+ bg[NORMAL] = { 0.35, 0.35, 0.35 }
+ bg[ACTIVE] = "#565690"
+ bg[PRELIGHT] = { 0.20, 0.20, 0.20 }
bg[INSENSITIVE] = { 0.20, 0.20, 0.20 }
bg[SELECTED] = { 0.20, 0.20, 0.20 }
}
@@ -239,6 +244,7 @@ style "time_button" = "default_buttons_menus"
style "transport_button"
{
bg[ACTIVE] = { 0.50, 1.0, 0.50 }
+ fg[ACTIVE] = { 0, 0, 0 }
}
style "transport_rec_button"
@@ -853,8 +859,8 @@ style "region_list_whole_file"
style "ardour_button" ="default_buttons_menus"
{
- xthickness = 0
- ythickness = 2
+ xthickness = 1
+ ythickness = 1
}
#---------------------------------------------------------------
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 3baa9ede18..146d4d2ffe 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -409,7 +409,7 @@ If you still wish to quit, please use the\n\n\
break;
}
}
-
+ Config->save_state();
quit ();
}
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index 826823885c..dbdcd6ae45 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -39,24 +39,48 @@ using namespace ARDOUR;
void
ARDOUR_UI::setup_config_options ()
{
+ std::vector<Glib::ustring> groups;
+ groups.push_back("options");
+ groups.push_back("Editor");
+
struct {
char* name;
bool (Configuration::*method)(void) const;
+ char act_type; // (t)oggle or (r)adio
} options[] = {
- { "ToggleTimeMaster", &Configuration::get_jack_time_master },
- { "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport },
- { "LatchedRecordEnable", &Configuration::get_latched_record_enable },
- { "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture },
- { "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun },
- { "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end },
- { 0, 0 }
+ { "ToggleTimeMaster", &Configuration::get_jack_time_master, 't' },
+ { "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport, 't' },
+ { "LatchedRecordEnable", &Configuration::get_latched_record_enable, 't' },
+ { "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture, 't' },
+ { "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun, 't' },
+ { "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end, 't' },
+ { "UseHardwareMonitoring", &Configuration::get_use_hardware_monitoring, 'r' },
+ { "UseSoftwareMonitoring", &Configuration::get_use_sw_monitoring, 'r' },
+ { "UseExternalMonitoring", &Configuration::get_use_external_monitoring, 'r' },
+ { "MeterFalloffOff", &Configuration::get_meter_falloff_off, 'r' },
+ { "MeterFalloffSlowest", &Configuration::get_meter_falloff_slowest, 'r' },
+ { "MeterFalloffSlow", &Configuration::get_meter_falloff_slow, 'r' },
+ { "MeterFalloffMedium", &Configuration::get_meter_falloff_medium, 'r' },
+ { "MeterFalloffFast", &Configuration::get_meter_falloff_fast, 'r' },
+ { "MeterFalloffFaster", &Configuration::get_meter_falloff_faster, 'r' },
+ { "MeterFalloffFastest", &Configuration::get_meter_falloff_fastest, 'r' },
+ { "MeterHoldOff", &Configuration::get_meter_hold_off, 'r' },
+ { "MeterHoldShort", &Configuration::get_meter_hold_short, 'r' },
+ { "MeterHoldMedium", &Configuration::get_meter_hold_medium, 'r' },
+ { "MeterHoldLong", &Configuration::get_meter_hold_long, 'r' },
+ { 0, 0, 0 }
};
for (uint32_t n = 0; options[n].name; ++n) {
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", options[n].name);
- if (act) {
- Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
- tact->set_active ((Config->*(options[n].method))());
+ for (std::vector<Glib::ustring>::iterator i = groups.begin(); i != groups.end(); i++) {
+ Glib::RefPtr<Action> act = ActionManager::get_action (i->c_str(), options[n].name);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ cerr << "action = " << (options[n].name) << " val = " << (Config->*(options[n].method))() << endl;//DEBUG
+ if (options[n].act_type == 't' || (options[n].act_type == 'r' && (Config->*(options[n].method))()))
+ tact->set_active ((Config->*(options[n].method))());
+ continue;
+ }
}
}
}
@@ -230,12 +254,14 @@ ARDOUR_UI::toggle_editing_space()
void
ARDOUR_UI::toggle_UseHardwareMonitoring()
{
- Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseSoftwareMonitoring");
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", "UseHardwareMonitoring");
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ cerr << "get_active() cond = " << tact->get_active() << endl;//DEBUG
if (tact->get_active()) {
Config->set_use_hardware_monitoring (true);
Config->set_use_sw_monitoring (false);
+ Config->set_use_external_monitoring (false);
if (session) {
session->reset_input_monitor_state();
}
@@ -252,6 +278,7 @@ ARDOUR_UI::toggle_UseSoftwareMonitoring()
if (tact->get_active()) {
Config->set_use_hardware_monitoring (false);
Config->set_use_sw_monitoring (true);
+ Config->set_use_external_monitoring (false);
if (session) {
session->reset_input_monitor_state();
}
@@ -268,6 +295,7 @@ ARDOUR_UI::toggle_UseExternalMonitoring()
if (tact->get_active()) {
Config->set_use_hardware_monitoring (false);
Config->set_use_sw_monitoring (false);
+ Config->set_use_external_monitoring (true);
if (session) {
session->reset_input_monitor_state();
}
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 6d834ef7a4..307cd71799 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -296,7 +296,7 @@ class Editor : public PublicEditor
void toggle_waveforms_while_recording ();
void toggle_measure_visibility ();
- void set_meter_falloff (float);
+ void set_meter_falloff (int);
void set_meter_hold (int32_t);
/* xfades */
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index 161d015583..d88cda61e6 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -371,13 +371,13 @@ Editor::register_actions ()
Slow = 6.8dB/sec falloff at update rate of 40ms
*/
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffOff"), _("Off"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.0f));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("Slowest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.266f));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("Slow"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.342f));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0.7f));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFast"), _("Fast"), bind (mem_fun (*this, &Editor::set_meter_falloff), 1.1f));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("Faster"), bind (mem_fun (*this, &Editor::set_meter_falloff), 1.5f));
- ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("Fastest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 2.5f));
+ ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffOff"), _("Off"), bind (mem_fun (*this, &Editor::set_meter_falloff), 0));
+ ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlowest"), _("Slowest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 1));
+ ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffSlow"), _("Slow"), bind (mem_fun (*this, &Editor::set_meter_falloff), 2));
+ ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffMedium"), _("Medium"), bind (mem_fun (*this, &Editor::set_meter_falloff), 3));
+ ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFast"), _("Fast"), bind (mem_fun (*this, &Editor::set_meter_falloff), 4));
+ ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFaster"), _("Faster"), bind (mem_fun (*this, &Editor::set_meter_falloff), 5));
+ ActionManager::register_radio_action (editor_actions, meter_falloff_group, X_("MeterFalloffFastest"), _("Fastest"), bind (mem_fun (*this, &Editor::set_meter_falloff), 6));
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldOff"), _("Off"), bind (mem_fun (*this, &Editor::set_meter_hold), 0));
ActionManager::register_radio_action (editor_actions, meter_hold_group, X_("MeterHoldShort"), _("Short"), bind (mem_fun (*this, &Editor::set_meter_hold), 40));
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index bccdce27c1..acf205d06f 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -93,14 +93,78 @@ Editor::redo (uint32_t n)
void
Editor::set_meter_hold (int32_t cnt)
{
+ Config->set_meter_hold_off(false);
+ Config->set_meter_hold_short(false);
+ Config->set_meter_hold_medium(false);
+ Config->set_meter_hold_long(false);
+
+ switch (cnt)
+ {
+ case 0:
+ Config->set_meter_hold_off(true);
+ break;
+ case 40:
+ Config->set_meter_hold_short(true);
+ break;
+ case 100:
+ Config->set_meter_hold_medium(true);
+ break;
+ case 200:
+ Config->set_meter_hold_long(true);
+ break;
+ }
+
if (session) {
session->set_meter_hold (cnt);
}
}
void
-Editor::set_meter_falloff (float val)
-{
+Editor::set_meter_falloff (int intval)
+{
+ float val;
+ std::string str;
+ cerr << "set_meter_falloff () called: intval = " << intval << endl;
+ Config->set_meter_falloff_off(false);
+ Config->set_meter_falloff_slowest(false);
+ Config->set_meter_falloff_slow(false);
+ Config->set_meter_falloff_medium(false);
+ Config->set_meter_falloff_fast(false);
+ Config->set_meter_falloff_faster(false);
+ Config->set_meter_falloff_fastest(false);
+
+ switch (intval)
+ {
+ case 0:
+ val = 0.0f;
+ Config->set_meter_falloff_off(true);
+ break;
+ case 1:
+ val = 0.266f;
+ Config->set_meter_falloff_slowest(true);
+ break;
+ case 2:
+ val = 0.342f;
+ Config->set_meter_falloff_slow(true);
+ break;
+ case 3:
+ val = 0.7f;
+ Config->set_meter_falloff_medium(true);
+ break;
+ case 4:
+ val = 1.1f;
+ Config->set_meter_falloff_fast(true);
+ break;
+ case 5:
+ val = 1.5f;
+ Config->set_meter_falloff_faster(true);
+ break;
+ case 6:
+ val = 2.5f;
+ Config->set_meter_falloff_fastest(true);
+ break;
+ }
+
if (session) {
session->set_meter_falloff (val);
}
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 2e4c3a6ae7..9bdc8c340a 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -414,14 +414,14 @@ MixerStrip::set_width (Width w)
set_size_request (-1, -1);
xml_node->add_property ("strip_width", "wide");
- rec_enable_button->set_label (_("Record"));
- mute_button->set_label (_("Mute"));
- solo_button->set_label (_("Solo"));
+ rec_enable_button->set_label (_("record"));
+ mute_button->set_label (_("mute"));
+ solo_button->set_label (_("solo"));
if (_route.comment() == "") {
- comment_button.set_label (_("Comments"));
+ comment_button.set_label (_("comments"));
} else {
- comment_button.set_label (_("*Comments*"));
+ comment_button.set_label (_("*comments*"));
}
gpm.gain_automation_style_button.set_label (gpm.astyle_string(_route.gain_automation_curve().automation_style()));