Change export dialog widget size allocation and make closing the exander make the...
authorSakari Bergen <sakari.bergen@beatwaves.net>
Sat, 4 Feb 2012 13:18:58 +0000 (13:18 +0000)
committerSakari Bergen <sakari.bergen@beatwaves.net>
Sat, 4 Feb 2012 13:18:58 +0000 (13:18 +0000)
(another attempt at fixing #4559

git-svn-id: svn://localhost/ardour2/branches/3.0@11447 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/export_dialog.cc
gtk2_ardour/export_dialog.h

index 451f0c2b9a2fa6a78c537ea4494519a0cbb54950..9da584307bd3c2d941c59ba7e775e4cdb59eea17 100644 (file)
@@ -145,6 +145,12 @@ ExportDialog::init ()
        progress_widget.hide_all();
 }
 
+void
+ExportDialog::expanded_changed ()
+{
+       set_resizable(advanced->get_expanded());
+}
+
 void
 ExportDialog::init_gui ()
 {
@@ -183,9 +189,17 @@ ExportDialog::init_gui ()
        get_vbox()->pack_start (warning_widget, false, false, 0);
        get_vbox()->pack_start (progress_widget, false, false, 0);
 
-       Gtk::Expander* advanced = Gtk::manage (new Gtk::Expander (_("Advanced options")));
+       advanced = Gtk::manage (new Gtk::Expander (_("Advanced options")));
+       advanced->property_expanded().signal_changed().connect(
+               sigc::mem_fun(*this, &ExportDialog::expanded_changed));
        advanced->add (*advanced_paned);
 
+       if (channel_selector_is_expandable()) {
+               advanced_sizegroup = Gtk::SizeGroup::create(Gtk::SIZE_GROUP_VERTICAL);
+               advanced_sizegroup->add_widget(*timespan_selector);
+               advanced_sizegroup->add_widget(*channel_selector);
+       }
+
        get_vbox()->pack_start (*advanced, true, true);
 
        Pango::AttrList bold;
index 73d11ecffdf983575ab49a8171fe9ba7f1f2a541..835c220c2331f1b7d9a0697bc7aa68da0a03525f 100644 (file)
@@ -93,6 +93,8 @@ class ExportDialog : public ArdourDialog {
 
        void init ();
 
+       void expanded_changed();
+
        void notify_errors ();
        void close_dialog ();
 
@@ -114,6 +116,9 @@ class ExportDialog : public ArdourDialog {
 
        /*** GUI components ***/
 
+       Glib::RefPtr<Gtk::SizeGroup> advanced_sizegroup;
+       Gtk::Expander * advanced;
+
        /* Warning area */
 
        Gtk::HBox           warn_hbox;