M-` shows version anywhere in the app.

This commit is contained in:
casey langen 2019-02-18 14:43:28 -08:00
parent 6bbb88ba0d
commit a45f8d7cf5
4 changed files with 9 additions and 11 deletions

View File

@ -14,6 +14,8 @@ musikdroid:
* changed general music browse experience to be tab-based with with modern
scrolling behaviors. this results in fewer clicks to find music and more
screen real estate.
* fixed elusive bug that would cause lock screen controls to stop functioning
sometimes, on some devices.
* massive cleanup and refactor to old code, making it more modular and easier
to compose.

View File

@ -57,11 +57,7 @@ void ConsoleLayout::OnItemActivated(cursespp::ListWindow* window, size_t index)
}
bool ConsoleLayout::KeyPress(const std::string& kn) {
if (kn == "^_" || kn == "M-v") { /* ctrl+/ */
ToastOverlay::Show(u8fmt(_TSTR("console_version"), VERSION), -1);
return true;
}
else if (kn == "x") {
if (kn == "x") {
this->adapter->Clear();
return true;
}

View File

@ -36,6 +36,7 @@
#include <cursespp/Screen.h>
#include <cursespp/Colors.h>
#include <cursespp/ToastOverlay.h>
#include <core/runtime/Message.h>
@ -47,6 +48,7 @@
#include <app/layout/SettingsLayout.h>
#include <app/layout/HotkeysLayout.h>
#include <app/util/Hotkeys.h>
#include <app/version.h>
#include <map>
@ -154,6 +156,10 @@ bool MainLayout::KeyPress(const std::string& key) {
this->SetLayout(settingsLayout);
return true;
}
else if (key == "M-`") {
ToastOverlay::Show(u8fmt(_TSTR("console_version"), VERSION), -1);
return true;
}
return AppLayout::KeyPress(key);
}

View File

@ -37,7 +37,6 @@
#include <cursespp/App.h>
#include <cursespp/Colors.h>
#include <cursespp/DialogOverlay.h>
#include <cursespp/ToastOverlay.h>
#include <cursespp/InputOverlay.h>
#include <cursespp/Screen.h>
#include <cursespp/SingleLineEntry.h>
@ -48,7 +47,6 @@
#include <core/audio/Outputs.h>
#include <core/support/Messages.h>
#include <app/version.h>
#include <app/util/Hotkeys.h>
#include <app/util/Messages.h>
#include <app/util/PreferenceKeys.h>
@ -713,10 +711,6 @@ bool SettingsLayout::KeyPress(const std::string& key) {
return true;
}
}
if (key == "^_" || key == "M-v") { /* ctrl+/ */
ToastOverlay::Show(u8fmt(_TSTR("console_version"), VERSION), -1);
return true;
}
return LayoutBase::KeyPress(key);
}