diff --git a/applets/CMakeLists.txt b/applets/CMakeLists.txt --- a/applets/CMakeLists.txt +++ b/applets/CMakeLists.txt @@ -20,7 +20,6 @@ add_subdirectory(notes) add_subdirectory(quicklaunch) add_subdirectory(quickshare) -add_subdirectory(showdesktop) if(NOT WIN32) add_subdirectory(systemloadviewer) endif(NOT WIN32) diff --git a/applets/showdesktop/CMakeLists.txt b/applets/showdesktop/CMakeLists.txt deleted file mode 100644 --- a/applets/showdesktop/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -plasma_install_package(package org.kde.plasma.showdesktop) - -add_definitions(-DTRANSLATION_DOMAIN="plasma_applet_org.kde.plasma.showdesktop") - -set(showdesktop_SRCS - plugin/showdesktop.cpp - plugin/showdesktopplugin.cpp -) - -add_library(showdesktopplugin SHARED ${showdesktop_SRCS}) - -target_link_libraries(showdesktopplugin - Qt5::Core - Qt5::Qml - Qt5::Quick - KF5::WindowSystem - ) - -install(TARGETS showdesktopplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/showdesktop) -install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/showdesktop) diff --git a/applets/showdesktop/Messages.sh b/applets/showdesktop/Messages.sh deleted file mode 100755 --- a/applets/showdesktop/Messages.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /usr/bin/env bash -$XGETTEXT `find . -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.showdesktop.pot diff --git a/applets/showdesktop/package/contents/config/main.xml b/applets/showdesktop/package/contents/config/main.xml deleted file mode 100644 --- a/applets/showdesktop/package/contents/config/main.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - user-desktop - - - diff --git a/applets/showdesktop/package/contents/ui/main.qml b/applets/showdesktop/package/contents/ui/main.qml deleted file mode 100644 --- a/applets/showdesktop/package/contents/ui/main.qml +++ /dev/null @@ -1,91 +0,0 @@ -/* - Copyright (C) 2014 Ashish Madeti - Copyright (C) 2016 Kai Uwe Broulik - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -import QtQuick 2.1 -import QtQuick.Layouts 1.1 - -import org.kde.plasma.core 2.0 as PlasmaCore - -import org.kde.plasma.plasmoid 2.0 - -import org.kde.plasma.private.showdesktop 0.1 - -QtObject { - id: root - - // you can't have an applet with just a compact representation :( - Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation - Plasmoid.onActivated: showdesktop.showingDesktop = !showdesktop.showingDesktop - Plasmoid.icon: plasmoid.configuration.icon - Plasmoid.title: i18n("Show Desktop") - Plasmoid.toolTipSubText: i18n("Show the Plasma desktop") - - // QtObject has no default property - property QtObject showdesktop: ShowDesktop { } - - Component.onCompleted: { - plasmoid.setAction("minimizeall", i18nc("@action", "Minimize All Windows")) - } - - function action_minimizeall() { - showdesktop.minimizeAll() - } - - Plasmoid.fullRepresentation: PlasmaCore.ToolTipArea { - readonly property bool inPanel: (plasmoid.location === PlasmaCore.Types.TopEdge - || plasmoid.location === PlasmaCore.Types.RightEdge - || plasmoid.location === PlasmaCore.Types.BottomEdge - || plasmoid.location === PlasmaCore.Types.LeftEdge) - - Layout.minimumWidth: units.iconSizes.small - Layout.minimumHeight: Layout.minimumWidth - - Layout.maximumWidth: inPanel ? units.iconSizeHints.panel : -1 - Layout.maximumHeight: inPanel ? units.iconSizeHints.panel : -1 - - icon: plasmoid.icon - mainText: plasmoid.title - subText: plasmoid.toolTipSubText - - MouseArea { - anchors.fill: parent - onClicked: showdesktop.showingDesktop = !showdesktop.showingDesktop - } - - PlasmaCore.IconItem { - anchors.fill: parent - source: plasmoid.icon - active: parent.containsMouse || showdesktop.showingDesktop - } - - // also activate when dragging an item over the plasmoid so a user can easily drag data to the desktop - DropArea { - anchors.fill: parent - onEntered: activateTimer.start() - onExited: activateTimer.stop() - - Timer { - id: activateTimer - interval: 250 //to match TaskManager - onTriggered: plasmoid.activated() - } - } - } - -} diff --git a/applets/showdesktop/package/metadata.desktop b/applets/showdesktop/package/metadata.desktop deleted file mode 100644 --- a/applets/showdesktop/package/metadata.desktop +++ /dev/null @@ -1,133 +0,0 @@ -[Desktop Entry] -Name=Show Desktop -Name[ar]=أظهر سطح المكتب -Name[bs]=Prikaži radnu površinu -Name[ca]=Mostra l'escriptori -Name[ca@valencia]=Mostra l'escriptori -Name[cs]=Zobrazit plochu -Name[da]=Vis skrivebord -Name[de]=Arbeitsfläche anzeigen -Name[el]=Εμφάνιση επιφάνειας εργασίας -Name[en_GB]=Show Desktop -Name[es]=Mostrar el escritorio -Name[et]=Töölaua näitamine -Name[eu]=Erakutsi mahaigaina -Name[fi]=Näytä työpöytä -Name[fr]=Afficher un bureau -Name[ga]=Taispeáin an Deasc -Name[gl]=Mostrar o escritorio -Name[he]=הצג שולחן עבודה -Name[hr]=Prkaži radnu površinu -Name[hu]=A munkaasztal megjelenítése -Name[ia]=Monstra Scriptorio -Name[id]=Show Desktop -Name[is]=Sýna skjáborðið -Name[it]=Mostra desktop -Name[ja]=デスクトップを表示 -Name[kk]=Үстел бетін көрсету -Name[km]=បង្ហាញ​ផ្ទៃតុ -Name[ko]=데스크톱 보이기 -Name[ku]=Sermasê Nîşan Bide -Name[lt]=Rodyti darbalaukį -Name[lv]=Parādīt darbvirsmu -Name[mr]=डेस्कटॉप दर्शवा -Name[nb]=Vis skrivebord -Name[nds]=Schriefdisch wiesen -Name[nl]=Bureaublad tonen -Name[nn]=Vis skrivebord -Name[pa]=ਡੈਸਕਟਾਪ ਵੇਖੋ -Name[pl]=Pokaż pulpit -Name[pt]=Mostrar o Ecrã -Name[pt_BR]=Exibir a área de trabalho -Name[ro]=Arată biroul -Name[ru]=Показать рабочий стол -Name[sk]=Zobraziť plochu -Name[sl]=Pokaži namizje -Name[sq]=Shfaq Hapësirën e Punës -Name[sr]=приказ површи -Name[sr@ijekavian]=приказ површи -Name[sr@ijekavianlatin]=prikaz površi -Name[sr@latin]=prikaz površi -Name[sv]=Visa skrivbord -Name[th]=แสดงพื้นที่ทำงาน -Name[tr]=Masaüstünü Göster -Name[ug]=ئۈستەلئۈستىنى كۆرسەت -Name[uk]=Показати стільницю -Name[wa]=Mostrer scribanne -Name[x-test]=xxShow Desktopxx -Name[zh_CN]=显示桌面 -Name[zh_TW]=顯示桌面 -Comment=Show the Plasma desktop -Comment[ar]=أظهر سطح مكتب بلازما -Comment[bs]=Prikazi plazma površ -Comment[ca]=Mostra l'escriptori Plasma -Comment[ca@valencia]=Mostra l'escriptori Plasma -Comment[cs]=Zobrazení plochy Plasmy -Comment[da]=Viser Plasmas skrivebord. -Comment[de]=Die Plasma-Arbeitsfläche anzeigen -Comment[el]=Εμφάνιση της επιφάνειας εργασίας plasma -Comment[en_GB]=Show the Plasma desktop -Comment[es]=Mostrar el escritorio de Plasma -Comment[et]=Plasma töölaua näitamine -Comment[eu]=Erakutsi Plasma mahaigaina -Comment[fi]=Näyttää työpöydän -Comment[fr]=Afficher le bureau Plasma -Comment[ga]=Taispeáin an deasc Plasma -Comment[gl]=Mostra o escritorio Plasma -Comment[he]=מציג את שולחן העבודה Plasma -Comment[hr]=Prikaži radnu površinu Plasme -Comment[hu]=A Plazma munkaasztal megjelenítése -Comment[ia]=Monstra le scriptorio de Plasma -Comment[id]=Menampilkan desktop Plasma -Comment[is]=Sýna Plasmaskjáborðið -Comment[it]=Mostra il desktop di Plasma -Comment[ja]=Plasma デスクトップを表示します -Comment[kk]=Plasma үстелінің бетін көрсету -Comment[km]=បង្ហាញ​ផ្ទៃតុ​ប្លាស្មា -Comment[ko]=Plasma 데스크톱 보이기 -Comment[ku]=Sermase ya Plasma nîşan bide -Comment[lt]=Rodo Plasma darbalaukį -Comment[lv]=Parāda Plasma darbvirsmu -Comment[mr]=प्लाज्मा डेस्कटॉप दर्शवा -Comment[nb]=Vis Plasma-skrivebordet -Comment[nds]=Den Plasma-Schriefdisch wiesen -Comment[nl]=Toont het Plasma-bureaublad -Comment[nn]=Vis Plasma-skrivebordet -Comment[pa]=ਪਲਾਜ਼ਮਾ ਡੈਸਕਟਾਪ ਵੇਖੋ -Comment[pl]=Pokazuje pulpit Plazmy -Comment[pt]=Mostrar o ecrã do Plasma -Comment[pt_BR]=Mostra a área de trabalho do Plasma -Comment[ro]=Arată biroul Plasma -Comment[ru]=Показать рабочий стол Plasma -Comment[sk]=Zobrazenie plochy Plasmy -Comment[sl]=Pokaži namizje Plasma -Comment[sr]=Баците поглед на плазма површ -Comment[sr@ijekavian]=Баците поглед на плазма површ -Comment[sr@ijekavianlatin]=Bacite pogled na plasma površ -Comment[sr@latin]=Bacite pogled na plasma površ -Comment[sv]=Visa Plasmas skrivbord -Comment[th]=แสดงพื้นที่ทำงานของพลาสมา -Comment[tr]=Plasma masaüstünü göster -Comment[uk]=Показує стільницю Плазми -Comment[wa]=Mostrer l' sicribanne Plasma -Comment[x-test]=xxShow the Plasma desktopxx -Comment[zh_CN]=显示 Plasma 桌面 -Comment[zh_TW]=顯示 Plasma 桌面 -Icon=user-desktop - -Type=Service -X-KDE-ServiceTypes=Plasma/Applet - -X-KDE-PluginInfo-Author=Petri Damstén -X-KDE-PluginInfo-Email=damu@iki.fi -X-KDE-PluginInfo-Name=org.kde.plasma.showdesktop -X-KDE-PluginInfo-Version=1.0 -X-KDE-PluginInfo-Website=http://plasma.kde.org/ -X-KDE-PluginInfo-Category=Windows and Tasks -X-KDE-PluginInfo-Depends= -X-KDE-PluginInfo-License=GPL-2.0+ -X-KDE-PluginInfo-EnabledByDefault=true -X-Plasma-MainScript=ui/main.qml -X-Plasma-API=declarativeappletscript - -X-KDE-FormFactors=desktop diff --git a/applets/showdesktop/plugin/qmldir b/applets/showdesktop/plugin/qmldir deleted file mode 100644 --- a/applets/showdesktop/plugin/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module org.kde.plasma.private.showdesktop -plugin showdesktopplugin diff --git a/applets/showdesktop/plugin/showdesktop.h b/applets/showdesktop/plugin/showdesktop.h deleted file mode 100644 --- a/applets/showdesktop/plugin/showdesktop.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2008 Petri Damsten - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef SHOWDESKTOP_HEADER -#define SHOWDESKTOP_HEADER - -#include - -class ShowDesktop : public QObject -{ - Q_OBJECT - - Q_PROPERTY(bool showingDesktop READ showingDesktop WRITE setShowingDesktop NOTIFY showingDesktopChanged) - -public: - explicit ShowDesktop(QObject *parent = nullptr); - ~ShowDesktop() override; - - bool showingDesktop() const; - void setShowingDesktop(bool showingDesktop); - - Q_INVOKABLE void minimizeAll(); - -Q_SIGNALS: - void showingDesktopChanged(bool showingDesktop); - -}; - -#endif //SHOWDESKTOP_HEADER diff --git a/applets/showdesktop/plugin/showdesktop.cpp b/applets/showdesktop/plugin/showdesktop.cpp deleted file mode 100644 --- a/applets/showdesktop/plugin/showdesktop.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2008 Petri Damsten - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "showdesktop.h" - -#include - -ShowDesktop::ShowDesktop(QObject *parent) : QObject(parent) -{ - connect(KWindowSystem::self(), &KWindowSystem::showingDesktopChanged, - this, &ShowDesktop::showingDesktopChanged); -} - -ShowDesktop::~ShowDesktop() = default; - -bool ShowDesktop::showingDesktop() const -{ - return KWindowSystem::showingDesktop(); -} - -void ShowDesktop::setShowingDesktop(bool showingDesktop) -{ - KWindowSystem::setShowingDesktop(showingDesktop); -} - -void ShowDesktop::minimizeAll() -{ - const auto &windows = KWindowSystem::windows(); - for (WId wid : windows) { - KWindowSystem::minimizeWindow(wid); - } -} diff --git a/applets/showdesktop/plugin/showdesktopplugin.h b/applets/showdesktop/plugin/showdesktopplugin.h deleted file mode 100644 --- a/applets/showdesktop/plugin/showdesktopplugin.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2014 Ashish Madeti - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#ifndef SHOWDESKTOPPLUGIN_H -#define SHOWDESKTOPPLUGIN_H - -#include -#include -#include - -class ShowDesktopPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - void registerTypes(const char *uri) override; -}; - -#endif // SHOWDESKTOPPLUGIN_H diff --git a/applets/showdesktop/plugin/showdesktopplugin.cpp b/applets/showdesktop/plugin/showdesktopplugin.cpp deleted file mode 100644 --- a/applets/showdesktop/plugin/showdesktopplugin.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2014 Ashish Madeti - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#include "showdesktopplugin.h" -#include "showdesktop.h" - -// Qt -#include - -void ShowDesktopPlugin::registerTypes(const char *uri) -{ - Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.showdesktop")); - qmlRegisterType(uri, 0, 1, "ShowDesktop"); -}