Skip to content

Commit

Permalink
Major Controller refactor (#2295)
Browse files Browse the repository at this point in the history
* Change Controller interface to mimic the CLI

Signed-off-by: Haris Gušić <[email protected]>

* Remove obsolete handleCaptureTaken

Signed-off-by: Haris Gušić <[email protected]>

* Extract system tray icon into separate class

The implementation is not complete and full of bugs

Signed-off-by: Haris Gušić <[email protected]>

* Remove Controller::handleCaptureFailed

Signed-off-by: Haris Gušić <[email protected]>

* Fix a QObject connection

Signed-off-by: Haris Gušić <[email protected]>

* Controller: remove unused includes

Signed-off-by: Haris Gušić <[email protected]>

* Make check for updates work again

Signed-off-by: Haris Gušić <[email protected]>

* Move functionality to daemon and tray icon

Signed-off-by: Haris Gušić <[email protected]>

* Rename SystemTray to TrayIcon

Signed-off-by: Haris Gušić <[email protected]>

* Add missing trayicon.* files

Signed-off-by: Haris Gušić <[email protected]>

* Add missing QDesktopWidget

Signed-off-by: Haris Gušić <[email protected]>

* Fix syntax errors

Signed-off-by: Haris Gušić <[email protected]>

* Add missing include

Signed-off-by: Haris Gušić <[email protected]>

* Include missing QOperatingSystemVersion on Mac

Signed-off-by: Haris Gušić <[email protected]>

* Move update checking to daemon

Signed-off-by: Haris Gušić <[email protected]>

* Remove obsolete method Controller::doLater

Signed-off-by: Haris Gušić <[email protected]>

* Some cleanup

Signed-off-by: Haris Gušić <[email protected]>

* Rename Controller to Flameshot

Signed-off-by: Haris Gušić <[email protected]>

* Final touches

Signed-off-by: Haris Gušić <[email protected]>
  • Loading branch information
veracioux authored Mar 25, 2022
1 parent e97f733 commit 54690d5
Show file tree
Hide file tree
Showing 20 changed files with 945 additions and 929 deletions.
3 changes: 1 addition & 2 deletions src/config/generalconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2017-2019 Alejandro Sirgo Rica & Contributors

#include "generalconf.h"
#include "src/core/controller.h"
#include "src/core/flameshot.h"
#include "src/utils/confighandler.h"
#include <QCheckBox>
#include <QComboBox>
Expand Down Expand Up @@ -127,7 +127,6 @@ void GeneralConf::showDesktopNotificationChanged(bool checked)
void GeneralConf::checkForUpdatesChanged(bool checked)
{
ConfigHandler().setCheckForUpdates(checked);
Controller::getInstance()->setCheckForUpdatesEnabled(checked);
}

void GeneralConf::allowMultipleGuiInstancesChanged(bool checked)
Expand Down
4 changes: 2 additions & 2 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
target_sources(flameshot PRIVATE
controller.h
flameshot.h
flameshotdaemon.h
flameshotdbusadapter.h
qguiappcurrentscreen.h
)

target_sources(flameshot PRIVATE
capturerequest.cpp
controller.cpp
flameshot.cpp
flameshotdaemon.cpp
flameshotdbusadapter.cpp
qguiappcurrentscreen.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/core/capturerequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "capturerequest.h"
#include "confighandler.h"
#include "controller.h"
#include "flameshot.h"
#include "imgupload/imguploadermanager.h"
#include "pinwidget.h"
#include "src/utils/screenshotsaver.h"
Expand Down
Loading

0 comments on commit 54690d5

Please sign in to comment.