View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004833 | ardour | features | public | 2012-04-09 21:42 | 2020-04-19 20:16 |
Reporter | colinf | Assigned To | cth103 | ||
Priority | normal | Severity | tweak | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 3.0 | ||||
Summary | 0004833: [PATCH] Show name of current playlist/take somewhere | ||||
Description | When I'm comping together multiple takes, I sometimes lose track of which one I can see & hear, so it'd be nice to be able to see somewhere the name of the the current playlist or take for a track without having to actually click on the 'p' button in the track header to pop up the menu. Not only is it an extra click, but it's actually quite easy to accidentally change it with a second click in the same place. My best idea so far is to add the playlist name to the tooltip of the 'p' button. That doesn't feel completely right to me, but I can't think of anywhere obviously better to put it. Anyway, simple patch attached. | ||||
Tags | No tags attached. | ||||
duplicate of | 0002595 | new | it could be quite useful to see the playlist´s name at the track header |
2012-04-09 21:42
|
playlist-name-in-tooltip.patch (756 bytes)
Index: gtk2_ardour/route_time_axis.cc =================================================================== --- gtk2_ardour/route_time_axis.cc (revision 11860) +++ gtk2_ardour/route_time_axis.cc (working copy) @@ -209,8 +209,11 @@ ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo")); ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute")); ARDOUR_UI::instance()->set_tip(route_group_button, _("Route Group")); - ARDOUR_UI::instance()->set_tip(playlist_button,_("Playlist")); + if (is_track()) { + ARDOUR_UI::instance()->set_tip(playlist_button,_("Playlist") + std::string(":\n") + track()->playlist()->name()); + } + if (is_midi_track()) { ARDOUR_UI::instance()->set_tip(automation_button, _("MIDI Controllers and Automation")); } else { |
|
Bah. Of course this patch doesn't actually work... I'll have another go at this later. |
2012-04-11 14:25
|
playlist-name-in-tooltip-v2.patch (2,493 bytes)
Index: gtk2_ardour/route_time_axis.cc =================================================================== --- gtk2_ardour/route_time_axis.cc (revision 11896) +++ gtk2_ardour/route_time_axis.cc (working copy) @@ -190,6 +190,11 @@ } rec_enable_button->set_sensitive (_session->writable()); + + // set playlist button tip to current playlist, and make it update when it changes + update_playlist_tip(); + track()->PlaylistChanged.connect(*this, invalidator (*this), ui_bind(&RouteTimeAxisView::update_playlist_tip, this), gui_context()); + } controls_hbox.pack_start(gm.get_level_meter(), false, false); @@ -209,7 +214,6 @@ ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo")); ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute")); ARDOUR_UI::instance()->set_tip(route_group_button, _("Route Group")); - ARDOUR_UI::instance()->set_tip(playlist_button,_("Playlist")); if (is_midi_track()) { ARDOUR_UI::instance()->set_tip(automation_button, _("MIDI Controllers and Automation")); @@ -1578,6 +1582,31 @@ } void +RouteTimeAxisView::update_playlist_tip() +{ + RouteGroup* rg = route_group(); + if (rg && rg->is_active() && rg->enabled_property (ARDOUR::Properties::edit.property_id)) { + std::string group_string = "." + rg->name() + "."; + + std::string take_name = track()->playlist()->name(); + std::string::size_type idx = take_name.find(group_string); + + if (idx != std::string::npos) { + // find the bit containing the take number / name + take_name = take_name.substr(idx + group_string.length()); + + // set the playlist button tooltip to the take name + ARDOUR_UI::instance()->set_tip(playlist_button,string_compose(_("Take: %1.%2"), rg->name(), take_name)); + return; + } + } + // set the playlist button tooltip to the playlist name + ARDOUR_UI::instance()->set_tip(playlist_button,_("Playlist") + std::string(":") + track()->playlist()->name()); + +} + + +void RouteTimeAxisView::show_playlist_selector () { _editor.playlist_selector().show_for (this); Index: gtk2_ardour/route_time_axis.h =================================================================== --- gtk2_ardour/route_time_axis.h (revision 11896) +++ gtk2_ardour/route_time_axis.h (working copy) @@ -271,6 +271,7 @@ virtual Gtk::Menu* build_color_mode_menu() { return 0; } void use_playlist (Gtk::RadioMenuItem *item, boost::weak_ptr<ARDOUR::Playlist> wpl); + void update_playlist_tip(); ArdourCanvas::SimpleRect* timestretch_rect; |
|
Let's try that again... I don't know whether I did this right: I looked at the other places where the PlaylistChanged signal is caught to see what to do, but I confess to not fully understanding what the parameters to PlaylistChanged.connect() really mean. Anyway, it seems to work for me, so here it is. [EDIT] Ah, it still doesn't always update the tip when it should. More prodding required... [EDIT again] Actually, I think it does work all the time: at least, I can't make it go wrong in the way I though I saw it fail earlier. |
|
Applied to SVN 12666, thanks! |
|
Thanks for applying this! A couple of things: - the tooltips don't work when there are '<' or '>' characters in the playlist name (e.g. frozen playlists), because set_tip() assumes that the tooltip text contains markup. I couldn't find any way of telling gtkmm not to treat the tooltip text as markup: that shouldn't be too difficult, but I didn't do it... - I thought that changing 'p' to 't' when the playlist is part of a take might be a good idea too: thoughts? |
|
OK I've escaped angled brackets in the tips in 12672. No strong feelings either way about the 'p' - 't' thing ... |
|
Yes, that looks like an expedient and correct fix: cheers. Two-line patch to change 'p' to 't'+take number coming up: I find it useful, anyway... |
2012-06-12 15:05
|
playlist-button-t-for-take.patch (694 bytes)
Index: gtk2_ardour/route_time_axis.cc =================================================================== --- gtk2_ardour/route_time_axis.cc (revision 12672) +++ gtk2_ardour/route_time_axis.cc (working copy) @@ -1596,12 +1596,14 @@ string_compose(_("Take: %1.%2"), escape_angled_brackets (rg->name()), escape_angled_brackets (take_name)) ); + playlist_button.set_text (string_compose(_("t%1"), take_name)); return; } } /* set the playlist button tooltip to the playlist name */ ARDOUR_UI::instance()->set_tip (playlist_button, _("Playlist") + std::string(": ") + escape_angled_brackets (track()->playlist()->name())); + playlist_button.set_text (_("p")); } |
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-04-09 21:42 | colinf | New Issue | |
2012-04-09 21:42 | colinf | File Added: playlist-name-in-tooltip.patch | |
2012-04-09 23:43 | cth103 | cost | => 0.00 |
2012-04-09 23:43 | cth103 | Target Version | => 3.0 beta4 |
2012-04-10 12:44 | colinf | Note Added: 0013101 | |
2012-04-11 14:25 | colinf | File Added: playlist-name-in-tooltip-v2.patch | |
2012-04-11 14:28 | colinf | Note Added: 0013114 | |
2012-04-11 14:32 | colinf | Note Edited: 0013114 | |
2012-04-11 21:51 | colinf | Note Edited: 0013114 | |
2012-05-23 15:08 | cth103 | Target Version | 3.0 beta4 => 3.0 |
2012-06-09 00:37 | cth103 | Relationship added | duplicate of 0002595 |
2012-06-11 23:15 | cth103 | Note Added: 0013473 | |
2012-06-11 23:15 | cth103 | Status | new => resolved |
2012-06-11 23:15 | cth103 | Resolution | open => fixed |
2012-06-11 23:15 | cth103 | Assigned To | => cth103 |
2012-06-12 13:55 | colinf | Note Added: 0013476 | |
2012-06-12 14:20 | cth103 | Note Added: 0013477 | |
2012-06-12 15:05 | colinf | Note Added: 0013478 | |
2012-06-12 15:05 | colinf | File Added: playlist-button-t-for-take.patch | |
2020-04-19 20:16 | system | Note Added: 0023037 | |
2020-04-19 20:16 | system | Status | resolved => closed |