Only give messages about unsupported accelerators in wxGTK
Doing this under all platforms results in too many false positives,
which can't be avoided currently, e.g. even if an application uses "Tab"
as an accelerator only under MSW, these messages still appear (in debug
builds, but this is more than sufficient for them to be annoying).
For now, restrict the messages to wxGTK only. In the future we could
revert to giving them under all platforms if we provide some way of
disabling them, e.g. qualifying accelerators with "[port]" or "[!port]"
string before them.
This partially reverts 6596f5a98d
, see
https://github.com/wxWidgets/wxWidgets/pull/1505
Closes https://github.com/wxWidgets/wxWidgets/pull/1566
This commit is contained in:
@@ -53,9 +53,7 @@ public:
|
||||
, m_keyCode(keyCode)
|
||||
, m_command(cmd)
|
||||
, m_item(item)
|
||||
{
|
||||
ValidateKey(flags, keyCode);
|
||||
}
|
||||
{ }
|
||||
|
||||
// create accelerator corresponding to the specified string, return NULL if
|
||||
// string couldn't be parsed or a pointer to be deleted by the caller
|
||||
@@ -63,8 +61,6 @@ public:
|
||||
|
||||
void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
|
||||
{
|
||||
ValidateKey(flags, keyCode);
|
||||
|
||||
m_flags = flags;
|
||||
m_keyCode = keyCode;
|
||||
m_command = cmd;
|
||||
@@ -122,8 +118,6 @@ public:
|
||||
private:
|
||||
wxString AsPossiblyLocalizedString(bool localized) const;
|
||||
|
||||
static bool ValidateKey(int flags, int keycode);
|
||||
|
||||
// common part of Create() and FromString()
|
||||
static bool ParseAccel(const wxString& str, int *flags, int *keycode);
|
||||
|
||||
|
Reference in New Issue
Block a user