fixed os x crash with tray icon disabled, fixed retina photos overview indicators

This commit is contained in:
John Preston 2014-09-30 15:50:35 -07:00
parent 9a3ea063c8
commit c3a5194a6c
4 changed files with 13 additions and 14 deletions

View File

@ -19,8 +19,10 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
static const int32 AppVersion = 6001;
static const wchar_t *AppVersionStr = L"0.6.1";
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
static const wchar_t *AppName = L"Telegram Desktop";
static const wchar_t *AppId = L"{53F49750-6209-4FBF-9CA8-7A333C87D1ED}";
static const wchar_t *AppFile = L"Telegram";

View File

@ -635,6 +635,7 @@ void OverviewInner::paintEvent(QPaintEvent *e) {
p.drawPixmap(pos, pix, QRect(0, (h - w) / 2, w, w));
size = w;
}
size /= cIntRetinaFactor();
if (!quality) {
uint64 dt = itemAnimations().animate(item, getms());

View File

@ -133,19 +133,13 @@ void PsMainWindow::psRefreshTaskbarIcon() {
}
void PsMainWindow::psUpdateWorkmode() {
switch (cWorkMode()) {
case dbiwmWindowAndTray:
case dbiwmTrayOnly: {
setupTrayIcon();
} break;
case dbiwmWindowOnly: {
if (trayIcon) {
trayIcon->setContextMenu(0);
trayIcon->deleteLater();
}
trayIcon = 0;
} break;
setupTrayIcon();
if (cWorkMode() == dbiwmWindowOnly) {
if (trayIcon) {
trayIcon->setContextMenu(0);
trayIcon->deleteLater();
}
trayIcon = 0;
}
}

View File

@ -795,7 +795,9 @@ void Window::updateTrayMenu(bool force) {
disconnect(first, SIGNAL(triggered(bool)), 0, 0);
connect(first, SIGNAL(triggered(bool)), this, active ? SLOT(minimizeToTray()) : SLOT(showFromTray()));
#ifndef Q_OS_WIN
trayIcon->setContextMenu((active || cPlatform() != dbipMac) ? trayIconMenu : 0);
if (trayIcon) {
trayIcon->setContextMenu((active || cPlatform() != dbipMac) ? trayIconMenu : 0);
}
#endif
}