2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

moved almost all Application to AppClass (autoupdate and singleinstance left), logs rewritten

This commit is contained in:
John Preston
2016-01-11 23:43:29 +08:00
parent f3e560541b
commit 58777dbc21
55 changed files with 1904 additions and 1773 deletions

View File

@@ -179,7 +179,7 @@ void MediaView::moveToScreen() {
}
QPoint wndCenter(App::wnd()->x() + App::wnd()->width() / 2, App::wnd()->y() + App::wnd()->height() / 2);
QRect avail = App::app() ? App::app()->desktop()->screenGeometry(wndCenter) : QDesktopWidget().screenGeometry(wndCenter);
QRect avail = Sandboxer::screenGeometry(wndCenter);
if (avail != geometry()) {
setGeometry(avail);
}
@@ -586,7 +586,7 @@ void MediaView::onSaveAs() {
}
}
activateWindow();
App::app()->setActiveWindow(this);
Sandboxer::setActiveWindow(this);
setFocus();
}
@@ -1074,7 +1074,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty
show();
psShowOverAll(this);
activateWindow();
App::app()->setActiveWindow(this);
Sandboxer::setActiveWindow(this);
setFocus();
}
}
@@ -1990,7 +1990,7 @@ void MediaView::onCheckActive() {
if (App::wnd() && isVisible()) {
if (App::wnd()->isActiveWindow() && App::wnd()->hasFocus()) {
activateWindow();
App::app()->setActiveWindow(this);
Sandboxer::setActiveWindow(this);
setFocus();
}
}