From 5516ffe1cc233d66a86c024130520e027b15ab6d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 11 Oct 2016 08:38:54 -0400 Subject: Make lumina-screenshot single-instanced, and adjust the .desktop entry to *always* open a new window. --- src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop | 2 +- src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro | 2 +- src-qt5/desktop-utils/lumina-screenshot/main.cpp | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src-qt5') diff --git a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop index b1c386fc..c4678265 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop +++ b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Exec=lumina-screenshot +Exec=lumina-screenshot -new-instance Icon=camera-web Terminal=false Type=Application diff --git a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro index 6f47f61f..a85b234c 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro +++ b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro @@ -1,6 +1,6 @@ include("$${PWD}/../../OS-detect.pri") -QT += core gui +QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets x11extras diff --git a/src-qt5/desktop-utils/lumina-screenshot/main.cpp b/src-qt5/desktop-utils/lumina-screenshot/main.cpp index aee374b0..27e1f2ff 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/main.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/main.cpp @@ -7,14 +7,15 @@ #include #include #include +#include int main(int argc, char ** argv) { LTHEME::LoadCustomEnvSettings(); - QApplication a(argc, argv); + LSingleApplication a(argc, argv, "l-screenshot"); LuminaThemeEngine theme(&a); a.setApplicationName("Take Screenshot"); - LUtils::LoadTranslation(&a, "l-screenshot"); + //LUtils::LoadTranslation(&a, "l-screenshot"); MainUI w; QObject::connect(&theme,SIGNAL(updateIcons()), &w, SLOT(setupIcons()) ); -- cgit