2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

max history width limited, custom tooltips replace QToolTip, keys with modifiers are not passed to MentionsDropdown

This commit is contained in:
John Preston
2016-02-07 18:38:49 +03:00
parent db9f47c6f2
commit 0b4ddb045e
16 changed files with 363 additions and 31 deletions

View File

@@ -70,6 +70,13 @@ namespace {
App::wnd()->setWindowState(Qt::WindowMinimized);
return true;
}
} else {
if ((ev->key() == Qt::Key_W || ev->key() == Qt::Key_F4) && (ev->modifiers() & Qt::ControlModifier)) {
if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) {
App::wnd()->minimizeToTray();
return true;
}
}
}
if (ev->key() == Qt::Key_MediaPlay) {
if (App::main()) App::main()->player()->playPressed();
@@ -279,7 +286,15 @@ void Application::singleInstanceChecked() {
if (status == SignalHandlers::CantOpen) {
new NotStartedWindow();
} else if (status == SignalHandlers::LastCrashed) {
new LastCrashedWindow();
if (Global::LastCrashDump().isEmpty()) { // don't handle bad closing for now
if (SignalHandlers::restart() == SignalHandlers::CantOpen) {
new NotStartedWindow();
} else {
Sandboxer::startSandbox();
}
} else {
new LastCrashedWindow();
}
} else {
Sandboxer::startSandbox();
}
@@ -560,6 +575,12 @@ namespace Sandboxer {
return false;
}
void installEventFilter(QObject *filter) {
if (Application *a = application()) {
a->installEventFilter(filter);
}
}
void execExternal(const QString &cmd) {
DEBUG_LOG(("Application Info: executing external command '%1'").arg(cmd));
if (cmd == "show") {