View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002207 | ardour | features | public | 2008-04-21 17:25 | 2015-03-30 15:12 |
| Reporter | colinf | Assigned To | cth103 | ||
| Priority | normal | Severity | trivial | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | SVN/2.0-ongoing | ||||
| Target Version | 3.0 | ||||
| Summary | 0002207: [PATCH] Remember more recent sessions | ||||
| Description | Currently, the last ten recent sessions are remembered. A lot of albums have more than ten tracks, though, and it's nice to see all of them in the list of recent sessions. | ||||
| Additional Information | Attached a patch to up it to 25, which is enough for me. | ||||
| Tags | No tags attached. | ||||
|
2008-04-21 17:25
|
more-recent-sessions.patch (628 bytes)
Index: libs/ardour/recent_sessions.cc
===================================================================
--- libs/ardour/recent_sessions.cc (revision 3278)
+++ libs/ardour/recent_sessions.cc (working copy)
@@ -31,6 +31,8 @@
using namespace ARDOUR;
using namespace PBD;
+#define MAX_RECENT_SESSIONS 25
+
int
ARDOUR::read_recent_sessions (RecentSessions& rs)
{
@@ -111,8 +113,8 @@
rs.push_front (newpair);
- if (rs.size() > 10) {
- rs.erase(rs.begin()+10, rs.end());
+ if (rs.size() > MAX_RECENT_SESSIONS) {
+ rs.erase(rs.begin()+MAX_RECENT_SESSIONS, rs.end());
}
return ARDOUR::write_recent_sessions (rs);
|
|
2008-07-03 15:23
|
even-more-recent-sessions.patch (642 bytes)
Index: libs/ardour/recent_sessions.cc
===================================================================
--- libs/ardour/recent_sessions.cc (revision 3508)
+++ libs/ardour/recent_sessions.cc (working copy)
@@ -36,6 +36,8 @@
using namespace ARDOUR;
using namespace PBD;
+static const int max_recent_sessions = 50;
+
int
ARDOUR::read_recent_sessions (RecentSessions& rs)
{
@@ -114,8 +116,8 @@
rs.push_front (newpair);
- if (rs.size() > 10) {
- rs.erase(rs.begin()+10, rs.end());
+ if (rs.size() > max_recent_sessions) {
+ rs.erase(rs.begin() + max_recent_sessions, rs.end());
}
return ARDOUR::write_recent_sessions (rs);
|
|
|
Actually, more is better... How about 50? Also, perhaps it's nicer to use a static const int instead of a #define |
|
2008-07-04 08:12
|
more-recent-sessions-again.patch (651 bytes)
Index: libs/ardour/recent_sessions.cc
===================================================================
--- libs/ardour/recent_sessions.cc (revision 3512)
+++ libs/ardour/recent_sessions.cc (working copy)
@@ -36,6 +36,8 @@
using namespace ARDOUR;
using namespace PBD;
+static const unsigned int max_recent_sessions = 50;
+
int
ARDOUR::read_recent_sessions (RecentSessions& rs)
{
@@ -114,8 +116,8 @@
rs.push_front (newpair);
- if (rs.size() > 10) {
- rs.erase(rs.begin()+10, rs.end());
+ if (rs.size() > max_recent_sessions) {
+ rs.erase(rs.begin() + max_recent_sessions, rs.end());
}
return ARDOUR::write_recent_sessions (rs);
|
|
2012-02-08 21:24
|
more-recent-sessions-a3 (525 bytes)
Index: libs/ardour/recent_sessions.cc
===================================================================
--- libs/ardour/recent_sessions.cc (revision 11476)
+++ libs/ardour/recent_sessions.cc (working copy)
@@ -130,8 +130,10 @@
rs.push_front (newpair);
- if (rs.size() > 10) {
- rs.erase(rs.begin()+10, rs.end());
+ static const unsigned int max_recent_sessions = 50;
+
+ if (rs.size() > max_recent_sessions) {
+ rs.erase(rs.begin()+max_recent_sessions, rs.end());
}
return ARDOUR::write_recent_sessions (rs);
|
|
2012-02-08 22:25
|
configurable-max-recent-sessions.patch (2,608 bytes)
Index: libs/ardour/ardour/rc_configuration_vars.h
===================================================================
--- libs/ardour/ardour/rc_configuration_vars.h (revision 11476)
+++ libs/ardour/ardour/rc_configuration_vars.h (working copy)
@@ -174,6 +174,7 @@
CONFIG_VARIABLE (bool, never_display_periodic_midi, "never-display-periodic-midi", true)
CONFIG_VARIABLE (bool, sound_midi_notes, "sound-midi-notes", false)
CONFIG_VARIABLE (bool, use_plugin_own_gui, "use-plugin-own-gui", true)
+CONFIG_VARIABLE (uint32_t, max_recent_sessions, "max-recent-sessions", 10)
/* denormal management */
@@ -185,4 +186,4 @@
CONFIG_VARIABLE (bool, show_zoom_tools, "show-zoom-tools", true)
CONFIG_VARIABLE (bool, widget_prelight, "widget-prelight", true)
CONFIG_VARIABLE (std::string, mixer_strip_visibility, "mixer-strip-visibility", "PhaseInvert,SoloSafe,SoloIsolated,Group,MeterPoint")
-CONFIG_VARIABLE (bool, allow_non_quarter_pulse, "allow-non-quarter-pulse", false)
+CONFIG_VARIABLE (bool, allow_non_quarter_pulse, "allow-non-quarter-pulse", true)
Index: libs/ardour/recent_sessions.cc
===================================================================
--- libs/ardour/recent_sessions.cc (revision 11476)
+++ libs/ardour/recent_sessions.cc (working copy)
@@ -28,6 +28,7 @@
#include "pbd/error.h"
#include "ardour/configuration.h"
+#include "ardour/rc_configuration.h"
#include "ardour/filesystem_paths.h"
#include "ardour/recent_sessions.h"
#include "ardour/utils.h"
@@ -130,8 +131,10 @@
rs.push_front (newpair);
- if (rs.size() > 10) {
- rs.erase(rs.begin()+10, rs.end());
+ uint32_t max_recent_sessions = Config->get_max_recent_sessions();
+
+ if (rs.size() > max_recent_sessions) {
+ rs.erase(rs.begin()+max_recent_sessions, rs.end());
}
return ARDOUR::write_recent_sessions (rs);
Index: gtk2_ardour/rc_option_editor.cc
===================================================================
--- gtk2_ardour/rc_option_editor.cc (revision 11476)
+++ gtk2_ardour/rc_option_editor.cc (working copy)
@@ -919,6 +919,15 @@
sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_session_parent_dir)
));
+ add_option (_("Misc"),
+ new SpinOption<uint32_t> (
+ "max-recent-sessions",
+ _("Maximum number of recent sessions"),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::get_max_recent_sessions),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::set_max_recent_sessions),
+ 0, 1000, 1, 20
+ ));
+
add_option (_("Misc"), new OptionEditorHeading (_("Click")));
add_option (_("Misc"), new ClickOptions (_rc_config, this));
|
|
|
As suggested by seablade on IRC, here's one that makes the maximum number of recent sessions configurable. |
|
|
Oh poo, just spotted I made an unrelated change in libs/ardour/ardour/rc_configuration_vars.h (defaulting "allow-non-quarter-pulse" to true). Obviously that has nothing to do with this... |
|
2012-03-09 17:12
|
configurable-max-recent-sessions-11624.patch (2,156 bytes)
Index: libs/ardour/ardour/rc_configuration_vars.h
===================================================================
--- libs/ardour/ardour/rc_configuration_vars.h (revision 11624)
+++ libs/ardour/ardour/rc_configuration_vars.h (working copy)
@@ -174,6 +174,7 @@
CONFIG_VARIABLE (bool, never_display_periodic_midi, "never-display-periodic-midi", true)
CONFIG_VARIABLE (bool, sound_midi_notes, "sound-midi-notes", false)
CONFIG_VARIABLE (bool, use_plugin_own_gui, "use-plugin-own-gui", true)
+CONFIG_VARIABLE (uint32_t, max_recent_sessions, "max-recent-sessions", 10)
/* denormal management */
Index: libs/ardour/recent_sessions.cc
===================================================================
--- libs/ardour/recent_sessions.cc (revision 11624)
+++ libs/ardour/recent_sessions.cc (working copy)
@@ -28,6 +28,7 @@
#include "pbd/error.h"
#include "ardour/configuration.h"
+#include "ardour/rc_configuration.h"
#include "ardour/filesystem_paths.h"
#include "ardour/recent_sessions.h"
#include "ardour/utils.h"
@@ -130,8 +131,10 @@
rs.push_front (newpair);
- if (rs.size() > 10) {
- rs.erase(rs.begin()+10, rs.end());
+ uint32_t max_recent_sessions = Config->get_max_recent_sessions();
+
+ if (rs.size() > max_recent_sessions) {
+ rs.erase(rs.begin()+max_recent_sessions, rs.end());
}
return ARDOUR::write_recent_sessions (rs);
Index: gtk2_ardour/rc_option_editor.cc
===================================================================
--- gtk2_ardour/rc_option_editor.cc (revision 11624)
+++ gtk2_ardour/rc_option_editor.cc (working copy)
@@ -919,6 +919,15 @@
sigc::mem_fun (*_rc_config, &RCConfiguration::set_default_session_parent_dir)
));
+ add_option (_("Misc"),
+ new SpinOption<uint32_t> (
+ "max-recent-sessions",
+ _("Maximum number of recent sessions"),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::get_max_recent_sessions),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::set_max_recent_sessions),
+ 0, 1000, 1, 20
+ ));
+
add_option (_("Misc"), new OptionEditorHeading (_("Click")));
add_option (_("Misc"), new ClickOptions (_rc_config, this));
|
|
2012-03-09 17:12
|
recent-session-fullpath-tooltips.patch (752 bytes)
Index: gtk2_ardour/startup.cc =================================================================== --- gtk2_ardour/startup.cc (revision 11624) +++ gtk2_ardour/startup.cc (working copy) @@ -996,6 +1005,7 @@ } } + recent_session_display.set_tooltip_column(1); // recent_session_columns.fullpath recent_session_display.set_model (recent_session_model); return rs.size(); } Index: gtk2_ardour/ardour_ui.cc =================================================================== --- gtk2_ardour/ardour_ui.cc (revision 11624) +++ gtk2_ardour/ardour_ui.cc (working copy) @@ -1219,6 +1219,7 @@ } } + recent_session_display.set_tooltip_column(1); // recent_session_columns.fullpath recent_session_display.set_model (recent_session_model); } |
|
|
Alright, here's a version of the patch against 11624, this time without the extra hunk. Also, a (very simple) patch to show the full path to the session folder in a tooltip, which I think is useful in conjunction with being able to have many recent sessions. |
|
|
Patches applied to SVN 11641 and 11642. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-04-21 17:25 | colinf | New Issue | |
| 2008-04-21 17:25 | colinf | File Added: more-recent-sessions.patch | |
| 2008-07-03 15:23 | colinf | File Added: even-more-recent-sessions.patch | |
| 2008-07-03 15:25 | colinf | Note Added: 0005085 | |
| 2008-07-04 08:12 | colinf | File Added: more-recent-sessions-again.patch | |
| 2012-02-08 21:24 | colinf | File Added: more-recent-sessions-a3 | |
| 2012-02-08 22:25 | colinf | File Added: configurable-max-recent-sessions.patch | |
| 2012-02-08 22:26 | colinf | Note Added: 0012767 | |
| 2012-02-08 22:29 | colinf | Note Added: 0012768 | |
| 2012-02-09 20:20 | cth103 | cost | => 0.00 |
| 2012-02-09 20:20 | cth103 | Target Version | => 3.0-beta3 |
| 2012-02-09 20:20 | cth103 | Summary | Remember more recent sessions => [PATCH] Remember more recent sessions |
| 2012-02-14 17:20 | paul | Target Version | 3.0-beta3 => 3.0 beta4 |
| 2012-03-09 17:12 | colinf | File Added: configurable-max-recent-sessions-11624.patch | |
| 2012-03-09 17:12 | colinf | File Added: recent-session-fullpath-tooltips.patch | |
| 2012-03-09 17:16 | colinf | Note Added: 0012887 | |
| 2012-03-10 11:42 | cth103 | Note Added: 0012894 | |
| 2012-03-10 11:42 | cth103 | Status | new => resolved |
| 2012-03-10 11:42 | cth103 | Resolution | open => fixed |
| 2012-03-10 11:42 | cth103 | Assigned To | => cth103 |
| 2012-05-23 15:09 | cth103 | Target Version | 3.0 beta4 => 3.0 |
| 2015-03-30 15:12 | colinf | Status | resolved => closed |