From a5b39d56dfe5925238847cb2496aed3dbd1eb6fb Mon Sep 17 00:00:00 2001 From: Sakari Bergen Date: Sat, 4 Feb 2012 13:18:58 +0000 Subject: [PATCH] Change export dialog widget size allocation and make closing the exander make the window smaller also (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 | 16 +++++++++++++++- gtk2_ardour/export_dialog.h | 5 +++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 451f0c2b9a..9da584307b 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -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; diff --git a/gtk2_ardour/export_dialog.h b/gtk2_ardour/export_dialog.h index 73d11ecffd..835c220c23 100644 --- a/gtk2_ardour/export_dialog.h +++ b/gtk2_ardour/export_dialog.h @@ -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 advanced_sizegroup; + Gtk::Expander * advanced; + /* Warning area */ Gtk::HBox warn_hbox;