Fixes from review

This commit is contained in:
Ian McInerney
2019-08-25 17:31:02 +02:00
parent e961307043
commit 2c146d830d
2 changed files with 15 additions and 42 deletions

View File

@@ -193,8 +193,8 @@ bool wxAcceleratorEntry::ValidateKey(int flags, int keycode)
if ( !flags )
{
valid = false;
wxLogDebug( wxString::Format( wxT("Compatibility issue: %s key must have modifiers to be an accelerator key on GTK"),
keyname ) );
wxLogDebug( "Compatibility issue: %s key must have modifiers to be an accelerator key on GTK",
keyname );
}
break;
@@ -238,8 +238,8 @@ bool wxAcceleratorEntry::ValidateKey(int flags, int keycode)
case WXK_SPECIAL16: case WXK_SPECIAL17: case WXK_SPECIAL18:
case WXK_SPECIAL19: case WXK_SPECIAL20:
valid = false;
wxLogDebug( wxString::Format( wxT("Compatibility issue: %s is not supported as a keyboard accelerator key on GTK"),
keyname ) );
wxLogDebug( "Compatibility issue: %s is not supported as a keyboard accelerator key on GTK",
keyname );
break;
}

View File

@@ -1062,37 +1062,25 @@ static wxString GetGtkHotKey( const wxMenuItem& item )
if ( flags )
hotkey << wxT("Up" );
else
{
wxLogDebug( wxT("The Up key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_DOWN:
if ( flags )
hotkey << wxT("Down" );
else
{
wxLogDebug( wxT("The Down key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_LEFT:
if ( flags )
hotkey << wxT("Left" );
else
{
wxLogDebug( wxT("The Left key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_RIGHT:
if ( flags )
hotkey << wxT("Right" );
else
{
wxLogDebug( wxT("The Right key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_PAGEUP:
hotkey << wxT("Page_Up" );
@@ -1168,37 +1156,25 @@ static wxString GetGtkHotKey( const wxMenuItem& item )
if ( flags )
hotkey << wxT("KP_Up" );
else
{
wxLogDebug( wxT("The KP_Up key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_NUMPAD_DOWN:
if ( flags )
hotkey << wxT("KP_Down" );
else
{
wxLogDebug( wxT("The KP_Down key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_NUMPAD_LEFT:
if ( flags )
hotkey << wxT("KP_Left" );
else
{
wxLogDebug( wxT("The KP_Left key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_NUMPAD_RIGHT:
if ( flags )
hotkey << wxT("KP_Right" );
else
{
wxLogDebug( wxT("The KP_Right key must have modifiers to be an accelerator key") );
hotkey.Clear();
}
hotkey.clear();
break;
case WXK_NUMPAD_PAGEUP:
hotkey << wxT("KP_Page_Up" );
@@ -1282,9 +1258,7 @@ static wxString GetGtkHotKey( const wxMenuItem& item )
case WXK_SPECIAL13: case WXK_SPECIAL14: case WXK_SPECIAL15:
case WXK_SPECIAL16: case WXK_SPECIAL17: case WXK_SPECIAL18:
case WXK_SPECIAL19: case WXK_SPECIAL20:
wxLogDebug( wxString::Format( wxT("Unsupported keyboard accelerator key: %s"),
accel->ToString() ) );
hotkey.Clear();
hotkey.clear();
break;
// if there are any other keys wxAcceleratorEntry::Create() may
@@ -1302,9 +1276,8 @@ static wxString GetGtkHotKey( const wxMenuItem& item )
}
}
wxLogDebug( wxString::Format( wxT("unknown keyboard accelerator key code: %i"),
code ) );
hotkey.Clear();
wxLogDebug( "Unknown keyboard accelerator key code: %i", code );
hotkey.clear();
}
delete accel;