#include "duplicate_routes_dialog.h"
#include "selection.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace ARDOUR;
using namespace Gtk;
, share_playlists_button (playlist_button_group, _("Share playlists"))
, count_adjustment (1.0, 1.0, 999, 1.0, 10.0)
, count_spinner (count_adjustment)
- , count_label (_("Duplicate each track/bus this number of times"))
+ , count_label (_("Duplicate each track/bus this number of times:"))
{
count_box.pack_start (count_label, false, false);
- count_box.pack_start (count_spinner, false, false);
- get_vbox()->pack_start (count_box, false, false, 20);
+ count_box.pack_start (count_spinner, false, false, 5);
+ get_vbox()->pack_start (count_box, false, false, 10);
playlist_button_box.pack_start (copy_playlists_button, false, false);
playlist_button_box.pack_start (new_playlists_button, false, false);
}
int
-DuplicateRouteDialog::restart ()
+DuplicateRouteDialog::restart (Session* s)
{
+ if (!s) {
+ return -1;
+ }
+
+ set_session (s);
+
TrackSelection& tracks (PublicEditor::instance().get_selection().tracks);
uint32_t ntracks = 0;
uint32_t nbusses = 0;
which is what we really want to happen here.
*/
- if (ntracks == 0) {
+ if (playlist_button_box.get_parent()) {
get_vbox()->remove (playlist_button_box);
- } else {
+ }
+
+ if (ntracks > 0) {
get_vbox()->pack_end (playlist_button_box, false, false);
}