The controller is globally accesible

The controller class has some important methods which may be
required in multiple parts of the code. Now that class is a
singleton (that may change in the future).
The core parts have been moved to src/core.
Now the tray Icon can be disabled by the controller.
I need to reimplement a new notification system due to its
dependency with the tray icon, they are disabled in this actual
commit.
This commit is contained in:
lupoDharkael
2017-07-28 11:34:39 +02:00
parent 165939c88f
commit 3199059ede
11 changed files with 99 additions and 93 deletions

View File

@@ -375,7 +375,7 @@ QString CaptureWidget::saveScreenshot(bool toClipboard) {
savePath = m_screenshot->fileSave(ok, getExtendedSelection());
if(!ok || config.getSavePath() != m_forcedSavePath) {
saveMessage = tr("Error trying to save in ") + savePath;
Q_EMIT newMessage(saveMessage);
// TODO send saveMessage
}
}
if (toClipboard) {
@@ -383,7 +383,7 @@ QString CaptureWidget::saveScreenshot(bool toClipboard) {
}
if(ok) {
saveMessage = tr("Capture saved in ") + savePath;
Q_EMIT newMessage(saveMessage);
// TODO send saveMessage
}
close();
return savePath;
@@ -437,7 +437,7 @@ void CaptureWidget::uploadScreenshot() {
m_screenshot->uploadToImgur(am, getExtendedSelection());
}
hide();
Q_EMIT newMessage(tr("Uploading image..."));
// TODO send tr("Uploading image...")
}
bool CaptureWidget::undo() {