2 Copyright (C) 2015 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "gtkmm/stock.h"
22 #include "duplicate_routes_dialog.h"
26 DuplicateRouteDialog::DuplicateRouteDialog ()
27 : ArdourDialog (_("Duplicate Tracks & Busses"), false, false)
28 , copy_playlists_button (playlist_button_group, _("Copy playlists"))
29 , new_playlists_button (playlist_button_group, _("Create new (empty) playlists"))
30 , share_playlists_button (playlist_button_group, _("Share playlists"))
31 , count_adjustment (1.0, 1.0, 999, 1.0, 10.0)
32 , count_spinner (count_adjustment)
34 playlist_button_box.pack_start (copy_playlists_button, false, false);
35 playlist_button_box.pack_start (new_playlists_button, false, false);
36 playlist_button_box.pack_start (share_playlists_button, false, false);
38 get_vbox()->pack_start (playlist_button_box, false, false);
39 get_vbox()->show_all ();
41 add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
42 add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
45 DuplicateRouteDialog::~DuplicateRouteDialog ()
50 DuplicateRouteDialog::count() const
52 return count_adjustment.get_value ();
55 ARDOUR::PlaylistDisposition
56 DuplicateRouteDialog::playlist_disposition() const
58 if (new_playlists_button.get_active()) {
59 return ARDOUR::NewPlaylist;
60 } else if (copy_playlists_button.get_active()) {
61 return ARDOUR::CopyPlaylist;
64 return ARDOUR::SharePlaylist;