summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-03-12 14:24:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-03-12 14:24:05 +0000
commit84af9f18ebd755a10f1b902d41a9730639467dbb (patch)
tree61195bc41622835c074b243c51aa78652b7d482c
parenta74b374024da3d21df616f08ace84daba50495a3 (diff)
fixes from Carl H for a couple of buglets
git-svn-id: svn://localhost/ardour2/trunk@1575 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/audio_time_axis.cc24
-rw-r--r--gtk2_ardour/audio_time_axis.h1
-rw-r--r--gtk2_ardour/gain_meter.cc14
-rw-r--r--gtk2_ardour/gain_meter.h2
-rw-r--r--gtk2_ardour/time_axis_view.cc4
5 files changed, 25 insertions, 20 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index bc3a13fb01..8484bbceca 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -107,21 +107,13 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
_route->panner().Changed.connect (mem_fun(*this, &AudioTimeAxisView::update_pans));
- if (is_audio_track()) {
+ update_control_names ();
- controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
- controls_base_selected_name = "AudioTrackControlsBaseSelected";
- controls_base_unselected_name = "AudioTrackControlsBaseUnselected";
+ if (is_audio_track()) {
/* ask for notifications of any new RegionViews */
_view->RegionViewAdded.connect (mem_fun(*this, &AudioTimeAxisView::region_view_added));
_view->attach ();
-
- } else { /* bus */
-
- controls_ebox.set_name ("AudioBusControlsBaseUnselected");
- controls_base_selected_name = "AudioBusControlsBaseSelected";
- controls_base_unselected_name = "AudioBusControlsBaseUnselected";
}
post_construct ();
@@ -621,7 +613,19 @@ void
AudioTimeAxisView::route_active_changed ()
{
RouteTimeAxisView::route_active_changed ();
+ update_control_names ();
+}
+
+
+/**
+ * Set up the names of the controls so that they are coloured
+ * correctly depending on whether this route is inactive or
+ * selected.
+ */
+void
+AudioTimeAxisView::update_control_names ()
+{
if (is_audio_track()) {
if (_route->active()) {
controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
diff --git a/gtk2_ardour/audio_time_axis.h b/gtk2_ardour/audio_time_axis.h
index 8f2c868167..d8c3f07cc1 100644
--- a/gtk2_ardour/audio_time_axis.h
+++ b/gtk2_ardour/audio_time_axis.h
@@ -114,6 +114,7 @@ class AudioTimeAxisView : public RouteTimeAxisView
void pan_hidden ();
void update_pans ();
+ void update_control_names ();
AutomationTimeAxisView* gain_track;
AutomationTimeAxisView* pan_track;
diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc
index 7778430993..76be06e1a2 100644
--- a/gtk2_ardour/gain_meter.cc
+++ b/gtk2_ardour/gain_meter.cc
@@ -105,11 +105,11 @@ GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
gain_display_box.pack_start (gain_display, true, true);
peak_display.set_name ("MixerStripPeakDisplay");
- peak_display.set_has_frame (false);
- peak_display.set_editable (false);
+// peak_display.set_has_frame (false);
+// peak_display.set_editable (false);
set_size_request_to_display_given_text (peak_display, "-80.g", 2, 6); /* note the descender */
max_peak = minus_infinity();
- peak_display.set_text (_("-inf"));
+ peak_display.set_label (_("-inf"));
peak_display.unset_flags (Gtk::CAN_FOCUS);
meter_metric_area.set_name ("MeterMetricsStrip");
@@ -327,10 +327,10 @@ GainMeter::update_meters ()
max_peak = mpeak;
/* set peak display */
if (max_peak <= -200.0f) {
- peak_display.set_text (_("-inf"));
+ peak_display.set_label (_("-inf"));
} else {
snprintf (buf, sizeof(buf), "%.1f", max_peak);
- peak_display.set_text (buf);
+ peak_display.set_label (buf);
}
if (max_peak >= 0.0f) {
@@ -494,7 +494,7 @@ GainMeter::reset_peak_display ()
}
max_peak = -INFINITY;
- peak_display.set_text (_("-Inf"));
+ peak_display.set_label (_("-Inf"));
peak_display.set_name ("MixerStripPeakDisplay");
}
@@ -516,7 +516,7 @@ GainMeter::meter_button_release (GdkEventButton* ev, uint32_t which)
case 1:
meters[which].meter->clear();
max_peak = minus_infinity();
- peak_display.set_text (_("-inf"));
+ peak_display.set_label (_("-inf"));
peak_display.set_name ("MixerStripPeakDisplay");
break;
diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h
index 7e758a36e4..a24b93c034 100644
--- a/gtk2_ardour/gain_meter.h
+++ b/gtk2_ardour/gain_meter.h
@@ -86,7 +86,7 @@ class GainMeter : public Gtk::VBox
Gtkmm2ext::VSliderController *gain_slider;
Gtk::Adjustment gain_adjustment;
Gtkmm2ext::FocusEntry gain_display;
- Gtk::Entry peak_display;
+ Gtk::Button peak_display;
Gtk::HBox gain_display_box;
Gtk::HBox fader_box;
Gtk::DrawingArea meter_metric_area;
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 2a0087dc2c..0a5d65b13d 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -246,14 +246,14 @@ TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
switch (ev->direction) {
case GDK_SCROLL_UP:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
- step_height (true);
+ step_height (false);
return true;
}
break;
case GDK_SCROLL_DOWN:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) {
- step_height (false);
+ step_height (true);
return true;
}
break;