Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / wx / content_widget.h
index e162aca4950718ac7fd709a21d59d2bca114b52b..c4ae4d591aaa5d97a472953d4e06626e0236019e 100644 (file)
@@ -105,7 +105,7 @@ public:
                update_from_model ();
 
                for (typename List::iterator i = _content.begin(); i != _content.end(); ++i) {
-                       _connections.push_back ((*i)->Changed.connect (boost::bind (&ContentWidget::model_changed, this, _2)));
+                       _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, _1, _3)));
                }
        }
 
@@ -149,11 +149,16 @@ public:
                _ignore_model_changes = false;
        }
 
+       void show (bool s)
+       {
+               _wrapped->Show (s);
+       }
+
 private:
 
        void set_single ()
        {
-               if (_wrapped->IsShown ()) {
+               if (_wrapped->IsShown() || !_sizer) {
                        return;
                }
 
@@ -166,7 +171,7 @@ private:
 
        void set_multiple ()
        {
-               if (_button->IsShown ()) {
+               if (_button->IsShown() || !_sizer) {
                        return;
                }
 
@@ -185,9 +190,9 @@ private:
                }
        }
 
-       void model_changed (int property)
+       void model_changed (ChangeType type, int property)
        {
-               if (property == _property && !_ignore_model_changes) {
+               if (type == CHANGE_TYPE_DONE && property == _property && !_ignore_model_changes) {
                        update_from_model ();
                }
        }