Skip to content

Commit

Permalink
Merge branch 'flameshot-org:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jack9603301 authored Jul 5, 2024
2 parents 6d39344 + ccb5a27 commit a3bc7a3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ There are packages available in the repository of some Linux distributions:
- [Solus](https://dev.getsol.us/source/flameshot/): `eopkg it flameshot`
- [Fedora](https://src.fedoraproject.org/rpms/flameshot): `dnf install flameshot`
- [NixOS](https://search.nixos.org/packages?query=flameshot): `nix-env -iA nixos.flameshot`
- [ALT](https://packages.altlinux.org/en/sisyphus/srpms/flameshot/): `su - -c "apt-get install flameshot"`
- [Snap/Flatpak/AppImage](https://github.com/flameshotapp/packages)
- [Docker](https://github.com/ManuelLR/docker-flameshot)
- [Windows](https://github.com/majkinetor/au-packages/tree/master/flameshot)
Expand Down
3 changes: 3 additions & 0 deletions flameshot.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
;; Whether the tray icon is disabled (bool)
;disabledTrayIcon=false
;
;; Disable Grim Warning notification
;disabledGrimWarning=true
;
;; Automatically close daemon when it's not needed (not available on Windows)
;autoCloseIdleDaemon=false
;
Expand Down
1 change: 1 addition & 0 deletions src/utils/confighandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static QMap<class QString, QSharedPointer<ValueHandler>>
OPTION("showSidePanelButton" ,Bool ( true )),
OPTION("showDesktopNotification" ,Bool ( true )),
OPTION("disabledTrayIcon" ,Bool ( false )),
OPTION("disabledGrimWarning" ,Bool ( false )),
OPTION("historyConfirmationToDelete" ,Bool ( true )),
#if !defined(DISABLE_UPDATE_CHECKER)
OPTION("checkForUpdates" ,Bool ( true )),
Expand Down
1 change: 1 addition & 0 deletions src/utils/confighandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class ConfigHandler : public QObject
bool)
CONFIG_GETTER_SETTER(filenamePattern, setFilenamePattern, QString)
CONFIG_GETTER_SETTER(disabledTrayIcon, setDisabledTrayIcon, bool)
CONFIG_GETTER_SETTER(disabledGrimWarning, disabledGrimWarning, bool)
CONFIG_GETTER_SETTER(drawThickness, setDrawThickness, int)
CONFIG_GETTER_SETTER(drawFontSize, setDrawFontSize, int)
CONFIG_GETTER_SETTER(keepOpenAppLauncher, setKeepOpenAppLauncher, bool)
Expand Down
11 changes: 7 additions & 4 deletions src/utils/screengrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "screengrabber.h"
#include "abstractlogger.h"
#include "src/core/qguiappcurrentscreen.h"
#include "src/utils/confighandler.h"
#include "src/utils/filenamehandler.h"
#include "src/utils/systemnotification.h"
#include <QApplication>
Expand Down Expand Up @@ -176,10 +177,12 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
"activate the grim-based general wayland screenshot adapter");
freeDesktopPortal(ok, res);
#else
AbstractLogger::warning()
<< tr("grim's screenshot component is implemented based on "
"wlroots, it may not be used in GNOME or similar "
"desktop environments");
if (!ConfigHandler().disabledGrimWarning()) {
AbstractLogger::warning() << tr(
"grim's screenshot component is implemented based on "
"wlroots, it may not be used in GNOME or similar "
"desktop environments");
}
generalGrimScreenshot(ok, res);
#endif
break;
Expand Down

0 comments on commit a3bc7a3

Please sign in to comment.