mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
add insert-at combo selector for duplicate tracks dialog
This commit is contained in:
parent
444b9e8903
commit
ae32f44dc9
2 changed files with 36 additions and 0 deletions
|
|
@ -49,6 +49,19 @@ DuplicateRouteDialog::DuplicateRouteDialog ()
|
||||||
playlist_button_box.pack_start (share_playlists_button, false, false);
|
playlist_button_box.pack_start (share_playlists_button, false, false);
|
||||||
playlist_button_box.show_all ();
|
playlist_button_box.show_all ();
|
||||||
|
|
||||||
|
insert_at_combo.append_text (_("First"));
|
||||||
|
insert_at_combo.append_text (_("Before Selection"));
|
||||||
|
insert_at_combo.append_text (_("After Selection"));
|
||||||
|
insert_at_combo.append_text (_("Last"));
|
||||||
|
insert_at_combo.set_active (3);
|
||||||
|
|
||||||
|
Gtk::Label* l = manage (new Label (_("Insert duplicates at: ")));
|
||||||
|
Gtk::HBox* b = manage (new HBox);
|
||||||
|
b->pack_start (*l, false, false, 10);
|
||||||
|
b->pack_start (insert_at_combo, true, true);
|
||||||
|
|
||||||
|
get_vbox()->pack_end (*b, false, false, 10);
|
||||||
|
|
||||||
get_vbox()->show_all ();
|
get_vbox()->show_all ();
|
||||||
|
|
||||||
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||||
|
|
@ -179,3 +192,20 @@ DuplicateRouteDialog::on_response (int response)
|
||||||
msg.run ();
|
msg.run ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RouteDialogs::InsertAt
|
||||||
|
DuplicateRouteDialog::insert_at ()
|
||||||
|
{
|
||||||
|
using namespace RouteDialogs;
|
||||||
|
|
||||||
|
std::string str = insert_at_combo.get_active_text();
|
||||||
|
|
||||||
|
if (str == _("First")) {
|
||||||
|
return First;
|
||||||
|
} else if (str == _("After Selection")) {
|
||||||
|
return AfterSelection;
|
||||||
|
} else if (str == _("Before Selection")){
|
||||||
|
return BeforeSelection;
|
||||||
|
}
|
||||||
|
return Last;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include <gtkmm/entry.h>
|
#include <gtkmm/entry.h>
|
||||||
#include <gtkmm/box.h>
|
#include <gtkmm/box.h>
|
||||||
|
#include <gtkmm/comboboxtext.h>
|
||||||
#include <gtkmm/radiobutton.h>
|
#include <gtkmm/radiobutton.h>
|
||||||
#include <gtkmm/adjustment.h>
|
#include <gtkmm/adjustment.h>
|
||||||
#include <gtkmm/spinbutton.h>
|
#include <gtkmm/spinbutton.h>
|
||||||
|
|
@ -29,6 +30,7 @@
|
||||||
#include "ardour/types.h"
|
#include "ardour/types.h"
|
||||||
|
|
||||||
#include "ardour_dialog.h"
|
#include "ardour_dialog.h"
|
||||||
|
#include "route_dialogs.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
class Session;
|
class Session;
|
||||||
|
|
@ -58,7 +60,11 @@ class DuplicateRouteDialog : public ArdourDialog
|
||||||
void on_response (int);
|
void on_response (int);
|
||||||
|
|
||||||
uint32_t count() const;
|
uint32_t count() const;
|
||||||
|
RouteDialogs::InsertAt insert_at();
|
||||||
ARDOUR::PlaylistDisposition playlist_disposition() const;
|
ARDOUR::PlaylistDisposition playlist_disposition() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Gtk::ComboBoxText insert_at_combo;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __gtk_ardour_duplicate_route_dialog_h__ */
|
#endif /* __gtk_ardour_duplicate_route_dialog_h__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue