summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-01-24 21:58:07 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2013-01-24 21:58:07 +0000
commita97376dd808f72e0bc0c1a0f40c1a6244f0b0c3c (patch)
tree46e018003851cbeb57ad7623b28f301ef2aa0745 /gtk2_ardour
parent627a99034a1a90dd1111c9d32a280490ad9f7e6f (diff)
fix up rather odd sizing model for ProcessorBox that affected Pixfaders used as controls
git-svn-id: svn://localhost/ardour2/branches/3.0@13994 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/processor_box.cc37
-rw-r--r--gtk2_ardour/processor_box.h3
2 files changed, 1 insertions, 39 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 7bdaa8b3cb..91551e19bb 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -297,14 +297,6 @@ ProcessorEntry::name (Width w) const
}
void
-ProcessorEntry::set_pixel_width (int p)
-{
- for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
- (*i)->set_pixel_width (p);
- }
-}
-
-void
ProcessorEntry::show_all_controls ()
{
for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
@@ -470,12 +462,6 @@ ProcessorEntry::Control::set_tooltip ()
}
void
-ProcessorEntry::Control::set_pixel_width (int p)
-{
- _slider.set_fader_length (p);
-}
-
-void
ProcessorEntry::Control::slider_adjusted ()
{
if (_ignore_ui_adjustment) {
@@ -705,7 +691,6 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
processor_display.set_flags (CAN_FOCUS);
processor_display.set_name ("ProcessorList");
- processor_display.set_size_request (48, -1);
processor_display.set_data ("processorbox", this);
processor_display.set_spacing (2);
@@ -844,8 +829,7 @@ ProcessorBox::set_width (Width w)
(*i)->set_enum_width (w);
}
- _redisplay_pending = true;
-
+ queue_resize ();
}
Gtk::Menu*
@@ -1356,7 +1340,6 @@ ProcessorBox::redisplay_processors ()
if (_visible_prefader_processors == 0) { // fader only
BlankProcessorEntry* bpe = new BlankProcessorEntry (this, _width);
- bpe->set_pixel_width (get_allocation().get_width());
processor_display.add_child (bpe);
}
@@ -1481,8 +1464,6 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p)
e = new ProcessorEntry (this, processor, _width);
}
- e->set_pixel_width (get_allocation().get_width());
-
/* Set up this entry's state from the GUIObjectState */
XMLNode* proc = entry_gui_object_state (e);
if (proc) {
@@ -2499,22 +2480,6 @@ ProcessorBox::generate_processor_title (boost::shared_ptr<PluginInsert> pi)
return string_compose(_("%1: %2 (by %3)"), _route->name(), pi->name(), maker);
}
-void
-ProcessorBox::on_size_allocate (Allocation& a)
-{
- HBox::on_size_allocate (a);
-
- if (_redisplay_pending) {
- _redisplay_pending = false;
- redisplay_processors ();
- } else {
- list<ProcessorEntry*> children = processor_display.children ();
- for (list<ProcessorEntry*>::const_iterator i = children.begin(); i != children.end(); ++i) {
- (*i)->set_pixel_width (a.get_width ());
- }
- }
-}
-
/** @param p Processor.
* @return the UI window for \a p.
*/
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h
index f500a06838..157cdbf27e 100644
--- a/gtk2_ardour/processor_box.h
+++ b/gtk2_ardour/processor_box.h
@@ -119,7 +119,6 @@ public:
void set_position (Position);
boost::shared_ptr<ARDOUR::Processor> processor () const;
void set_enum_width (Width);
- virtual void set_pixel_width (int);
/** Hide any widgets that should be hidden */
virtual void hide_things ();
@@ -156,7 +155,6 @@ private:
public:
Control (boost::shared_ptr<ARDOUR::AutomationControl>, std::string const &);
- void set_pixel_width (int);
void set_visible (bool);
void add_state (XMLNode *) const;
void set_state (XMLNode const *);
@@ -367,7 +365,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
gint idle_delete_processor (boost::weak_ptr<ARDOUR::Processor>);
void weird_plugin_dialog (ARDOUR::Plugin& p, ARDOUR::Route::ProcessorStreams streams);
- void on_size_allocate (Gtk::Allocation &);
void setup_entry_positions ();