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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user