mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Playlist UI tweaks: move pgroup_id out of the menu text, and into a column of the playlist selector
This commit is contained in:
parent
1c9bb9ab41
commit
e63dc0eb29
3 changed files with 6 additions and 3 deletions
|
|
@ -57,11 +57,12 @@ PlaylistSelector::PlaylistSelector ()
|
|||
set_name ("PlaylistSelectorWindow");
|
||||
set_modal(false);
|
||||
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
|
||||
set_size_request (300, 200);
|
||||
set_size_request (400, 250);
|
||||
|
||||
model = TreeStore::create (columns);
|
||||
tree.set_model (model);
|
||||
tree.append_column (_("Playlists grouped by track"), columns.text);
|
||||
tree.append_column (_("Playlist Group"), columns.pgrp);
|
||||
tree.set_headers_visible (false);
|
||||
|
||||
scroller.add (tree);
|
||||
|
|
@ -215,6 +216,7 @@ PlaylistSelector::redisplay()
|
|||
|
||||
if (child_row) {
|
||||
child_row[columns.text] = (*p)->name();
|
||||
child_row[columns.pgrp] = (*p)->pgroup_id();
|
||||
child_row[columns.playlist] = *p;
|
||||
|
||||
if (*p == this_track->playlist()) {
|
||||
|
|
@ -250,6 +252,7 @@ PlaylistSelector::redisplay()
|
|||
|
||||
child_row = *(model->append (row.children()));
|
||||
child_row[columns.text] = (*p)->name();
|
||||
child_row[columns.pgrp] = (*p)->pgroup_id();
|
||||
child_row[columns.playlist] = *p;
|
||||
|
||||
if (*p == this_track->playlist()) {
|
||||
|
|
|
|||
|
|
@ -97,9 +97,11 @@ private:
|
|||
{
|
||||
ModelColumns () {
|
||||
add (text);
|
||||
add (pgrp);
|
||||
add (playlist);
|
||||
}
|
||||
Gtk::TreeModelColumn<std::string> text;
|
||||
Gtk::TreeModelColumn<std::string> pgrp;
|
||||
Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Playlist> > playlist;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2505,8 +2505,6 @@ RouteUI::build_playlist_menu ()
|
|||
/* add the playlists to the menu */
|
||||
for (vector<boost::shared_ptr<Playlist> >::iterator i = playlists_tr.begin(); i != playlists_tr.end(); ++i) {
|
||||
string text = (*i)->name();
|
||||
if ((*i)->pgroup_id().length()>0)
|
||||
text.append( string_compose( " (%1)", (*i)->pgroup_id()));
|
||||
playlist_items.push_back (RadioMenuElem (playlist_group, text));
|
||||
RadioMenuItem *item = static_cast<RadioMenuItem*>(&playlist_items.back());
|
||||
item->signal_toggled().connect(sigc::bind (sigc::mem_fun (*this, &RouteUI::use_playlist), item, boost::weak_ptr<Playlist> (*i)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue