Commit f2fcb6ee authored by twanvl's avatar twanvl

fixes to non-unicode build

parent da864989
...@@ -352,7 +352,11 @@ bool DropDownList::onCharInParent(wxKeyEvent& ev) { ...@@ -352,7 +352,11 @@ bool DropDownList::onCharInParent(wxKeyEvent& ev) {
for (size_t i = 0 ; i < count ; ++i) { for (size_t i = 0 ; i < count ; ++i) {
size_t index = (si + i) % count; size_t index = (si + i) % count;
String c = itemText(index); String c = itemText(index);
#ifdef UNICODE
if (!c.empty() && toUpper(c.GetChar(0)) == toUpper(ev.GetUnicodeKey())) { if (!c.empty() && toUpper(c.GetChar(0)) == toUpper(ev.GetUnicodeKey())) {
#else
if (!c.empty() && toUpper(c.GetChar(0)) == toUpper(ev.GetKeyCode())) {
#endif
// first character matches // first character matches
selected_item = index; selected_item = index;
showSubMenu(); showSubMenu();
......
...@@ -152,7 +152,7 @@ void draw_control_border(Window* win, DC& dc, const wxRect& rect) { ...@@ -152,7 +152,7 @@ void draw_control_border(Window* win, DC& dc, const wxRect& rect) {
RECT r; RECT r;
wxUxThemeEngine *themeEngine = wxUxThemeEngine::Get(); wxUxThemeEngine *themeEngine = wxUxThemeEngine::Get();
if (themeEngine && themeEngine->IsAppThemed()) { if (themeEngine && themeEngine->IsAppThemed()) {
wxUxThemeHandle hTheme(win, _("EDIT")); wxUxThemeHandle hTheme(win, L"EDIT");
r.left = rect.x -1; r.left = rect.x -1;
r.top = rect.y -1; r.top = rect.y -1;
r.right = rect.x + rect.width + 1; r.right = rect.x + rect.width + 1;
......
...@@ -199,7 +199,11 @@ bool TextValueEditor::onChar(wxKeyEvent& ev) { ...@@ -199,7 +199,11 @@ bool TextValueEditor::onChar(wxKeyEvent& ev) {
// TODO: Find a more correct way to determine normal characters, // TODO: Find a more correct way to determine normal characters,
// this might not work for internationalized input. // this might not work for internationalized input.
// It might also not be portable! // It might also not be portable!
replaceSelection(escape(String(ev.GetUnicodeKey(), 1)), _("Typing")); #ifdef UNICODE
replaceSelection(escape(String(ev.GetUnicodeKey(), 1)), _("Typing"));
#else
replaceSelection(escape(String((Char)ev.GetKeyCode(), 1)), _("Typing"));
#endif
} else { } else {
return false; return false;
} }
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
Name="VCCustomBuildTool"/> Name="VCCustomBuildTool"/>
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="rpcrt4.lib wsock32.lib comctl32.lib wxbase26.lib wxmsw26_core.lib wxjpeg.lib wxpng.lib wxtiff.lib wxzlib.lib wxregex.lib" AdditionalDependencies="rpcrt4.lib wsock32.lib comctl32.lib wxbase26.lib wxmsw26_core.lib wxjpeg.lib wxpng.lib wxtiff.lib wxzlib.lib wxregex.lib wxbase26_net.lib wxmsw26_html.lib"
OutputFile="$(OutDir)/mse.exe" OutputFile="$(OutDir)/mse.exe"
LinkIncremental="1" LinkIncremental="1"
SuppressStartupBanner="TRUE" SuppressStartupBanner="TRUE"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment