Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Commit 93f25a9

Browse files
author
Alexis López Zubieta
committed
Initial port of the plasma systemtray applet
0 parents  commit 93f25a9

35 files changed

+3847
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CMakeLists.txt.user

CMakeLists.txt

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
project(nomad-systemtray)
2+
3+
4+
set(PROJECT_VERSION "1.0")
5+
set(PROJECT_VERSION_MAJOR 1)
6+
7+
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
8+
9+
set(QT_MIN_VERSION "5.7.0")
10+
set(KF5_MIN_VERSION "5.32.0")
11+
12+
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui Quick Test DBus)
13+
find_package(ECM 1.8.0 REQUIRED NO_MODULE)
14+
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
15+
16+
include(KDEInstallDirs)
17+
include(KDECMakeSettings)
18+
include(KDECompilerSettings NO_POLICY_SCOPE)
19+
include(ECMPackageConfigHelpers)
20+
include(ECMMarkNonGuiExecutable)
21+
include(CMakePackageConfigHelpers)
22+
include(WriteBasicConfigVersionFile)
23+
include(CheckIncludeFiles)
24+
include(FeatureSummary)
25+
include(ECMOptionalAddSubdirectory)
26+
include(ECMQtDeclareLoggingCategory)
27+
include(KDEPackageAppTemplates)
28+
29+
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
30+
Plasma Declarative I18n IconThemes XmlGui KIO )
31+
32+
find_package(KF5Notifications)
33+
34+
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.nomad.private.systemtray\")
35+
36+
plasma_install_package(package org.nomad.private.systemtray)
37+
38+
set(systemtray_SRCS
39+
systemtray.cpp
40+
)
41+
42+
ecm_qt_declare_logging_category(systemtray_SRCS HEADER debug.h
43+
IDENTIFIER SYSTEM_TRAY
44+
CATEGORY_NAME nomad.systemtray
45+
DEFAULT_SEVERITY Info)
46+
47+
add_library(org.nomad.private.systemtray MODULE ${systemtray_SRCS})
48+
49+
kcoreaddons_desktop_to_json(org.nomad.private.systemtray package/metadata.desktop)
50+
51+
target_link_libraries(org.nomad.private.systemtray
52+
Qt5::Gui
53+
Qt5::Quick
54+
KF5::Plasma
55+
Qt5::DBus
56+
KF5::IconThemes
57+
KF5::XmlGui
58+
KF5::I18n)
59+
60+
install(TARGETS org.nomad.private.systemtray DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/applets)
61+
62+
add_subdirectory(container)
63+
add_subdirectory(tests)

INSTALL

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# (0) Minimum Requirements (tested, but might be lower)
2+
- Qt >= 5.7.0
3+
- KDE Workspace >= 5.8.0
4+
- Plasma Framework >= 5.32
5+
6+
# (1) Standard way: having root permission
7+
cd /path/to/src-dir/
8+
mkdir build
9+
cd build
10+
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../
11+
make
12+
make install
13+
14+
# (2) Alternative way: having non-root permission
15+
cd /path/to/src-dir/
16+
mkdir build
17+
cd build
18+
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` -DCMAKE_BUILD_TYPE=Release -DLIB_INSTALL_DIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON ../
19+
make
20+
make install

Messages.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#! /usr/bin/env bash
2+
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg | grep -v '/tests/'` >> rc.cpp
3+
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp | grep -v '/tests/'` -o $podir/plasma_applet_org.nomad.private.systemtray.pot
4+
rm -f rc.cpp

container/CMakeLists.txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
plasma_install_package(package org.nomad.systemtray)
3+
4+
set(systemtraycontainer_SRCS
5+
systemtraycontainer.cpp
6+
)
7+
8+
ecm_qt_declare_logging_category(systemtraycontainer_SRCS HEADER debug.h
9+
IDENTIFIER SYSTEM_TRAY_CONTAINER
10+
CATEGORY_NAME kde.systemtraycontainer
11+
DEFAULT_SEVERITY Info)
12+
13+
add_library(org.nomad.systemtray MODULE ${systemtraycontainer_SRCS})
14+
15+
kcoreaddons_desktop_to_json(org.nomad.systemtray package/metadata.desktop)
16+
17+
target_link_libraries(org.nomad.systemtray
18+
Qt5::Gui
19+
Qt5::Quick
20+
KF5::Plasma
21+
KF5::XmlGui
22+
KF5::I18n)
23+
24+
25+
install(TARGETS org.nomad.systemtray DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/applets)
26+
27+
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright 2016 Marco Martin <[email protected]>
3+
*
4+
* This program is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU Library General Public License as
6+
* published by the Free Software Foundation; either version 2, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Library General Public License for more details
13+
*
14+
* You should have received a copy of the GNU Library General Public
15+
* License along with this program; if not, write to the
16+
* Free Software Foundation, Inc.,
17+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18+
*/
19+
20+
import QtQuick 2.1
21+
import QtQuick.Layouts 1.1
22+
import org.kde.plasma.core 2.0 as PlasmaCore
23+
import org.kde.plasma.plasmoid 2.0
24+
25+
Item {
26+
id: root
27+
28+
Layout.minimumWidth: internalSystray ? internalSystray.Layout.minimumWidth : 0
29+
Layout.minimumHeight: internalSystray ? internalSystray.Layout.minimumHeight : 0
30+
Layout.preferredHeight: Layout.minimumHeight
31+
32+
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
33+
Plasmoid.status: internalSystray ? internalSystray.status : PlasmaCore.Types.UnknownStatus
34+
35+
Plasmoid.onExpandedChanged: {
36+
if (internalSystray && !plasmoid.expanded) {
37+
internalSystray.expanded = false;
38+
}
39+
}
40+
Connections {
41+
target: internalSystray
42+
onExpandedChanged: plasmoid.expanded = internalSystray.expanded
43+
}
44+
45+
property Item internalSystray
46+
47+
Component.onCompleted: {
48+
root.internalSystray = plasmoid.nativeInterface.internalSystray;
49+
50+
if (root.internalSystray == null) {
51+
return;
52+
}
53+
root.internalSystray.parent = root;
54+
root.internalSystray.anchors.fill = root;
55+
}
56+
57+
Connections {
58+
target: plasmoid.nativeInterface
59+
onInternalSystrayChanged: {
60+
root.internalSystray = plasmoid.nativeInterface.internalSystray;
61+
root.internalSystray.parent = root;
62+
root.internalSystray.anchors.fill = root;
63+
}
64+
}
65+
}

container/package/metadata.desktop

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
[Desktop Entry]
2+
Name=Nomad System Tray
3+
Name[es]=Bandeja del sistema Nomad
4+
Comment=Access hidden applications minimized in the system tray
5+
Comment[be@latin]=Dostup da schavanych u systemnym trei aplikacyjaŭ
6+
Comment[bg]=Достъп до минимизираните в системния панел програми
7+
Comment[bs]=Pristup skrivenim programima minimizovanim u sistemsku kasetu
8+
Comment[ca]=Accés a les aplicacions minimitzades ocultes a la safata del sistema
9+
Comment[ca@valencia]=Accés a les aplicacions minimitzades ocultes a la safata del sistema
10+
Comment[cs]=Přístup ke skrytým aplikacím, které jsou minimalizované v systémové oblasti
11+
Comment[csb]=Dôwô mòżnotã taceniô ë minimalizowaniô aplikacëjów do systemòwégò zabiérnika
12+
Comment[da]=Tilgå skjulte programmer der er minimeret i statusområdet
13+
Comment[de]=Ermöglicht den Zugriff auf Programme, die im Systemabschnitt der Kontrollleiste laufen.
14+
Comment[el]=Πρόσβαση κρυφών εφαρμογών ελαχιστοποιημένων στο πλαίσιο συστήματος
15+
Comment[en_GB]=Access hidden applications minimised in the system tray
16+
Comment[eo]=Atingi kaŝitan minimumigitajn aplikaĵojn en la taskopleto
17+
Comment[es]=Acceder a aplicaciones ocultas minimizadas en la bandeja del sistema
18+
Comment[et]=Süsteemsesse salve minimeeritud peidetud rakenduste kasutamine
19+
Comment[eu]=Atzitu sistema-erretiluan ikonotuta dauden ezkutuko aplikazioak
20+
Comment[fi]=Hae piilotettuja sovelluksia, jotka on pienennetty ilmoitusalueelle
21+
Comment[fr]=Accède aux applications cachées et réduites dans la boîte à miniatures
22+
Comment[fy]=Jou tagong ta programma's dy't yn it systeemfak rinne
23+
Comment[ga]=Rochtain feidhmchláir atá íoslaghdaithe i dtráidire an chórais
24+
Comment[gl]=Accede a aplicativos ocultos minimizados na bandexa do sistema
25+
Comment[gu]=સિસ્ટમ ટ્રેમાં નીચાં કરેલ છુપાયેલ કાર્યક્રમોને જુઓ
26+
Comment[he]=גישה ליישומים מוסתרים הממוזערים במגש המערכת
27+
Comment[hi]=तंत्र तश्तरी में न्यूनतम किए गए छुपे अनुप्रयोगों पर पहुँच
28+
Comment[hne]=सिस्टम ट्रे मं छोटा करे लुकाय गे अनुपरयोग मं पहुंच
29+
Comment[hr]=Pristup skrivenim aplikacijama minimiziranim u sistemskom bloku
30+
Comment[hu]=Minimalizált alkalmazások elérését teszi lehetővé a paneltálcáról
31+
Comment[ia]=Accede a applicationes celate minimisate in le tabuliero de systema
32+
Comment[id]=Akses aplikasi tersembunyi yang diminimalkan di baki sistem
33+
Comment[is]=Aðgangur að földum forritum sem ganga í kerfisbakkanum
34+
Comment[it]=Accedi alle applicazioni minimizzate nel vassoio di sistema
35+
Comment[ja]=システムトレイに最小化されたアプリケーションにアクセスします
36+
Comment[kk]=Жүйелік сөреге түйілген жасырын қолданбаларға қатынау
37+
Comment[km]=ចូល​ដំណើរការ​កម្មវិធី​ដែល​លាក់​ដែល​បានបង្រួម​នៅ​ក្នុង​ថាស​ប្រព័ន្ធ
38+
Comment[kn]=ವ್ಯವಸ್ಥಾ ಖಾನೆಯಲ್ಲಿ (ಟ್ರೇ) ಕನಿಷ್ಠೀಕರಿಸಲಾದ ಅಡಗಿಸಲಾದ ಅನ್ವಯಗಳನ್ನು ನಿಲುಕಿಸಿಕೋ
39+
Comment[ko]=시스템 트레이에 숨어 있는 프로그램에 접근합니다
40+
Comment[lt]=Prieiti prie sistemos dėkle paslėptų programų
41+
Comment[lv]=Piekļūst slēptām programmām, kas minimizētas sistēmas ikonu joslā
42+
Comment[mk]=Пристап до скриените апликации што се наоѓаат во сис. лента
43+
Comment[ml]=സിസ്റ്റം ട്രേയില്‍ മിനിമൈസ് ആയിരിക്കുന്ന ഒളിഞ്ഞിരിയ്ക്കുന്ന പ്രയോഗങ്ങളെ സമീപിയ്ക്കുക
44+
Comment[mr]=system tray अंतर्गत प्रवेश करिता लपविलेले अनुप्रयोग लहान करा
45+
Comment[nb]=Få tilgang til skjulte programmer som er minimert i systemkurven
46+
Comment[nds]=Togriep op versteken Programmen binnen den Systeemafsnitt
47+
Comment[nl]=Biedt toegang tot programma's die in het systeemvak draaien
48+
Comment[nn]=Tilgang til program minimerte i systemtrauet
49+
Comment[or]=ତନ୍ତ୍ର ଟ୍ରେରେ ଆକାର ଛୋଟହୋଇ ଲୁକ୍କାୟିତ ପ୍ରୟୋଗଗୁଡ଼ିକୁ ବ୍ୟବହାର କରନ୍ତୁ
50+
Comment[pa]=ਸਿਸਟਮ ਟਰੇ ਵਿੱਚ ਲੁਕਵੀਆਂ ਘੱਟੋ-ਘੱਟ ਕੀਤੀਆਂ ਆਈਟਮਾਂ ਲਈ ਅਸੈੱਸ
51+
Comment[pl]=Zapewnia dostęp do programów zminimalizowanych na tacce systemowej
52+
Comment[pt]=Aceder às aplicações escondidas e minimizadas na bandeja do sistema
53+
Comment[pt_BR]=Acessa aplicativos ocultos minimizados na área de notificação
54+
Comment[ro]=Accesați aplicațiile ascunse minimizate în tava de sistem
55+
Comment[ru]=Показ значков приложений, свёрнутых в системный лоток
56+
Comment[si]=පද්ධති තැටියේ හකුළා සඟවා ඇති යෙදුම් වලට පිවිසෙන්න
57+
Comment[sk]=Prístup k skrytým aplikáciam minimalizovaným do systémovej lišty
58+
Comment[sl]=Dostopajte do skritih programov, skrčenih v sistemsko vrstico
59+
Comment[sr]=Приступ скривеним програмима минимизованим у системску касету
60+
Comment[sr@ijekavian]=Приступ скривеним програмима минимизованим у системску касету
61+
Comment[sr@ijekavianlatin]=Pristup skrivenim programima minimizovanim u sistemsku kasetu
62+
Comment[sr@latin]=Pristup skrivenim programima minimizovanim u sistemsku kasetu
63+
Comment[sv]=Kom åt dolda program minimerade i systembrickan
64+
Comment[ta]=Access hidden applications minimized in the system tray
65+
Comment[te]=సిస్టమ్ ట్రేనందు మినిమైజ్ కాబడి దాగివున్న అనువవర్తనములను యాక్సిస్ చేయుము
66+
Comment[th]=เข้าใช้งานโปรแกรมที่ซ่อนตัวอยู่ในถาดระบบ
67+
Comment[tr]=Sistem çekmecesine küçültülen uygulamalara erişin
68+
Comment[ug]=سىستېما قونداققا كىچىكلىتىپ يوشۇرۇلغان پروگراممىلارنى زىيارەت
69+
Comment[uk]=Доступ до прихованих програм, мінімізованих до системного лотка
70+
Comment[vi]=Truy cập các ứng dụng ẩn được thu nhỏ trong khay hệ thống
71+
Comment[wa]=Åyoz accès ås programes catchîs metous ås pus ptit el boesse ås imådjetes do sistinme
72+
Comment[x-test]=xxAccess hidden applications minimized in the system trayxx
73+
Comment[zh_CN]=访问在系统托盘中最小化隐藏的应用程序
74+
Comment[zh_TW]=存取最小化在系統匣內的隱藏應用程式
75+
Encoding=UTF-8
76+
Icon=preferences-desktop-notification
77+
Type=Service
78+
X-KDE-ServiceTypes=Plasma/Applet
79+
80+
X-Plasma-API=declarativeappletscript
81+
X-Plasma-MainScript=ui/main.qml
82+
X-KDE-PluginInfo-Author=Alexis Lopez Zubieta
83+
84+
X-KDE-PluginInfo-Name=org.nomad.systemtray
85+
X-KDE-PluginInfo-Version=1.0
86+
# X-KDE-PluginInfo-Website=http://plasma.kde.org/
87+
X-KDE-PluginInfo-Category=Windows and Tasks
88+
X-KDE-PluginInfo-Depends=
89+
X-KDE-PluginInfo-License=GPL v2+
90+
X-KDE-PluginInfo-EnabledByDefault=true
91+
X-Plasma-ContainmentType=Panel

0 commit comments

Comments
 (0)