View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005201 | ardour | features | public | 2012-11-30 17:45 | 2019-05-21 11:28 |
| Reporter | colinf | Assigned To | colinf | ||
| Priority | normal | Severity | minor | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Summary | 0005201: Export window gets too big for 800-pixel tall screen | ||||
| Description | When the 'Time span and channel options' section of the export window is expanded, the window becomes too tall to fit on my 800-pixel tall screen. Would it make sense to split the expander into two: one for 'Time span' and one for 'channel options'? | ||||
| Tags | No tags attached. | ||||
|
|
yes. :) |
|
2013-01-22 17:13
|
export-timespan-channels-expanders.patch (6,899 bytes)
Index: gtk2_ardour/export_channel_selector.h
===================================================================
--- gtk2_ardour/export_channel_selector.h (revision 13971)
+++ gtk2_ardour/export_channel_selector.h (working copy)
@@ -122,7 +122,7 @@
typedef Gtk::TreeModelColumn<Glib::RefPtr<Gtk::ListStore> > ComboCol;
ComboCol port_list_col;
- /* Channel struct, that represents the selected port and it's name */
+ /* Channel struct, that represents the selected port and its name */
struct Channel {
public:
Index: gtk2_ardour/export_dialog.cc
===================================================================
--- gtk2_ardour/export_dialog.cc (revision 13971)
+++ gtk2_ardour/export_dialog.cc (working copy)
@@ -143,7 +143,8 @@
void
ExportDialog::expanded_changed ()
{
- set_resizable(advanced->get_expanded());
+ set_resizable(false);
+ set_resizable(timespan_expander->get_expanded() || channels_expander->get_expanded());
}
void
@@ -152,57 +153,25 @@
Gtk::Alignment * preset_align = Gtk::manage (new Gtk::Alignment());
preset_align->add (*preset_selector);
preset_align->set_padding (0, 12, 0, 0);
+ get_vbox()->set_homogeneous (false);
get_vbox()->pack_start (*preset_align, false, false, 0);
-
- Gtk::VPaned * advanced_paned = Gtk::manage (new Gtk::VPaned());
-
- Gtk::VBox* timespan_vbox = Gtk::manage (new Gtk::VBox());
- timespan_vbox->set_spacing (12);
- timespan_vbox->set_border_width (12);
-
- Gtk::Alignment * timespan_align = Gtk::manage (new Gtk::Alignment());
- timespan_label = Gtk::manage (new Gtk::Label (_("Time Span"), Gtk::ALIGN_LEFT));
- timespan_align->add (*timespan_selector);
- timespan_align->set_padding (0, 0, 18, 0);
- timespan_vbox->pack_start (*timespan_label, false, false, 0);
- timespan_vbox->pack_start (*timespan_align, true, true, 0);
- advanced_paned->pack1(*timespan_vbox, true, false);
-
- Gtk::VBox* channels_vbox = Gtk::manage (new Gtk::VBox());
- channels_vbox->set_spacing (12);
- channels_vbox->set_border_width (12);
-
- Gtk::Alignment * channels_align = Gtk::manage (new Gtk::Alignment());
- channels_label = Gtk::manage (new Gtk::Label (_("Channels"), Gtk::ALIGN_LEFT));
- channels_align->add (*channel_selector);
- channels_align->set_padding (0, 12, 18, 0);
- channels_vbox->pack_start (*channels_label, false, false, 0);
- channels_vbox->pack_start (*channels_align, true, true, 0);
- advanced_paned->pack2(*channels_vbox, channel_selector_is_expandable(), false);
-
get_vbox()->pack_start (*file_notebook, false, false, 0);
- get_vbox()->pack_start (warning_widget, false, false, 0);
- get_vbox()->pack_start (progress_widget, false, false, 0);
- advanced = Gtk::manage (new Gtk::Expander (_("Time span and channel options")));
- advanced->property_expanded().signal_changed().connect(
+ timespan_expander = Gtk::manage (new Gtk::Expander (_("Time Span")));
+ timespan_expander->property_expanded().signal_changed().connect(
sigc::mem_fun(*this, &ExportDialog::expanded_changed));
- advanced->add (*advanced_paned);
+ timespan_expander->add (*timespan_selector);
- 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);
- }
+ channels_expander = Gtk::manage (new Gtk::Expander (_("Channels")));
+ channels_expander->property_expanded().signal_changed().connect(
+ sigc::mem_fun(*this, &ExportDialog::expanded_changed));
+ channels_expander->add (*channel_selector);
+
+ get_vbox()->pack_start (*timespan_expander, false, false, 0);
+ get_vbox()->pack_start (*channels_expander, false, false, 0);
+ get_vbox()->pack_end (warning_widget, false, false, 0);
+ get_vbox()->pack_end (progress_widget, false, false, 0);
- get_vbox()->pack_start (*advanced, true, true);
-
- Pango::AttrList bold;
- Pango::Attribute b = Pango::Attribute::create_attr_weight (Pango::WEIGHT_BOLD);
- bold.insert (b);
-
- timespan_label->set_attributes (bold);
- channels_label->set_attributes (bold);
}
void
@@ -440,7 +409,7 @@
{
ExportDialog::init_gui ();
- channels_label->set_text (_("Source"));
+ channels_expander->set_label (_("Source"));
}
void
Index: gtk2_ardour/export_dialog.h
===================================================================
--- gtk2_ardour/export_dialog.h (revision 13971)
+++ gtk2_ardour/export_dialog.h (working copy)
@@ -86,8 +86,9 @@
Gtk::VBox warning_widget;
Gtk::VBox progress_widget;
- Gtk::Label * timespan_label;
- Gtk::Label * channels_label;
+ /*** GUI components ***/
+ Gtk::Expander * timespan_expander;
+ Gtk::Expander * channels_expander;
private:
@@ -112,10 +113,7 @@
PublicEditor & editor;
StatusPtr status;
- /*** GUI components ***/
- Glib::RefPtr<Gtk::SizeGroup> advanced_sizegroup;
- Gtk::Expander * advanced;
/* Warning area */
Index: gtk2_ardour/export_timespan_selector.cc
===================================================================
--- gtk2_ardour/export_timespan_selector.cc (revision 13971)
+++ gtk2_ardour/export_timespan_selector.cc (working copy)
@@ -105,6 +105,9 @@
/* Range view */
range_list = Gtk::ListStore::create (range_cols);
+ // order by location start times
+ range_list->set_sort_column(range_cols.location, Gtk::SORT_ASCENDING);
+ range_list->set_sort_func(range_cols.location, sigc::mem_fun(*this, &ExportTimespanSelector::location_sorter));
range_view.set_model (range_list);
range_view.set_headers_visible (true);
}
@@ -114,6 +117,22 @@
}
+int
+ExportTimespanSelector::location_sorter(Gtk::TreeModel::iterator a, Gtk::TreeModel::iterator b)
+{
+ Location *l1 = (*a)[range_cols.location];
+ Location *l2 = (*b)[range_cols.location];
+ const Location *ls = state->session_range.get();
+
+ // always sort session range first
+ if (l1 == ls)
+ return -1;
+ if (l2 == ls)
+ return +1;
+
+ return l1->start() - l2->start();
+}
+
void
ExportTimespanSelector::add_range_to_selection (ARDOUR::Location const * loc)
{
Index: gtk2_ardour/export_timespan_selector.h
===================================================================
--- gtk2_ardour/export_timespan_selector.h (revision 13971)
+++ gtk2_ardour/export_timespan_selector.h (working copy)
@@ -84,6 +84,7 @@
void update_range_name (std::string const & path, std::string const & new_text);
void set_selection_state_of_all_timespans (bool);
+ int location_sorter(Gtk::TreeModel::iterator a, Gtk::TreeModel::iterator b);
/*** GUI components ***/
@@ -127,7 +128,7 @@
Gtk::ScrolledWindow range_scroller;
};
-/// Allows seleting multiple timespans
+/// Allows selecting multiple timespans
class ExportTimespanSelectorMultiple : public ExportTimespanSelector
{
public:
|
|
|
Rudimentary patch for this and 0005202 attached. It still doesn't behave exactly as I'd like: if you expand both the Timespan and Channels expanders, and then collapse one of them, the other doesn't expand completely to fill the remaining space, but I still think it's an improvement. I can commit this in a day or two if no-one has any objections. |
|
|
Incidentally, in poking at this, I discovered that the files gtk2_ardour/export_range_markers_dialog.cc & gtk2_ardour/export_range_markers_dialog.h are completely unused. I guess they could probably be removed. |
|
|
Does the patch need more testing or has this bug simply submarined for a bit and got forgotton? My laptop has a 1280x800 laptop display and I found this bug description after being unable to export a selection from Ardour3 due to this issue (the track I want to export is off the bottom of the screen). |
|
|
Whether it is needed or not I tested it anyway... 1. It works and solved my immediate problem. 2. The Timespan expander appears to consume *less* vertical space than the one it replaces. Thus even with both expanders open the whole dialog now fits on a 800px display anyway. This is because the timespan list has been crushed down to only a one and one half line scrolling window. |
|
|
Yes, I know it's not quite right yet, which is why I didn't commit it before, and then I rather forgot about it: sorry! I do have a couple of ideas to improve things a bit: I hope I'll have time soon to have another look at it. |
|
|
This was fixed ages ago now. |
|
|
Closing this ancient issue: resolved a long time ago. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-11-30 17:45 | colinf | New Issue | |
| 2012-11-30 23:35 | paul | Note Added: 0014311 | |
| 2013-01-22 17:13 | colinf | File Added: export-timespan-channels-expanders.patch | |
| 2013-01-22 17:23 | colinf | Note Added: 0014555 | |
| 2013-01-22 17:43 | colinf | Note Added: 0014557 | |
| 2013-04-09 07:27 | DanielT | Note Added: 0014851 | |
| 2013-04-09 20:39 | DanielT | Note Added: 0014852 | |
| 2013-04-10 19:09 | colinf | Note Added: 0014854 | |
| 2014-10-17 16:11 | colinf | Note Added: 0015925 | |
| 2014-10-17 16:11 | colinf | Status | new => resolved |
| 2014-10-17 16:11 | colinf | Resolution | open => fixed |
| 2014-10-17 16:11 | colinf | Assigned To | => colinf |
| 2019-05-21 11:28 | colinf | Status | resolved => closed |
| 2019-05-21 11:28 | colinf | Note Added: 0020656 |