diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-10 15:25:11 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-10 15:25:11 +0000 |
commit | b1029a3caf4153835b7faa8e1a689f4f4a05622b (patch) | |
tree | 3803271511ae9bf3f528b96b01dbb842233641ae /gtk2_ardour | |
parent | 31172d0c71d56db3e0ae7dac3ea21e731e80cedf (diff) |
goodbye pixmaps and pixbufs (no longer) used by Gtkmm2ext::PixFader
git-svn-id: svn://localhost/ardour2/branches/3.0@13827 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 35 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.h | 8 | ||||
-rw-r--r-- | gtk2_ardour/option_editor.cc | 16 | ||||
-rw-r--r-- | gtk2_ardour/option_editor.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.cc | 22 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.h | 7 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 17 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.h | 5 |
9 files changed, 11 insertions, 104 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index f2123e2e31..cb8d57b1be 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -273,9 +273,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[]) setup_gtk_ardour_enums (); setup_profile (); - GainMeter::setup_slider_pix (); - RouteTimeAxisView::setup_slider_pix (); - ProcessorEntry::setup_slider_pix (); SessionEvent::create_per_thread_pool ("GUI", 512); } catch (failed_constructor& err) { diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 5fe3847e6f..9436596afa 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -61,27 +61,8 @@ sigc::signal<void> GainMeterBase::ResetAllPeakDisplays; sigc::signal<void,RouteGroup*> GainMeterBase::ResetGroupPeakDisplays; GainMeter::MetricPatterns GainMeter::metric_patterns; -Glib::RefPtr<Gdk::Pixbuf> GainMeter::slider; -Glib::RefPtr<Gdk::Pixbuf> GainMeter::slider_desensitised; - -void -GainMeter::setup_slider_pix () -{ - if ((slider = ::get_icon ("fader_belt")) == 0) { - throw failed_constructor(); - } - - if ((slider_desensitised = ::get_icon ("fader_belt_desensitised")) == 0) { - throw failed_constructor(); - } -} - -GainMeterBase::GainMeterBase (Session* s, - const Glib::RefPtr<Gdk::Pixbuf>& pix, - const Glib::RefPtr<Gdk::Pixbuf>& pix_desensitised, - bool horizontal, - int fader_length) +GainMeterBase::GainMeterBase (Session* s, bool horizontal, int fader_length) : gain_adjustment (gain_to_slider_position_with_max (1.0, Config->get_max_gain()), 0.0, 1.0, 0.01, 0.1) , gain_automation_style_button ("") , gain_automation_state_button ("") @@ -100,17 +81,9 @@ GainMeterBase::GainMeterBase (Session* s, _width = Wide; if (horizontal) { - gain_slider = manage (new HSliderController (pix, - pix_desensitised, - &gain_adjustment, - fader_length, - false)); + gain_slider = manage (new HSliderController (&gain_adjustment, fader_length, false)); } else { - gain_slider = manage (new VSliderController (pix, - pix_desensitised, - &gain_adjustment, - fader_length, - false)); + gain_slider = manage (new VSliderController (&gain_adjustment, fader_length, false)); } level_meter = new LevelMeter(_session); @@ -881,7 +854,7 @@ GainMeterBase::on_theme_changed() } GainMeter::GainMeter (Session* s, int fader_length) - : GainMeterBase (s, slider, slider_desensitised, false, fader_length) + : GainMeterBase (s, false, fader_length) , gain_display_box(true, 0) , hbox(true, 2) { diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index 73144380dd..116a0e7dfe 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -67,8 +67,7 @@ namespace Gtk { class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr { public: - GainMeterBase (ARDOUR::Session*, const Glib::RefPtr<Gdk::Pixbuf>&, const Glib::RefPtr<Gdk::Pixbuf> &, - bool horizontal, int); + GainMeterBase (ARDOUR::Session*, bool horizontal, int); virtual ~GainMeterBase (); virtual void set_controls (boost::shared_ptr<ARDOUR::Route> route, @@ -211,8 +210,6 @@ class GainMeter : public GainMeterBase, public Gtk::VBox int get_gm_width (); void setup_meters (int len=0); - static void setup_slider_pix (); - protected: void hide_all_meters (); @@ -233,9 +230,6 @@ class GainMeter : public GainMeterBase, public Gtk::VBox Gtk::Alignment fader_alignment; Gtk::Alignment meter_alignment; std::vector<ARDOUR::DataType> _types; - - static Glib::RefPtr<Gdk::Pixbuf> slider; - static Glib::RefPtr<Gdk::Pixbuf> slider_desensitised; }; #endif /* __ardour_gtk_gain_meter_h__ */ diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index da4594e6da..c59762b70d 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -224,21 +224,7 @@ FaderOption::FaderOption (string const & i, string const & n, sigc::slot<gain_t> , _get (g) , _set (s) { - _pix = ::get_icon (X_("fader_belt_h")); - if (_pix == 0) { - throw failed_constructor (); - } - - _pix_desensitised = ::get_icon (X_("fader_belt_h_desensitised")); - if (_pix_desensitised == 0) { - throw failed_constructor (); - } - - _db_slider = manage (new HSliderController (_pix, - _pix_desensitised, - &_db_adjustment, - 115, - false)); + _db_slider = manage (new HSliderController (&_db_adjustment, 115, false)); _label.set_text (n + ":"); _label.set_name (X_("OptionsLabel")); diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index 5fbed4ea32..d09be0a904 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -522,8 +522,6 @@ private: Gtk::Adjustment _db_adjustment; Gtkmm2ext::HSliderController* _db_slider; - Glib::RefPtr<Gdk::Pixbuf> _pix; - Glib::RefPtr<Gdk::Pixbuf> _pix_desensitised; Gtk::Entry _db_display; Gtk::Label _label; Gtk::HBox _box; diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 016379493c..2cf051baf2 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -90,8 +90,6 @@ RefPtr<Action> ProcessorBox::cut_action; RefPtr<Action> ProcessorBox::rename_action; RefPtr<Action> ProcessorBox::edit_action; RefPtr<Action> ProcessorBox::edit_generic_action; -Glib::RefPtr<Gdk::Pixbuf> ProcessorEntry::_slider_pixbuf; -Glib::RefPtr<Gdk::Pixbuf> ProcessorEntry::_slider_pixbuf_desensitised; ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processor> p, Width w) : _button (ArdourButton::led_default_elements) @@ -122,12 +120,7 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo set<Evoral::Parameter> p = _processor->what_can_be_automated (); for (set<Evoral::Parameter>::iterator i = p.begin(); i != p.end(); ++i) { - Control* c = new Control ( - _slider_pixbuf, - _slider_pixbuf_desensitised, - _processor->automation_control (*i), - _processor->describe_parameter (*i) - ); + Control* c = new Control (_processor->automation_control (*i), _processor->describe_parameter (*i)); _controls.push_back (c); @@ -304,15 +297,6 @@ ProcessorEntry::name (Width w) const } void -ProcessorEntry::setup_slider_pix () -{ - _slider_pixbuf = ::get_icon ("fader_belt_h_thin"); - assert (_slider_pixbuf); - _slider_pixbuf_desensitised = ::get_icon ("fader_belt_h_thin_desensitised"); - assert (_slider_pixbuf_desensitised); -} - -void ProcessorEntry::set_pixel_width (int p) { for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) { @@ -407,10 +391,10 @@ ProcessorEntry::toggle_control_visibility (Control* c) _parent->update_gui_object_state (this); } -ProcessorEntry::Control::Control (Glib::RefPtr<Gdk::Pixbuf> s, Glib::RefPtr<Gdk::Pixbuf> sd, boost::shared_ptr<AutomationControl> c, string const & n) +ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string const & n) : _control (c) , _adjustment (gain_to_slider_position_with_max (1.0, Config->get_max_gain()), 0, 1, 0.01, 0.1) - , _slider (s, sd, &_adjustment, 0, false) + , _slider (&_adjustment, 0, false) , _slider_persistant_tooltip (&_slider) , _button (ArdourButton::Element (ArdourButton::Text | ArdourButton::Indicator)) , _ignore_ui_adjustment (false) diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index d300f70d5a..268241a4e6 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -131,8 +131,6 @@ public: std::string state_id () const; Gtk::Menu* build_controls_menu (); - static void setup_slider_pix (); - protected: ArdourButton _button; Gtk::VBox _vbox; @@ -140,9 +138,6 @@ protected: virtual void setup_visuals (); - static Glib::RefPtr<Gdk::Pixbuf> _slider_pixbuf; - static Glib::RefPtr<Gdk::Pixbuf> _slider_pixbuf_desensitised; - private: void led_clicked(); void processor_active_changed (); @@ -159,7 +154,7 @@ private: class Control : public sigc::trackable { public: - Control (Glib::RefPtr<Gdk::Pixbuf>, Glib::RefPtr<Gdk::Pixbuf>, boost::shared_ptr<ARDOUR::AutomationControl>, std::string const &); + Control (boost::shared_ptr<ARDOUR::AutomationControl>, std::string const &); void set_pixel_width (int); void set_visible (bool); diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index f818686df2..a882dd0965 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -85,21 +85,6 @@ using namespace Editing; using namespace std; using std::list; -Glib::RefPtr<Gdk::Pixbuf> RouteTimeAxisView::slider; -Glib::RefPtr<Gdk::Pixbuf> RouteTimeAxisView::slider_desensitised; - -void -RouteTimeAxisView::setup_slider_pix () -{ - if ((slider = ::get_icon ("fader_belt_h_medium")) == 0) { - throw failed_constructor (); - } - - if ((slider_desensitised = ::get_icon ("fader_belt_h_medium_desensitised")) == 0) { - throw failed_constructor (); - } -} - RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, Canvas& canvas) : AxisView(sess) , RouteUI(sess) @@ -117,7 +102,7 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, Canvas& c , playlist_action_menu (0) , mode_menu (0) , color_mode_menu (0) - , gm (sess, slider, slider_desensitised, true, 125) + , gm (sess, true, 125) , _ignore_set_layer_display (false) { } diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index 541b070558..3a5bc34250 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -142,8 +142,6 @@ public: std::string state_id() const; - static void setup_slider_pix (); - protected: friend class StreamView; @@ -289,9 +287,6 @@ protected: GainMeterBase gm; - static Glib::RefPtr<Gdk::Pixbuf> slider; - static Glib::RefPtr<Gdk::Pixbuf> slider_desensitised; - XMLNode* underlay_xml_node; bool set_underlay_state(); |