This is an automated email from the git hooks/post-receive script. thansen pushed a commit to branch master in repository aseprite.
commit cb86fb4c8f0de597f0c6ff95aa5431926573d0ba Author: David Capello <[email protected]> Date: Wed Mar 2 10:31:39 2016 -0300 Rename ui::winKeyName to ui::kWinKeyName --- src/app/ui/select_accelerator.cpp | 4 ++-- src/ui/accelerator.cpp | 15 ++++++++++++--- src/ui/accelerator.h | 8 ++------ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/app/ui/select_accelerator.cpp b/src/app/ui/select_accelerator.cpp index 1c5023d..4cb305c 100644 --- a/src/app/ui/select_accelerator.cpp +++ b/src/app/ui/select_accelerator.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2001-2015 David Capello +// Copyright (C) 2001-2016 David Capello // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -161,7 +161,7 @@ void SelectAccelerator::updateModifiers() cmd()->setSelected(m_accel.modifiers() & kKeyCmdModifier ? true: false); #else #if __linux__ - win()->setText(winKeyName); + win()->setText(kWinKeyName); #endif win()->setSelected(m_accel.modifiers() & kKeyWinModifier ? true: false); cmd()->setVisible(false); diff --git a/src/ui/accelerator.cpp b/src/ui/accelerator.cpp index 47900da..c7f01e2 100644 --- a/src/ui/accelerator.cpp +++ b/src/ui/accelerator.cpp @@ -1,5 +1,5 @@ // Aseprite UI Library -// Copyright (C) 2001-2013, 2015 David Capello +// Copyright (C) 2001-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -27,6 +27,12 @@ namespace ui { +#ifdef _WIN32 + const char* kWinKeyName = "Win"; +#else + const char* kWinKeyName = "Super"; +#endif + static KeyModifiers get_pressed_modifiers_from_she() { KeyModifiers mods = kKeyNoneModifier; @@ -91,7 +97,7 @@ Accelerator::Accelerator(const std::string& str) else if (tok == "cmd") { m_modifiers = (KeyModifiers)((int)m_modifiers | (int)kKeyCmdModifier); } - else if (tok == base::string_to_lower(winKeyName)) { + else if (tok == base::string_to_lower(kWinKeyName)) { m_modifiers = (KeyModifiers)((int)m_modifiers | (int)kKeyWinModifier); } @@ -352,7 +358,10 @@ std::string Accelerator::toString() const if (m_modifiers & kKeyAltModifier) buf += "Alt+"; if (m_modifiers & kKeyShiftModifier) buf += "Shift+"; if (m_modifiers & kKeySpaceModifier) buf += "Space+"; - if (m_modifiers & kKeyWinModifier) { buf += winKeyName; buf += "+"; } + if (m_modifiers & kKeyWinModifier) { + buf += kWinKeyName; + buf += "+"; + } // Key if (m_unicodeChar) { diff --git a/src/ui/accelerator.h b/src/ui/accelerator.h index 1ae41d2..3bfd586 100644 --- a/src/ui/accelerator.h +++ b/src/ui/accelerator.h @@ -1,5 +1,5 @@ // Aseprite UI Library -// Copyright (C) 2001-2013, 2015 David Capello +// Copyright (C) 2001-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -15,11 +15,7 @@ namespace ui { -#ifdef _WIN32 - const std::string winKeyName = "Win"; -#else - const std::string winKeyName = "Super"; -#endif + extern const char* kWinKeyName; class Accelerator { public: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

