This fixes an issue where brining up a menu can directly activate an
action in the menu. Notably on macOS.
Nathan reports that this may also address #9515
Note: mac touchpads are not affected since right-click there is
effectively a "press and hold".
Besides, it can happen under normal circumstances that the
Editor window, or any other window with clocks (prefs) is
visible while no session is loaded.
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
Having current_time as a public alias of the private last_when did not
add any clarity to the abstraction of last_time. A small step, but still
room for improvement.
Ignored strings were scanned to a buffer that potentially could
overflow. There might be hidden invariants that make actual overflow
impossible, but that seems like a fragile defense.
Instead, just *really* ignore them.
Much like the edit-tool and grid-types, clock-modes are UI state.
Saving the UI state separately allows them to be used
consistently for new sessions. Previously clock-modes were set
initially (at application start) and when loading sessions.
The clock modes of newly created sessions was different
depending on loading another session prior to creating the
session. This is now no longer the case.
The class now has two separate methods for setting a duration or a point
value. They MUST be used appropriately, because their behavior is different.
When ::set_duration() is used in timecode mode, an extent (inclusive-end
length) is shown rather than a length.
Some objects, such as the TimeInfoBox, now deliberately shown an inclusive end
for their "end" clock, but this not universally followed, pending more feedback
from users and investigating of conventions in other DAWs.
Address build warnings:
audio_clock.cc:911: warning: Empty msgid. It is reserved by GNU gettext:
gettext("") returns the header entry with
meta information, not the empty string.
audio_clock.cc:912: warning: Empty msgid. It is reserved by GNU gettext:
gettext("") returns the header entry with
meta information, not the empty string.
session_dialog.cc:604: warning: Empty msgid. It is reserved by GNU gettext:
gettext("") returns the header entry with
meta information, not the empty string.
session_dialog.cc:605: warning: Empty msgid. It is reserved by GNU gettext:
gettext("") returns the header entry with
meta information, not the empty string.
Use ("") instead of _("") to try to indicate syntactically that
localization markup intentionally has been left out.