From 8a3bd84b8ecf0f82d43c4259c041eda2abe6dd89 Mon Sep 17 00:00:00 2001 From: Pavel Borecki Date: Thu, 17 Aug 2017 17:32:56 +0000 Subject: Translated using Weblate (Czech) Currently translated at 100.0% (330 of 330 strings) --- .../core/lumina-desktop/i18n/lumina-desktop_cs.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts index adc843ed..c27b5bba 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts @@ -265,12 +265,12 @@ - Don't expect to build up the weak by pulling down the strong. + Don't expect to build up the weak by pulling down the strong. Neočekávejte že povzbudíte slabé tím že stáhnete dolů silné. - You can't know too much, but you can say too much. + You can't know too much, but you can say too much. Nemůžete vědět příliš mnoho, ale můžete toho říct přespříliš. @@ -350,7 +350,7 @@ - Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. + Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Jen dvě věci jsou nekonečné – vesmír a lidská hloupost. Tím prvním si vlastně nejsem tak úplně jistý. @@ -360,7 +360,7 @@ - Do, or do not. There is no 'try'. + Do, or do not. There is no 'try'. Udělejte to, nebo to nedělejte vůbec. Nejde o to to jen zkoušet. @@ -380,7 +380,7 @@ - It's kind of fun to do the impossible. + It's kind of fun to do the impossible. Dělat nemožné je zábava. @@ -1461,17 +1461,17 @@ Yes - + Ano No - + Ne Cancel - Storno + Storno @@ -1547,12 +1547,12 @@ Yes - + Ano No - + Ne -- cgit From 9b00fe3fbfb0aa0e52eb8e5324afd2b9a15d7cfa Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 17 Aug 2017 14:41:07 -0400 Subject: Small changes to lumina-open: 1) Don't change the lumina-mimeapps.list file unless the user chooses to change the default (never clear the default) 2) Clean up a bunch of whitespace issues --- src-qt5/core/lumina-open/main.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp index d421b5b6..72d09f42 100644 --- a/src-qt5/core/lumina-open/main.cpp +++ b/src-qt5/core/lumina-open/main.cpp @@ -88,9 +88,9 @@ void LaunchAutoStart(){ QString cmd = xdgapps[i]->getDesktopExec(); if(cmd.contains("%")){cmd = cmd.remove("%U").remove("%u").remove("%F").remove("%f").remove("%i").remove("%c").remove("%k").simplified(); } //Now run the command - if(!cmd.isEmpty()){ + if(!cmd.isEmpty()){ qDebug() << " - Auto-Starting File:" << xdgapps[i]->filePath; - QProcess::startDetached(cmd); + QProcess::startDetached(cmd); } } //make sure we clean up all the xdgapps structures @@ -103,7 +103,7 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS if(extension=="mimetype"){ //qDebug() << "inFile:" << inFile; QStringList matches = LXDG::findAppMimeForFile(inFile, true).split("::::"); //allow multiple matches - //qDebug() << "Matches:" << matches; + qDebug() << "Mimetype Matches:" << matches; for(int i=0; i Date: Thu, 17 Aug 2017 18:47:48 +0000 Subject: Translated using Weblate (Catalan) Currently translated at 100.0% (330 of 330 strings) --- .../core/lumina-desktop/i18n/lumina-desktop_ca.ts | 112 ++++++++++----------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts index 4cd0c63e..7f0aeeed 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts @@ -21,7 +21,7 @@ Select Application - Seleccioneu l'aplicació + Seleccioneu l'aplicació @@ -55,7 +55,7 @@ View Properties - Mostra'n les propietats + Mostra'n les propietats @@ -65,7 +65,7 @@ Rename - Canvia'n el nom + Canvia'n el nom @@ -85,7 +85,7 @@ Select Application - Seleccioneu l'aplicació + Seleccioneu l'aplicació @@ -196,7 +196,7 @@ Starting the Lumina Desktop... - S'inicia l'escriptori Lumina... + S'inicia l'escriptori Lumina... @@ -211,22 +211,22 @@ Keep up with desktop news! - Mantingueu-vos al dia de les notícies de l'escriptori! + Mantingueu-vos al dia de les notícies de l'escriptori! There is a full handbook of information about the desktop available online. - Hi ha un manual ple d'informació de l'escriptori disponible en línia. + Hi ha un manual ple d'informació de l'escriptori disponible en línia. Want to change the interface? Everything is customizable in the desktop configuration! - Voleu canviar-ne la interfície? Tot és personalitzable des de la configuració de l'escriptori! + Voleu canviar-ne la interfície? Tot és personalitzable des de la configuració de l'escriptori! Lumina can easily reproduce the interface from most other desktop environments. - El Lumina pot reproduir fàcilment la interfície de la majoria d'altres entorns d'escriptori. + El Lumina pot reproduir fàcilment la interfície de la majoria d'altres entorns d'escriptori. @@ -236,7 +236,7 @@ I have never been hurt by what I have not said - Mai no m'ha fet mal el que no he dit. + Mai no m'ha fet mal el que no he dit. @@ -265,12 +265,12 @@ - Don't expect to build up the weak by pulling down the strong. + Don't expect to build up the weak by pulling down the strong. No espereu fer forts els febles enfonsant forts. - You can't know too much, but you can say too much. + You can't know too much, but you can say too much. No es pot saber massa, però es pot dir massa. @@ -281,7 +281,7 @@ Any society that would give up a little liberty to gain a little security will deserve neither and lose both. - Qualsevol societat que deixi de banda una mica de llibertat per guanyar una mica de seguretat no en mereixerà ni una ni l'altra i les perdrà totes dues. + Qualsevol societat que deixi de banda una mica de llibertat per guanyar una mica de seguretat no en mereixerà ni una ni l'altra i les perdrà totes dues. @@ -341,7 +341,7 @@ The only way to do great work is to love what you do. - L'única manera de fer una bona feina és que us agradi el que feu. + L'única manera de fer una bona feina és que us agradi el que feu. @@ -350,8 +350,8 @@ - Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Només hi ha dues coses infinites: l'univers i l'estupidesa humana, i no estic segur de la primera. + Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. + Només hi ha dues coses infinites: l'univers i l'estupidesa humana, i no estic segur de la primera. @@ -360,8 +360,8 @@ - Do, or do not. There is no 'try'. - Fes-ho o no. No hi ha un "intent". + Do, or do not. There is no 'try'. + Fes-ho o no. No hi ha un "intent". @@ -371,7 +371,7 @@ Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. - La gent bona no necessita lleis que els diguin d'actuar responsablement, mentre que la mala gent trobarà una manera d'evitar les lleis. + La gent bona no necessita lleis que els diguin d'actuar responsablement, mentre que la mala gent trobarà una manera d'evitar les lleis. @@ -380,8 +380,8 @@ - It's kind of fun to do the impossible. - És bastant divertit fer l'impossible. + It's kind of fun to do the impossible. + És bastant divertit fer l'impossible. @@ -396,7 +396,7 @@ Success usually comes to those who are too busy to be looking for it. - L'èxit normalment arriba als que estan massa enfeinats per buscar-lo. + L'èxit normalment arriba als que estan massa enfeinats per buscar-lo. @@ -421,7 +421,7 @@ Sometimes it is not enough that we do our best; we must do what is required. - Algunes vegades no n'hi ha prou amb fer-ho el millor que podem, hem de fer el que cal. + Algunes vegades no n'hi ha prou amb fer-ho el millor que podem, hem de fer el que cal. @@ -446,7 +446,7 @@ Loading User Preferences … - Carregant les preferències de l'usuari… + Carregant les preferències de l'usuari… @@ -471,7 +471,7 @@ Preparing Workspace … - Preparant l'espai de treball… + Preparant l'espai de treball… @@ -481,7 +481,7 @@ Starting App: %1 - Iniciant l'aplicació: %1 + Iniciant l'aplicació: %1 @@ -532,7 +532,7 @@ Pin to Desktop - Enganxa a l'escriptori + Enganxa a l'escriptori @@ -560,7 +560,7 @@ Error parsing script output: %1 - Error analitzant la sortida de l'script: %1 + Error analitzant la sortida de l'script: %1 @@ -684,7 +684,7 @@ Use System Time - Usa l'hora del sistema + Usa l'hora del sistema @@ -692,17 +692,17 @@ Modify Item - Modifica l'ítem + Modifica l'ítem Start Moving Item - Inicia el trasllat de l'ítem + Inicia el trasllat de l'ítem Start Resizing Item - Inicia el canvi de mida de l'ítem + Inicia el canvi de mida de l'ítem @@ -717,7 +717,7 @@ Remove Item - Elimina l'ítem + Elimina l'ítem @@ -773,7 +773,7 @@ Desktop Actions - Accions de l'escriptori + Accions de l'escriptori @@ -879,7 +879,7 @@ Launch Audio Mixer - Obre el Mesclador d'àudio + Obre el Mesclador d'àudio @@ -1182,12 +1182,12 @@ View Options - Mostra'n les opcions + Mostra'n les opcions Open Website - Obre'n el lloc web + Obre'n el lloc web @@ -1219,7 +1219,7 @@ RSS URL - URL de l'RSS + URL de l'RSS @@ -1244,7 +1244,7 @@ Some RSS feeds may request custom update intervals instead of using this setting - Alguns canals RSS poden sol·licitar intervals d'actualització personalitzats en lloc d'utilitzar aquest paràmetre. + Alguns canals RSS poden sol·licitar intervals d'actualització personalitzats en lloc d'utilitzar aquest paràmetre. @@ -1290,7 +1290,7 @@ Lumina Desktop RSS - RSS de l'escriptori Lumina + RSS de l'escriptori Lumina @@ -1315,7 +1315,7 @@ Last Build Date: %1 - Data de l'última construcció: %1 + Data de l'última construcció: %1 @@ -1353,7 +1353,7 @@ All Desktop Settings - Tots els paràmetres de l'escriptori + Tots els paràmetres de l'escriptori @@ -1411,7 +1411,7 @@ Configure Desktop - Configureu l'escriptori + Configureu l'escriptori @@ -1461,17 +1461,17 @@ Yes - + No - + No Cancel - Cancel·la + Cancel·la @@ -1547,12 +1547,12 @@ Yes - + No - + No @@ -1583,7 +1583,7 @@ UserWidget - Giny de l'usuari + Giny de l'usuari @@ -1631,12 +1631,12 @@ Home - Carpeta de l'usuari + Carpeta de l'usuari Home Directory - Directori de l'usuari + Directori de l'usuari @@ -1646,7 +1646,7 @@ Go back to home directory - Torna al directori de l'usuari + Torna al directori de l'usuari @@ -1661,7 +1661,7 @@ Desktop Preferences - Preferències de l'escriptori + Preferències de l'escriptori @@ -1671,7 +1671,7 @@ Desktop Appearance/Plugins - Aparença de l'escriptori / connectors + Aparença de l'escriptori / connectors @@ -1681,12 +1681,12 @@ Screensaver Settings - Paràmetres de l'estalvi de pantalla + Paràmetres de l'estalvi de pantalla About the Lumina Desktop - Quant a l'escriptori Lumina + Quant a l'escriptori Lumina -- cgit From 94b73445ccaf5652714373ce6e5a6d6feeb3914d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 18 Aug 2017 13:22:01 -0400 Subject: Change around the default settings for Lumina quite a bit: 1) Turn on some themes by default (DarkGlass/Black) 2) Sync icon theme between desktop/lthemeengine 3) If DarkGlass/Black is for the desktop, automatically turn on the "darker" color scheme for applications within lthemeengine. 4) Ensure lumina-pdf is added as a default PDF viewer. 5) Change the wallpapers/interface for the TrueOS defaults. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 12 +++++++++++- src-qt5/core/libLumina/LUtils.cpp | 21 ++++++++++----------- .../defaults/luminaDesktop-TrueOS.conf | 15 ++++++++------- .../core/lumina-desktop/defaults/luminaDesktop.conf | 11 +++++++---- 4 files changed, 36 insertions(+), 23 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index b79f777d..973763e8 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -409,6 +409,7 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ } } } + } //qDebug() << " - Final Theme Color:" << themesettings[1]; @@ -419,7 +420,16 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ dir.mkpath(setdir); } //Now save the settings files - if(setTheme){ LTHEME::setCurrentSettings( themesettings[0], themesettings[1], themesettings[2], themesettings[3], themesettings[4]); } + if(setTheme){ + LTHEME::setCurrentSettings( themesettings[0], themesettings[1], themesettings[2], themesettings[3], themesettings[4]); + QSettings themeset("lthemeengine","lthemeengine"); + themeset.setValue("Appearance/icon_theme",themesettings[2]); + //Quick hack for a "dark" theme/color to be uniform across the desktop/applications + if(themesettings[0].contains("DarkGlass") || themesettings[1].contains("Black")){ + themeset.setValue("Appearance/custom_palette", true); + themeset.setValue("Appearance/color_scheme_path", LOS::LuminaShare().section("/",0,-3)+"/lthemeengine/colors/darker.conf"); + } + } LUtils::writeFile(setdir+"/sessionsettings.conf", sesset, true); LUtils::writeFile(setdir+"/desktopsettings.conf", deskset, true); diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index fa0173dc..e4f1c517 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -26,7 +26,7 @@ inline QStringList ProcessRun(QString cmd, QStringList args){ if(args.isEmpty()){ proc.start(cmd, QIODevice::ReadOnly); }else{ - proc.start(cmd,args ,QIODevice::ReadOnly); + proc.start(cmd,args ,QIODevice::ReadOnly); } QString info; while(!proc.waitForFinished(1000)){ @@ -37,7 +37,7 @@ inline QStringList ProcessRun(QString cmd, QStringList args){ } out[0] = QString::number(proc.exitCode()); out[1] = info+QString(proc.readAllStandardOutput()); - return out; + return out; } //============= // LUtils Functions @@ -59,7 +59,6 @@ int LUtils::runCmd(QString cmd, QStringList args){ return ret;*/ QFuture future = QtConcurrent::run(ProcessRun, cmd, args); return future.result()[0].toInt(); //turn it back into an integer return code - } QStringList LUtils::getCmdOutput(QString cmd, QStringList args){ @@ -72,7 +71,7 @@ QStringList LUtils::getCmdOutput(QString cmd, QStringList args){ if(args.isEmpty()){ proc.start(cmd); }else{ - proc.start(cmd,args); + proc.start(cmd,args); } //if(!proc.waitForStarted(30000)){ return QStringList(); } //process never started - max wait of 30 seconds while(!proc.waitForFinished(300)){ @@ -118,7 +117,7 @@ bool LUtils::isValidBinary(QString& bin){ //Relative path: search for it on the current "PATH" settings QStringList paths = QString(qgetenv("PATH")).split(":"); for(int i=0; i fmt = QImageReader::supportedImageFormats(); - for(int i=0; i%) ) #DESKTOP SETTINGS (used for the primary screen in multi-screen setups) desktop_visiblepanels=1 #[0 - 12] The number of panels visible by default -#desktop_backgroundfiles= #list of absolute file paths for image files (disable for Lumina default) +desktop_backgroundfiles=/usr/local/share/wallpapers/TrueOS/trueos-1-4k.png #list of absolute file paths for image files (disable for Lumina default) desktop_backgroundrotateminutes=5 #[positive integer] number of minutes between background rotations (if multiple files) -desktop_plugins=rssreader #list of plugins to be shown on the desktop by default +#desktop_plugins= #list of plugins to be shown on the desktop by default desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop items #PANEL SETTINGS (preface with panel1. or panel2., depending on the number of panels you have visible by default) @@ -70,7 +71,7 @@ panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or 100] percentage of the screen edge to use +panel1_edgepercent=100 #[1->100] percentage of the screen edge to use #MENU SETTINGS (right-click menu) menu_plugins=terminal, filemanager, applications, line, settings, line, lockdesktop#list of menu plugins to show diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf index 46d00053..1327f148 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf @@ -34,9 +34,12 @@ session_default_email_ifexists=trojita.desktop #DEFAULT UTILITIES FOR INDIVIDUAL MIME TYPES # Format: mime_default_[_ifexists]=<*.desktop file> mime_default_text/*_ifexists=lumina-textedit.desktop +mime_default_audio/*_ifexists=lumina-mediaplayer.desktop mime_default_audio/*_ifexists=vlc.desktop +mime_default_video/*_ifexists=lumina-mediaplayer.desktop mime_default_video/*_ifexists=vlc.desktop mime_default_application/zip_ifexists=lumina-archiver.desktop +mime_default_application/pdf_ifexists=lumina-pdf.desktop mime_default_application/x-compressed-tar_ifexists=lumina-archiver.desktop mime_default_application/x-bzip-compressed-tar_ifexists=lumina-archiver.desktop mime_default_application/x-lrzip-compressed-tar_ifexists=lumina-archiver.desktop @@ -47,9 +50,9 @@ mime_default_unknown/*=lumina-textedit.desktop mime_default_application/x-shellscript=lumina-textedit.desktop #THEME SETTINGS -theme_themefile=Glass #Name of the theme to use (disable for Lumina-Default) -theme_colorfile=Lumina-Glass #Name of the color spec file to use for theming -theme_iconset=oxygen #Name of the icon theme to use +theme_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default) +theme_colorfile=Black #Name of the color spec file to use for theming +theme_iconset=material-design-dark #Name of the icon theme to use theme_font=Arial #Name of the font family to use theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (%) ) @@ -66,7 +69,7 @@ panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or 100] percentage of the screen edge to use +panel1_edgepercent=100 #[1->100] percentage of the screen edge to use panel2_location=top panel2_pixelsize=3%H -- cgit From ddde99fd0aaf1c474a3e4b4a759a850780871903 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 18 Aug 2017 14:15:15 -0400 Subject: Add the ability to generate symlinks in the Desktop folder the first time Lumina starts up for a user, based on entries in the system's luminaDesktop.conf file. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 10 ++++++++++ src-qt5/core/libLumina/LDesktopUtils.h | 4 ++-- .../core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf | 13 +++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 973763e8..4c87ae22 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -337,6 +337,16 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ else if(var=="favorites_remove"){ qDebug() << " - Removing:"; LDesktopUtils::removeFavorite(val); } } + tmp = sysDefaults.filter("desktoplinks_"); + QString desktopFolder = QDir::homePath()+"/Desktop/"; //need to make this translatable and dynamic later + for(int i=0; i::::[dir/app/]::::" // the field might not be used for "app" flagged entries @@ -40,7 +40,7 @@ public: static bool addFavorite(QString path, QString name = ""); static void removeFavorite(QString path); static void upgradeFavorites(int fromoldversionnumber); - + //Load the default setup for the system static void LoadSystemDefaults(bool skipOS = false); static bool checkUserFiles(QString lastversion); //returns true if something changed diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf index f9481459..e453c0b8 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf @@ -97,6 +97,19 @@ favorites_add_ifexists=~/Videos #quicklaunch_add= #Create a quicklaunch shortcut for this file/dir #quicklaunch_add_ifexists= #Create a quicklaunch shortcut for this file/dir if the file/dir exists +#Desktop Folder symlinks +#desktoplinks_add= +desktoplinks_add=firefox.desktop +desktoplinks_add=chromium-browser.desktop +desktoplinks_add=qupzilla.desktop +desktoplinks_add=thunderbird.desktop +desktoplinks_add=trojita.desktop +desktoplinks_add=vlc.desktop +desktoplinks_add=pccontrol.desktop +desktoplinks_add=lthemeengine.desktop +desktoplinks_add=lumina-config.desktop +desktoplinks_add=appcafe.desktop +desktoplinks_add=handbook.desktop #Generic scripts/utilities to run for any additional setup procedures # These are always run after all other settings are saved #Format: usersetup_run= -- cgit From 51d2fb0813d16a0e300a2e18d501640cdb8f0579 Mon Sep 17 00:00:00 2001 From: scootergrisen Date: Sat, 19 Aug 2017 14:59:41 +0000 Subject: Translated using Weblate (Danish) Currently translated at 100.0% (330 of 330 strings) --- .../core/lumina-desktop/i18n/lumina-desktop_da.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts index f791a3d9..a000c313 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts @@ -265,12 +265,12 @@ - Don't expect to build up the weak by pulling down the strong. + Don't expect to build up the weak by pulling down the strong. Forvent ikke at opbygge det svage ved at nedrive det stærke. - You can't know too much, but you can say too much. + You can't know too much, but you can say too much. Du kan ikke vide for meget, men du kan sige for meget. @@ -350,7 +350,7 @@ - Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. + Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Kun to ting er uendelige, universet og menneskelig dumhed, og jeg er ikke sikker på det første. @@ -360,8 +360,8 @@ - Do, or do not. There is no 'try'. - Gør eller lad være. Der er ikke noget "prøv". + Do, or do not. There is no 'try'. + Gør eller lad være. Der er ikke noget "prøv". @@ -380,7 +380,7 @@ - It's kind of fun to do the impossible. + It's kind of fun to do the impossible. Det er egentligt sjovt at gøre det umulige. @@ -1461,17 +1461,17 @@ Yes - + Ja No - + Nej Cancel - Annuller + Annuller @@ -1547,12 +1547,12 @@ Yes - + Ja No - + Nej -- cgit From fe614e648144af72c8112d96901d9919d9ac2e29 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 25 Aug 2017 13:51:23 -0400 Subject: Re-enable compositing and ensure that the window embed routines work for all types of windows. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 57 +++++++++++++++------------ src-qt5/core/libLumina/NativeEventFilter.cpp | 6 +-- src-qt5/core/libLumina/NativeWindowSystem.cpp | 10 ++--- 3 files changed, 39 insertions(+), 34 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 487d1040..68ba44a4 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -16,22 +16,22 @@ #include #include -#define DISABLE_COMPOSITING true +#define DISABLE_COMPOSITING false -#define NORMAL_WIN_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ - XCB_EVENT_MASK_BUTTON_RELEASE | \ - XCB_EVENT_MASK_POINTER_MOTION | \ - XCB_EVENT_MASK_BUTTON_MOTION | \ - XCB_EVENT_MASK_EXPOSURE | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ - XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_ENTER_WINDOW| \ - XCB_EVENT_MASK_PROPERTY_CHANGE) +#define NORMAL_WIN_EVENT_MASK () inline void registerClientEvents(WId id){ - uint32_t value_list[1] = {NORMAL_WIN_EVENT_MASK}; + uint32_t value_list[1] = {XCB_EVENT_MASK_BUTTON_PRESS + | XCB_EVENT_MASK_BUTTON_RELEASE + | XCB_EVENT_MASK_POINTER_MOTION + | XCB_EVENT_MASK_BUTTON_MOTION + | XCB_EVENT_MASK_EXPOSURE + | XCB_EVENT_MASK_STRUCTURE_NOTIFY + | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT + | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY + | XCB_EVENT_MASK_ENTER_WINDOW + | XCB_EVENT_MASK_PROPERTY_CHANGE}; xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); } @@ -40,12 +40,13 @@ inline void registerClientEvents(WId id){ // ============ //Simplification functions for the XCB/XLib interactions void NativeEmbedWidget::syncWinSize(QSize sz){ - if(WIN==0 ){ return; } + if(WIN==0 || paused){ return; } else if(!sz.isValid()){ sz = this->size(); } //use the current widget size //qDebug() << "Sync Window Size:" << sz; - if(sz == winSize){ return; } //no change - const uint32_t valList[2] = {(uint32_t) sz.width(), (uint32_t) sz.height()}; - const uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; + //if(sz == winSize){ return; } //no change + QPoint pt= this->mapToGlobal(QPoint(0,0)); + const uint32_t valList[4] = {(uint32_t) pt.x(), (uint32_t) pt.y(), (uint32_t) sz.width(), (uint32_t) sz.height()}; + const uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; xcb_configure_window(QX11Info::connection(), WIN->id(), mask, valList); winSize = sz; //save this for checking later } @@ -95,8 +96,8 @@ NativeEmbedWidget::NativeEmbedWidget(QWidget *parent) : QWidget(parent){ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ WIN = window; - //PIXBACK = xcb_generate_id(QX11Info::connection()); - xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); + //xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); + //Now send the embed event to the app //qDebug() << " - send _XEMBED event"; /*xcb_client_message_event_t event; @@ -131,8 +132,8 @@ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change registerClientEvents(WIN->id()); - registerClientEvents(this->winId()); - qDebug() << "Events Registered:" << WIN->id() << this->winId(); + //registerClientEvents(this->winId()); + //qDebug() << "Events Registered:" << WIN->id() << this->winId(); return true; } @@ -157,15 +158,16 @@ void NativeEmbedWidget::pause(){ void NativeEmbedWidget::resume(){ paused = false; - //syncWinSize(); + syncWinSize(); //showWindow(); repaintWindow(); //update the cached image right away } void NativeEmbedWidget::resyncWindow(){ if(WIN==0){ return; } - /*return; //skip the stuff below (not working) - QRect geom = WIN->geometry(); + + // Attempt 1 : spec says to send an artificial configure event to the window + /*QRect geom = WIN->geometry(); //Send an artificial configureNotify event to the window with the global position/size included xcb_configure_notify_event_t event; event.x = geom.x() + this->pos().x(); @@ -180,15 +182,18 @@ void NativeEmbedWidget::resyncWindow(){ event.response_type = XCB_CONFIGURE_NOTIFY; xcb_send_event(QX11Info::connection(), false, WIN->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, (const char *) &event); */ - //Just jitter the window size by 1 pixel really quick so the window knows to update it's geometry - QSize sz = this->size(); + + // Attempt 2 : Just jitter the window size by 1 pixel really quick so the window knows to update it's geometry + /*QSize sz = this->size(); uint32_t valList[2] = {(uint32_t) sz.width()-1, (uint32_t) sz.height()}; uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; xcb_configure_window(QX11Info::connection(), WIN->id(), mask, valList); xcb_flush(QX11Info::connection()); valList[0] = (uint32_t) sz.width(); xcb_configure_window(QX11Info::connection(), WIN->id(), mask, valList); - xcb_flush(QX11Info::connection()); + xcb_flush(QX11Info::connection());*/ + + //Make sure the window size is syncronized and visual up to date syncWinSize(); QTimer::singleShot(10, this, SLOT(repaintWindow()) ); } diff --git a/src-qt5/core/libLumina/NativeEventFilter.cpp b/src-qt5/core/libLumina/NativeEventFilter.cpp index 354dbe76..df44c7fb 100644 --- a/src-qt5/core/libLumina/NativeEventFilter.cpp +++ b/src-qt5/core/libLumina/NativeEventFilter.cpp @@ -65,7 +65,7 @@ static xcb_ewmh_connection_t EWMH; static xcb_atom_t _NET_SYSTEM_TRAY_OPCODE = 0; inline void ParsePropertyEvent(xcb_property_notify_event_t *ev, NativeEventFilter *obj){ - qDebug() << "Got Property Event:" << ev->window << ev->atom; + //qDebug() << "Got Property Event:" << ev->window << ev->atom; NativeWindow::Property prop = NativeWindow::None; //Now determine which properties are getting changed, and update the native window as appropriate if(ev->atom == EWMH._NET_WM_NAME){ prop = NativeWindow::Title; } @@ -76,8 +76,8 @@ inline void ParsePropertyEvent(xcb_property_notify_event_t *ev, NativeEventFilte else if( ev->atom == EWMH._NET_WM_STATE){ prop = NativeWindow::States; } //Send out the signal if necessary if(prop!=NativeWindow::None){ - //if(DEBUG){ - qDebug() << "Detected Property Change:" << ev->window << prop; + //if(DEBUG){ + qDebug() << "Detected Property Change:" << ev->window << prop; //} obj->emit WindowPropertyChanged(ev->window, prop); }else{ diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index 71e95a0e..ea170b98 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -480,24 +480,24 @@ void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< Native } if(props.contains(NativeWindow::Size) || props.contains(NativeWindow::GlobalPos) ){ xcb_configure_window_value_list_t valList; - valList.x = 0; //Note that this is the relative position - should always be 0,0 relative to the embed widget - valList.y = 0; + //valList.x = 0; //Note that this is the relative position - should always be 0,0 relative to the embed widget + //valList.y = 0; QSize sz = win->property(NativeWindow::Size).toSize(); if(props.contains(NativeWindow::Size)){ sz = vals[ props.indexOf(NativeWindow::Size) ] .toSize(); } valList.width = sz.width(); valList.height = sz.height(); - /*if(props.contains(NativeWindow::GlobalPos)){ + if(props.contains(NativeWindow::GlobalPos)){ QPoint pt = vals[ props.indexOf(NativeWindow::GlobalPos) ] .toPoint(); valList.x = pt.x(); valList.y = pt.y(); }else{ valList.x = win->property(NativeWindow::GlobalPos).toPoint().x(); valList.y = win->property(NativeWindow::GlobalPos).toPoint().y(); - }*/ + } uint16_t mask = 0; - mask = mask | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;// | XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; + mask = mask | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; qDebug() << "Configure window Geometry:" << sz; xcb_configure_window_aux(QX11Info::connection(), win->id(), mask, &valList); } -- cgit From 3e729319b90c5519ee470db412389dad9bb3e0e1 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Fri, 25 Aug 2017 15:18:12 -0400 Subject: Finished the video slideshow --- .../src-screensaver/animations/VideoSlideshow.h | 73 ++++++---------------- 1 file changed, 20 insertions(+), 53 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h index cc3c1b83..9c52c447 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h @@ -4,58 +4,22 @@ // Available under the 3-clause BSD license // See the LICENSE file for full details //=========================================== -#ifndef _LUMINA_DESKTOP_SCREEN_SAVER_VIDEOSLIDESHOW_ANIMATION_H +#ifndef _LUMINA_DESKTOP_SCREEN_SAVER_VIDEOSLIDESHOW_ANIMATION_H #define _LUMINA_DESKTOP_SCREEN_SAVER_VIDEOSLIDESHOW_ANIMATION_H #include "global-includes.h" #include "BaseAnimGroup.h" -class VideoSlideshow: public QPropertyAnimation{ - Q_OBJECT -public: - VideoSlideshow(QWidget *parent, QVideoWidget *videoWidget) : QPropertyAnimation(videoWidget, "pos", parent){ - this->setKeyValueAt(0,QPoint(0,0)); - this->setKeyValueAt(1,QPoint(0,0)); - this->setDuration(1000000); - this->setLoopCount(-1); - } - ~VideoSlideshow(){} - -}; - class VideoAnimation: public BaseAnimGroup{ Q_OBJECT private: QString videoPath; - VideoSlideshow *tmp; QVideoWidget *videoWidget; QMediaPlayer *video; QStringList videoFiles; - bool multimonitor; + //bool multimonitor; private slots: - void startVideo(QAbstractAnimation::State state) { - qDebug() << "Status: " << video->mediaStatus() << "New Animation State:" << state; - if(state==QAbstractAnimation::Running){ - video->setVolume(100); - video->play(); - } - if(state==QAbstractAnimation::Stopped && video->state()!=QMediaPlayer::StoppedState){ - video->stop(); - } - } - - void stopVideo() { - if(video->state() == QMediaPlayer::StoppedState) { - qDebug() << "Stopping Animation"; - //this->deleteLater(); - videoWidget->hide(); - tmp->stop(); - //tmp->deleteLater(); - videoWidget->deleteLater(); - video->deleteLater(); - } - } public: VideoAnimation(QWidget *parent, QSettings *set) : BaseAnimGroup(parent, set){} @@ -72,32 +36,35 @@ public: if(!videoPath.endsWith("/")){ videoPath.append("/"); } //Set whether to copy videos on two monitors or play different videos - multimonitor = settings->value("videoSlideshow/multimonitor",true).toBool(); + //multimonitor = settings->value("videoSlideshow/multimonitor",true).toBool(); + //Set up the VideoWidget video = new QMediaPlayer(canvas, QMediaPlayer::VideoSurface); videoWidget = new QVideoWidget(canvas); + video->setVideoOutput(videoWidget); videoWidget->setGeometry(QRect(QPoint(0,0), canvas->size())); - - tmp = new VideoSlideshow(canvas, videoWidget); - this->addAnimation(tmp); //Generate the list of files in the directory videoFiles = QDir(videoPath).entryList(QDir::Files); if(videoFiles.empty()) qDebug() << "Current video file path has no files."; - this->setLoopCount(1); - - QUrl url = QUrl::fromLocalFile(videoPath+videoFiles[qrand() % videoFiles.size()]); - video->setMedia(url); - qDebug() << url; - video->setVideoOutput(videoWidget); + //Loading a random file from a directory + QDesktopWidget *dw = new QDesktopWidget(); + QMediaPlaylist *playlist = new QMediaPlaylist(); + for(int i = 0; i < videoFiles.size(); i++) + playlist->addMedia(QUrl::fromLocalFile(videoPath+videoFiles[i])); + qsrand(QTime::currentTime().msec()); + playlist->setCurrentIndex(qrand() % videoFiles.size()); + playlist->setPlaybackMode(QMediaPlaylist::Random); videoWidget->show(); - - qDebug() << "VideoWidget Displayed"; - connect(tmp, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), this, SLOT(startVideo(QAbstractAnimation::State)) ); - //connect(video, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(startVideo()) ); - connect(video, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(stopVideo()) ); + video->setPlaylist(playlist); + //Only play sound for one monitor to prevent messed up audio + if(dw->screenNumber(canvas) == 0) + video->setVolume(100); + else + video->setVolume(0); + video->play(); } }; -- cgit From ca1234e18f6317fa9d8321c6257204b9e265d860 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 25 Aug 2017 16:10:42 -0400 Subject: Another round of work on getting the window embed stuff cleaned up. Now the windows are restacking properly again - just need to forward events from the frame to the window on-demand still --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 30 +++++++++++++++++++++------ src-qt5/core/libLumina/NativeEmbedWidget.h | 4 +++- src-qt5/core/libLumina/NativeWindowSystem.cpp | 25 +++++++++++++++------- src-qt5/core/libLumina/RootSubWindow.cpp | 7 ++++--- 4 files changed, 49 insertions(+), 17 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 68ba44a4..9fac4f1a 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -18,11 +18,9 @@ #define DISABLE_COMPOSITING false -#define NORMAL_WIN_EVENT_MASK () - - inline void registerClientEvents(WId id){ - uint32_t value_list[1] = {XCB_EVENT_MASK_BUTTON_PRESS + uint32_t value_list[1] = {XCB_EVENT_MASK_PROPERTY_CHANGE + | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_BUTTON_MOTION @@ -31,7 +29,7 @@ inline void registerClientEvents(WId id){ | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_ENTER_WINDOW - | XCB_EVENT_MASK_PROPERTY_CHANGE}; + }; xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); } @@ -147,6 +145,11 @@ bool NativeEmbedWidget::isEmbedded(){ return (WIN!=0); } +void NativeEmbedWidget::raiseWindow(){ + uint32_t val = XCB_STACK_MODE_ABOVE; + xcb_configure_window(QX11Info::connection(), WIN->id(), XCB_CONFIG_WINDOW_STACK_MODE, &val); +} + // ============== // PUBLIC SLOTS // ============== @@ -208,6 +211,11 @@ void NativeEmbedWidget::repaintWindow(){ }else{ qDebug() << "Got Null Image!!"; } this->parentWidget()->update(); } + +void NativeEmbedWidget::reregisterEvents(){ + if(WIN!=0){ registerClientEvents(WIN->id()); } +} + // ============== // PROTECTED // ============== @@ -236,7 +244,7 @@ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ //else if(this->size() != winImage.size()){ QTimer::singleShot(0, this, SLOT(repaintWindow()) ); return; } //Need to paint the image from the window onto the widget as an overlay QRect geom = ev->rect(); //atomic updates - geom.adjust(-10,-10,10,10); //add an additional few pixels in each direction to be painted + //geom.adjust(-10,-10,10,10); //add an additional few pixels in each direction to be painted geom = geom.intersected(QRect(0,0,this->width(), this->height())); //ensure intersection with actual window if( !QRect(QPoint(0,0),winImage.size()).contains(geom) ){ QTimer::singleShot(0,this, SLOT(repaintWindow()) );return; } QPainter P(this); @@ -256,3 +264,13 @@ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ // Since this is an embedded image - we fully expect there to be transparency all/most of the time. } + +bool NativeEmbedWidget::nativeEvent(const QByteArray &eventType, void *message, long *result){ + /*if(eventType=="xcb_generic_event_t" && WIN!=0){ + //Convert to known event type (for X11 systems) + xcb_generic_event_t *ev = static_cast(message); + //Now forward this event on to the embedded window + xcb_send_event(QX11Info::connection(), true, WIN->id(), EVENT_MASK, ev); + }*/ + return false; +} diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 65e03c51..523ff790 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -43,7 +43,7 @@ public: bool detachWindow(); bool isEmbedded(); //status of the embed - + void raiseWindow(); public slots: //Pause/resume @@ -52,12 +52,14 @@ public slots: void resyncWindow(); void repaintWindow(); + void reregisterEvents(); protected: void resizeEvent(QResizeEvent *ev); void showEvent(QShowEvent *ev); void hideEvent(QHideEvent *ev); void paintEvent(QPaintEvent *ev); + bool nativeEvent(const QByteArray &eventType, void *message, long *result); }; #endif diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index ea170b98..e1478b41 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -45,7 +45,6 @@ #define ROOT_WIN_EVENT_MASK (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ XCB_EVENT_MASK_BUTTON_PRESS | \ XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ XCB_EVENT_MASK_POINTER_MOTION | \ XCB_EVENT_MASK_PROPERTY_CHANGE | \ @@ -60,8 +59,9 @@ XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_ENTER_WINDOW| \ - XCB_EVENT_MASK_PROPERTY_CHANGE) + XCB_EVENT_MASK_ENTER_WINDOW | \ + XCB_EVENT_MASK_PROPERTY_CHANGE | \ + XCB_EVENT_MASK_FOCUS_CHANGE) inline void registerClientEvents(WId id){ uint32_t value_list[1] = {NORMAL_WIN_EVENT_MASK}; @@ -524,10 +524,20 @@ void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< Native if(props.contains(NativeWindow::Active)){ //Only one window can be "Active" at a time - so only do anything if this window wants to be active if(vals[props.indexOf(NativeWindow::Active)].toBool() ){ - xcb_ewmh_set_active_window(&obj->EWMH, QX11Info::appScreen(), (win->frameId()==0 ?win->id() : win->frameId())); + //Lower the currently active window (invisible window) to the bottom of the stack + xcb_window_t cactive; + if( 1 == xcb_ewmh_get_active_window_reply( &obj->EWMH, + xcb_ewmh_get_active_window_unchecked(&obj->EWMH, QX11Info::appScreen()), + &cactive, NULL) ){ + uint32_t val = XCB_STACK_MODE_BELOW; + xcb_configure_window(QX11Info::connection(), cactive, XCB_CONFIG_WINDOW_STACK_MODE, &val); + } + + xcb_ewmh_set_active_window(&obj->EWMH, QX11Info::appScreen(), win->id() ); //Also send the active window a message to take input focus + xcb_set_input_focus(QX11Info::connection(), XCB_INPUT_FOCUS_PARENT, win->id(), XCB_CURRENT_TIME); //Send the window a WM_TAKE_FOCUS message - xcb_client_message_event_t event; +/* xcb_client_message_event_t event; event.response_type = XCB_CLIENT_MESSAGE; event.format = 32; event.window = win->id(); @@ -540,6 +550,7 @@ void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< Native xcb_send_event(QX11Info::connection(), 0, win->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); xcb_flush(QX11Info::connection()); +*/ } } @@ -625,7 +636,7 @@ void NativeWindowSystem::setRoot_desktopWorkarea(QList list){ } void NativeWindowSystem::setRoot_activeWindow(WId win){ - xcb_ewmh_set_active_window(&obj->EWMH, QX11Info::appScreen(), win); + /*xcb_ewmh_set_active_window(&obj->EWMH, QX11Info::appScreen(), win); //Also send the active window a message to take input focus //Send the window a WM_TAKE_FOCUS message xcb_client_message_event_t event; @@ -640,7 +651,7 @@ void NativeWindowSystem::setRoot_activeWindow(WId win){ event.data.data32[4] = 0; xcb_send_event(QX11Info::connection(), 0, win, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); - xcb_flush(QX11Info::connection()); + xcb_flush(QX11Info::connection());*/ } int NativeWindowSystem::currentWorkspace(){ diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 6341f923..68fdde5c 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -294,7 +294,7 @@ void RootSubWindow::toggleSticky(){ } void RootSubWindow::activate(){ - WIN->requestProperty(NativeWindow::Active, true); + WIN->requestProperty(NativeWindow::Active, true, true); } //Mouse Interactivity @@ -394,6 +394,7 @@ void RootSubWindow::propertiesChanged(QList props, QList void RootSubWindow::mousePressEvent(QMouseEvent *ev){ activate(); this->raise(); + WinWidget->raiseWindow(); //qDebug() << "Frame Mouse Press Event"; offset.setX(0); offset.setY(0); if(activeState != Normal){ return; } // do nothing - already in a state of grabbed mouse @@ -414,7 +415,7 @@ void RootSubWindow::mousePressEvent(QMouseEvent *ev){ } void RootSubWindow::mouseMoveEvent(QMouseEvent *ev){ - activate(); //make sure this window is "Active" + //activate(); //make sure this window is "Active" on mouse over if(activeState == Normal){ setMouseCursor( getStateAtPoint(ev->pos()) ); //just update the mouse cursor }else{ @@ -508,7 +509,7 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ activeState = Normal; QApplication::restoreOverrideCursor(); setMouseCursor( getStateAtPoint(ev->pos()) ); - if(QFrame::mouseGrabber() == this){ this->releaseMouse(); } + if(QFrame::mouseGrabber() == this){ this->releaseMouse(); activate(); } } void RootSubWindow::leaveEvent(QEvent *ev){ -- cgit From 6824bc2c5069b8ea6799bf6e84d66de205bc8e0c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Sun, 27 Aug 2017 08:14:44 -0400 Subject: Add 3 simple window arrangements to Lumina 2. Also clean up a bit of the invisible layering for embedded windows. --- src-qt5/core/libLumina/RootSubWindow.cpp | 4 ++- src-qt5/core/libLumina/RootWindow-mgmt.cpp | 56 ++++++++++++++++++++++++++---- src-qt5/core/libLumina/RootWindow.cpp | 10 ++++++ src-qt5/core/libLumina/RootWindow.h | 7 +++- 4 files changed, 69 insertions(+), 8 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 68fdde5c..a42f866a 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -347,6 +347,7 @@ void RootSubWindow::propertiesChanged(QList props, QList i--; }else if(anim->state() != QPropertyAnimation::Running ){ if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size() && activeState==Normal ){ + qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); this->setGeometry(WIN->geometry()); } } @@ -370,7 +371,7 @@ void RootSubWindow::propertiesChanged(QList props, QList WinWidget->setMaximumSize(vals[i].toSize()); break; case NativeWindow::Active: - //if(vals[i].toBool()){ WinWidget->setFocus(); } + if(vals[i].toBool()){ WinWidget->raiseWindow(); } break; /*case NativeWindow::FrameExtents: qDebug() << " - FRAME CHANGE"; @@ -500,6 +501,7 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ //Check for a right-click event //qDebug() << "Frame Mouse Release Event"; QFrame::mouseReleaseEvent(ev); + WinWidget->raiseWindow(); //need to ensure the native window is always on top of this frame if( (activeState==Normal) && (titleBar->geometry().contains(ev->pos())) && (ev->button()==Qt::RightButton) ){ otherM->popup(ev->globalPos()); return; diff --git a/src-qt5/core/libLumina/RootWindow-mgmt.cpp b/src-qt5/core/libLumina/RootWindow-mgmt.cpp index 00b3e336..525e43be 100644 --- a/src-qt5/core/libLumina/RootWindow-mgmt.cpp +++ b/src-qt5/core/libLumina/RootWindow-mgmt.cpp @@ -7,13 +7,57 @@ #include "RootWindow.h" //Primary/private function -void RootWindow::arrangeWindows(RootSubWindow *primary, QString type){ +void RootWindow::arrangeWindows(RootSubWindow *primary, QString type, bool primaryonly){ + if(type.isEmpty()){ type = "center"; } if(primary==0){ //Get the currently active window and treat that as the primary - + for(int i=0; inativeWindow()->property(NativeWindow::Active).toBool()){ primary = WINDOWS[i]; } + } + if(primary==0 && !WINDOWS.isEmpty()){ primary = WINDOWS[0]; } //just use the first one in the list + } + //Now get the current screen that the mouse cursor is over (and valid area) + QScreen *screen = screenUnderMouse(); + QRect desktopArea = screen->availableGeometry(); + //qDebug() << "Arrange Windows:" << primary->geometry() << type << primaryonly << desktopArea; + //Now start filtering out all the windows that need to be ignored + int wkspace = primary->nativeWindow()->property(NativeWindow::Workspace).toInt(); + QList winlist = WINDOWS; + for(int i=0; inativeWindow()->property(NativeWindow::Workspace).toInt()!=wkspace + || !winlist[i]->nativeWindow()->property(NativeWindow::Visible).toBool() + || desktopArea.intersected(winlist[i]->geometry()).isNull() ){ + //window is outside of the desired area or invisible - ignore it + winlist.removeAt(i); + i--; + } } - //Now loop over the windows and arrange them as needed + if(!winlist.contains(primary)){ winlist << primary; } //could be doing this on a window right before it is shown + else if(primaryonly){ winlist.removeAll(primary); winlist << primary; } //move primary window to last + //QRegion used; + for(int i=0; igeometry(); + //verify that the window is contained by the desktop area + if(geom.width()>desktopArea.width()){ geom.setWidth(desktopArea.width()); } + if(geom.height()>desktopArea.height()){ geom.setHeight(desktopArea.height()); } + //Now apply the proper placement routine + if(type=="center"){ + QPoint ct = desktopArea.center(); + winlist[i]->setGeometry( ct.x()-(geom.width()/2), ct.y()-(geom.height()/2), geom.width(), geom.height()); + }else if(type=="single_max"){ + winlist[i]->setGeometry( desktopArea.x(), desktopArea.y(), desktopArea.width(), desktopArea.height()); + }else if(type=="under-mouse"){ + QPoint ct = QCursor::pos(); + geom = QRect(ct.x()-(geom.width()/2), ct.y()-(geom.height()/2), geom.width(), geom.height() ); + //Now verify that the top of the window is still contained within the desktop area + if(geom.y() < desktopArea.y() ){ geom.moveTop(desktopArea.y()); } + winlist[i]->setGeometry(geom); + } + //qDebug() << " - New Geometry:" << winlist[i]->geometry(); + } //end loop over winlist } // ================ @@ -21,13 +65,13 @@ void RootWindow::arrangeWindows(RootSubWindow *primary, QString type){ // ================ void RootWindow::ArrangeWindows(WId primary, QString type){ RootSubWindow* win = windowForId(primary); - if(type.isEmpty()){ type = ""; } //grab the default arrangement format + if(type.isEmpty()){ type = "center"; } //grab the default arrangement format arrangeWindows(win, type); } void RootWindow::TileWindows(WId primary, QString type){ RootSubWindow* win = windowForId(primary); - if(type.isEmpty()){ type = ""; } //grab the default arrangement format for tiling + if(type.isEmpty()){ type = "single_max"; } //grab the default arrangement format for tiling arrangeWindows(win, type); } @@ -45,5 +89,5 @@ void RootWindow::CheckWindowPosition(WId id, bool newwindow){ if(geom.height() < 20){ changed = true; geom.setHeight(100); } if(changed){ win->setGeometry(geom); } //Now run it through the window arrangement routine - ArrangeWindows(id); + arrangeWindows(win, newwindow ?"center" : "snap", true); } diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index 48c37c86..b0d07600 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -108,6 +108,16 @@ RootSubWindow* RootWindow::windowForId(WId id){ return tmp; } +QScreen* RootWindow::screenUnderMouse(){ + QPoint mpos = QCursor::pos(); + QList scrns = QApplication::screens(); + for(int i=0; igeometry().contains(mpos)){ return scrns[i]; } + } + //Could not find an exact match - just return the first one + return scrns.first(); +} + // === PUBLIC SLOTS === void RootWindow::ResizeRoot(){ if(DEBUG){ qDebug() << "Resize Root..."; } diff --git a/src-qt5/core/libLumina/RootWindow.h b/src-qt5/core/libLumina/RootWindow.h index 9b1334dc..5f11fd6d 100644 --- a/src-qt5/core/libLumina/RootWindow.h +++ b/src-qt5/core/libLumina/RootWindow.h @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include "RootSubWindow.h" @@ -51,7 +53,10 @@ private: //Window Management QList WINDOWS; RootSubWindow* windowForId(WId id); - void arrangeWindows(RootSubWindow *primary = 0, QString type = ""); + void arrangeWindows(RootSubWindow *primary = 0, QString type = "", bool primaryonly = false); + + QScreen* screenUnderMouse(); + public slots: void ResizeRoot(); -- cgit From 39c9a096ef2bee1e224561ed5daa6a63a9018b36 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Sun, 27 Aug 2017 11:29:43 -0400 Subject: A bunch more work on Lumina 2 mouse focus settings and such. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 51 ++++++++++++++++++++++-- src-qt5/core/libLumina/NativeEmbedWidget.h | 4 +- src-qt5/core/libLumina/NativeEventFilter.cpp | 5 ++- src-qt5/core/libLumina/NativeEventFilter.h | 1 + src-qt5/core/libLumina/NativeWindowSystem.cpp | 29 ++++++++++++-- src-qt5/core/libLumina/NativeWindowSystem.h | 1 + src-qt5/core/libLumina/RootSubWindow.cpp | 8 +++- src-qt5/core/libLumina/RootWindow-mgmt.cpp | 2 + src-qt5/core/lumina-desktop-unified/LSession.cpp | 7 ++-- 9 files changed, 94 insertions(+), 14 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 9fac4f1a..41a036a2 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ #define DISABLE_COMPOSITING false inline void registerClientEvents(WId id){ - uint32_t value_list[1] = {XCB_EVENT_MASK_PROPERTY_CHANGE + uint32_t value_list[1] = { (XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION @@ -28,7 +29,7 @@ inline void registerClientEvents(WId id){ | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY - | XCB_EVENT_MASK_ENTER_WINDOW + | XCB_EVENT_MASK_ENTER_WINDOW) }; xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); } @@ -60,6 +61,7 @@ void NativeEmbedWidget::hideWindow(){ void NativeEmbedWidget::showWindow(){ xcb_map_window(QX11Info::connection(), WIN->id()); + reregisterEvents(); QTimer::singleShot(0,this, SLOT(repaintWindow())); } @@ -89,6 +91,7 @@ QImage NativeEmbedWidget::windowImage(QRect geom){ NativeEmbedWidget::NativeEmbedWidget(QWidget *parent) : QWidget(parent){ WIN = 0; //nothing embedded yet paused = false; + this->setMouseTracking(true); //this->setSizeIncrement(2,2); } @@ -265,12 +268,54 @@ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ } +void NativeEmbedWidget::enterEvent(QEvent *ev){ + QWidget::enterEvent(ev); + //this->grabMouse(); //xcb_grab_pointer_unchecked(QX11Info::connection(), ); +} + +void NativeEmbedWidget::leaveEvent(QEvent *ev){ + QWidget::leaveEvent(ev); + //this->releaseMouse(); //xcb_ungrab_pointer(QX11Info::connection(), XCB_CURRENT_TIME); +} + bool NativeEmbedWidget::nativeEvent(const QByteArray &eventType, void *message, long *result){ /*if(eventType=="xcb_generic_event_t" && WIN!=0){ //Convert to known event type (for X11 systems) xcb_generic_event_t *ev = static_cast(message); + //qDebug() << "Got Embed Window Event:" << xcb_event_get_label(ev->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) << xcb_event_get_request_label(ev->response_type); + uint32_t mask = 0; + switch( ev->response_type & XCB_EVENT_RESPONSE_TYPE_MASK){ + case XCB_BUTTON_PRESS: + //This is a mouse button press + mask = XCB_EVENT_MASK_BUTTON_PRESS; + break; + case XCB_BUTTON_RELEASE: + //This is a mouse button release + //qDebug() << "Button Release Event"; + mask = XCB_EVENT_MASK_BUTTON_RELEASE; + break; + case XCB_MOTION_NOTIFY: + //This is a mouse movement event + mask = XCB_EVENT_MASK_POINTER_MOTION; + break; + case XCB_ENTER_NOTIFY: + //This is a mouse movement event when mouse goes over a new window + mask = XCB_EVENT_MASK_ENTER_WINDOW; + break; + case XCB_LEAVE_NOTIFY: + //This is a mouse movement event when mouse goes leaves a window + mask = XCB_EVENT_MASK_LEAVE_WINDOW; + break; + default: + mask = 0; + } + //Now forward this event on to the embedded window - xcb_send_event(QX11Info::connection(), true, WIN->id(), EVENT_MASK, ev); + if(mask!=0){ + qDebug() << " - Got a mouse event"; + xcb_send_event(QX11Info::connection(), true, WIN->id(),mask, (char*) ev); + return true; + } }*/ return false; } diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 523ff790..7e129fa3 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -43,9 +43,9 @@ public: bool detachWindow(); bool isEmbedded(); //status of the embed +public slots: void raiseWindow(); -public slots: //Pause/resume void pause(); void resume(); @@ -59,6 +59,8 @@ protected: void showEvent(QShowEvent *ev); void hideEvent(QHideEvent *ev); void paintEvent(QPaintEvent *ev); + void enterEvent(QEvent *ev); + void leaveEvent(QEvent *ev); bool nativeEvent(const QByteArray &eventType, void *message, long *result); }; diff --git a/src-qt5/core/libLumina/NativeEventFilter.cpp b/src-qt5/core/libLumina/NativeEventFilter.cpp index df44c7fb..a2016402 100644 --- a/src-qt5/core/libLumina/NativeEventFilter.cpp +++ b/src-qt5/core/libLumina/NativeEventFilter.cpp @@ -81,6 +81,9 @@ inline void ParsePropertyEvent(xcb_property_notify_event_t *ev, NativeEventFilte //} obj->emit WindowPropertyChanged(ev->window, prop); }else{ + //Quick re-check of the simple properties (nothing like the icon or other graphics) + obj->emit WindowPropertiesChanged(ev->window, QList() << NativeWindow::Title + << NativeWindow::ShortTitle << NativeWindow::Workspace ); //qDebug() << "Unknown Property Change:" << ev->window << ev->atom; } } @@ -98,7 +101,7 @@ inline void ParseClientMessageEvent(xcb_client_message_event_t *ev, NativeEventF else if(ev->type==EWMH._NET_WM_STATE){ prop = NativeWindow::States; } if(prop!=NativeWindow::None){ - //if(DEBUG){ + //if(DEBUG){ qDebug() << "Detected Property Change Request:" << ev->window << prop; //} if(val.isNull()){ obj->emit WindowPropertyChanged(ev->window, prop); } else{ obj->emit RequestWindowPropertyChange(ev->window, prop, val); } diff --git a/src-qt5/core/libLumina/NativeEventFilter.h b/src-qt5/core/libLumina/NativeEventFilter.h index 2b184f99..a3be3ef1 100644 --- a/src-qt5/core/libLumina/NativeEventFilter.h +++ b/src-qt5/core/libLumina/NativeEventFilter.h @@ -34,6 +34,7 @@ signals: void WindowCreated(WId); void WindowDestroyed(WId); void WindowPropertyChanged(WId, NativeWindow::Property); + void WindowPropertiesChanged(WId, QList); void WindowPropertyChanged(WId, NativeWindow::Property, QVariant); void WindowPropertiesChanged(WId, QList, QList); void RequestWindowPropertyChange(WId, NativeWindow::Property, QVariant); diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index e1478b41..cd2459d3 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -255,7 +255,7 @@ NativeWindow* NativeWindowSystem::findWindow(WId id, bool checkRelated){ //qDebug() << "Find Window:" << id; for(int i=0; iid() ){ return NWindows[i]; } - else if(id==NWindows[i]->frameId() ){ qDebug() << "Matched Frame:" << id; return NWindows[i]; } + else if(id==NWindows[i]->frameId() ){ return NWindows[i]; } //if(checkRelated && NWindows[i]->isRelatedTo(id)){ return NWindows[i]; } //else if(!checkRelated && id==NWindows[i]->id()){ return NWindows[i]; } } @@ -498,7 +498,7 @@ void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< Native } uint16_t mask = 0; mask = mask | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; - qDebug() << "Configure window Geometry:" << sz; + //qDebug() << "Configure window Geometry:" << sz; xcb_configure_window_aux(QX11Info::connection(), win->id(), mask, &valList); } if(props.contains(NativeWindow::Name)){ @@ -667,7 +667,7 @@ int NativeWindowSystem::currentWorkspace(){ //NativeWindowEventFilter interactions void NativeWindowSystem::NewWindowDetected(WId id){ //Make sure this can be managed first - if(findWindow(id, false) != 0){ qDebug() << "Window Already Managed!!!!"; findWindow(id,false)->setProperty(NativeWindow::Visible, true, true); return; } //already managed + if(findWindow(id, false) != 0){ findWindow(id,false)->setProperty(NativeWindow::Visible, true, true); return; } //already managed xcb_get_window_attributes_cookie_t cookie = xcb_get_window_attributes(QX11Info::connection(), id); xcb_get_window_attributes_reply_t *attr = xcb_get_window_attributes_reply(QX11Info::connection(), cookie, NULL); if(attr == 0){ return; } //could not get attributes of window @@ -679,7 +679,7 @@ void NativeWindowSystem::NewWindowDetected(WId id){ registerClientEvents(win->id()); NWindows << win; UpdateWindowProperties(win, NativeWindow::allProperties()); - qDebug() << "New Window [& associated ID's]:" << win->id() << win->frameId() << win->property(NativeWindow::RelatedWindows); + qDebug() << "New Window [& associated ID's]:" << win->id() << win->property(NativeWindow::Name).toString(); //Now setup the connections with this window connect(win, SIGNAL(RequestClose(WId)), this, SLOT(RequestClose(WId)) ); connect(win, SIGNAL(RequestKill(WId)), this, SLOT(RequestKill(WId)) ); @@ -744,6 +744,27 @@ void NativeWindowSystem::WindowPropertyChanged(WId id, NativeWindow::Property pr if(win==0){ win = findTrayWindow(id); } if(win!=0){ UpdateWindowProperties(win, QList() << prop); + }else if(prop != 0){ + //Could not find the window for a specific property with an undefined value + // - update this property for all the windows just in case + for(int i=0; i() << prop); + } + } +} + +void NativeWindowSystem::WindowPropertiesChanged(WId id, QList props){ + //NOTE: This is triggered by the NativeEventFilter - not by changes to the NativeWindow objects themselves + NativeWindow *win = findWindow(id); + if(win==0){ win = findTrayWindow(id); } + if(win!=0){ + UpdateWindowProperties(win, props); + }else{ + //Could not find the window for a specific property with an undefined value + // - update this property for all the windows just in case + for(int i=0; i); void WindowPropertyChanged(WId, NativeWindow::Property, QVariant); //will save that property/value to the right object void WindowPropertiesChanged(WId, QList, QList); void RequestPropertyChange(WId, NativeWindow::Property, QVariant); diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index a42f866a..fba02e96 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -192,6 +192,7 @@ void RootSubWindow::initWindowFrame(){ maxB->setCursor(Qt::ArrowCursor); otherM->setCursor(Qt::ArrowCursor); titleLabel->setCursor(Qt::ArrowCursor); + WinWidget->setCursor(Qt::ArrowCursor); //Now all the stylesheet options this->setObjectName("WindowFrame"); closeB->setObjectName("Button_Close"); @@ -294,6 +295,7 @@ void RootSubWindow::toggleSticky(){ } void RootSubWindow::activate(){ + WinWidget->raiseWindow(); WIN->requestProperty(NativeWindow::Active, true, true); } @@ -501,8 +503,8 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ //Check for a right-click event //qDebug() << "Frame Mouse Release Event"; QFrame::mouseReleaseEvent(ev); - WinWidget->raiseWindow(); //need to ensure the native window is always on top of this frame if( (activeState==Normal) && (titleBar->geometry().contains(ev->pos())) && (ev->button()==Qt::RightButton) ){ + WinWidget->raiseWindow();//need to ensure the native window is always on top of this frame but under the menu otherM->popup(ev->globalPos()); return; } @@ -511,7 +513,9 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ activeState = Normal; QApplication::restoreOverrideCursor(); setMouseCursor( getStateAtPoint(ev->pos()) ); - if(QFrame::mouseGrabber() == this){ this->releaseMouse(); activate(); } + if(QFrame::mouseGrabber() == this){ this->releaseMouse(); } + activate(); + QTimer::singleShot(0, WinWidget, SLOT(raiseWindow()) ); } void RootSubWindow::leaveEvent(QEvent *ev){ diff --git a/src-qt5/core/libLumina/RootWindow-mgmt.cpp b/src-qt5/core/libLumina/RootWindow-mgmt.cpp index 525e43be..24ea639b 100644 --- a/src-qt5/core/libLumina/RootWindow-mgmt.cpp +++ b/src-qt5/core/libLumina/RootWindow-mgmt.cpp @@ -46,6 +46,8 @@ void RootWindow::arrangeWindows(RootSubWindow *primary, QString type, bool prima if(type=="center"){ QPoint ct = desktopArea.center(); winlist[i]->setGeometry( ct.x()-(geom.width()/2), ct.y()-(geom.height()/2), geom.width(), geom.height()); + }else if(type=="snap"){ + }else if(type=="single_max"){ winlist[i]->setGeometry( desktopArea.x(), desktopArea.y(), desktopArea.width(), desktopArea.height()); }else if(type=="under-mouse"){ diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index c6f79584..bee12180 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -38,9 +38,9 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu this->setOrganizationName("LuminaDesktopEnvironment"); this->setQuitOnLastWindowClosed(false); //since the LDesktop's are not necessarily "window"s //Enable a few of the simple effects by default - this->setEffectEnabled( Qt::UI_AnimateMenu, true); - this->setEffectEnabled( Qt::UI_AnimateCombo, true); - this->setEffectEnabled( Qt::UI_AnimateTooltip, true); + //this->setEffectEnabled( Qt::UI_AnimateMenu, true); + //this->setEffectEnabled( Qt::UI_AnimateCombo, true); + //this->setEffectEnabled( Qt::UI_AnimateTooltip, true); this->setAttribute(Qt::AA_UseDesktopOpenGL); this->setAttribute(Qt::AA_UseHighDpiPixmaps); //allow pixmaps to be scaled up as well as down @@ -231,6 +231,7 @@ void LSession::setupGlobalConnections(){ connect(Lumina::NEF, SIGNAL(WindowCreated(WId)), Lumina::NWS, SLOT(NewWindowDetected(WId))); connect(Lumina::NEF, SIGNAL(WindowDestroyed(WId)), Lumina::NWS, SLOT(WindowCloseDetected(WId))); connect(Lumina::NEF, SIGNAL(WindowPropertyChanged(WId, NativeWindow::Property)), Lumina::NWS, SLOT(WindowPropertyChanged(WId, NativeWindow::Property))); + connect(Lumina::NEF, SIGNAL(WindowPropertiesChanged(WId, QList)), Lumina::NWS, SLOT(WindowPropertiesChanged(WId, QList)) ); connect(Lumina::NEF, SIGNAL(WindowPropertyChanged(WId, NativeWindow::Property, QVariant)), Lumina::NWS, SLOT(WindowPropertyChanged(WId, NativeWindow::Property, QVariant))); connect(Lumina::NEF, SIGNAL(WindowPropertiesChanged(WId, QList, QList)), Lumina::NWS, SLOT(WindowPropertiesChanged(WId, QList, QList)) ); connect(Lumina::NEF, SIGNAL(RequestWindowPropertyChange(WId, NativeWindow::Property, QVariant)), Lumina::NWS, SLOT(RequestPropertyChange(WId, NativeWindow::Property, QVariant))); -- cgit From ec9533d155f8b1a9595666ee2b1f14aedaec0e60 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 28 Aug 2017 13:46:11 -0400 Subject: Remove the src-DE directory from lumina-desktop-unified. No need for this old copy of the files. --- .../core/lumina-desktop-unified/src-DE/AppMenu.cpp | 183 ---- .../core/lumina-desktop-unified/src-DE/AppMenu.h | 58 - .../core/lumina-desktop-unified/src-DE/JsonMenu.h | 79 -- .../lumina-desktop-unified/src-DE/LDesktop.cpp | 553 ---------- .../core/lumina-desktop-unified/src-DE/LDesktop.h | 107 -- .../src-DE/LDesktopBackground.cpp | 90 -- .../src-DE/LDesktopBackground.h | 27 - .../src-DE/LDesktopPluginSpace.cpp | 333 ------ .../src-DE/LDesktopPluginSpace.h | 303 ------ .../core/lumina-desktop-unified/src-DE/LPanel.cpp | 399 ------- .../core/lumina-desktop-unified/src-DE/LPanel.h | 81 -- .../lumina-desktop-unified/src-DE/LSession.cpp | 798 -------------- .../core/lumina-desktop-unified/src-DE/LSession.h | 193 ---- .../lumina-desktop-unified/src-DE/LWinInfo.cpp | 48 - .../core/lumina-desktop-unified/src-DE/LWinInfo.h | 50 - .../src-DE/LXcbEventFilter.cpp | 118 -- .../src-DE/LXcbEventFilter.h | 104 -- .../lumina-desktop-unified/src-DE/SettingsMenu.cpp | 67 -- .../lumina-desktop-unified/src-DE/SettingsMenu.h | 28 - .../lumina-desktop-unified/src-DE/SystemWindow.cpp | 104 -- .../lumina-desktop-unified/src-DE/SystemWindow.h | 46 - .../lumina-desktop-unified/src-DE/SystemWindow.ui | 194 ---- .../src-DE/desktop-plugins/LDPlugin.cpp | 63 -- .../src-DE/desktop-plugins/LDPlugin.h | 156 --- .../src-DE/desktop-plugins/NewDP.h | 63 -- .../src-DE/desktop-plugins/SamplePlugin.h | 38 - .../applauncher/AppLauncherPlugin.cpp | 145 --- .../applauncher/AppLauncherPlugin.h | 59 - .../applauncher/OutlineToolButton.h | 99 -- .../desktop-plugins/audioplayer/PlayerWidget.cpp | 271 ----- .../desktop-plugins/audioplayer/PlayerWidget.h | 84 -- .../desktop-plugins/audioplayer/PlayerWidget.ui | 182 ---- .../desktop-plugins/calendar/CalendarPlugin.h | 59 - .../src-DE/desktop-plugins/desktop-plugins.pri | 24 - .../desktopview/DesktopViewPlugin.cpp | 214 ---- .../desktopview/DesktopViewPlugin.h | 55 - .../messagecenter/LXDG-DBusNotifier.h | 17 - .../messagecenter/MessageCenter.cpp | 90 -- .../desktop-plugins/messagecenter/MessageCenter.h | 48 - .../desktop-plugins/notepad/NotepadPlugin.cpp | 330 ------ .../src-DE/desktop-plugins/notepad/NotepadPlugin.h | 66 -- .../desktop-plugins/quickcontainer/QuickDPlugin.h | 51 - .../desktop-plugins/rssreader/RSSFeedPlugin.cpp | 363 ------- .../desktop-plugins/rssreader/RSSFeedPlugin.h | 72 -- .../desktop-plugins/rssreader/RSSFeedPlugin.ui | 552 ---------- .../desktop-plugins/rssreader/RSSObjects.cpp | 287 ----- .../src-DE/desktop-plugins/rssreader/RSSObjects.h | 105 -- .../systemmonitor/MonitorWidget.cpp | 63 -- .../desktop-plugins/systemmonitor/MonitorWidget.h | 62 -- .../desktop-plugins/systemmonitor/MonitorWidget.ui | 143 --- .../src-DE/panel-plugins/LPPlugin.h | 77 -- .../src-DE/panel-plugins/LTBWidget.h | 71 -- .../src-DE/panel-plugins/NewPP.h | 82 -- .../src-DE/panel-plugins/RotateToolButton.h | 58 - .../panel-plugins/applauncher/AppLaunchButton.cpp | 77 -- .../panel-plugins/applauncher/AppLaunchButton.h | 63 -- .../panel-plugins/appmenu/LAppMenuPlugin.cpp | 142 --- .../src-DE/panel-plugins/appmenu/LAppMenuPlugin.h | 64 -- .../panel-plugins/audioplayer/LPAudioPlayer.cpp | 30 - .../panel-plugins/audioplayer/LPAudioPlayer.h | 49 - .../panel-plugins/audioplayer/PPlayerWidget.cpp | 258 ----- .../panel-plugins/audioplayer/PPlayerWidget.h | 59 - .../panel-plugins/audioplayer/PPlayerWidget.ui | 182 ---- .../src-DE/panel-plugins/battery/LBattery.cpp | 115 -- .../src-DE/panel-plugins/battery/LBattery.h | 53 - .../src-DE/panel-plugins/battery/NOTES | 49 - .../src-DE/panel-plugins/clock/LClock.cpp | 230 ---- .../src-DE/panel-plugins/clock/LClock.h | 58 - .../src-DE/panel-plugins/desktopbar/LDeskBar.cpp | 207 ---- .../src-DE/panel-plugins/desktopbar/LDeskBar.h | 88 -- .../desktopswitcher/LDesktopSwitcher.cpp | 148 --- .../desktopswitcher/LDesktopSwitcher.h | 73 -- .../src-DE/panel-plugins/jsonmenu/PPJsonMenu.cpp | 35 - .../src-DE/panel-plugins/jsonmenu/PPJsonMenu.h | 42 - .../src-DE/panel-plugins/line/LLine.h | 40 - .../src-DE/panel-plugins/panel-plugins.pri | 57 - .../panel-plugins/quickcontainer/QuickPPlugin.h | 43 - .../panel-plugins/showdesktop/LHomeButton.cpp | 43 - .../src-DE/panel-plugins/showdesktop/LHomeButton.h | 62 -- .../src-DE/panel-plugins/spacer/LSpacer.h | 34 - .../systemdashboard/LSysDashboard.cpp | 91 -- .../panel-plugins/systemdashboard/LSysDashboard.h | 76 -- .../panel-plugins/systemdashboard/SysMenuQuick.cpp | 211 ---- .../panel-plugins/systemdashboard/SysMenuQuick.h | 54 - .../panel-plugins/systemdashboard/SysMenuQuick.ui | 400 ------- .../panel-plugins/systemstart/ItemWidget.cpp | 279 ----- .../src-DE/panel-plugins/systemstart/ItemWidget.h | 98 -- .../panel-plugins/systemstart/LStartButton.cpp | 137 --- .../panel-plugins/systemstart/LStartButton.h | 113 -- .../src-DE/panel-plugins/systemstart/StartMenu.cpp | 720 ------------ .../src-DE/panel-plugins/systemstart/StartMenu.h | 105 -- .../src-DE/panel-plugins/systemstart/StartMenu.ui | 1148 -------------------- .../src-DE/panel-plugins/systemtray/LSysTray.cpp | 167 --- .../src-DE/panel-plugins/systemtray/LSysTray.h | 74 -- .../src-DE/panel-plugins/systemtray/TrayIcon.cpp | 128 --- .../src-DE/panel-plugins/systemtray/TrayIcon.h | 55 - .../panel-plugins/taskmanager/LTaskButton.cpp | 271 ----- .../src-DE/panel-plugins/taskmanager/LTaskButton.h | 73 -- .../taskmanager/LTaskManagerPlugin.cpp | 141 --- .../panel-plugins/taskmanager/LTaskManagerPlugin.h | 71 -- .../panel-plugins/userbutton/LUserButton.cpp | 67 -- .../src-DE/panel-plugins/userbutton/LUserButton.h | 75 -- .../panel-plugins/userbutton/UserItemWidget.cpp | 205 ---- .../panel-plugins/userbutton/UserItemWidget.h | 72 -- .../src-DE/panel-plugins/userbutton/UserWidget.cpp | 393 ------- .../src-DE/panel-plugins/userbutton/UserWidget.h | 101 -- .../src-DE/panel-plugins/userbutton/UserWidget.ui | 593 ---------- 107 files changed, 16231 deletions(-) delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/JsonMenu.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LPanel.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LPanel.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LSession.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LSession.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.ui delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/NewDP.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/SamplePlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/OutlineToolButton.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.ui delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/calendar/CalendarPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktop-plugins.pri delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/LXDG-DBusNotifier.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/quickcontainer/QuickDPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.ui delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSObjects.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSObjects.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.ui delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LPPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LTBWidget.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/NewPP.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/RotateToolButton.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.ui delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/NOTES delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/line/LLine.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/panel-plugins.pri delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/quickcontainer/QuickPPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/spacer/LSpacer.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.ui delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.ui delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.cpp delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.h delete mode 100644 src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.ui (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.cpp deleted file mode 100644 index 798d8b6d..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.cpp +++ /dev/null @@ -1,183 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "AppMenu.h" -#include "LSession.h" -#include - -AppMenu::AppMenu(QWidget* parent) : QMenu(parent){ - appstorelink = LOS::AppStoreShortcut(); //Default application "store" to display (AppCafe in TrueOS) - controlpanellink = LOS::ControlPanelShortcut(); //Default control panel - sysApps = new XDGDesktopList(this, true); //have this one automatically keep in sync - APPS.clear(); - //watcher = new QFileSystemWatcher(this); - //connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherUpdate()) ); - //QTimer::singleShot(200, this, SLOT(start()) ); //Now start filling the menu - start(); //do the initial run during session init so things are responsive immediately. - connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(watcherUpdate()) ); - connect(QApplication::instance(), SIGNAL(IconThemeChanged()), this, SLOT(watcherUpdate()) ); -} - -AppMenu::~AppMenu(){ - -} - -QHash >* AppMenu::currentAppHash(){ - return &APPS; -} - -//=========== -// PRIVATE -//=========== -void AppMenu::updateAppList(){ - //watcher->removePaths(watcher->directories()); - //Make sure the title/icon are updated as well (in case of locale/icon change) - this->setTitle(tr("Applications")); - this->setIcon( LXDG::findIcon("system-run","") ); - //Now update the lists - this->clear(); - APPS.clear(); //NOTE: Don't delete these pointers - the pointers are managed by the sysApps class and these are just references to them - //qDebug() << "New Apps List:"; - if(LSession::handle()->sessionSettings()->value("AutomaticDesktopAppLinks",true).toBool() && !lastHashUpdate.isNull() ){ - QString desktop = QDir::homePath()+"/"+tr("Desktop")+"/"; //translated desktop folder - if(!QFile::exists(desktop)){ - desktop = QDir::homePath()+"/Desktop/"; //desktop folder - if(!QFile::exists(desktop)){ - desktop = QDir::homePath()+"/desktop/"; //lowercase desktop folder - if(!QFile::exists(desktop)){ desktop.clear(); } - } - } - //qDebug() << "Update Desktop Folder:" << desktop << sysApps->removedApps << sysApps->newApps; - QStringList tmp = sysApps->removedApps; - for(int i=0; inewApps; - for(int i=0; ifiles.value(tmp[i]); - if(desk->isHidden || !desk->isValid(false) ){ continue; } //skip this one - //qDebug() << "New App: " << tmp[i] << desk.filePath << "Hidden:" << desk.isHidden; - //Create a new symlink for this file if one does not exist - QString filename = tmp[i].section("/",-1); - //qDebug() << "Check for symlink:" << filename; - if(!QFile::exists(desktop+filename) ){ QFile::link(tmp[i], desktop+filename); } - } - } - QList allfiles = sysApps->apps(false,false); //only valid, non-hidden apps - APPS = LXDG::sortDesktopCats(allfiles); - APPS.insert("All", LXDG::sortDesktopNames(allfiles)); - lastHashUpdate = QDateTime::currentDateTime(); - //Now fill the menu - //Add link to the file manager - //this->addAction( LXDG::findIcon("user-home", ""), tr("Browse Files"), this, SLOT(launchFileManager()) ); - //--Look for the app store - XDGDesktop store(appstorelink); - if(store.isValid()){ - this->addAction( LXDG::findIcon(store.icon, ""), tr("Manage Applications"), this, SLOT(launchStore()) ); - } - //--Look for the control panel - XDGDesktop controlp(controlpanellink); - if(controlp.isValid()){ - this->addAction( LXDG::findIcon(controlp.icon, ""), tr("Control Panel"), this, SLOT(launchControlPanel()) ); - } - this->addSeparator(); - //--Now create the sub-menus - QStringList cats = APPS.keys(); - cats.sort(); //make sure they are alphabetical - for(int i=0; isetIcon(LXDG::findIcon(icon,"")); - connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(launchApp(QAction*)) ); - QList appL = APPS.value(cats[i]); - for( int a=0; aactions.isEmpty()){ - //Just a single entry point - no extra actions - QAction *act = new QAction(LXDG::findIcon(appL[a]->icon, ""), appL[a]->name, this); - act->setToolTip(appL[a]->comment); - act->setWhatsThis(appL[a]->filePath); - menu->addAction(act); - }else{ - //This app has additional actions - make this a sub menu - // - first the main menu/action - QMenu *submenu = new QMenu(appL[a]->name, this); - submenu->setIcon( LXDG::findIcon(appL[a]->icon,"") ); - //This is the normal behavior - not a special sub-action (although it needs to be at the top of the new menu) - QAction *act = new QAction(LXDG::findIcon(appL[a]->icon, ""), appL[a]->name, this); - act->setToolTip(appL[a]->comment); - act->setWhatsThis(appL[a]->filePath); - submenu->addAction(act); - //Now add entries for every sub-action listed - for(int sa=0; saactions.length(); sa++){ - QAction *sact = new QAction(LXDG::findIcon(appL[a]->actions[sa].icon, appL[a]->icon), appL[a]->actions[sa].name, this); - sact->setToolTip(appL[a]->comment); - sact->setWhatsThis("-action \""+appL[a]->actions[sa].ID+"\" \""+appL[a]->filePath+"\""); - submenu->addAction(sact); - } - menu->addMenu(submenu); - } - } - this->addMenu(menu); - } - // watcher->addPaths(LXDG::systemApplicationDirs()); - emit AppMenuUpdated(); -} - -//================= -// PRIVATE SLOTS -//================= -void AppMenu::start(){ - //Setup the watcher - connect(sysApps, SIGNAL(appsUpdated()), this, SLOT(watcherUpdate()) ); - sysApps->updateList(); - //Now fill the menu the first time - updateAppList(); -} - -void AppMenu::watcherUpdate(){ - updateAppList(); //Update the menu listings -} - -void AppMenu::launchStore(){ - LSession::LaunchApplication("lumina-open \""+appstorelink+"\""); -} - -void AppMenu::launchControlPanel(){ - LSession::LaunchApplication("lumina-open \""+controlpanellink+"\""); -} - -void AppMenu::launchFileManager(){ - QString fm = "lumina-open \""+QDir::homePath()+"\""; - LSession::LaunchApplication(fm); -} - -void AppMenu::launchApp(QAction *act){ - QString appFile = act->whatsThis(); - if(appFile.startsWith("-action")){ - LSession::LaunchApplication("lumina-open "+appFile); //already has quotes put in place properly - }else{ - LSession::LaunchApplication("lumina-open \""+appFile+"\""); - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.h b/src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.h deleted file mode 100644 index 5baaab7a..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/AppMenu.h +++ /dev/null @@ -1,58 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This menu auto-updates to keep the list of available applications -// current at all times - and can launch them as necessary -//=========================================== -#ifndef _LUMINA_DESKTOP_APP_MENU_H -#define _LUMINA_DESKTOP_APP_MENU_H - -// Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include - -// libLumina includes -#include - -class AppMenu : public QMenu{ - Q_OBJECT -public: - AppMenu(QWidget *parent = 0); - ~AppMenu(); - - QHash > *currentAppHash(); - QDateTime lastHashUpdate; - -private: - //QFileSystemWatcher *watcher; - QString appstorelink, controlpanellink; - QList MLIST; - XDGDesktopList *sysApps; - QHash > APPS; - - void updateAppList(); //completely update the menu lists - -private slots: - void start(); //This is called in a new thread after initialization - void watcherUpdate(); - void launchStore(); - void launchControlPanel(); - void launchFileManager(); - void launchApp(QAction *act); - -signals: - void AppMenuUpdated(); -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/JsonMenu.h b/src-qt5/core/lumina-desktop-unified/src-DE/JsonMenu.h deleted file mode 100644 index 5a6b2237..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/JsonMenu.h +++ /dev/null @@ -1,79 +0,0 @@ -//=========================================== -// Lumina Desktop source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This menu is used to automatically generate menu contents -// based on the JSON output of an external script/utility -//=========================================== -#ifndef _LUMINA_DESKTOP_JSON_MENU_H -#define _LUMINA_DESKTOP_JSON_MENU_H - -#include -#include -#include -#include -#include - -#include -#include -#include "LSession.h" - -class JsonMenu : public QMenu{ - Q_OBJECT -private: - QString exec; - -public: - JsonMenu(QString execpath, QWidget *parent = 0) : QMenu(parent){ - exec = execpath; - connect(this, SIGNAL(aboutToShow()), this, SLOT(updateMenu()) ); - connect(this, SIGNAL(triggered(QAction*)), this, SLOT(itemTriggered(QAction*)) ); - } - -private slots: - void parseObject(QString label, QJsonObject obj){ - if( label.isEmpty() || !obj.contains("type") ){ return; } - QString type = obj.value("type").toString(); - if(type.toLower()=="item"){ - QAction *act = this->addAction(label); - if(obj.contains("icon")){ act->setIcon( LXDG::findIcon(obj.value("icon").toString(),"") ); } - if(obj.contains("action")){ act->setWhatsThis( obj.value("action").toString() ); } - else{ act->setEnabled(false); } //not interactive - }else if(type.toLower()=="menu"){ - - }else if(type.toLower()=="jsonmenu"){ - //This is a recursive JSON menu object - if(!obj.contains("exec")){ return; } - JsonMenu *menu = new JsonMenu(obj.value("exec").toString(), this); - menu->setTitle(label); - if(obj.contains("icon")){ menu->setIcon(LXDG::findIcon(obj.value("icon").toString(),"") ); } - this->addMenu(menu); - } - } - - void updateMenu(){ - this->clear(); - QJsonDocument doc = QJsonDocument::fromJson( LUtils::getCmdOutput(exec).join(" ").toLocal8Bit() ); - if(doc.isNull() || !doc.isObject()){ - this->addAction( QString(tr("Error parsing script output: %1")).arg("\n"+exec) )->setEnabled(false); - }else{ - QStringList keys = doc.object().keys(); - for(int i=0; iparent()!=this || act->whatsThis().isEmpty() ){ return; } //only handle direct child actions - needed for recursive nature of menu - QString cmd = act->whatsThis(); - QString bin = cmd.section(" ",0,0); - if( !LUtils::isValidBinary(bin) ){ cmd.prepend("lumina-open "); } - LSession::handle()->LaunchApplication(cmd); - } -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.cpp deleted file mode 100644 index de7d086e..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.cpp +++ /dev/null @@ -1,553 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LDesktop.h" -#include "LSession.h" - -#include -#include -#include "LWinInfo.h" -#include "JsonMenu.h" - -#include - -#define DEBUG 0 - -LDesktop::LDesktop(int deskNum, bool setdefault) : QObject(){ - screenID = QApplication::screens().at(deskNum)->name(); - DPREFIX = "desktop-"+screenID+"/"; - //desktopnumber = deskNum; - //desktop = QApplication::desktop(); - defaultdesktop = setdefault; //(desktop->screenGeometry(desktopnumber).x()==0); - //desktoplocked = true; - issyncing = bgupdating = false; - usewinmenu=false; - - //Setup the internal variables - settings = new QSettings(QSettings::UserScope, "lumina-desktop","desktopsettings", this); - //qDebug() << " - Desktop Settings File:" << settings->fileName(); - if(!QFile::exists(settings->fileName())){ settings->setValue(DPREFIX+"background/filelist",QStringList()<<"default"); settings->sync(); } - //bgWindow = 0; - bgDesktop = 0; - QTimer::singleShot(1,this, SLOT(InitDesktop()) ); - -} - -LDesktop::~LDesktop(){ - delete deskMenu; - delete winMenu; - //delete bgWindow; - delete workspacelabel; - delete wkspaceact; -} - -int LDesktop::Screen(){ - QList scrns = QApplication::screens(); - for(int i=0; iname()==screenID){ return i; } - } - return -1; -} - -void LDesktop::show(){ - //if(bgWindow!=0){ bgWindow->show(); } - if(bgDesktop!=0){ bgDesktop->show(); } - for(int i=0; ishow(); } -} - -void LDesktop::hide(){ - //if(bgWindow!=0){ bgWindow->hide(); } - if(bgDesktop!=0){ bgDesktop->hide(); } - for(int i=0; ihide(); } -} - -void LDesktop::prepareToClose(){ - //Get any panels ready to close - issyncing = true; //Stop handling any watcher events - for(int i=0; iprepareToClose(); PANELS.takeAt(i)->deleteLater(); i--; } - //Now close down any desktop plugins - //desktoplocked = true; //make sure that plugin settings are preserved during removal - //Remove all the current containers - bgDesktop->cleanup(); -} - -WId LDesktop::backgroundID(){ - if(bgDesktop!=0){ return bgDesktop->winId(); } - else{ return QX11Info::appRootWindow(); } -} - -QRect LDesktop::availableScreenGeom(){ - //Return a QRect containing the (global) screen area that is available (not under any panels) - if(bgDesktop!=0){ - return globalWorkRect; //saved from previous calculations - }else{ - return LSession::handle()->screenGeom( Screen() ); - } -} - -void LDesktop::UpdateGeometry(){ - //First make sure there is something different about the geometry - //if(desktop->screenGeometry(Screen())==bgWindow->geometry()){ return; } - //Now update the screen - // NOTE: This functionality is highly event-driven based on X changes - so we need to keep things in order (no signals/slots) - //qDebug() << "Changing Desktop Geom:" << Screen(); - //bgWindow->setGeometry(desktop->screenGeometry(Screen())); - /*for(int i=0; iUpdatePanel(true); //geom only updates - do this before adjusting the background - }*/ - //qDebug() << " - Update Desktop Plugin Area"; - UpdateDesktopPluginArea(); - //qDebug() << " - Done With Desktop Geom Updates"; - QTimer::singleShot(0, this, SLOT(UpdatePanels())); -} - -void LDesktop::SystemLock(){ - QProcess::startDetached("xscreensaver-command -lock"); -} - -void LDesktop::SystemLogout(){ - LSession::handle()->systemWindow(); -} - -void LDesktop::SystemTerminal(){ - LSession::handle()->sessionSettings()->sync(); //make sure it is up to date - QString term = LXDG::findDefaultAppForMime("application/terminal"); //LSession::handle()->sessionSettings()->value("default-terminal","xterm").toString(); - if(term.isEmpty() ||(!term.endsWith(".desktop") && !LUtils::isValidBinary(term)) ){ term = "xterm"; } - LSession::LaunchApplication("lumina-open \""+term+"\""); -} - -void LDesktop::SystemFileManager(){ - //Just open the home directory - QString fm = "lumina-open \""+QDir::homePath()+"\""; - LSession::LaunchApplication(fm); -} - -void LDesktop::SystemApplication(QAction* act){ - if(!act->whatsThis().isEmpty() && act->parent()==deskMenu){ - LSession::LaunchApplication("lumina-open \""+act->whatsThis()+"\""); - } -} - -void LDesktop::checkResolution(){ - //Compare the current screen resolution with the last one used/saved and adjust config values *only* - //NOTE: This is only run the first time this desktop is created (before loading all the interface) - not on each desktop change - int oldWidth = settings->value(DPREFIX+"screen/lastWidth",-1).toInt(); - int oldHeight = settings->value(DPREFIX+"screen/lastHeight",-1).toInt(); - QRect scrn = LSession::handle()->screenGeom( Screen() ); - if(scrn.isNull()){ return; } - issyncing = true; - settings->setValue(DPREFIX+"screen/lastWidth",scrn.width()); - settings->setValue(DPREFIX+"screen/lastHeight",scrn.height()); - - if(oldWidth<1 || oldHeight<1 || scrn.width()<1 || scrn.height()<1){ - //nothing to do - something invalid - }else if(scrn.width()==oldWidth && scrn.height()==oldHeight){ - //nothing to do - same as before - }else{ - //Calculate the scale factor between the old/new sizes in each dimension - // and forward that on to all the interface elements - double xscale = scrn.width()/((double) oldWidth); - double yscale = scrn.height()/((double) oldHeight); - if(DEBUG){ - qDebug() << "Screen Resolution Changed:" << screenID; - qDebug() << " - Old:" << QString::number(oldWidth)+"x"+QString::number(oldHeight); - qDebug() << " - New:" << QString::number(scrn.width())+"x"+QString::number(scrn.height()); - qDebug() << " - Scale Factors:" << xscale << yscale; - } - //Update any panels in the config file - for(int i=0; i<4; i++){ - QString PPREFIX = "panel"+QString::number(Screen())+"."+QString::number(i)+"/"; - int ht = settings->value(PPREFIX+"height",-1).toInt(); - if(ht<1){ continue; } //no panel height defined - QString loc = settings->value(PPREFIX+"location","top").toString().toLower(); - if(loc=="top" || loc=="bottom"){ - settings->setValue(PPREFIX+"height", (int) ht*yscale); //vertical dimension - }else{ - settings->setValue(PPREFIX+"height", (int) ht*xscale); //horizontal dimension - } - } - //Update any desktop plugins - QStringList plugs = settings->value(DPREFIX+"pluginlist").toStringList(); - QFileInfoList files = LSession::handle()->DesktopFiles(); - for(int i=0; iDesktopPluginSettings(); - QStringList keys = DP->allKeys(); - for(int i=0; isetValue( filter[j], qRound(DP->value(filter[j]).toInt()*yscale) ); } - if(filter[j].endsWith("location/width")){ DP->setValue( filter[j], qRound(DP->value(filter[j]).toInt()*xscale) ); } - if(filter[j].endsWith("location/x")){ DP->setValue( filter[j], qRound(DP->value(filter[j]).toInt()*xscale) ); } - if(filter[j].endsWith("location/y")){ DP->setValue( filter[j], qRound(DP->value(filter[j]).toInt()*yscale) ); } - if(filter[j].endsWith("IconSize")){ DP->setValue( filter[j], qRound(DP->value(filter[j]).toInt()*yscale) ); } - if(filter[j].endsWith("iconsize")){ DP->setValue( filter[j], qRound(DP->value(filter[j]).toInt()*yscale) ); } - } - } - DP->sync(); //make sure it gets saved to disk right away - - } - issyncing = false; -} - -// ===================== -// PRIVATE SLOTS -// ===================== -void LDesktop::InitDesktop(){ - //This is called *once* during the main initialization routines - checkResolution(); //Adjust the desktop config file first (if necessary) - if(DEBUG){ qDebug() << "Init Desktop:" << Screen(); } - //connect(desktop, SIGNAL(resized(int)), this, SLOT(UpdateGeometry(int))); - if(DEBUG){ qDebug() << "Desktop #"< "<< LSession::desktop()->screenGeometry(Screen()) << LSession::handle()->screenGeom(Screen()); } - deskMenu = new QMenu(0); - connect(deskMenu, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) ); - winMenu = new QMenu(0); - winMenu->setTitle(tr("Window List")); - winMenu->setIcon( LXDG::findIcon("preferences-system-windows","") ); - connect(winMenu, SIGNAL(triggered(QAction*)), this, SLOT(winClicked(QAction*)) ); - workspacelabel = new QLabel(0); - workspacelabel->setAlignment(Qt::AlignCenter); - wkspaceact = new QWidgetAction(0); - wkspaceact->setDefaultWidget(workspacelabel); - bgtimer = new QTimer(this); - bgtimer->setSingleShot(true); - connect(bgtimer, SIGNAL(timeout()), this, SLOT(UpdateBackground()) ); - - connect(QApplication::instance(), SIGNAL(DesktopConfigChanged()), this, SLOT(SettingsChanged()) ); - connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(UpdateDesktop()) ); - connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(LocaleChanged()) ); - connect(QApplication::instance(), SIGNAL(WorkspaceChanged()), this, SLOT(UpdateBackground()) ); - //if(DEBUG){ qDebug() << "Create bgWindow"; } - /*bgWindow = new QWidget(); //LDesktopBackground(); - bgWindow->setObjectName("bgWindow"); - bgWindow->setContextMenuPolicy(Qt::CustomContextMenu); - bgWindow->setFocusPolicy(Qt::StrongFocus); - bgWindow->setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); - LSession::handle()->XCB->SetAsDesktop(bgWindow->winId()); - bgWindow->setGeometry(LSession::handle()->screenGeom(Screen())); - bgWindow->setWindowOpacity(0.0); - connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) );*/ - if(DEBUG){ qDebug() << "Create bgDesktop"; } - bgDesktop = new LDesktopPluginSpace(); - int grid = settings->value(DPREFIX+"GridSize",-1).toInt(); - if(grid<0 && LSession::desktop()->screenGeometry(Screen()).height() > 2000){ grid = 200; } - else if(grid<0){ grid = 100; } - bgDesktop->SetIconSize( grid ); - bgDesktop->setContextMenuPolicy(Qt::CustomContextMenu); - //LSession::handle()->XCB->SetAsDesktop(bgDesktop->winId()); - connect(bgDesktop, SIGNAL(PluginRemovedByUser(QString)), this, SLOT(RemoveDeskPlugin(QString)) ); - connect(bgDesktop, SIGNAL(IncreaseIcons()), this, SLOT(IncreaseDesktopPluginIcons()) ); - connect(bgDesktop, SIGNAL(DecreaseIcons()), this, SLOT(DecreaseDesktopPluginIcons()) ); - connect(bgDesktop, SIGNAL(HideDesktopMenu()), deskMenu, SLOT(hide())); - connect(bgDesktop, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) ); - if(DEBUG){ qDebug() << " - Desktop Init Done:" << screenID; } - //Start the update processes - QTimer::singleShot(10,this, SLOT(UpdateMenu()) ); - QTimer::singleShot(0,this, SLOT(UpdateBackground()) ); - QTimer::singleShot(1,this, SLOT(UpdateDesktop()) ); - QTimer::singleShot(2,this, SLOT(UpdatePanels()) ); -} - -void LDesktop::SettingsChanged(){ - if(issyncing){ return; } //don't refresh for internal modifications to the - issyncing = true; - qDebug() << "Found Settings Change:" << screenID; - settings->sync(); //make sure to sync with external settings changes - UpdateBackground(); - UpdateDesktop(); - UpdatePanels(); - UpdateMenu(); - issyncing = false; - QTimer::singleShot(100, this, SLOT(UnlockSettings()) ); //give it a few moments to settle before performing another sync -} - -void LDesktop::LocaleChanged(){ - //Update any elements which require a re-translation - UpdateMenu(false); //do the full menu refresh -} - -void LDesktop::UpdateMenu(bool fast){ - if(DEBUG){ qDebug() << " - Update Menu:" << screenID; } - //Put a label at the top - int num = LSession::handle()->XCB->CurrentWorkspace(); //LX11::GetCurrentDesktop(); - if(DEBUG){ qDebug() << "Found workspace number:" << num; } - if(num < 0){ workspacelabel->setText( ""+tr("Lumina Desktop")+""); } - else{ workspacelabel->setText( ""+QString(tr("Workspace %1")).arg(QString::number(num+1))+""); } - if(fast && usewinmenu){ UpdateWinMenu(); } - if(fast){ return; } //already done - deskMenu->clear(); //clear it for refresh - deskMenu->addAction(wkspaceact); - deskMenu->addSeparator(); - //Now load the user's menu setup and fill the menu - QStringList items = settings->value("menu/itemlist", QStringList()<< "terminal" << "filemanager" <<"applications" << "line" << "settings" ).toStringList(); - usewinmenu=false; - for(int i=0; iaddAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"), this, SLOT(SystemTerminal()) ); } - else if(items[i]=="lockdesktop"){ deskMenu->addAction(LXDG::findIcon("system-lock-screen",""), tr("Lock Session"), this, SLOT(SystemLock()) ); } - else if(items[i]=="filemanager"){ deskMenu->addAction( LXDG::findIcon("user-home",""), tr("Browse Files"), this, SLOT(SystemFileManager()) ); } - else if(items[i]=="applications"){ deskMenu->addMenu( LSession::handle()->applicationMenu() ); } - else if(items[i]=="line"){ deskMenu->addSeparator(); } - else if(items[i]=="settings"){ deskMenu->addMenu( LSession::handle()->settingsMenu() ); } - else if(items[i]=="windowlist"){ deskMenu->addMenu( winMenu); usewinmenu=true;} - else if(items[i].startsWith("app::::") && items[i].endsWith(".desktop")){ - //Custom *.desktop application - QString file = items[i].section("::::",1,1).simplified(); - XDGDesktop xdgf(file);// = LXDG::loadDesktopFile(file, ok); - if(xdgf.type!=XDGDesktop::BAD){ - deskMenu->addAction( LXDG::findIcon(xdgf.icon,""), xdgf.name)->setWhatsThis(file); - }else{ - qDebug() << "Could not load application file:" << file; - } - }else if(items[i].startsWith("jsonmenu::::")){ - //Custom JSON menu system (populated on demand via external scripts/tools - QStringList info = items[i].split("::::"); //FORMAT:[ "jsonmenu",exec,name, icon(optional)] - if(info.length()>=3){ - qDebug() << "Custom JSON Menu Loaded:" << info; - JsonMenu *tmp = new JsonMenu(info[1], deskMenu); - tmp->setTitle(info[2]); - connect(tmp, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) ); - if(info.length()>=4){ tmp->setIcon( LXDG::findIcon(info[3],"") ); } - deskMenu->addMenu(tmp); - } - } - } - //Now add the system quit options - deskMenu->addSeparator(); - deskMenu->addAction(LXDG::findIcon("system-log-out",""), tr("Leave"), this, SLOT(SystemLogout()) ); -} - -void LDesktop::UpdateWinMenu(){ - winMenu->clear(); - //Get the current list of windows - QList wins = LSession::handle()->XCB->WindowList(); - //Now add them to the menu - for(int i=0; iaddAction( info.icon(junk), info.text() ); - act->setData( QString::number(wins[i]) ); - } -} - -void LDesktop::winClicked(QAction* act){ - LSession::handle()->XCB->ActivateWindow( act->data().toString().toULong() ); -} - -void LDesktop::UpdateDesktop(){ - if(DEBUG){ qDebug() << " - Update Desktop Plugins for screen:" << screenID; } - QStringList plugins = settings->value(DPREFIX+"pluginlist", QStringList()).toStringList(); - if(defaultdesktop && plugins.isEmpty()){ - //plugins << "sample" << "sample" << "sample"; - } - bool changed=false; //in case the plugin list needs to be changed - //First make sure all the plugin names are unique - for(int i=0; isetValue(DPREFIX+"pluginlist", plugins); - settings->sync(); - QTimer::singleShot(200, this, SLOT(UnlockSettings()) ); - } - //If generating desktop file launchers, add those in - QStringList filelist; - if(settings->value(DPREFIX+"generateDesktopIcons",false).toBool()){ - QFileInfoList files = LSession::handle()->DesktopFiles(); - for(int i=0; iLoadItems(plugins, filelist); -} - -void LDesktop::RemoveDeskPlugin(QString ID){ - //This is called after a plugin is manually removed by the user - // just need to ensure that the plugin is also removed from the settings file - QStringList plugs = settings->value(DPREFIX+"pluginlist", QStringList()).toStringList(); - if(plugs.contains(ID)){ - plugs.removeAll(ID); - issyncing=true; //don't let the change cause a refresh - settings->setValue(DPREFIX+"pluginlist", plugs); - settings->sync(); - QTimer::singleShot(200, this, SLOT(UnlockSettings()) ); - } -} - -void LDesktop::IncreaseDesktopPluginIcons(){ - int cur = settings->value(DPREFIX+"GridSize",-1).toInt(); - if(cur<0 &&LSession::desktop()->screenGeometry(Screen()).height() > 2000){ cur = 200; } - else if(cur<0){ cur = 100; } - cur+=16; - issyncing=true; //don't let the change cause a refresh - settings->setValue(DPREFIX+"GridSize",cur); - settings->sync(); - QTimer::singleShot(200, this, SLOT(UnlockSettings()) ); - bgDesktop->SetIconSize(cur); -} - -void LDesktop::DecreaseDesktopPluginIcons(){ - int cur = settings->value(DPREFIX+"GridSize",-1).toInt(); - if(cur<0 &&LSession::desktop()->screenGeometry(Screen()).height() > 2000){ cur = 200; } - else if(cur<0){ cur = 100; } - if(cur<32){ return; } //cannot get smaller than 16x16 - cur-=16; - issyncing=true; //don't let the change cause a refresh - settings->setValue(DPREFIX+"GridSize",cur); - settings->sync(); - QTimer::singleShot(200, this, SLOT(UnlockSettings()) ); - bgDesktop->SetIconSize(cur); -} - -void LDesktop::UpdatePanels(){ - if(DEBUG){ qDebug() << " - Update Panels For Screen:" << Screen(); } - int panels = settings->value(DPREFIX+"panels", -1).toInt(); - //if(panels==-1 && defaultdesktop){ panels=1; } //need at least 1 panel on the primary desktop - //Remove all extra panels - for(int i=0; inumber()){ - if(DEBUG){ qDebug() << " -- Remove Panel:" << PANELS[i]->number(); } - PANELS[i]->prepareToClose(); - PANELS.takeAt(i)->deleteLater(); - i--; - } - } - for(int i=0; inumber() == i){ - found = true; - if(DEBUG){ qDebug() << " -- Update panel "<< i; } - //panel already exists - just update it - QTimer::singleShot(0, PANELS[p], SLOT(UpdatePanel()) ); - } - } - if(!found){ - if(DEBUG){ qDebug() << " -- Create panel "<< i; } - //New panel - LPanel *pan = new LPanel(settings, screenID, i, bgDesktop); - PANELS << pan; - pan->show(); - } - } - //Give it a 1/2 second before ensuring that the visible desktop area is correct - QTimer::singleShot(500, this, SLOT(UpdateDesktopPluginArea()) ); -} - -void LDesktop::UpdateDesktopPluginArea(){ - QRegion visReg(LSession::desktop()->screenGeometry(Screen()) ); //visible region (not hidden behind a panel) - QRect rawRect = visReg.boundingRect(); //initial value (screen size) - //qDebug() << "Update Desktop Plugin Area:" << bgWindow->geometry(); - for(int i=0; ivalue(PANELS[i]->prefix()+"location","top").toString().toLower(); - int vis = PANELS[i]->visibleWidth(); - if(loc=="top"){ - if(!shifted.contains(QRect(rawRect.x(), rawRect.y(), rawRect.width(), vis))){ continue; } - shifted.translate(0, (rawRect.top()+vis)-shifted.boundingRect().top() ); - }else if(loc=="bottom"){ - if(!shifted.contains(QRect(rawRect.x(), rawRect.bottom()-vis, rawRect.width(), vis))){ continue; } - shifted.translate(0, (rawRect.bottom()-vis)-shifted.boundingRect().bottom()); - }else if(loc=="left"){ - if( !shifted.contains(QRect(rawRect.x(), rawRect.y(), vis,rawRect.height())) ){ continue; } - shifted.translate((rawRect.left()+vis)-shifted.boundingRect().left() ,0); - }else{ //right - if(!shifted.contains(QRect(rawRect.right()-vis, rawRect.y(), vis,rawRect.height())) ){ continue; } - shifted.translate((rawRect.right()-vis)-shifted.boundingRect().right(),0); - } - visReg = visReg.intersected( shifted ); - } - //Now make sure the desktop plugin area is only the visible area - QRect rec = visReg.boundingRect(); - //qDebug() << " - DPArea: Panel-Adjusted rectangle:" << rec; - //LSession::handle()->XCB->SetScreenWorkArea((unsigned int) Screen(), rec); - //Now remove the X offset to place it on the current screen (needs widget-coords, not global) - globalWorkRect = rec; //save this for later - rec.moveTopLeft( QPoint( rec.x()-LSession::desktop()->screenGeometry(Screen()).x() , rec.y()-LSession::desktop()->screenGeometry(Screen()).y() ) ); - //qDebug() << "DPlug Area:" << rec << bgDesktop->geometry() << LSession::handle()->desktop()->availableGeometry(bgDesktop); - if(rec.size().isNull() || rec == bgDesktop->geometry()){return; } //nothing changed - bgDesktop->setGeometry( LSession::desktop()->screenGeometry(Screen())); - bgDesktop->setDesktopArea( rec ); - bgDesktop->UpdateGeom(); //just in case the plugin space itself needs to do anything - QTimer::singleShot(10, this, SLOT(UpdateBackground()) ); - //Re-paint the panels (just in case a plugin was underneath it and the panel is transparent) - //for(int i=0; iupdate(); } - //Make sure to re-disable any WM control flags - LSession::handle()->XCB->SetDisableWMActions(bgDesktop->winId()); -} - -void LDesktop::UpdateBackground(){ - //Get the current Background - if(bgupdating || bgDesktop==0){ return; } //prevent multiple calls to this at the same time - bgupdating = true; - if(DEBUG){ qDebug() << " - Update Desktop Background for screen:" << Screen(); } - //Get the list of background(s) to show - QStringList bgL = settings->value(DPREFIX+"background/filelist-workspace-"+QString::number( LSession::handle()->XCB->CurrentWorkspace()), QStringList()).toStringList(); - if(bgL.isEmpty()){ bgL = settings->value(DPREFIX+"background/filelist", QStringList()).toStringList(); } - - //qDebug() << " - List:" << bgL << CBG; - //Remove any invalid files - for(int i=0; iisActive(); - if(bgL==oldBGL && !CBG.isEmpty() && bgtimer->isActive()){ - //No background change scheduled - just update the widget - bgDesktop->update(); - bgupdating=false; - return; - } - oldBGL = bgL; //save this for later - //Determine which background to use next - int index ( qrand() % bgL.length() ); - if(index== bgL.indexOf(CBG)){ //if the current wallpaper was selected by the randomization again - //Go to the next in the list - if(index < 0 || index >= bgL.length()-1){ index = 0; } //if invalid or last item in the list - go to first - else{ index++; } //go to next - } - QString bgFile = bgL[index]; - //Save this file as the current background - CBG = bgFile; - //qDebug() << " - Set Background to:" << CBG << index << bgL; - if( (bgFile.toLower()=="default")){ bgFile = LOS::LuminaShare()+"desktop-background.jpg"; } - //Now set this file as the current background - QString format = settings->value(DPREFIX+"background/format","stretch").toString(); - //bgWindow->setBackground(bgFile, format); - QPixmap backPix = LDesktopBackground::setBackground(bgFile, format, LSession::handle()->screenGeom(Screen())); - bgDesktop->setBackground(backPix); - //Now reset the timer for the next change (if appropriate) - if(bgtimer->isActive()){ bgtimer->stop(); } - if(bgL.length() > 1){ - //get the length of the timer (in minutes) - int min = settings->value(DPREFIX+"background/minutesToChange",5).toInt(); - //restart the internal timer - if(min > 0){ - bgtimer->start(min*60000); //convert from minutes to milliseconds - } - } - //Now update the panel backgrounds - for(int i=0; iupdate(); - PANELS[i]->show(); - } - bgupdating=false; -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.h b/src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.h deleted file mode 100644 index b6034c18..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktop.h +++ /dev/null @@ -1,107 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_LDESKTOP_H -#define _LUMINA_DESKTOP_LDESKTOP_H - -#include - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#include - -#include "LPanel.h" -//#include "Globals.h" -#include "AppMenu.h" -#include "LDesktopPluginSpace.h" -#include "desktop-plugins/LDPlugin.h" -//#include "desktop-plugins/NewDP.h" -#include "LDesktopBackground.h" - -class LDesktop : public QObject{ - Q_OBJECT -public: - LDesktop(int deskNum=0, bool setdefault = false); - ~LDesktop(); - - int Screen(); //return the screen number this object is managing - void show(); - void hide(); - void prepareToClose(); - - WId backgroundID(); - QRect availableScreenGeom(); - - void UpdateGeometry(); - -public slots: - void SystemLock(); - void SystemLogout(); - void SystemTerminal(); - void SystemFileManager(); - void SystemApplication(QAction*); - - void checkResolution(); - -private: - QSettings *settings; - QTimer *bgtimer; - //QDesktopWidget *desktop; - QString DPREFIX, screenID; - //int desktopnumber; - QRegion availDPArea; - bool defaultdesktop, issyncing, usewinmenu, bgupdating; - QStringList oldBGL; - QList PANELS; - LDesktopPluginSpace *bgDesktop; //desktop plugin area - //QWidget *bgWindow; //full screen background - QMenu *deskMenu, *winMenu; - QLabel *workspacelabel; - QWidgetAction *wkspaceact; - QList PLUGINS; - QString CBG; //current background - QRect globalWorkRect; - -private slots: - void InitDesktop(); - void SettingsChanged(); - void UnlockSettings(){ issyncing=false; } - void LocaleChanged(); - - //Menu functions - void UpdateMenu(bool fast = false); - void ShowMenu(){ - UpdateMenu(true); //run the fast version - deskMenu->popup(QCursor::pos()); //} - } - void UpdateWinMenu(); - void winClicked(QAction*); - - //Desktop plugin system functions - void UpdateDesktop(); - void RemoveDeskPlugin(QString); - void IncreaseDesktopPluginIcons(); - void DecreaseDesktopPluginIcons(); - - void UpdatePanels(); - - void UpdateDesktopPluginArea(); //make sure the area is not underneath any panels - - void UpdateBackground(); -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.cpp deleted file mode 100644 index 6b458c24..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.cpp +++ /dev/null @@ -1,90 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Henry Hu -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LDesktopBackground.h" - -#include -#include -#include - -#include "LSession.h" - -void LDesktopBackground::paintEvent(QPaintEvent *ev) { - //return; //do nothing - always invisible - if (bgPixmap != NULL) { - //qDebug() << "Wallpaper paint Event:" << ev->rect(); - //QPainter painter(this); - //painter.setBrush(*bgPixmap); - //painter.drawRect(ev->rect().adjusted(-1,-1,2,2)); - }else{ - QWidget::paintEvent(ev); - } -} - -QPixmap LDesktopBackground::setBackground(const QString& bgFile, const QString& format, QRect geom) { - //if (bgPixmap != NULL) delete bgPixmap; - QPixmap bgPixmap(geom.size());// = new QPixmap(size()); - - if (bgFile.startsWith("rgb(")) { - QStringList colors = bgFile.section(")",0,0).section("(",1,1).split(","); - QColor color = QColor(colors[0].toInt(), colors[1].toInt(), colors[2].toInt()); - bgPixmap.fill(color); - } else { - bgPixmap.fill(Qt::black); - - // Load the background file and scale - QPixmap bgImage(bgFile); - if (format == "stretch" || format == "full" || format == "fit") { - Qt::AspectRatioMode mode; - if (format == "stretch") { - mode = Qt::IgnoreAspectRatio; - } else if (format == "full") { - mode = Qt::KeepAspectRatioByExpanding; - } else { - mode = Qt::KeepAspectRatio; - } - if(bgImage.height() != geom.height() && bgImage.width() != geom.width() ){ bgImage = bgImage.scaled(geom.size(), mode); } - //bgImage = bgImage.scaled(size(), mode); - } - - // Calculate the offset - int dx = 0, dy = 0; - int drawWidth = bgImage.width(), drawHeight = bgImage.height(); - if (format == "fit" || format == "center" || format == "full") { - dx = (geom.width() - bgImage.width()) / 2; - dy = (geom.height() - bgImage.height()) / 2; - } else if (format == "tile") { - drawWidth = geom.width(); - drawHeight = geom.height(); - } else { - if (format.endsWith("right")) { - dx = geom.width() - bgImage.width(); - } - if (format.startsWith("bottom")) { - dy = geom.height() - bgImage.height(); - } - } - - // Draw the background image - QPainter painter(&bgPixmap); - painter.setBrush(bgImage); - painter.setBrushOrigin(dx, dy); - painter.drawRect(dx, dy, drawWidth, drawHeight); - } - //this->repaint(); //make sure the entire thing gets repainted right away - //LSession::handle()->XCB->paintRoot(geom, &bgPixmap); - return bgPixmap; - //show(); -} - -LDesktopBackground::LDesktopBackground() : QWidget() { - bgPixmap = NULL; - this->setWindowOpacity(0); -} - -LDesktopBackground::~LDesktopBackground() { - if (bgPixmap != NULL) delete bgPixmap; -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.h b/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.h deleted file mode 100644 index a2e46748..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopBackground.h +++ /dev/null @@ -1,27 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Henry Hu -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_LDESKTOPBACKGROUND_H_ -#define _LUMINA_DESKTOP_LDESKTOPBACKGROUND_H_ - -#include -#include -#include - -class LDesktopBackground: public QWidget { - Q_OBJECT -public: - LDesktopBackground(); - virtual ~LDesktopBackground(); - - virtual void paintEvent(QPaintEvent*); - static QPixmap setBackground(const QString&, const QString&, QRect geom); - -private: - QPixmap *bgPixmap; -}; - -#endif // _LUMINA_DESKTOP_LDESKTOPBACKGROUND_H_ diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.cpp deleted file mode 100644 index 18126dfa..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.cpp +++ /dev/null @@ -1,333 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LDesktopPluginSpace.h" -#include "LSession.h" -#include "desktop-plugins/NewDP.h" - -#include -#include - -#define DEBUG 0 - -// =================== -// PUBLIC -// =================== -LDesktopPluginSpace::LDesktopPluginSpace() : QWidget(){ - this->setObjectName("LuminaDesktopPluginSpace"); - this->setAttribute(Qt::WA_TranslucentBackground); - //this->setAttribute(Qt::WA_NoSystemBackground); - this->setAutoFillBackground(false); - this->setStyleSheet("QWidget#LuminaDesktopPluginSpace{ border: none; background: transparent; }"); - this->setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); - this->setAcceptDrops(true); - this->setContextMenuPolicy(Qt::NoContextMenu); - this->setMouseTracking(true); - TopToBottom = true; - GRIDSIZE = 100.0; //default value if not set - plugsettings = LSession::handle()->DesktopPluginSettings(); - LSession::handle()->XCB->SetAsDesktop(this->winId()); - //this->setWindowOpacity(0.0); -} - -LDesktopPluginSpace::~LDesktopPluginSpace(){ - -} - -void LDesktopPluginSpace::LoadItems(QStringList plugs, QStringList files){ - if(DEBUG){ qDebug() << "Loading Desktop Items:" << plugs << files << "Area:" << this->size() << GRIDSIZE; } - bool changes = false; - if(plugs != plugins){ plugins = plugs; changes = true; } - if(files != deskitems){ deskitems = files; changes = true; } - if(changes){ QTimer::singleShot(0,this, SLOT(reloadPlugins())); } - this->show(); -} - -void LDesktopPluginSpace::SetIconSize(int size){ - if(DEBUG){ qDebug() << "Set Desktop Icon Size:" << size; } - //QSize newsize = calculateItemSize(size); - int oldsize = GRIDSIZE; - GRIDSIZE = size; //turn the int into a float; - //itemSize = QSize(1,1); //save this for all the later icons which are generated (grid size) - UpdateGeom(oldsize); - //Now re-set the item icon size - //reloadPlugins(true); -} - -void LDesktopPluginSpace::cleanup(){ - //Perform any final cleanup actions here - for(int i=0; ideleteLater(); - i--; - } - plugins.clear(); - deskitems.clear(); - this->hide(); -} - -void LDesktopPluginSpace::setBackground(QPixmap pix){ - wallpaper = pix; - this->repaint(); -} - -void LDesktopPluginSpace::setDesktopArea(QRect area){ - desktopRect = area; -} - -// =================== -// PUBLIC SLOTS -// =================== -void LDesktopPluginSpace::UpdateGeom(int oldgrid){ - if(DEBUG){ qDebug() << "Updated Desktop Geom:" << desktopRect.size() << GRIDSIZE << desktopRect.size()/GRIDSIZE; } - //Go through and check the locations/sizes of all items (particularly the ones on the bottom/right edges) - //bool reload = false; - for(int i=0; igeometry(), oldgrid); - if(DEBUG){ qDebug() << " - Check Plugin:" << ITEMS[i]->whatsThis() << grid; } - if( !ValidGrid(grid) ){ - //This plugin is too far out of the screen - find new location for it - if(DEBUG){ qDebug() << " -- Out of bounds - Find a new spot"; } - grid = findOpenSpot(grid, ITEMS[i]->whatsThis(), true); //Reverse lookup spot - } - if(!ValidGrid(grid)){ - qDebug() << "No Place for plugin:" << ITEMS[i]->whatsThis(); - qDebug() << " - Removing it for now..."; - ITEMS.takeAt(i)->deleteLater(); - i--; - }else{ - //NOTE: We are not doing the ValidGeometry() checks because we are only resizing existing plugin with pre-set & valid grid positions - grid = gridToGeom(grid); //convert to pixels before saving/sizing - MovePlugin(ITEMS[i], grid); - /*ITEMS[i]->setGeometry( grid ); - ITEMS[i]->setFixedSize(grid.size()); - ITEMS[i]->savePluginGeometry(grid);*/ - } - } - //if(reload){ QTimer::singleShot(0,this, SLOT(reloadPlugins())); } -} - -// =================== -// PRIVATE -// =================== -void LDesktopPluginSpace::addDesktopItem(QString filepath){ - addDesktopPlugin("applauncher::"+filepath+"---dlink"+QString::number(LSession::handle()->desktop()->screenNumber(this)) ); -} - -void LDesktopPluginSpace::addDesktopPlugin(QString plugID){ - //This is used for generic plugins (QWidget-based) - if(DEBUG){ qDebug() << "Adding Desktop Plugin:" << plugID; } - LDPlugin *plug = NewDP::createPlugin(plugID, this); - if(plug==0){ return; } //invalid plugin - //plug->setAttribute(Qt::WA_TranslucentBackground); - plug->setWhatsThis(plugID); - //Now get the geometry for the plugin - QRect geom = plug->loadPluginGeometry(); //in pixel coords - if(!geom.isNull()){ geom = geomToGrid(geom); } //convert to grid coordinates - if(geom.isNull()){ - //No previous location - need to calculate initial geom - QSize sz = plug->defaultPluginSize(); //in grid coordinates - geom.setSize(sz); - //if an applauncher - add from top-left, otherwise add in from bottom-right - if(plugID.startsWith("applauncher")){ geom = findOpenSpot(geom.width(), geom.height() ); } - else{ geom = findOpenSpot(geom.width(), geom.height(), RoundUp(this->height()/GRIDSIZE), RoundUp(this->width()/GRIDSIZE), true); } - }else if(!ValidGeometry(plugID, gridToGeom(geom)) ){ - //Find a new location for the plugin (saved location is invalid) - geom = findOpenSpot(geom.width(), geom.height(), geom.y(), geom.x(), false); //try to get it within the same general area first - } - if(geom.x() < 0 || geom.y() < 0){ - qDebug() << "No available space for desktop plugin:" << plugID << " - IGNORING"; - delete plug; - }else{ - if(DEBUG){ qDebug() << " - New Plugin Geometry (grid):" << geom; } - //Now place the item in the proper spot/size - MovePlugin(plug, gridToGeom(geom)); - //plug->setGeometry( gridToGeom(geom) ); - plug->show(); - if(DEBUG){ qDebug() << " - New Plugin Geometry (px):" << plug->geometry(); } - ITEMS << plug; - connect(plug, SIGNAL(StartMoving(QString)), this, SLOT(StartItemMove(QString)) ); - connect(plug, SIGNAL(StartResizing(QString)), this, SLOT(StartItemResize(QString)) ); - connect(plug, SIGNAL(RemovePlugin(QString)), this, SLOT(RemoveItem(QString)) ); - connect(plug, SIGNAL(IncreaseIconSize()), this, SIGNAL(IncreaseIcons()) ); - connect(plug, SIGNAL(DecreaseIconSize()), this, SIGNAL(DecreaseIcons()) ); - connect(plug, SIGNAL(CloseDesktopMenu()), this, SIGNAL(HideDesktopMenu()) ); - } -} - -QRect LDesktopPluginSpace::findOpenSpot(int gridwidth, int gridheight, int startRow, int startCol, bool reversed, QString plugID){ - //Note about the return QPoint: x() is the column number, y() is the row number - QPoint pt(0,0); - //qDebug() << "FIND OPEN SPOT:" << gridwidth << gridheight << startRow << startCol << reversed; - int row = startRow; int col = startCol; - if(row<0){ row = 0; } //just in case - since this can be recursively called - if(col<0){ col = 0; } //just in case - since this can be recursively called - bool found = false; - int rowCount, colCount; - rowCount = RoundUp(desktopRect.height()/GRIDSIZE); - colCount = RoundUp(desktopRect.width()/GRIDSIZE); - if( (row+gridheight)>rowCount){ row = rowCount-gridheight; startRow = row; } - if( (col+gridwidth)>colCount){ col = colCount-gridwidth; startCol = col; } - QRect geom(0, 0, gridwidth*GRIDSIZE, gridheight*GRIDSIZE); //origin point will be adjusted in a moment - if(DEBUG){ qDebug() << "Search for plugin space:" << rowCount << colCount << gridheight << gridwidth << this->size(); } - if(TopToBottom && reversed && (startRow>0 || startCol>0) ){ - //Arrange Top->Bottom (work backwards) - //qDebug() << "Search backwards for space:" << rowCount << colCount << startRow << startCol << gridheight << gridwidth; - while(col>=0 && !found){ - while(row>=0 && !found){ - bool ok = true; - geom.moveTo(col*GRIDSIZE, row*GRIDSIZE); - //qDebug() << " - Check Geom:" << geom << col << row; - //Check all the existing items to ensure no overlap - for(int i=0; iwhatsThis()==plugID){ continue; } //same plugin - this is not a conflict - if(geom.intersects(ITEMS[i]->geometry())){ - //Collision - move the next searchable row/column index - ok = false; - //qDebug() << "Collision:" << col << row; - row = ((ITEMS[i]->geometry().y()-GRIDSIZE/2)/GRIDSIZE) -gridheight; //use top edge for next search (minus item height) - //qDebug() << " - new row:" << row; - } - } - if(ok){ pt = QPoint(col,row); found = true; } //found an open spot - } - if(!found){ col--; row=rowCount-gridheight; } //go to the previous column - } - }else if(TopToBottom){ - //Arrange Top->Bottom - while(col<(colCount-gridwidth) && !found){ - while(row<(rowCount-gridheight) && !found){ - bool ok = true; - geom.moveTo(col*GRIDSIZE, row*GRIDSIZE); - //qDebug() << " - Check Geom:" << geom << col << row; - //Check all the existing items to ensure no overlap - for(int i=0; iwhatsThis()==plugID){ continue; } //same plugin - this is not a conflict - if(geom.intersects(ITEMS[i]->geometry())){ - //Collision - move the next searchable row/column index - ok = false; - row = posToGrid(ITEMS[i]->geometry().bottomLeft()).y(); //use bottom edge for next search - } - } - if(ok){ pt = QPoint(col,row); found = true; } //found an open spot - //else{ row++; } - } - if(!found){ col++; row=0; } //go to the next column - } - }else if(reversed && (startRow>0 || startCol>0) ){ - //Arrange Left->Right (work backwards) - while(row>=0 && !found){ - while(col>=0 && !found){ - bool ok = true; - geom.moveTo(col*GRIDSIZE, row*GRIDSIZE); - //Check all the existing items to ensure no overlap - for(int i=0; iwhatsThis()==plugID){ continue; } //same plugin - this is not a conflict - if(geom.intersects(ITEMS[i]->geometry())){ - //Collision - move the next searchable row/column index - ok = false; - col = (ITEMS[i]->geometry().x()-GRIDSIZE/2)/GRIDSIZE - gridwidth; // Fill according to row/column - } - } - if(ok){ pt = QPoint(col,row); found = true; } //found an open spot - //else{ col++; } - } - if(!found){ row--; col=colCount-gridwidth;} //go to the previous row - } - }else{ - //Arrange Left->Right - while(row<(rowCount-gridheight) && !found){ - while(col<(colCount-gridwidth) && !found){ - bool ok = true; - geom.moveTo(col*GRIDSIZE, row*GRIDSIZE); - //Check all the existing items to ensure no overlap - for(int i=0; iwhatsThis()==plugID){ continue; } //same plugin - this is not a conflict - if(geom.intersects(ITEMS[i]->geometry())){ - //Collision - move the next searchable row/column index - ok = false; - col = posToGrid(ITEMS[i]->geometry().topRight()).x(); // Fill according to row/column - } - } - if(ok){ pt = QPoint(col,row); found = true; } //found an open spot - //else{ col++; } - } - if(!found){ row++; col=0;} //go to the next row - } - } - if(!found){ - //qDebug() << "Could not find a spot:" << startRow << startCol << gridheight << gridwidth; - if( (startRow!=0 || startCol!=0) && !reversed){ - //Did not check the entire screen yet - gradually work it's way back to the top/left corner - //qDebug() << " - Start backwards search"; - return findOpenSpot(gridwidth, gridheight,startRow,startCol, true); //reverse the scan - }else if(gridwidth>1 && gridheight>1){ - //Decrease the size of the item by 1x1 grid points and try again - //qDebug() << " - Out of space: Decrease item size and try again..."; - return findOpenSpot(gridwidth-1, gridheight-1, 0, 0); - }else{ - //qDebug() << " - Could not find an open spot for a desktop plugin:" << gridwidth << gridheight << startRow << startCol; - return QRect(-1,-1,-1,-1); - } - }else{ - return QRect(pt,QSize(gridwidth,gridheight)); - } -} - -QRect LDesktopPluginSpace::findOpenSpot(QRect grid, QString plugID, bool recursive){ //Reverse lookup spotc{ - //This is just an overloaded simplification for checking currently existing plugins - return findOpenSpot(grid.width(), grid.height(), grid.y(), grid.x(), recursive, plugID); -} - -// =================== -// PRIVATE SLOTS -// =================== -void LDesktopPluginSpace::reloadPlugins(bool ForceIconUpdate ){ - //Remove any plugins as necessary - QStringList plugs = plugins; - QStringList items = deskitems; - for(int i=0; iwhatsThis().startsWith("applauncher") && ForceIconUpdate){ - //Change the size of the existing plugin - preserving the location if possible - /*QRect geom = ITEMS[i]->loadPluginGeometry(); //pixel coords - if(!geom.isNull()){ - geom = geomToGrid(geom); //convert to grid coords - geom.setSize(itemSize); //Reset back to default size (does not change location) - ITEMS[i]->savePluginGeometry( gridToGeom(geom)); //save it back in pixel coords - }*/ - //Now remove the plugin for the moment - run it through the re-creation routine below - ITEMS.takeAt(i)->deleteLater(); - i--; - } - else if(plugs.contains(ITEMS[i]->whatsThis())){ plugs.removeAll(ITEMS[i]->whatsThis()); } - else if(items.contains(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50))){ items.removeAll(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50)); } - else{ ITEMS[i]->removeSettings(true); ITEMS.takeAt(i)->deleteLater(); i--; } //this is considered a permanent removal (cleans settings) - } - - //Now create any new items - //First load the plugins (almost always have fixed locations) - for(int i=0; irect().adjusted(-1,-1,2,2)); - }else{ - QWidget::paintEvent(ev); - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.h b/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.h deleted file mode 100644 index abc34878..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LDesktopPluginSpace.h +++ /dev/null @@ -1,303 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_LDESKTOP_PLUGIN_SPACE_H -#define _LUMINA_DESKTOP_LDESKTOP_PLUGIN_SPACE_H - -#include -#include -#include //includes all the QDrag*Event classes -#include -#include -#include -#include -#include -#include -#include -#include - -#include "desktop-plugins/LDPlugin.h" - -#define MIMETYPE QString("x-special/lumina-desktop-plugin") - -class LDesktopPluginSpace : public QWidget{ - Q_OBJECT - -signals: - void PluginRemovedByUser(QString ID); - void IncreaseIcons(); //increase default icon sizes - void DecreaseIcons(); //decrease default icon sizes - void HideDesktopMenu(); - -public: - LDesktopPluginSpace(); - ~LDesktopPluginSpace(); - - void LoadItems(QStringList plugs, QStringList files); - //void setShowGrid(bool show); This is already implemented in QTableView (inherited) - void SetIconSize(int size); - void ArrangeTopToBottom(bool ttb); //if false, will arrange left->right - void cleanup(); - - void setBackground(QPixmap pix); //should already be sized appropriately for this widget - void setDesktopArea(QRect area); - -public slots: - void UpdateGeom(int oldgrid = -1); - -private: - QSettings *plugsettings; - QStringList plugins, deskitems; - QList ITEMS; - QPixmap wallpaper; - QRect desktopRect; - bool TopToBottom; - float GRIDSIZE; - - int RoundUp(double num){ - int out = num; //This will truncate the number - if(out < num){ out++; } //need to increase by 1 - return out; - } - - void addDesktopItem(QString filepath); //This will convert it into a valid Plugin ID automatically - void addDesktopPlugin(QString plugID); - - - QRect findOpenSpot(int gridwidth = 1, int gridheight = 1, int startRow = 0, int startCol = 0, bool reversed = false, QString plugID = ""); - QRect findOpenSpot(QRect grid, QString plugID, bool recursive = false); - - QPoint posToGrid(QPoint pos){ - //This assumes a point in widget-relative coordinates - pos.setX( RoundUp(pos.x()/GRIDSIZE)); - pos.setY( RoundUp(pos.y()/GRIDSIZE)); - return pos; - } - - QRect geomToGrid(QRect geom, int grid = -1){ - if(grid<0){ - //use the current grid size - return QRect( RoundUp(geom.x()/GRIDSIZE), RoundUp(geom.y()/GRIDSIZE), \ - RoundUp(geom.width()/GRIDSIZE), RoundUp(geom.height()/GRIDSIZE) ); - }else{ - //use the input grid size - return QRect( RoundUp(geom.x()/((double) grid)), RoundUp(geom.y()/((double) grid)), \ - RoundUp(geom.width()/((double) grid)), RoundUp(geom.height()/((double) grid)) ); - } - } - - QRect gridToGeom(QRect grid){ - //This function incorporates the bottom/right edge matchins procedures (for incomplete last grid) - QRect geom(grid.x()*GRIDSIZE, grid.y()*GRIDSIZE, grid.width()*GRIDSIZE, grid.height()*GRIDSIZE); - //Now check the edge conditions (last right/bottom grid points might be smaller than GRIDSIZE) - QSize areaSize = desktopRect.size(); //use the size of the area instead of the geometry - because we need this in child coordinates like "geom" above - //qDebug() << "GridToGeom:" << grid << geom << "Area size:" << areaSize; - if(geom.right() > areaSize.width() && (geom.right()-areaSize.width()) areaSize.height() && (geom.bottom() -areaSize.height())setData(MIMETYPE, QString(type+"::::"+id).toLocal8Bit() ); - //If this is a desktop file - also add it to the generic URI list mimetype - if(id.startsWith("applauncher::")){ - QList urilist; - urilist << QUrl::fromLocalFile( id.section("---",0,0).section("::",1,50) ); - mime->setUrls(urilist); - } - //Create the drag structure - QDrag *drag = new QDrag(this); - drag->setMimeData(mime); - drag->exec(Qt::CopyAction); - } - - bool ValidGrid(QRect grid){ - //qDebug() << "Check Valid Grid:" << grid << RoundUp(this->width()/GRIDSIZE) << RoundUp(this->height()/GRIDSIZE); - //This just checks that the grid coordinates are not out of bounds - should still run ValidGeometry() below with the actual pixel geom - if(grid.x()<0 || grid.y()<0 || grid.width()<0 || grid.height()<0){ return false; } - else if( (grid.x()+grid.width()) > RoundUp(desktopRect.width()/GRIDSIZE) ){ return false; } - else if( (grid.y()+grid.height()) > RoundUp(desktopRect.height()/GRIDSIZE) ){ return false; } - return true; - } - - bool ValidGeometry(QString id, QRect geom){ - //First check that it is within the desktop area completely - // Note that "this->geometry()" is not in the same coordinate space as the geometry inputs - if(!QRect(0,0,desktopRect.width(), desktopRect.height()).contains(geom)){ return false; } - //Now check that it does not collide with any other items - for(int i=0; iwhatsThis()==id){ continue; } - else if(geom.intersects(ITEMS[i]->geometry())){ return false; } - } - return true; - } - - LDPlugin* ItemFromID(QString ID){ - for(int i=0; iwhatsThis()==ID){ return ITEMS[i]; } - } - return 0; - } - - void MovePlugin(LDPlugin* plug, QRect geom){ - plug->setGeometry( geom ); - plug->setFixedSize(geom.size()); //needed for some plugins - plug->savePluginGeometry(geom); - } - -private slots: - void reloadPlugins(bool ForceIconUpdate = false); - - void StartItemMove(QString ID){ - setupDrag(ID, "move"); - } - void StartItemResize(QString ID){ - setupDrag(ID, "resize"); - } - void RemoveItem(QString ID){ - //Special case - desktop file/dir link using the "applauncher" plugin - if(ID.startsWith("applauncher::")){ - QFileInfo info(ID.section("---",0,0).section("::",1,50) ); - if(info.exists() && info.absolutePath()==QDir::homePath()+"/Desktop"){ - qDebug() << "Deleting Desktop Item:" << info.absoluteFilePath(); - if(!info.isSymLink() && info.isDir()){ QProcess::startDetached("rm -r \""+info.absoluteFilePath()+"\""); } - else{ QFile::remove(info.absoluteFilePath()); } //just remove the file/symlink directly - emit PluginRemovedByUser(ID); - return; - } - } - //Any other type of plugin - for(int i=0; iwhatsThis()==ID){ - ITEMS[i]->Cleanup(); - ITEMS.takeAt(i)->deleteLater(); - break; - } - } - emit PluginRemovedByUser(ID); - } - -protected: - void focusInEvent(QFocusEvent *ev){ - this->lower(); //make sure we stay on the bottom of the window stack - QWidget::focusInEvent(ev); //do normal handling - } - void paintEvent(QPaintEvent*ev); - - //Need Drag and Drop functionality (internal movement) - void dragEnterEvent(QDragEnterEvent *ev){ - if(ev->mimeData()->hasFormat(MIMETYPE) ){ - ev->acceptProposedAction(); //allow this to be dropped here - }else if(ev->mimeData()->hasUrls()){ - ev->acceptProposedAction(); //allow this to be dropped here - }else{ - ev->ignore(); - } - } - - void dragMoveEvent(QDragMoveEvent *ev){ - if(ev->mimeData()->hasFormat(MIMETYPE) ){ - //Internal move/resize - Check for validity - QString act = QString( ev->mimeData()->data(MIMETYPE) ); - LDPlugin *item = ItemFromID(act.section("::::",1,50)); - //qDebug() << "Internal Move Event:" << act << ev->pos(); - if(item!=0){ - QRect geom = item->geometry(); - QPoint grid = posToGrid(ev->pos()); - if(act.section("::::",0,0)=="move"){ - QPoint diff = grid - posToGrid(geom.center()); //difference in grid coords - //qDebug() << "Move Event:" << "Diff:" << diff << "Geom:" << geom << grid << ev->pos(); - geom = geomToGrid(geom); //convert to grid coords - //qDebug() << "Move Event:" << "Old geom (grid):" << geom; - geom.moveTo( (geom.topLeft()+diff) ); - //qDebug() << " - After Move:" << geom; - bool valid = ValidGrid(geom); - if(valid){ - //Convert to pixel coordinates and check validity again - geom = gridToGeom(geom); //convert back to px coords with edge matching - valid = ValidGeometry(act.section("::::",1,50), geom); - } - if(valid){ - MovePlugin(item, geom); - //item->setGeometry(geom); - //item->setFixedSize(geom.size()); //needed due to resizing limitations and such for some plugins - ev->acceptProposedAction(); - //item->savePluginGeometry(geom); //save in pixel coords - }else{ ev->ignore(); } //invalid location - - }else{ - //Resize operation - QPoint diff = ev->pos() - (geom.center()-QPoint(1,1)); //need difference from center (pixels) - //Note: Use the 1x1 pixel offset to ensure that the center point is not exactly on a grid point intersection (2x2, 4x4, etc) - //qDebug() << "Resize Plugin:" << geom << grid << posToGrid(geom.center()) << diff; - geom = geomToGrid(geom); //convert to grid coordinates now - //qDebug() << " - Grid Geom:" << geom; - if(diff.x()<0){ geom.setLeft(ev->pos().x()/GRIDSIZE); } //expanding to the left (round down) - else if(diff.x()>0){ geom.setRight( ev->pos().x()/GRIDSIZE); } //expanding to the right (round down) - if(diff.y()<0){ geom.setTop( ev->pos().y()/GRIDSIZE); } //expanding above (round down) - else if(diff.y()>0){ geom.setBottom( ev->pos().y()/GRIDSIZE); } //expanding below (round down) - //qDebug() << " - Adjusted:" << geom; - bool valid = ValidGrid(geom); - if(valid){ - //Convert to pixel coordinates and check validity again - geom = gridToGeom(geom); //convert back to px coords with edge matching - valid = ValidGeometry(act.section("::::",1,50), geom); - } - if(valid){ - MovePlugin(item, geom); - //item->setGeometry(geom); - //item->setFixedSize(geom.size()); //needed due to resizing limitations and such for some plugins - ev->acceptProposedAction(); - //item->savePluginGeometry(geom); //save in pixel coords - }else{ ev->ignore(); } //invalid location - } - } - }else if(ev->mimeData()->hasUrls()){ - ev->acceptProposedAction(); //allow this to be dropped here - }else{ - ev->ignore(); - } - } - - void dropEvent(QDropEvent *ev){ - //QPoint grid = posToGrid(ev->pos()); - if(ev->mimeData()->hasFormat(MIMETYPE)){ - //Desktop Items getting moved around - already performed in the dragMoveEvent - ev->accept(); - }else if(ev->mimeData()->hasUrls()){ - ev->accept(); - //Files getting dropped here - QList urls = ev->mimeData()->urls(); - qDebug() << "Desktop Drop Event:" << urls; - for(int i=0; iignore(); - } - } - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LPanel.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/LPanel.cpp deleted file mode 100644 index 5df1fcb6..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LPanel.cpp +++ /dev/null @@ -1,399 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LPanel.h" -#include "LSession.h" -#include - -#include "panel-plugins/systemtray/LSysTray.h" - -#define DEBUG 0 - -LPanel::LPanel(QSettings *file, QString scr, int num, QWidget *parent) : QWidget(){ - //Take care of inputs - this->setMouseTracking(true); - hascompositer = false; //LUtils::isValidBinary("xcompmgr"); //NOT WORKING YET - xcompmgr issue with special window flags? - if(DEBUG){ qDebug() << " - Creating Panel:" << scr << num; } - bgWindow = parent; //save for later - //Setup the widget overlay for the entire panel to provide transparency effects - panelArea = new QWidget(this); - //panelArea->setAttribute(Qt::WA_TranslucentBackground); - QBoxLayout *tmp = new QBoxLayout(QBoxLayout::LeftToRight); - tmp->setContentsMargins(0,0,0,0); - this->setLayout(tmp); - tmp->addWidget(panelArea); - settings = file; - screenID = scr; - panelnum = num; //save for later - screen = LSession::desktop(); - QString screenID = QApplication::screens().at(Screen())->name(); - PPREFIX = "panel_"+screenID+"."+QString::number(num)+"/"; - defaultpanel = (LSession::handle()->screenGeom(Screen()).x()==0 && num==0); - horizontal=true; //use this by default initially - hidden = false; //use this by default - //Setup the panel - if(DEBUG){ qDebug() << " -- Setup Panel"; } - this->setContentsMargins(0,0,0,0); - this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - //panels cannot get keyboard focus otherwise it upsets the task manager window detection - //this->setAttribute(Qt::WA_X11DoNotAcceptFocus); - this->setAttribute(Qt::WA_X11NetWmWindowTypeDock); - this->setAttribute(Qt::WA_AlwaysShowToolTips); - this->setAttribute(Qt::WA_TranslucentBackground); - //this->setAttribute(Qt::WA_NoSystemBackground); - this->setAutoFillBackground(false); - this->setWindowFlags(Qt::FramelessWindowHint | Qt::CustomizeWindowHint | Qt::WindowStaysOnTopHint); - //this->setWindowFlags(Qt::X11BypassWindowManagerHint | Qt::WindowStaysOnTopHint); - - this->setWindowTitle("LuminaPanel"); - this->setObjectName("LuminaPanelBackgroundWidget"); - this->setStyleSheet("QToolButton::menu-indicator{ image: none; } QWidget#LuminaPanelBackgroundWidget{ background: transparent; }"); - panelArea->setObjectName("LuminaPanelColor"); - layout = new QBoxLayout(QBoxLayout::LeftToRight); - layout->setContentsMargins(0,0,0,0); - layout->setSpacing(1); - //layout->setSizeConstraint(QLayout::SetFixedSize); - panelArea->setLayout(layout); - //Set special window flags on the panel for proper usage - this->show(); - LSession::handle()->XCB->SetAsPanel(this->winId()); - LSession::handle()->XCB->SetAsSticky(this->winId()); - if(hascompositer){ - //qDebug() << "Enable Panel compositing"; - //this->setStyleSheet("QWidget#LuminaPanelBackgroundWidget{ background: transparent; }"); - //this->setWindowOpacity(0.5); //fully transparent background for the main widget - //panelArea->setWindowOpacity(1.0); //fully opaque for the widget on top (apply stylesheet transparencies) - } - QTimer::singleShot(1,this, SLOT(UpdatePanel()) ); - //connect(screen, SIGNAL(resized(int)), this, SLOT(UpdatePanel()) ); //in case the screen resolution changes -} - -LPanel::~LPanel(){ - -} - -int LPanel::Screen(){ - // Find the screen number associated with this ID - QList scrns = QApplication::screens(); - for(int i=0; iname() == screenID){ return i; } - } - return -1; -} - -void LPanel::prepareToClose(){ - //Go through and remove all the plugins - for(int i=0; iAboutToClose(); //any last cleanup for this plugin - layout->takeAt(i); //remove from the layout - PLUGINS.takeAt(i)->deleteLater(); //delete the actual widget - LSession::processEvents(); - i--; //need to back up one space to not miss another plugin - } - this->hide(); -} - -void LPanel::scalePanel(double xscale, double yscale){ - int ht = settings->value(PPREFIX+"height", 30).toInt(); //this is technically the distance into the screen from the edge - QString loc = settings->value(PPREFIX+"location","").toString().toLower(); - if(loc=="top" || loc=="bottom"){ - ht = qRound(ht*yscale); - }else{ - ht = qRound(ht*xscale); - } - settings->setValue(PPREFIX+"height", ht); - settings->sync(); - QTimer::singleShot(0, this, SLOT(UpdatePanel()) ); -} - -//=========== -// PUBLIC SLOTS -//=========== -void LPanel::UpdatePanel(bool geomonly){ - //Create/Update the panel as designated in the Settings file - settings->sync(); //make sure to catch external settings changes - //First set the geometry of the panel and send the EWMH message to reserve that space - if(DEBUG){ qDebug() << "Update Panel: Geometry only=" << geomonly << "Screen Size:" << LSession::handle()->screenGeom(Screen()); } - hidden = settings->value(PPREFIX+"hidepanel",false).toBool(); - QString loc = settings->value(PPREFIX+"location","").toString().toLower(); - if(loc.isEmpty() && defaultpanel){ loc="top"; } - if(loc=="top" || loc=="bottom"){ - horizontal=true; - layout->setAlignment(Qt::AlignLeft); - layout->setDirection(QBoxLayout::LeftToRight); - }else{ - horizontal=false; - layout->setAlignment(Qt::AlignTop); - layout->setDirection(QBoxLayout::TopToBottom); - } - int ht = qRound(settings->value(PPREFIX+"height", 30).toDouble()); //this is technically the distance into the screen from the edge - fullwidth = ht; //save this for later - if(ht<=1){ ht = 30; } //some kind of error in the saved height - use the default value - int hidesize = qRound(ht*0.01); //use 1% of the panel size - if(hidesize<2){ hidesize=2; } //minimum of 2 pixels (need space for the mouse to go over it) - if(hidden){ viswidth = hidesize; } - else{ viswidth = ht; } - if(DEBUG){ qDebug() << "Hidden Panel size:" << hidesize << "pixels"; } - //qDebug() << " - set Geometry"; - int xwid = LSession::handle()->screenGeom(Screen()).width(); - int xhi = LSession::handle()->screenGeom(Screen()).height(); - int xloc = LSession::handle()->screenGeom(Screen()).x(); - int yloc = LSession::handle()->screenGeom(Screen()).y(); - double panelPercent = settings->value(PPREFIX+"lengthPercent",100).toInt(); - if(panelPercent<1 || panelPercent>100){ panelPercent = 100; } - panelPercent = panelPercent/100.0; - QString panelPinLoc = settings->value(PPREFIX+"pinLocation","center").toString().toLower(); //[left/right/center] possible values (assume center otherwise) - if(DEBUG){ qDebug() << " - Panel settings:" << QString::number(panelPercent)+QString("%") << panelPinLoc << loc; } - //xloc=xoffset; - if(loc=="top"){ //top of screen - QSize sz = QSize(xwid*panelPercent, ht); - if(panelPinLoc=="left"){} // no change to xloc - else if(panelPinLoc=="right"){ xloc = xloc+xwid-sz.width(); } - else{ xloc = xloc+((xwid-sz.width())/2) ; } //centered - //qDebug() << " - Panel Sizing:" << xloc << sz; - this->setMinimumSize(sz); - this->setMaximumSize(sz); - this->setGeometry(xloc,yloc,sz.width(), sz.height()); - //qDebug() << " - Reserve Panel Localation"; - if(!hidden){ LSession::handle()->XCB->ReserveLocation(this->winId(), this->geometry(), "top"); } - else{ - LSession::handle()->XCB->ReserveLocation(this->winId(), QRect(xloc, yloc, this->width(), hidesize), "top"); - hidepoint = QPoint(xloc, yloc); - showpoint = QPoint(xloc, yloc); - this->move(hidepoint); - this->resize( this->width(), viswidth); - } - }else if(loc=="bottom"){ //bottom of screen - QSize sz = QSize(xwid*panelPercent, ht); - if(panelPinLoc=="left"){} // no change to xloc - else if(panelPinLoc=="right"){ xloc = xloc+xwid-sz.width(); } - else{ xloc = xloc+((xwid-sz.width())/2) ; } //centered - this->setMinimumSize(sz); - this->setMaximumSize(sz); - this->setGeometry(xloc,yloc+xhi-ht,sz.width(), ht ); - if(!hidden){ LSession::handle()->XCB->ReserveLocation(this->winId(), this->geometry(), "bottom"); } - else{ - LSession::handle()->XCB->ReserveLocation(this->winId(), QRect(xloc,yloc+ xhi-hidesize, this->width(), hidesize), "bottom"); - hidepoint = QPoint(xloc, yloc+xhi-hidesize); - showpoint = QPoint(xloc, yloc+xhi-ht); - this->move(hidepoint); //Could bleed over onto the screen below - this->resize( this->width(), viswidth); - } - }else if(loc=="left"){ //left side of screen - QSize sz = QSize(ht, xhi*panelPercent); - if(panelPinLoc=="left"){} //this is actually the top (left of center in length dimension) - else if(panelPinLoc=="right"){ yloc = yloc+xhi-sz.height(); } - else{ yloc = yloc+((xhi-sz.height())/2) ; } //centered - this->setMinimumSize(sz); - this->setMaximumSize(sz); - this->setGeometry(xloc,yloc, ht, sz.height()); - if(!hidden){ LSession::handle()->XCB->ReserveLocation(this->winId(), this->geometry(), "left"); } - else{ - LSession::handle()->XCB->ReserveLocation(this->winId(), QRect(xloc, yloc, hidesize, sz.height()), "left"); - hidepoint = QPoint(xloc, yloc); - showpoint = QPoint(xloc, yloc); - this->move(hidepoint); //Could bleed over onto the screen left - this->resize( viswidth, this->height()); - } - }else{ //right side of screen - QSize sz = QSize(ht, xhi*panelPercent); - if(panelPinLoc=="left"){} //this is actually the top (left of center in length dimension) - else if(panelPinLoc=="right"){ yloc = yloc+xhi-sz.height(); } - else{ yloc = yloc+((xhi-sz.height())/2) ; } //centered - this->setMinimumSize(sz); - this->setMaximumSize(sz); - this->setGeometry(xloc+xwid-ht,yloc,ht, sz.height()); - if(!hidden){ LSession::handle()->XCB->ReserveLocation(this->winId(), this->geometry(), "right"); } - else{ - LSession::handle()->XCB->ReserveLocation(this->winId(), QRect(xloc+xwid-hidesize, yloc, hidesize, sz.height()), "right"); - hidepoint = QPoint(xloc+xwid-hidesize, yloc); - showpoint = QPoint(xloc+xwid-ht, yloc); - this->move(hidepoint); //Could bleed over onto the screen right - this->resize( viswidth, this->height()); - } - } - if(DEBUG){ qDebug() << " - Done with panel geometry"; } - //Double check that the "sticky" bit is set on the window state - bool needsticky = !LSession::handle()->XCB->WM_Get_Window_States(this->winId()).contains(LXCB::S_STICKY); - if(needsticky){ LSession::handle()->XCB->SetAsSticky(this->winId()); } - if(geomonly){ return; } - //Now update the appearance of the toolbar - if(settings->value(PPREFIX+"customColor", false).toBool()){ - QString color = settings->value(PPREFIX+"color", "rgba(255,255,255,160)").toString(); - QString style = "QWidget#LuminaPanelColor{ background: %1; border-radius: 3px; border: 1px solid %1; }"; - style = style.arg(color); - panelArea->setStyleSheet(style); - }else{ - panelArea->setStyleSheet(""); //clear it and use the one from the theme - } - - //Then go through the plugins and create them as necessary - QStringList plugins = settings->value(PPREFIX+"pluginlist", QStringList()).toStringList(); - /*if(defaultpanel && plugins.isEmpty()){ - plugins << "userbutton" << "taskmanager" << "spacer" << "systemtray" << "clock" << "systemdashboard"; - }*/ - if(DEBUG){ qDebug() << " - Initialize Plugins: " << plugins; } - for(int i=0; inumber())+"."+QString::number(num)) ){ - num++; - } - - plugins[i] = plugins[i]+"---"+QString::number(Screen())+"."+QString::number(this->number())+"."+QString::number(num); - //qDebug() << "Adjust Plugin ID:" << plugins[i]; - } - //See if this plugin is already there or in a different spot - bool found = false; - for(int p=0; ptype()==plugins[i]){ - found = true; //already exists - //Make sure the plugin layout has the correct orientation - if(horizontal){PLUGINS[p]->layout()->setDirection(QBoxLayout::LeftToRight); } - else{ PLUGINS[p]->layout()->setDirection(QBoxLayout::TopToBottom); } - PLUGINS[p]->OrientationChange(); - //Now check the location of the plugin in the panel - if(p!=i){ //wrong place in the panel - layout->takeAt(p); //remove the item from the current location - layout->insertWidget(i, PLUGINS[p]); //add the item into the correct location - PLUGINS.move(p,i); //move the identifier in the list to match - } - break; - } - } - if(!found){ - //New Plugin - if(DEBUG){ qDebug() << " -- New Plugin:" << plugins[i] << i; } - LPPlugin *plug = NewPP::createPlugin(plugins[i], panelArea, horizontal); - if(plug != 0){ - PLUGINS.insert(i, plug); - layout->insertWidget(i, PLUGINS[i]); - connect(plug, SIGNAL(MenuClosed()), this, SLOT(checkPanelFocus())); - }else{ - //invalid plugin type - plugins.removeAt(i); //remove this invalid plugin from the list - i--; //make sure we don't miss the next item with the re-order - } - } - //LSession::processEvents(); - } - //Now remove any extra plugins from the end - //qDebug() << "plugins:" << plugins; - //qDebug() << "PLUGINS length:" << PLUGINS.length(); - for(int i=0; itype())){ continue; } //good plugin - skip it - if(DEBUG){ qDebug() << " -- Remove Plugin: " << PLUGINS[i]->type(); } - //If this is the system tray - stop it first - if( PLUGINS[i]->type().startsWith("systemtray---") ){ - static_cast(PLUGINS[i])->stop(); - } - layout->takeAt(i); //remove from the layout - PLUGINS.takeAt(i)->deleteLater(); //delete the actual widget - //LSession::processEvents(); - i--; //need to back up one space to not miss another plugin - } - this->update(); - this->show(); //make sure the panel is visible now - if(hidden){ this->move(hidepoint); } - //Now go through and send the orientation update signal to each plugin - for(int i=0; isize(); - if( !this->geometry().contains(QCursor::pos()) ){ - //Move the panel back to it's "hiding" spot - if(hidden){ - QSize sz(horizontal ? this->width() : viswidth, horizontal ? viswidth : this->height() ); - this->setMinimumSize(sz); - this->setMaximumSize(sz); - this->setGeometry( QRect(hidepoint, sz) ); - } - //Re-active the old window - if(LSession::handle()->activeWindow()!=0){ - LSession::handle()->XCB->ActivateWindow(LSession::handle()->activeWindow()); - } - }else if(hidden){ - QSize sz(horizontal ? this->width() : fullwidth, horizontal ? fullwidth : this->height() ); - this->setMinimumSize(sz); - this->setMaximumSize(sz); - this->setGeometry( QRect(showpoint, sz) ); - } -} - -//=========== -// PROTECTED -//=========== -void LPanel::resizeEvent(QResizeEvent *event){ - QWidget::resizeEvent(event); - for(int i=0; iOrientationChange(); } -} - -void LPanel::paintEvent(QPaintEvent *event){ - if(!hascompositer){ - QPainter *painter = new QPainter(this); - //qDebug() << "Paint Panel:" << PPREFIX; - //Make sure the base background of the event rectangle is the associated rectangle from the BGWindow - QRect rec = event->rect();//this->geometry(); //start with the global geometry of the panel - rec.adjust(-1,-1,2,2); //add 1 more pixel on each side - //Need to translate that rectangle to the background image coordinates - //qDebug() << " - Rec:" << rec << hidden << this->geometry() << bgWindow->geometry(); - rec.moveTo( bgWindow->mapFromGlobal( this->mapToGlobal(rec.topLeft()) ) ); //(rec.x()-LSession::handle()->screenGeom(Screen()).x(), rec.y()-LSession::handle()->screenGeom(Screen()).y() ); - //qDebug() << " - Adjusted Window Rec:" << rec; - painter->drawPixmap(event->rect().adjusted(-1,-1,2,2), bgWindow->grab(rec)); - //painter->drawPixmap(event->rect().adjusted(-1,-1,2,2), QApplication::screens().at(Screen())->grabWindow(QX11Info::appRootWindow(), rec.x(), rec.y(), rec.width(), rec.height()) ); - delete(painter); - } - QWidget::paintEvent(event); //now pass the event along to the normal painting event -} - -void LPanel::enterEvent(QEvent *event){ - //qDebug() << "Panel Enter Event:"; - checkPanelFocus(); - /*if(hidden){ - //Move the panel out so it is fully available - this->move(showpoint); - this->resize( horizontal ? this->width() : fullwidth, horizontal ? fullwidth : this->height() ); - this->update(); - }*/ - //this->activateWindow(); - event->accept(); //just to quiet the compile warning -} - -void LPanel::leaveEvent(QEvent *event){ - /*qDebug() << "Panel Leave Event:"; - qDebug() << "Panel Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height() ; - QPoint pt = QCursor::pos(); - qDebug() << "Mouse Point (global):" << pt.x() << pt.y(); - //pt = this->mapFromGlobal(pt); - //qDebug() << "Mouse Point (local):" << pt.x() << pt.y(); - qDebug() << "Contained:" << this->geometry().contains(pt);*/ - checkPanelFocus(); - QWidget::leaveEvent(event); - //event->accept(); //just to quiet the compile warning -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LPanel.h b/src-qt5/core/lumina-desktop-unified/src-DE/LPanel.h deleted file mode 100644 index bcea8eaf..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LPanel.h +++ /dev/null @@ -1,81 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is the generic class for creating a full-width panel that stays -// on top of all other windows (top or bottom of the screen only) -//=========================================== -#ifndef _LUMINA_DESKTOP_PANEL_H -#define _LUMINA_DESKTOP_PANEL_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "panel-plugins/NewPP.h" -#include "panel-plugins/LPPlugin.h" - -#include -#include - -class LPanel : public QWidget{ - Q_OBJECT -private: - QBoxLayout *layout; - QSettings *settings; - QString PPREFIX; //internal prefix for all settings - QDesktopWidget *screen; - QWidget *bgWindow, *panelArea; - //QRect hidegeom, showgeom; //for hidden panels - QPoint hidepoint, showpoint; //for hidden panels: locations when hidden/visible - bool defaultpanel, horizontal, hidden, hascompositer; - QString screenID; - int panelnum; - int viswidth, fullwidth; - QList PLUGINS; - - int Screen(); //Turn the screenID into the appropriate number - -public: - LPanel(QSettings *file, QString scr = 0, int num =0, QWidget *parent=0); //settings file, screen number, panel number - ~LPanel(); - - int number(){ - return panelnum; - } - - QString prefix(){ - return PPREFIX; - } - - int visibleWidth(){ - return viswidth; - } - void prepareToClose(); - void scalePanel(double xscale, double yscale); - -public slots: - void UpdatePanel(bool geomonly = false); //Load the settings file and update the panel appropriately - void UpdateLocale(); //Locale Changed externally - void UpdateTheme(); //Theme Changed externally - -private slots: - void checkPanelFocus(); - -protected: - void resizeEvent(QResizeEvent *event); - void paintEvent(QPaintEvent *event); - void enterEvent(QEvent *event); - void leaveEvent(QEvent *event); -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LSession.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/LSession.cpp deleted file mode 100644 index 0387555a..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LSession.cpp +++ /dev/null @@ -1,798 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LSession.h" -#include - -#include -#include -#include -#include "LXcbEventFilter.h" -#include "BootSplash.h" - -//LibLumina X11 class -#include -#include - -#include //for usleep() usage - -#ifndef DEBUG -#define DEBUG 0 -#endif - -XCBEventFilter *evFilter = 0; - -LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lumina-desktop"){ - if(this->isPrimaryProcess()){ - connect(this, SIGNAL(InputsAvailable(QStringList)), this, SLOT(NewCommunication(QStringList)) ); - this->setApplicationName("Lumina Desktop Environment"); - this->setApplicationVersion( LDesktopUtils::LuminaDesktopVersion() ); - this->setOrganizationName("LuminaDesktopEnvironment"); - this->setQuitOnLastWindowClosed(false); //since the LDesktop's are not necessarily "window"s - //Enabled a few of the simple effects by default - this->setEffectEnabled( Qt::UI_AnimateMenu, true); - this->setEffectEnabled( Qt::UI_AnimateCombo, true); - this->setEffectEnabled( Qt::UI_AnimateTooltip, true); - //this->setAttribute(Qt::AA_UseDesktopOpenGL); - //this->setAttribute(Qt::AA_UseHighDpiPixmaps); //allow pixmaps to be scaled up as well as down - //this->setStyle( new MenuProxyStyle); //QMenu icon size override - SystemTrayID = 0; VisualTrayID = 0; - sysWindow = 0; - TrayDmgEvent = 0; - TrayDmgError = 0; - lastActiveWin = 0; - cleansession = true; - TrayStopping = false; - screenTimer = new QTimer(this); - screenTimer->setSingleShot(true); - screenTimer->setInterval(50); - connect(screenTimer, SIGNAL(timeout()), this, SLOT(updateDesktops()) ); - for(int i=1; iinstallNativeEventFilter( evFilter ); - connect(this, SIGNAL(screenAdded(QScreen*)), this, SLOT(screensChanged()) ); - connect(this, SIGNAL(screenRemoved(QScreen*)), this, SLOT(screensChanged()) ); - connect(this, SIGNAL(primaryScreenChanged(QScreen*)), this, SLOT(screensChanged()) ); - } //end check for primary process -} - -LSession::~LSession(){ - if(this->isPrimaryProcess()){ - //WM->stopWM(); - for(int i=0; ideleteLater(); - } - //delete WM; - settingsmenu->deleteLater(); - appmenu->deleteLater(); - delete currTranslator; - if(mediaObj!=0){delete mediaObj;} - } -} - -void LSession::setupSession(){ - //Seed random number generator (if needed) - qsrand( QTime::currentTime().msec() ); - - BootSplash splash; - splash.showScreen("init"); - qDebug() << "Initializing Session"; - if(QFile::exists("/tmp/.luminastopping")){ QFile::remove("/tmp/.luminastopping"); } - QTime* timer = 0; - //if(DEBUG){ timer = new QTime(); timer->start(); qDebug() << " - Init srand:" << timer->elapsed();} - - //Setup the QSettings default paths - splash.showScreen("settings"); - if(DEBUG){ qDebug() << " - Init QSettings:" << timer->elapsed();} - sessionsettings = new QSettings("lumina-desktop", "sessionsettings"); - DPlugSettings = new QSettings("lumina-desktop","pluginsettings/desktopsettings"); - //Load the proper translation files - if(sessionsettings->value("ForceInitialLocale",false).toBool()){ - //Some system locale override it in place - change the env first - LUtils::setLocaleEnv( sessionsettings->value("InitLocale/LANG","").toString(), \ - sessionsettings->value("InitLocale/LC_MESSAGES","").toString(), \ - sessionsettings->value("InitLocale/LC_TIME","").toString(), \ - sessionsettings->value("InitLocale/LC_NUMERIC","").toString(), \ - sessionsettings->value("InitLocale/LC_MONETARY","").toString(), \ - sessionsettings->value("InitLocale/LC_COLLATE","").toString(), \ - sessionsettings->value("InitLocale/LC_CTYPE","").toString() ); - } - currTranslator = LUtils::LoadTranslation(this, "lumina-desktop"); -//use the system settings - //Setup the user's lumina settings directory as necessary - splash.showScreen("user"); - if(DEBUG){ qDebug() << " - Init User Files:" << timer->elapsed();} - checkUserFiles(); //adds these files to the watcher as well - - //Initialize the internal variables - DESKTOPS.clear(); - - //Start the background system tray - splash.showScreen("systray"); - if(DEBUG){ qDebug() << " - Init System Tray:" << timer->elapsed();} - startSystemTray(); - - //Initialize the global menus - qDebug() << " - Initialize system menus"; - splash.showScreen("apps"); - if(DEBUG){ qDebug() << " - Init AppMenu:" << timer->elapsed();} - appmenu = new AppMenu(); - - splash.showScreen("menus"); - if(DEBUG){ qDebug() << " - Init SettingsMenu:" << timer->elapsed();} - settingsmenu = new SettingsMenu(); - if(DEBUG){ qDebug() << " - Init SystemWindow:" << timer->elapsed();} - sysWindow = new SystemWindow(); - - //Initialize the desktops - splash.showScreen("desktop"); - if(DEBUG){ qDebug() << " - Init Desktops:" << timer->elapsed();} - desktopFiles = QDir(QDir::homePath()+"/Desktop").entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); - updateDesktops(); - for(int i=0; i<6; i++){ LSession::processEvents(); } //Run through this a few times so the interface systems get up and running - - //Now setup the system watcher for changes - splash.showScreen("final"); - qDebug() << " - Initialize file system watcher"; - if(DEBUG){ qDebug() << " - Init QFileSystemWatcher:" << timer->elapsed();} - watcher = new QFileSystemWatcher(this); - QString confdir = sessionsettings->fileName().section("/",0,-2); - watcherChange(sessionsettings->fileName() ); - watcherChange( confdir+"/desktopsettings.conf" ); - watcherChange( confdir+"/fluxbox-init" ); - watcherChange( confdir+"/fluxbox-keys" ); - watcherChange( confdir+"/favorites.list" ); - //Try to watch the localized desktop folder too - if(QFile::exists(QDir::homePath()+"/"+tr("Desktop"))){ watcherChange( QDir::homePath()+"/"+tr("Desktop") ); } - watcherChange( QDir::homePath()+"/Desktop" ); - - //connect internal signals/slots - connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherChange(QString)) ); - connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(watcherChange(QString)) ); - connect(this, SIGNAL(aboutToQuit()), this, SLOT(SessionEnding()) ); - if(DEBUG){ qDebug() << " - Init Finished:" << timer->elapsed(); delete timer;} - for(int i=0; i<4; i++){ LSession::processEvents(); } //Again, just a few event loops here so thing can settle before we close the splash screen - //launchStartupApps(); - QTimer::singleShot(500, this, SLOT(launchStartupApps()) ); - splash.hide(); - LSession::processEvents(); - splash.close(); - LSession::processEvents(); -} - -void LSession::CleanupSession(){ - //Close any running applications and tray utilities (Make sure to keep the UI interactive) - LSession::processEvents(); - QDateTime time = QDateTime::currentDateTime(); - qDebug() << "Start closing down the session: " << time.toString( Qt::SystemLocaleShortDate); - //Create a temporary flag to prevent crash dialogs from opening during cleanup - LUtils::writeFile("/tmp/.luminastopping",QStringList() << "yes", true); - //Start the logout chimes (if necessary) - LOS::setAudioVolume( LOS::audioVolume() ); //make sure the audio volume is saved in the backend for the next login - bool playaudio = sessionsettings->value("PlayLogoutAudio",true).toBool(); - if( playaudio ){ playAudioFile(LOS::LuminaShare()+"Logout.ogg"); } - //Stop the background system tray (detaching/closing apps as necessary) - stopSystemTray(!cleansession); - //Now perform any other cleanup - if(cleansession){ - //Close any open windows - //qDebug() << " - Closing any open windows"; - QList WL = XCB->WindowList(true); - for(int i=0; iWindowClass(WL[i]) << WL[i]; - XCB->CloseWindow(WL[i]); - LSession::processEvents(); - } - //Now wait a moment for things to close down before quitting - for(int i=0; i<20; i++){ LSession::processEvents(); usleep(25); } //1/2 second pause - //Kill any remaining windows - WL = XCB->WindowList(true); //all workspaces - for(int i=0; iWindowClass(WL[i]) << WL[i]; - XCB->KillClient(WL[i]); - LSession::processEvents(); - } - } - evFilter->StopEventHandling(); - //Stop the window manager - //qDebug() << " - Stopping the window manager"; - //WM->stopWM(); - //Now close down the desktop - qDebug() << " - Closing down the desktop elements"; - for(int i=0; iprepareToClose(); - //don't actually close them yet - that will happen when the session exits - // this will leave the wallpapers up for a few moments (preventing black screens) - } - //Now wait a moment for things to close down before quitting - if(playaudio){ - //wait a max of 5 seconds for audio to finish - bool waitmore = true; - for(int i=0; i<100 && waitmore; i++){ - usleep(50000); //50ms = 50000 us - waitmore = (mediaObj->state()==QMediaPlayer::PlayingState); - LSession::processEvents(); - } - if(waitmore){ mediaObj->stop(); } //timed out - }else{ - for(int i=0; i<20; i++){ LSession::processEvents(); usleep(25000); } //1/2 second pause - } - //Clean up the temporary flag - if(QFile::exists("/tmp/.luminastopping")){ QFile::remove("/tmp/.luminastopping"); } -} - -int LSession::VersionStringToNumber(QString version){ - version = version.section("-",0,0); //trim any extra labels off the end - int maj, mid, min; //major/middle/minor version numbers (..) - maj = mid = min = 0; - bool ok = true; - maj = version.section(".",0,0).toInt(&ok); - if(ok){ mid = version.section(".",1,1).toInt(&ok); }else{ maj = 0; } - if(ok){ min = version.section(".",2,2).toInt(&ok); }else{ mid = 0; } - if(!ok){ min = 0; } - //Now assemble the number - //NOTE: This format allows numbers to be anywhere from 0->999 without conflict - return (maj*1000000 + mid*1000 + min); -} - -void LSession::NewCommunication(QStringList list){ - if(DEBUG){ qDebug() << "New Communications:" << list; } - for(int i=0; ivalue("EnableNumlock",false).toBool()){ - QProcess::startDetached("numlockx on"); - }else{ - QProcess::startDetached("numlockx off"); - } - } - int tmp = LOS::ScreenBrightness(); - if(tmp>0){ - LOS::setScreenBrightness( tmp ); - qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%"; - } - QProcess::startDetached("nice lumina-open -autostart-apps"); - - //Re-load the screen brightness and volume settings from the previous session - // Wait until after the XDG-autostart functions, since the audio system might be started that way - qDebug() << " - Loading previous settings"; - tmp = LOS::audioVolume(); - LOS::setAudioVolume(tmp); - qDebug() << " - - Audio Volume:" << QString::number(tmp)+"%"; - - //Now play the login music since we are finished - if(sessionsettings->value("PlayStartupAudio",true).toBool()){ - //Make sure to re-set the system volume to the last-used value at outset - int vol = LOS::audioVolume(); - if(vol>=0){ LOS::setAudioVolume(vol); } - LSession::playAudioFile(LOS::LuminaShare()+"Login.ogg"); - } - qDebug() << " - Finished with startup routines"; -} - -void LSession::StartLogout(){ - CleanupSession(); - QCoreApplication::exit(0); -} - -void LSession::StartShutdown(bool skipupdates){ - CleanupSession(); - LOS::systemShutdown(skipupdates); - QCoreApplication::exit(0); -} - -void LSession::StartReboot(bool skipupdates){ - CleanupSession(); - LOS::systemRestart(skipupdates); - QCoreApplication::exit(0); -} - -void LSession::reloadIconTheme(){ - //Wait a moment for things to settle before sending out the signal to the interfaces - QApplication::processEvents(); - QApplication::processEvents(); - emit IconThemeChanged(); -} - -void LSession::watcherChange(QString changed){ - if(DEBUG){ qDebug() << "Session Watcher Change:" << changed; } - //if(changed.endsWith("fluxbox-init") || changed.endsWith("fluxbox-keys")){ refreshWindowManager(); } - if(changed.endsWith("sessionsettings.conf") ){ - sessionsettings->sync(); - //qDebug() << "Session Settings Changed"; - if(sessionsettings->contains("Qt5_theme_engine")){ - QString engine = sessionsettings->value("Qt5_theme_engine","").toString(); - //qDebug() << "Set Qt5 theme engine: " << engine; - if(engine.isEmpty()){ unsetenv("QT_QPA_PLATFORMTHEME"); } - else{ setenv("QT_QPA_PLATFORMTHEME", engine.toUtf8().data(),1); } - } - emit SessionConfigChanged(); - }else if(changed.endsWith("desktopsettings.conf") ){ emit DesktopConfigChanged(); } - else if(changed == QDir::homePath()+"/Desktop" || changed == QDir::homePath()+"/"+tr("Desktop") ){ - desktopFiles = QDir(changed).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs ,QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); - if(DEBUG){ qDebug() << "New Desktop Files:" << desktopFiles.length(); } - emit DesktopFilesChanged(); - }else if(changed.endsWith("favorites.list")){ emit FavoritesChanged(); } - //Now ensure this file was not removed from the watcher - if(!watcher->files().contains(changed) && !watcher->directories().contains(changed)){ - if(!QFile::exists(changed)){ - //Create the file really quick to ensure it can be watched - //TODO - } - watcher->addPath(changed); - } -} - -void LSession::screensChanged(){ - qDebug() << "Screen Number Changed"; - if(screenTimer->isActive()){ screenTimer->stop(); } - screenTimer->start(); -} - -void LSession::screenResized(int scrn){ - qDebug() << "Screen Resized:" << scrn; - if(screenTimer->isActive()){ screenTimer->stop(); } - screenTimer->start(); -} - -void LSession::checkWindowGeoms(){ - //Only do one window per run (this will be called once per new window - with time delays between) - if(checkWin.isEmpty()){ return; } - WId win = checkWin.takeFirst(); - if(RunningApps.contains(win) ){ //just to make sure it did not close during the delay - adjustWindowGeom( win ); - } -} - -void LSession::checkUserFiles(){ - //internal version conversion examples: - // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] - QString OVS = sessionsettings->value("DesktopVersion","0").toString(); //Old Version String - bool changed = LDesktopUtils::checkUserFiles(OVS); - if(changed){ - //Save the current version of the session to the settings file (for next time) - sessionsettings->setValue("DesktopVersion", this->applicationVersion()); - } -} - -void LSession::refreshWindowManager(){ - LUtils::runCmd("touch \""+QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-init\"" ); -} - -void LSession::updateDesktops(){ - qDebug() << " - Update Desktops"; - QDesktopWidget *DW = this->desktop(); - int sC = DW->screenCount(); - qDebug() << " Screen Count:" << sC; - qDebug() << " DESKTOPS Length:" << DESKTOPS.length(); - if(sC<1){ return; } //stop here - no screens available temporarily (displayport/4K issue) - - for(int i=0; iscreenGeometry(i); } - - bool firstrun = (DESKTOPS.length()==0); - bool numchange = DESKTOPS.length()!=sC; - - // If the screen count is changing on us - if ( sC != DW->screenCount() ) { - qDebug() << "Screen Count changed while running"; - return; - } - - //First clean up any current desktops - QList dnums; //keep track of which screens are already managed - QList geoms; - for(int i=0; iScreen() < 0 || DESKTOPS[i]->Screen() >= sC || geoms.contains(DW->screenGeometry(DESKTOPS[i]->Screen())) ) { - //qDebug() << " - Close desktop:" << i; - qDebug() << " - Close desktop on screen:" << DESKTOPS[i]->Screen(); - DESKTOPS[i]->prepareToClose(); - DESKTOPS.takeAt(i)->deleteLater(); - i--; - } else { - //qDebug() << " - Show desktop:" << i; - qDebug() << " - Show desktop on screen:" << DESKTOPS[i]->Screen(); - DESKTOPS[i]->UpdateGeometry(); - DESKTOPS[i]->show(); - dnums << DESKTOPS[i]->Screen(); - geoms << DW->screenGeometry(DESKTOPS[i]->Screen()); - } - } - - //Now add any new desktops - for(int i=0; iscreenGeometry(i)) ){ - //Start the desktop on this screen - qDebug() << " - Start desktop on screen:" << i; - DESKTOPS << new LDesktop(i); - geoms << DW->screenGeometry(i); - } - } - - //Make sure fluxbox also gets prompted to re-load screen config if the number of screens changes in the middle of a session - if(numchange && !firstrun) { - qDebug() << "Update WM"; - refreshWindowManager(); - } - - //Make sure all the background windows are registered on the system as virtual roots - QTimer::singleShot(100,this, SLOT(registerDesktopWindows())); -} - -void LSession::registerDesktopWindows(){ - QList wins; - for(int i=0; ibackgroundID(); - } - XCB->RegisterVirtualRoots(wins); -} - -void LSession::adjustWindowGeom(WId win, bool maximize){ - //return; //temporary disable - if(DEBUG){ qDebug() << "AdjustWindowGeometry():" << win << maximize << XCB->WindowClass(win); } - if(XCB->WindowIsFullscreen(win) >=0 ){ return; } //don't touch it - //Quick hack for making sure that new windows are not located underneath any panels - // Get the window location - QRect geom = XCB->WindowGeometry(win, false); - //Get the frame size - QList frame = XCB->WindowFrameGeometry(win); //[top,bottom,left,right] sizes of the frame - //Calculate the full geometry (window + frame) - QRect fgeom = QRect(geom.x()-frame[2], geom.y()-frame[0], geom.width()+frame[2]+frame[3], geom.height()+frame[0]+frame[1]); - if(DEBUG){ - qDebug() << "Check Window Geometry:" << XCB->WindowClass(win) << !geom.isNull() << geom << fgeom; - } - if(geom.isNull()){ return; } //Could not get geometry for some reason - //Get the available geometry for the screen the window is on - QRect desk; - for(int i=0; idesktop()->screenGeometry(DESKTOPS[i]->Screen()).contains(geom.center()) ){ - //Window is on this screen - if(DEBUG){ qDebug() << " - On Screen:" << DESKTOPS[i]->Screen(); } - desk = DESKTOPS[i]->availableScreenGeom(); - if(DEBUG){ qDebug() << " - Screen Geom:" << desk; } - break; - } - } - if(desk.isNull()){ return; } //Unable to determine screen - //Adjust the window location if necessary - if(maximize){ - if(DEBUG){ qDebug() << " - Maximizing New Window:" << desk.width() << desk.height(); } - geom = desk; //Use the full screen - XCB->MoveResizeWindow(win, geom); - XCB->MaximizeWindow(win, true); //directly set the appropriate "maximized" flags (bypassing WM) - - }else if(!desk.contains(fgeom) ){ - //Adjust origin point for left/top margins - if(fgeom.y() < desk.y()){ geom.moveTop(desk.y()+frame[0]); fgeom.moveTop(desk.y()); } //move down to the edge (top panel) - if(fgeom.x() < desk.x()){ geom.moveLeft(desk.x()+frame[2]); fgeom.moveLeft(desk.x()); } //move right to the edge (left panel) - //Adjust size for bottom margins (within reason, since window titles are on top normally) - // if(geom.right() > desk.right() && (geom.width() > 100)){ geom.setRight(desk.right()); } - if(fgeom.bottom() > desk.bottom() && geom.height() > 10){ - if(DEBUG){ qDebug() << "Adjust Y:" << fgeom << geom << desk; } - int diff = fgeom.bottom()-desk.bottom(); //amount of overlap - if(DEBUG){ qDebug() << "Y-Diff:" << diff; } - if(diff < 0){ diff = -diff; } //need a positive value - if( (fgeom.height()+ diff)< desk.height()){ - //just move the window - there is room for it above - geom.setBottom(desk.bottom()-frame[1]); - fgeom.setBottom(desk.bottom()); - }else if(geom.height() > diff){ //window bigger than the difference - //Need to resize the window - keeping the origin point the same - geom.setHeight( geom.height()-diff-1 ); //shrink it by the difference (need an extra pixel somewhere) - fgeom.setHeight( fgeom.height()-diff ); - } - } - //Now move/resize the window - if(DEBUG){ - qDebug() << " - New Geom:" << geom << fgeom; - } - XCB->WM_Request_MoveResize_Window(win, geom); - } - -} - -void LSession::SessionEnding(){ - stopSystemTray(); //just in case it was not stopped properly earlier -} - -//=============== -// SYSTEM ACCESS -//=============== -void LSession::LaunchApplication(QString cmd){ - LSession::setOverrideCursor(QCursor(Qt::BusyCursor)); - QProcess::startDetached(cmd); -} - -QFileInfoList LSession::DesktopFiles(){ - return desktopFiles; -} - -QRect LSession::screenGeom(int num){ - if(num < 0 || num >= this->desktop()->screenCount() ){ return QRect(); } - QRect geom = this->desktop()->screenGeometry(num); - return geom; -} - -AppMenu* LSession::applicationMenu(){ - return appmenu; -} - -SettingsMenu* LSession::settingsMenu(){ - return settingsmenu; -} - -QSettings* LSession::sessionSettings(){ - return sessionsettings; -} - -QSettings* LSession::DesktopPluginSettings(){ - return DPlugSettings; -} - -WId LSession::activeWindow(){ - //Check the last active window pointer first - WId active = XCB->ActiveWindow(); - //qDebug() << "Check Active Window:" << active << lastActiveWin; - if(RunningApps.contains(active)){ lastActiveWin = active; } - else if(RunningApps.contains(lastActiveWin) && XCB->WindowState(lastActiveWin) >= LXCB::VISIBLE){} //no change needed - else if(RunningApps.contains(lastActiveWin) && RunningApps.length()>1){ - int start = RunningApps.indexOf(lastActiveWin); - if(start<1){ lastActiveWin = RunningApps.length()-1; } //wrap around to the last item - else{ lastActiveWin = RunningApps[start-1]; } - }else{ - //Need to change the last active window - find the first one which is visible - lastActiveWin = 0; //fallback value - nothing active - for(int i=0; iWindowState(RunningApps[i]) >= LXCB::VISIBLE){ - lastActiveWin = RunningApps[i]; - break; - } - } - //qDebug() << " -- New Last Active Window:" << lastActiveWin; - } - return lastActiveWin; -} - -//Temporarily change the session locale (nothing saved between sessions) -void LSession::switchLocale(QString localeCode){ - currTranslator = LUtils::LoadTranslation(this, "lumina-desktop", localeCode, currTranslator); - if(currTranslator!=0 || localeCode=="en_US"){ - LUtils::setLocaleEnv(localeCode); //will set everything to this locale (no custom settings) - } - emit LocaleChanged(); -} - -void LSession::systemWindow(){ - if(sysWindow==0){ sysWindow = new SystemWindow(); } - else{ sysWindow->updateWindow(); } - sysWindow->show(); - //LSession::processEvents(); -} - -//Play System Audio -void LSession::playAudioFile(QString filepath){ - if( !QFile::exists(filepath) ){ return; } - //Setup the audio output systems for the desktop - if(DEBUG){ qDebug() << "Play Audio File"; } - if(mediaObj==0){ qDebug() << " - Initialize media player"; mediaObj = new QMediaPlayer(); } - if(mediaObj !=0 ){ - if(DEBUG){ qDebug() << " - starting playback:" << filepath; } - mediaObj->setVolume(100); - mediaObj->setMedia(QUrl::fromLocalFile(filepath)); - mediaObj->play(); - LSession::processEvents(); - } - if(DEBUG){ qDebug() << " - Done with Audio File"; } -} -// ======================= -// XCB EVENT FILTER FUNCTIONS -// ======================= -void LSession::RootSizeChange(){ - qDebug() << "Got Root Size Change"; - if(DESKTOPS.isEmpty()){ return; } //Initial setup not run yet - screenTimer->start(); -} - -void LSession::WindowPropertyEvent(){ - if(DEBUG){ qDebug() << "Window Property Event"; } - QList newapps = XCB->WindowList(); - if(RunningApps.length() < newapps.length()){ - //New Window found - //qDebug() << "New window found"; - LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (new window opened?) - //Perform sanity checks on any new window geometries - for(int i=0; iSelectInput(newapps[i]); //make sure we get property/focus events for this window - if(DEBUG){ qDebug() << "New Window - check geom in a moment:" << XCB->WindowClass(newapps[i]); } - QTimer::singleShot(50, this, SLOT(checkWindowGeoms()) ); - } - } - } - - //Now save the list and send out the event - RunningApps = newapps; - emit WindowListEvent(); -} - -void LSession::WindowPropertyEvent(WId win){ - //Emit the single-app signal if the window in question is one used by the task manager - if(RunningApps.contains(win)){ - if(DEBUG){ qDebug() << "Single-window property event"; } - //emit WindowListEvent(); - WindowPropertyEvent(); //Run through the entire routine for window checks - }else if(RunningTrayApps.contains(win)){ - emit TrayIconChanged(win); - } -} - -void LSession::SysTrayDockRequest(WId win){ - if(TrayStopping){ return; } - attachTrayWindow(win); //Check to see if the window is already registered -} - -void LSession::WindowClosedEvent(WId win){ - if(TrayStopping){ return; } - removeTrayWindow(win); //Check to see if the window is a tray app -} - -void LSession::WindowConfigureEvent(WId win){ - if(TrayStopping){ return; } - if(RunningTrayApps.contains(win)){ - if(DEBUG){ qDebug() << "SysTray: Configure Event"; } - emit TrayIconChanged(win); //trigger a repaint event - }else if(RunningApps.contains(win)){ - WindowPropertyEvent(); - } -} - -void LSession::WindowDamageEvent(WId win){ - if(TrayStopping){ return; } - if(RunningTrayApps.contains(win)){ - if(DEBUG){ qDebug() << "SysTray: Damage Event"; } - emit TrayIconChanged(win); //trigger a repaint event - } -} - -void LSession::WindowSelectionClearEvent(WId win){ - if(win==SystemTrayID && !TrayStopping){ - qDebug() << "Stopping system tray"; - stopSystemTray(true); //make sure to detach all windows - } -} - - -//====================== -// SYSTEM TRAY FUNCTIONS -//====================== -bool LSession::registerVisualTray(WId visualTray){ - //Only one visual tray can be registered at a time - // (limitation of how tray apps are embedded) - if(TrayStopping){ return false; } - else if(VisualTrayID==0){ VisualTrayID = visualTray; return true; } - else if(VisualTrayID==visualTray){ return true; } - else{ return false; } -} - -void LSession::unregisterVisualTray(WId visualTray){ - if(VisualTrayID==visualTray){ - qDebug() << "Unregistered Visual Tray"; - VisualTrayID=0; - if(!TrayStopping){ emit VisualTrayAvailable(); } - } -} - -QList LSession::currentTrayApps(WId visualTray){ - if(visualTray==VisualTrayID){ - //Check the validity of all the current tray apps (make sure nothing closed erratically) - for(int i=0; iWindowClass(RunningTrayApps[i]).isEmpty()){ RunningTrayApps.removeAt(i); i--; } - } - return RunningTrayApps; - }else if( registerVisualTray(visualTray) ){ - return RunningTrayApps; - }else{ - return QList(); - } -} - -void LSession::startSystemTray(){ - if(SystemTrayID!=0){ return; } - RunningTrayApps.clear(); //nothing running yet - SystemTrayID = XCB->startSystemTray(0); - TrayStopping = false; - if(SystemTrayID!=0){ - XCB->SelectInput(SystemTrayID); //make sure TrayID events get forwarded here - TrayDmgEvent = XCB->GenerateDamageID(SystemTrayID); - evFilter->setTrayDamageFlag(TrayDmgEvent); - qDebug() << "System Tray Started Successfully"; - if(DEBUG){ qDebug() << " - System Tray Flags:" << TrayDmgEvent << TrayDmgError; } - } -} - -void LSession::stopSystemTray(bool detachall){ - if(TrayStopping){ return; } //already run - qDebug() << "Stopping system tray..."; - TrayStopping = true; //make sure the internal list does not modified during this - //Close all the running Tray Apps - QList tmpApps = RunningTrayApps; - RunningTrayApps.clear(); //clear this ahead of time so tray's do not attempt to re-access the apps - if(!detachall){ - for(int i=0; iWindowClass(tmpApps[i]); - //Tray apps are special and closing the window does not close the app - XCB->KillClient(tmpApps[i]); - LSession::processEvents(); - } - } - //Now close down the tray backend - XCB->closeSystemTray(SystemTrayID); - SystemTrayID = 0; - TrayDmgEvent = 0; - TrayDmgError = 0; - evFilter->setTrayDamageFlag(0); //turn off tray event handling - emit TrayListChanged(); - LSession::processEvents(); -} - -void LSession::attachTrayWindow(WId win){ - //static int appnum = 0; - if(TrayStopping){ return; } - if(RunningTrayApps.contains(win)){ return; } //already managed - qDebug() << "Session Tray: Window Added"; - RunningTrayApps << win; - LSession::restoreOverrideCursor(); - if(DEBUG){ qDebug() << "Tray List Changed"; } - emit TrayListChanged(); -} - -void LSession::removeTrayWindow(WId win){ - if(SystemTrayID==0){ return; } - for(int i=0; i -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Globals.h" -#include "AppMenu.h" -#include "SettingsMenu.h" -#include "SystemWindow.h" -#include "LDesktop.h" -//#include "WMProcess.h" -//#include "BootSplash.h" - -#include -#include - -//SYSTEM TRAY STANDARD DEFINITIONS -#define SYSTEM_TRAY_REQUEST_DOCK 0 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2 - -/*class MenuProxyStyle : public QProxyStyle{ -public: - int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const{ - if(metric==PM_SmallIconSize){ return 22; } //override QMenu icon size (make it larger) - else{ return QProxyStyle::pixelMetric(metric, option, widget); } //use the current style for everything else - } -};*/ - -class LSession : public LSingleApplication{ - Q_OBJECT -public: - LSession(int &argc, char **argv); - ~LSession(); - //Functions to be called during startup - void setupSession(); - - //Public System Tray Functions - QList currentTrayApps(WId visualTray); - bool registerVisualTray(WId); - void unregisterVisualTray(WId); - - //Public start menu buttons - bool registerStartButton(QString ID); - void unregisterStartButton(QString ID); - - //Special functions for XCB event filter parsing only - // (DO NOT USE MANUALLY) - void RootSizeChange(); - void WindowPropertyEvent(); - void WindowPropertyEvent(WId); - void SysTrayDockRequest(WId); - void WindowClosedEvent(WId); - void WindowConfigureEvent(WId); - void WindowDamageEvent(WId); - void WindowSelectionClearEvent(WId); - - //System Access - //Return a pointer to the current session - static LSession* handle(){ - return static_cast(LSession::instance()); - } - - static void LaunchApplication(QString cmd); - QFileInfoList DesktopFiles(); - - QRect screenGeom(int num); - - AppMenu* applicationMenu(); - void systemWindow(); - SettingsMenu* settingsMenu(); - LXCB *XCB; //class for XCB usage - - QSettings* sessionSettings(); - QSettings* DesktopPluginSettings(); - - //Keep track of which non-desktop window should be treated as active - WId activeWindow(); //This will return the last active window if a desktop element is currently active - - //Temporarily change the session locale (nothing saved between sessions) - void switchLocale(QString localeCode); - - //Play System Audio - void playAudioFile(QString filepath); - //Window Adjustment Routine (due to Fluxbox not respecting _NET_WM_STRUT) - void adjustWindowGeom(WId win, bool maximize = false); - -private: - //WMProcess *WM; - QList DESKTOPS; - QFileSystemWatcher *watcher; - QTimer *screenTimer; - - //Internal variable for global usage - AppMenu *appmenu; - SettingsMenu *settingsmenu; - SystemWindow *sysWindow; - QTranslator *currTranslator; - QMediaPlayer *mediaObj; - QSettings *sessionsettings, *DPlugSettings; - bool cleansession; - //QList savedScreens; - - //System Tray Variables - WId SystemTrayID, VisualTrayID; - int TrayDmgEvent, TrayDmgError; - QList RunningTrayApps; - bool TrayStopping; - //Start Button Variables - QString StartButtonID; - - //Task Manager Variables - WId lastActiveWin; - QList RunningApps; - QList checkWin; - QFileInfoList desktopFiles; - - void CleanupSession(); - - int VersionStringToNumber(QString version); - -public slots: - void StartLogout(); - void StartShutdown(bool skipupdates = false); - void StartReboot(bool skipupdates = false); - - void reloadIconTheme(); - -private slots: - void NewCommunication(QStringList); - void launchStartupApps(); //used during initialization - void watcherChange(QString); - void screensChanged(); - void screenResized(int); - void checkWindowGeoms(); - - //System Tray Functions - void startSystemTray(); - void stopSystemTray(bool detachall = false); - void attachTrayWindow(WId); - void removeTrayWindow(WId); - - //Internal simplification functions - void checkUserFiles(); - void refreshWindowManager(); - void updateDesktops(); - void registerDesktopWindows(); - - - void SessionEnding(); - -signals: - //System Tray Signals - void VisualTrayAvailable(); //new Visual Tray Plugin can be registered - void TrayListChanged(); //Item added/removed from the list - void TrayIconChanged(WId); //WinID of Tray App - //Start Button signals - void StartButtonAvailable(); - void StartButtonActivated(); - //Task Manager Signals - void WindowListEvent(WId); - void WindowListEvent(); - //General Signals - void LocaleChanged(); - void IconThemeChanged(); - void DesktopConfigChanged(); - void SessionConfigChanged(); - void FavoritesChanged(); - void DesktopFilesChanged(); - void WorkspaceChanged(); - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.cpp deleted file mode 100644 index 6a6cea0b..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LWinInfo.h" - -#include - -#include "LSession.h" - -//Information Retrieval - // Don't cache these results because they can change regularly -QString LWinInfo::text(){ - if(window==0){ return ""; } - QString nm = LSession::handle()->XCB->WindowVisibleIconName(window); - if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->WindowIconName(window); } - if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->WindowVisibleName(window); } - if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->WindowName(window); } - if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->OldWindowIconName(window); } - if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->OldWindowName(window); } - //Make sure that the text is a reasonable size (40 char limit) - //if(nm.length()>40){ nm = nm.left(40)+"..."; } - return nm; -} - -QIcon LWinInfo::icon(bool &noicon){ - if(window==0){ noicon = true; return QIcon();} - noicon = false; - QIcon ico = LSession::handle()->XCB->WindowIcon(window); - //Check for a null icon, and supply one if necessary - if(ico.isNull()){ ico = LXDG::findIcon( this->Class().toLower(),""); } - if(ico.isNull()){ico = LXDG::findIcon("preferences-system-windows",""); noicon=true;} - return ico; -} - -QString LWinInfo::Class(){ - return LSession::handle()->XCB->WindowClass(window); -} - -LXCB::WINDOWVISIBILITY LWinInfo::status(bool update){ - if(window==0){ return LXCB::IGNORE; } - if(update || cstate == LXCB::IGNORE){ - cstate = LSession::handle()->XCB->WindowState(window); - } - return cstate; -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.h b/src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.h deleted file mode 100644 index 3d2ea65a..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LWinInfo.h +++ /dev/null @@ -1,50 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_WINDOW_INFO_H -#define _LUMINA_DESKTOP_WINDOW_INFO_H - -// Qt includes -#include -#include -#include -#include - -// libLumina includes -#include -#include - -// Local includes -//#include "Globals.h" //For the STATES enumeration definition -//#include "LSession.h" - - -class LWinInfo{ -private: - WId window; - LXCB::WINDOWVISIBILITY cstate; //current window state - -public: - LWinInfo(WId id = 0){ - window = id; - cstate = LXCB::IGNORE; //make sure this gets updates with the first "status" call - } - ~LWinInfo(){}; - - //The current window ID - WId windowID(){ - return window; - } - - //Information Retrieval - // Don't cache these results because they can change regularly - QString text(); - QIcon icon(bool &noicon); - QString Class(); - LXCB::WINDOWVISIBILITY status(bool update = false); -}; - -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.cpp deleted file mode 100644 index ca7fb38d..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.cpp +++ /dev/null @@ -1,118 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LXcbEventFilter.h" - -//For all the XCB interactions and atoms -// is accessed via -// session->XCB->EWMH.(atom name) -// session->XCB->(do something) -#include -#include - -XCBEventFilter::XCBEventFilter(LSession *sessionhandle) : QAbstractNativeEventFilter(){ - session = sessionhandle; //save this for interaction with the session later - TrayDmgFlag = 0; - stopping = false; - session->XCB->SelectInput(QX11Info::appRootWindow()); //make sure we get root window events - InitAtoms(); -} - -void XCBEventFilter::setTrayDamageFlag(int flag){ - //Special flag for system tray damage events - TrayDmgFlag = flag + XCB_DAMAGE_NOTIFY; //save the whole flag (no calculations later) -} - -//This function format taken directly from the Qt5.3 documentation -bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *){ - if(stopping){ return false; } //don't do any parsing - //qDebug() << "New Event"; - if(eventType=="xcb_generic_event_t"){ - //qDebug() << " - XCB event"; - //Convert to known event type (for X11 systems) - xcb_generic_event_t *ev = static_cast(message); - //Now parse the event and emit signals as necessary - switch( ev->response_type & ~0x80){ -//============================== - case XCB_PROPERTY_NOTIFY: - //qDebug() << "Property Notify Event:"; - //qDebug() << " - Root Window:" << QX11Info::appRootWindow(); - //qDebug() << " - Given Window:" << ((xcb_property_notify_event_t*)ev)->window; - //System-specific proprty change - if( ((xcb_property_notify_event_t*)ev)->window == QX11Info::appRootWindow() \ - && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_DESKTOP_GEOMETRY) \ - || (((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_WORKAREA) )){ - session->RootSizeChange(); - }else if( ((xcb_property_notify_event_t*)ev)->window == QX11Info::appRootWindow() \ - && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_CURRENT_DESKTOP) )){ - //qDebug() << "Got Workspace Change"; - session->emit WorkspaceChanged(); - }else if( SysNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){ - //Update the status/list of all running windows - session->WindowPropertyEvent(); - - //window-specific property change - }else if( WinNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){ - //Ping only that window - //session->WindowPropertyEvent( ((xcb_property_notify_event_t*)ev)->window ); - session->WindowPropertyEvent(); - } - break; -//============================== - case XCB_CLIENT_MESSAGE: - //qDebug() << "Client Message Event"; - //qDebug() << " - Root Window:" << QX11Info::appRootWindow(); - //qDebug() << " - Given Window:" << ((xcb_client_message_event_t*)ev)->window; - if( TrayDmgFlag!=0 && ((xcb_client_message_event_t*)ev)->type == _NET_SYSTEM_TRAY_OPCODE && ((xcb_client_message_event_t*)ev)->format == 32){ - //data32[0] is timestamp, [1] is opcode, [2] is window handle - if(SYSTEM_TRAY_REQUEST_DOCK == ((xcb_client_message_event_t*)ev)->data.data32[1]){ - session->SysTrayDockRequest( ((xcb_client_message_event_t*)ev)->data.data32[2] ); - } - //Ignore the System Tray messages at the moment (let the WM handle it) - - //window-specific property changes - /*}else if( ((xcb_client_message_event_t*)ev)->type == session->XCB->EWMH._NET_WM_STATE ){ - if( session->XCB->WindowIsMaximized( ((xcb_client_message_event_t*)ev)->window ) ){ - //Quick fix for maximized windows (since Fluxbox is not doing the STRUT detection properly) - session->adjustWindowGeom( ((xcb_client_message_event_t*)ev)->window ); - } - session->WindowPropertyEvent( ((xcb_client_message_event_t*)ev)->window );*/ - }else if( WinNotifyAtoms.contains( ((xcb_client_message_event_t*)ev)->type ) ){ - //Ping only that window - //session->WindowPropertyEvent( ((xcb_client_message_event_t*)ev)->window ); - session->WindowPropertyEvent(); - } - break; -//============================== - case XCB_DESTROY_NOTIFY: - //qDebug() << "Window Closed Event"; - session->WindowClosedEvent( ( (xcb_destroy_notify_event_t*)ev )->window ); - break; -//============================== - case XCB_CONFIGURE_NOTIFY: - //qDebug() << "Configure Notify Event"; - session->WindowConfigureEvent( ((xcb_configure_notify_event_t*)ev)->window ); - break; -//============================== - case XCB_SELECTION_CLEAR: - //qDebug() << "Selection Clear Event"; - session->WindowSelectionClearEvent( ((xcb_selection_clear_event_t*)ev)->owner ); - break; -//============================== - default: - if(TrayDmgFlag!=0){ - //if( (ev->response_type & ~0x80)==TrayDmgFlag){ - session->WindowDamageEvent( ((xcb_damage_notify_event_t*)ev)->drawable ); - //} - }/*else{ - qDebug() << "Default Event:" << (ev->response_type & ~0x80); - }*/ -//============================== - } - } - //qDebug() << " - finished event"; - return false; //make sure the handling keeps going (transparent watching of events) -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.h b/src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.h deleted file mode 100644 index c56471c9..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/LXcbEventFilter.h +++ /dev/null @@ -1,104 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class provides the XCB ->Xlib conversion necessary for Qt5 usage -//=========================================== -#ifndef _LUMINA_DESKTOP_XCB_FILTER_H -#define _LUMINA_DESKTOP_XCB_FILTER_H - -#include -#include -#include -#include - -#include -#include -#include -#include -#include "LSession.h" - -/* -List of XCB response types (since almost impossible to find good docs on XCB) -switch (xcb_generic_event_t*->response_type & ~0x80) -case values: -XCB_KEY_[PRESS | RELEASE] -XCB_BUTTON_[PRESS | RELEASE] -XCB_MOTION_NOTIFY -XCB_ENTER_NOTIFY -XCB_LEAVE_NOTIFY -XCB_FOCUS_[IN | OUT] -XCB_KEYMAP_NOTIFY -XCB_EXPOSE -XCB_GRAPHICS_EXPOSURE -XCB_VISIBILITY_NOTIFY -XCB_CREATE_NOTIFY -XCB_DESTROY_NOTIFY -XCB_UNMAP_NOTIFY -XCB_MAP_[NOTIFY | REQUEST] -XCB_REPARENT_NOTIFY -XCB_CONFIGURE_[NOTIFY | REQUEST] -XCB_GRAVITY_NOTIFY -XCB_RESIZE_REQUEST -XCB_CIRCULATE_[NOTIFY | REQUEST] -XCB_PROPERTY_NOTIFY -XCB_SELECTION_[CLEAR | REQUEST | NOTIFY] -XCB_COLORMAP_NOTIFY -XCB_CLIENT_MESSAGE - -*/ - -//SYSTEM TRAY STANDARD DEFINITIONS -#define SYSTEM_TRAY_REQUEST_DOCK 0 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2 - -class XCBEventFilter : public QAbstractNativeEventFilter{ -private: - LSession *session; - xcb_atom_t _NET_SYSTEM_TRAY_OPCODE; - QList WinNotifyAtoms, SysNotifyAtoms; - int TrayDmgFlag; //internal damage event offset value for the system tray - bool stopping; - - void InitAtoms(){ - //Initialize any special atoms that we need to save/use regularly - //NOTE: All the EWMH atoms are already saved in session->XCB->EWMH - WinNotifyAtoms.clear(); - WinNotifyAtoms << session->XCB->EWMH._NET_WM_NAME \ - << session->XCB->EWMH._NET_WM_VISIBLE_NAME \ - << session->XCB->EWMH._NET_WM_ICON_NAME \ - << session->XCB->EWMH._NET_WM_VISIBLE_ICON_NAME \ - << session->XCB->EWMH._NET_WM_ICON \ - << session->XCB->EWMH._NET_WM_ICON_GEOMETRY; - - SysNotifyAtoms.clear(); - SysNotifyAtoms << session->XCB->EWMH._NET_CLIENT_LIST \ - << session->XCB->EWMH._NET_CLIENT_LIST_STACKING \ - << session->XCB->EWMH._NET_CURRENT_DESKTOP \ - << session->XCB->EWMH._NET_WM_STATE \ - << session->XCB->EWMH._NET_ACTIVE_WINDOW \ - << session->XCB->EWMH._NET_WM_ICON \ - << session->XCB->EWMH._NET_WM_ICON_GEOMETRY; - //_NET_SYSTEM_TRAY_OPCODE - xcb_intern_atom_cookie_t cookie = xcb_intern_atom(QX11Info::connection(), 0, 23,"_NET_SYSTEM_TRAY_OPCODE"); - xcb_intern_atom_reply_t *r = xcb_intern_atom_reply(QX11Info::connection(), cookie, NULL); - if(r){ - _NET_SYSTEM_TRAY_OPCODE = r->atom; - free(r); - } - } - -public: - XCBEventFilter(LSession *sessionhandle); - void setTrayDamageFlag(int flag); - void StopEventHandling(){ stopping = true; } - - //This function format taken directly from the Qt5.3 documentation - virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE; - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.cpp deleted file mode 100644 index 58208931..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "SettingsMenu.h" -#include "LSession.h" - -#include - -SettingsMenu::SettingsMenu() : QMenu(){ - this->setObjectName("SettingsMenu"); - connect(this, SIGNAL(triggered(QAction*)), this, SLOT(runApp(QAction*)) ); - connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(UpdateMenu()) ); - connect(QApplication::instance(), SIGNAL(IconThemeChanged()), this, SLOT(UpdateMenu()) ); - QTimer::singleShot(100, this, SLOT(UpdateMenu()) ); -} - -SettingsMenu::~SettingsMenu(){ - -} - -void SettingsMenu::UpdateMenu(){ - //Change the title/icon to account for locale/icon changes - this->setTitle( tr("Preferences") ); - this->setIcon( LXDG::findIcon("configure","") ); - this->clear(); - //Now setup the possible configuration options - QAction *act = new QAction(LXDG::findIcon("preferences-desktop-screensaver",""), tr("Screensaver"), this); - act->setWhatsThis("xscreensaver-demo"); - this->addAction(act); - act = new QAction( LXDG::findIcon("preferences-desktop-wallpaper",""), tr("Wallpaper"), this); - act->setWhatsThis("lumina-config --page wallpaper"); - this->addAction(act); - act = new QAction( LXDG::findIcon("preferences-other",""), tr("Display"), this); - act->setWhatsThis("lumina-xconfig"); - this->addAction(act); - act = new QAction( LXDG::findIcon("preferences-desktop",""), tr("All Desktop Settings"), this); - act->setWhatsThis("lumina-config"); - this->addAction(act); - this->addSeparator(); - /*QString qtconfig = LOS::QtConfigShortcut(); - if(QFile::exists(qtconfig) && !qtconfig.isEmpty()){ - act = new QAction( LXDG::findIcon("preferences-desktop-theme",""), tr("Window Theme"), this); - act->setWhatsThis(qtconfig); - this->addAction(act); - }*/ - QString CONTROLPANEL = LOS::ControlPanelShortcut(); - if(QFile::exists(CONTROLPANEL) && !CONTROLPANEL.isEmpty()){ - //Now load the info - XDGDesktop cpan(CONTROLPANEL); - if(cpan.isValid()){ - act = new QAction( LXDG::findIcon(cpan.icon,""), tr("Control Panel"), this); - act->setWhatsThis("lumina-open \""+CONTROLPANEL+"\""); - this->addAction(act); - } - } - act = new QAction( LXDG::findIcon("lumina",""), tr("About Lumina"), this); - act->setWhatsThis("lumina-info"); - this->addAction(act); -} - - -void SettingsMenu::runApp(QAction* act){ - LSession::LaunchApplication(act->whatsThis()); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.h b/src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.h deleted file mode 100644 index eeabab85..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/SettingsMenu.h +++ /dev/null @@ -1,28 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_SETTINGS_MENU_H -#define _LUMINA_DESKTOP_SETTINGS_MENU_H - -#include -#include -#include - -#include - -class SettingsMenu : public QMenu{ - Q_OBJECT -public: - SettingsMenu(); - ~SettingsMenu(); - -private slots: - void UpdateMenu(); - void runApp(QAction* act); - -}; - -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.cpp deleted file mode 100644 index 1c0b59a5..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#include "SystemWindow.h" -#include "ui_SystemWindow.h" - -#include "LSession.h" -#include -#include -#include -#include -#include -#include -#include - -SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){ - ui->setupUi(this); //load the designer file - //Setup the window flags - this->setWindowFlags( Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); - //Setup the icons based on the current theme - ui->tool_logout->setIcon( LXDG::findIcon("system-log-out","") ); - ui->tool_restart->setIcon( LXDG::findIcon("system-reboot","") ); - ui->tool_shutdown->setIcon( LXDG::findIcon("system-shutdown","") ); - ui->tool_suspend->setIcon( LXDG::findIcon("system-suspend","") ); - ui->push_cancel->setIcon( LXDG::findIcon("dialog-cancel","") ); - ui->push_lock->setIcon( LXDG::findIcon("system-lock-screen","") ); - //Connect the signals/slots - connect(ui->tool_logout, SIGNAL(clicked()), this, SLOT(sysLogout()) ); - connect(ui->tool_restart, SIGNAL(clicked()), this, SLOT(sysRestart()) ); - connect(ui->tool_shutdown, SIGNAL(clicked()), this, SLOT(sysShutdown()) ); - connect(ui->tool_suspend, SIGNAL(clicked()), this, SLOT(sysSuspend()) ); - connect(ui->push_cancel, SIGNAL(clicked()), this, SLOT(sysCancel()) ); - connect(ui->push_lock, SIGNAL(clicked()), this, SLOT(sysLock()) ); - //Disable buttons if necessary - updateWindow(); - ui->tool_suspend->setVisible(LOS::systemCanSuspend()); //does not change with time - just do a single check - connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(updateWindow()) ); - connect(QApplication::instance(), SIGNAL(IconThemeChanged()), this, SLOT(updateWindow()) ); -} - -SystemWindow::~SystemWindow(){ - -} - -void SystemWindow::updateWindow(){ - //Disable the shutdown/restart buttons if necessary - ui->retranslateUi(this); - bool ok = LOS::userHasShutdownAccess(); - ui->tool_restart->setEnabled(ok); - ui->tool_shutdown->setEnabled(ok); - //Center this window on the current screen - QPoint center = QApplication::desktop()->screenGeometry(QCursor::pos()).center(); //get the center of the current screen - this->move(center.x() - this->width()/2, center.y() - this->height()/2); -} - -bool SystemWindow::promptAboutUpdates(bool &skip){ - QString pending = LOS::systemPendingUpdates(); - if(pending.isEmpty()){ skip = false; } //continue without skip - else{ - QMessageBox dlg(QMessageBox::Question, tr("Apply Updates?"), tr("You have system updates waiting to be applied! Do you wish to install them now?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, this); - dlg.setDetailedText(pending); - dlg.setDefaultButton(QMessageBox::Yes); - dlg.show(); - int ret = dlg.exec(); - if(ret == QMessageBox::Cancel){ return false; } //do not continue - else{ skip = (ret==QMessageBox::No); } - } - return true; -} - -void SystemWindow::sysLogout(){ - this->close(); - LSession::processEvents(); - QTimer::singleShot(0, LSession::handle(), SLOT(StartLogout()) ); -} - -void SystemWindow::sysRestart(){ - bool skip = false; - if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled - this->close(); - LSession::processEvents(); - LSession::handle()->StartReboot(skip); -} - -void SystemWindow::sysShutdown(){ - bool skip = false; - if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled - this->close(); - LSession::processEvents(); - LSession::handle()->StartShutdown(skip); -} - -void SystemWindow::sysSuspend(){ - this->hide(); - LSession::processEvents(); - //Make sure to lock the system first (otherwise anybody can access it again) - LUtils::runCmd("xscreensaver-command -lock"); - //Now suspend the system - LOS::systemSuspend(); -} - -void SystemWindow::sysLock(){ - this->hide(); - LSession::processEvents(); - qDebug() << "Locking the desktop..."; - QProcess::startDetached("xscreensaver-command -lock"); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.h b/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.h deleted file mode 100644 index bbef36a3..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _LUMINA_DESKTOP_SYSTEM_WINDOW_H -#define _LUMINA_DESKTOP_SYSTEM_WINDOW_H - -#include - -#include "ui_SystemWindow.h" - - - - -namespace Ui{ - class SystemWindow; -}; - -class SystemWindow : public QDialog{ - Q_OBJECT -public: - SystemWindow(); - ~SystemWindow(); - -public slots: - void updateWindow(); - -private: - Ui::SystemWindow *ui; - - //void closeAllWindows(); - bool promptAboutUpdates(bool &skip); //main bool return: continue/cancel, skip: skip updates or not - -private slots: - void sysLogout(); - - void sysRestart(); - - void sysShutdown(); - - void sysSuspend(); - - void sysCancel(){ - this->close(); - } - - void sysLock(); -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.ui b/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.ui deleted file mode 100644 index 9e25509b..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/SystemWindow.ui +++ /dev/null @@ -1,194 +0,0 @@ - - - SystemWindow - - - - 0 - 0 - 289 - 135 - - - - System Options - - - - 2 - - - 2 - - - 2 - - - 2 - - - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 3 - - - 3 - - - 3 - - - 0 - - - - - - - Log Out - - - - 64 - 64 - - - - Qt::ToolButtonTextUnderIcon - - - - - - - Restart - - - - 64 - 64 - - - - Qt::ToolButtonTextUnderIcon - - - - - - - Shutdown - - - - 64 - 64 - - - - Qt::ToolButtonTextUnderIcon - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - - - - - - Cancel - - - - 32 - 32 - - - - Qt::ToolButtonTextUnderIcon - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Lock - - - - 32 - 32 - - - - Qt::ToolButtonTextUnderIcon - - - - - - - Suspend - - - - 32 - 32 - - - - Qt::ToolButtonTextUnderIcon - - - - - - - - - - - - - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.cpp deleted file mode 100644 index 545ba430..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LDPlugin.h" - -#include "../LSession.h" -#include - -LDPlugin::LDPlugin(QWidget *parent, QString id) : QFrame(parent){ - PLUGID=id; - prefix = id.replace("/","_")+"/"; - //qDebug() << "ID:" << PLUGID << prefix; - settings = LSession::handle()->DesktopPluginSettings(); - //Setup the plugin system control menu - menu = new QMenu(this); - setupMenu(); - //Setup the internal timer for when to start/stop drag events - dragTimer = new QTimer(this); - dragTimer->setSingleShot(true); - dragTimer->setInterval(500); //1/2 second to show the plugin menu - connect(dragTimer, SIGNAL(timeout()), this, SLOT(showPluginMenu())); - //Use plugin-specific values for stylesheet control (applauncher, desktopview, etc...) - this->setObjectName(id.section("---",0,0).section("::",0,0)); - this->setContextMenuPolicy(Qt::CustomContextMenu); - this->setMouseTracking(false); //only catch mouse movement events if the mouse is clicked/held on the plugin - connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(LocaleChange()) ); - connect(QApplication::instance(), SIGNAL(IconThemeChanged()), this, SLOT(ThemeChange()) ); - connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showPluginMenu()) ); -} - -void LDPlugin::setupMenu(){ - menu->clear(); - //SPECIAL CONTEXT MENU OPTIONS FOR PARTICULAR PLUGIN TYPES - if(PLUGID.startsWith("applauncher::")){ - menu->addAction( LXDG::findIcon("quickopen",""), tr("Launch Item"), this, SIGNAL(PluginActivated()) ); - menu->addSeparator(); - } - //General Options - menu->addAction( LXDG::findIcon("transform-move",""), tr("Start Moving Item"), this, SLOT(slotStartMove()) ); - menu->addAction( LXDG::findIcon("transform-scale",""), tr("Start Resizing Item"), this, SLOT(slotStartResize()) ); - menu->addSeparator(); - menu->addAction( LXDG::findIcon("zoom-in",""), tr("Increase Item Sizes"), this, SIGNAL(IncreaseIconSize()) ); - menu->addAction( LXDG::findIcon("zoom-out",""), tr("Decrease Item Sizes"), this, SIGNAL(DecreaseIconSize()) ); - menu->addSeparator(); - menu->addAction( LXDG::findIcon("edit-delete",""), tr("Remove Item"), this, SLOT(slotRemovePlugin()) ); -} - -/*void LDPlugin::setInitialSize(int width, int height){ - //Note: Only run this in the plugin initization routine: - // if the plugin is completely new (first time used), it will be this size - if(settings->allKeys().filter(prefix+"location").isEmpty()){ - //Brand new plugin: set initial size - //qDebug() << "Setting Initial Size:" << PLUGID << width << height; - settings->setValue(prefix+"location/width",width); - settings->setValue(prefix+"location/height",height); - settings->sync(); - } - //Now make sure the plugin is the saved size right away - this->resize( settings->value(prefix+"location/width").toInt(), settings->value(prefix+"location/height").toInt()); -}*/ diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.h deleted file mode 100644 index 820880ed..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/LDPlugin.h +++ /dev/null @@ -1,156 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is the generic container layout for all desktop plugins -// Simply subclass this when creating a new plugin to enable correct -// visibility and usage within the desktop window -//=========================================== -// WARNING: Do *not* setup a custom context menu for the entire plugins area! -// This can prevent access to the general desktop context menu if -// the plugin was maximized to fill the desktop area! -//=========================================== -#ifndef _LUMINA_DESKTOP_DESKTOP_PLUGIN_H -#define _LUMINA_DESKTOP_DESKTOP_PLUGIN_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class LDPlugin : public QFrame{ - Q_OBJECT - -private: - QString PLUGID, prefix; - QSettings *settings; - QMenu *menu; - QTimer *dragTimer; - - void setupMenu(); - -public: - LDPlugin(QWidget *parent = 0, QString id="unknown"); - - ~LDPlugin(){} - - QString ID(){ - return PLUGID; - } - - virtual QSize defaultPluginSize(){ - //This needs to be re-implemented in the subclassed plugin - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(1,1); //1x1 grid size - } - - void savePluginGeometry(QRect geom){ - settings->setValue(prefix+"geometry/desktopGridPoints", geom); - settings->sync(); - } - - QRect loadPluginGeometry(){ - return settings->value(prefix+"geometry/desktopGridPoints", QRect()).toRect(); - } - - void saveSetting(QString var, QVariant val){ - //qDebug() << "Saving Setting:" << prefix+var+QString(" = ")+val.toString(); - settings->setValue(prefix+var, val); - settings->sync(); - } - - QVariant readSetting(QString var, QVariant defaultval){ - return settings->value(prefix+var, defaultval); - } - - virtual void Cleanup(){ - //This needs to be re-implemented in the subclassed plugin - //This is where any last-minute changes are performed before a plugin is removed permanently - //Note1: This is *not* called if the plugin is being temporarily closed - //Note2: All the settings for this plugin will be automatically removed after this is finished - } - - void removeSettings(bool permanent = false){ //such as when a plugin is deleted - if(permanent){ Cleanup(); } - QStringList list = settings->allKeys().filter(prefix); - for(int i=0; iremove(list[i]); } - - } - -public slots: - virtual void LocaleChange(){ - //This needs to be re-implemented in the subclassed plugin - //This is where all text is set/translated - setupMenu(); - } - virtual void ThemeChange(){ - //This needs to be re-implemented in the subclassed plugin - //This is where all the visuals are set if using Theme-dependant icons. - setupMenu(); - } - void showPluginMenu(){ - emit CloseDesktopMenu(); - menu->popup( QCursor::pos() ); - } - -signals: - void OpenDesktopMenu(); - void CloseDesktopMenu(); - void PluginResized(); - void PluginActivated(); - - //Signals for communication with the desktop layout system (not generally used by hand) - void StartMoving(QString); //ID of plugin - void StartResizing(QString); //ID of plugin - void RemovePlugin(QString); //ID of plugin - void IncreaseIconSize(); // only used for desktop icons - void DecreaseIconSize(); // only used for desktop icons - -private slots: - void slotStartMove(){ - QCursor::setPos( this->mapToGlobal(QPoint(this->width()/2, this->height()/2)) ); - emit StartMoving(PLUGID); - } - - void slotStartResize(){ - QCursor::setPos( this->mapToGlobal(QPoint(this->width()/2, this->height()/2)) ); - emit StartResizing(PLUGID); - } - - void slotRemovePlugin(){ - removeSettings(true); - emit RemovePlugin(PLUGID); - } - -protected: - void mousePressEvent(QMouseEvent *ev){ - if(!dragTimer->isActive() && ev->buttons().testFlag(Qt::LeftButton) ){ dragTimer->start(); } - QWidget::mousePressEvent(ev); - } - void mouseReleaseEvent(QMouseEvent *ev){ - if(dragTimer->isActive()){ dragTimer->stop(); } - QWidget::mouseReleaseEvent(ev); - } - void mouseMoveEvent(QMouseEvent *ev){ - if(ev->buttons().testFlag(Qt::LeftButton)){ - if(dragTimer->isActive()){ dragTimer->stop(); } - slotStartMove(); - } - QWidget::mouseMoveEvent(ev); - } - void resizeEvent(QResizeEvent *ev){ - emit PluginResized(); - QFrame::resizeEvent(ev); //do normal processing - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/NewDP.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/NewDP.h deleted file mode 100644 index e28b8c61..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/NewDP.h +++ /dev/null @@ -1,63 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is the interface to load all the different desktop plugins -//=========================================== -#ifndef _LUMINA_DESKTOP_NEW_DESKTOP_PLUGIN_H -#define _LUMINA_DESKTOP_NEW_DESKTOP_PLUGIN_H - -#include - -//List all the individual plugin includes here -#include "LDPlugin.h" -//#include "SamplePlugin.h" -#include "calendar/CalendarPlugin.h" -#include "applauncher/AppLauncherPlugin.h" -#include "desktopview/DesktopViewPlugin.h" -#include "notepad/NotepadPlugin.h" -#include "audioplayer/PlayerWidget.h" -#include "systemmonitor/MonitorWidget.h" -//#include "quickcontainer/QuickDPlugin.h" -//#include "messagecenter/MessageCenter.h" -#include "rssreader/RSSFeedPlugin.h" - -class NewDP{ -public: - static LDPlugin* createPlugin(QString plugin, QWidget* parent=0){ - //qDebug() << "Create Plugin:" << plugin; - LDPlugin *plug = 0; - /*if(plugin.section("---",0,0)=="sample"){ - plug = new SamplePlugin(parent, plugin); - }else */ - if(plugin.section("---",0,0)=="calendar"){ - plug = new CalendarPlugin(parent, plugin); - }else if(plugin.section("---",0,0).section("::",0,0)=="applauncher"){ - //This plugin can be pre-initialized to a file path after the "::" delimiter - plug = new AppLauncherPlugin(parent, plugin); - }else if(plugin.section("---",0,0)=="desktopview"){ - plug = new DesktopViewPlugin(parent, plugin); - }else if(plugin.section("---",0,0)=="notepad"){ - plug = new NotePadPlugin(parent, plugin); - }else if(plugin.section("---",0,0)=="audioplayer"){ - plug = new AudioPlayerPlugin(parent, plugin); - }else if(plugin.section("---",0,0)=="systemmonitor"){ - plug = new SysMonitorPlugin(parent, plugin); - //}else if(plugin.section("---",0,0)=="messagecenter"){ - //plug = new MessageCenterPlugin(parent, plugin); - //}else if(plugin.section("---",0,0).startsWith("quick-") && LUtils::validQuickPlugin(plugin.section("---",0,0)) ){ - //plug = new QuickDPlugin(parent, plugin); - }else if(plugin.section("---",0,0)=="rssreader"){ - plug = new RSSFeedPlugin(parent, plugin); - }else{ - qWarning() << "Invalid Desktop Plugin:"< -#include -#include -#include "LDPlugin.h" - -class SamplePlugin : public LDPlugin{ - Q_OBJECT -public: - SamplePlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - this->setLayout( new QVBoxLayout()); - this->layout()->setContentsMargins(0,0,0,0); - button = new QPushButton("sample"); - this->layout()->addWidget(button); - connect(button, SIGNAL(clicked()), this, SLOT(showMessage()) ); - } - - ~SamplePlugin(){} - -private: - QPushButton *button; - -private slots: - void showMessage(){ - QMessageBox::information(this,"sample","sample desktop plugin works"); - } -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.cpp deleted file mode 100644 index 3be19faa..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.cpp +++ /dev/null @@ -1,145 +0,0 @@ -#include "AppLauncherPlugin.h" -#include "../../LSession.h" -#include "OutlineToolButton.h" - -#define OUTMARGIN 10 //special margin for fonts due to the outlining effect from the OutlineToolbutton - -AppLauncherPlugin::AppLauncherPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - QVBoxLayout *lay = new QVBoxLayout(); - this->setLayout(lay); - lay->setContentsMargins(0,0,0,0); - button = new OutlineToolButton(this); - button->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); - button->setAutoRaise(true); - button->setText("...\n..."); //Need to set something here so that initial sizing works properly - button->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); - lay->addWidget(button, 0, Qt::AlignCenter); - connect(button, SIGNAL(DoubleClicked()), this, SLOT(buttonClicked()) ); - button->setContextMenuPolicy(Qt::NoContextMenu); - watcher = new QFileSystemWatcher(this); - connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT( loadButton()) ); - - connect(this, SIGNAL(PluginActivated()), this, SLOT(buttonClicked()) ); //in case they use the context menu to launch it. - loadButton(); - //QTimer::singleShot(0,this, SLOT(loadButton()) ); -} - -void AppLauncherPlugin::Cleanup(){ - //This is run only when the plugin was forcibly closed/removed - -} - -void AppLauncherPlugin::loadButton(){ - QString def = this->ID().section("::",1,50).section("---",0,0).simplified(); - QString path = this->readSetting("applicationpath",def).toString(); //use the default if necessary - //qDebug() << "Default Application Launcher:" << def << path; - bool ok = QFile::exists(path); - if(!ok){ emit RemovePlugin(this->ID()); return;} - int icosize = this->height()-4 - 2.2*button->fontMetrics().height(); - button->setFixedSize( this->width()-4, this->height()-4); - button->setIconSize( QSize(icosize,icosize) ); - QString txt; - if(path.endsWith(".desktop") && ok){ - XDGDesktop file(path); - ok = !file.name.isEmpty(); - if(!ok){ - button->setWhatsThis(""); - button->setIcon( QIcon(LXDG::findIcon("quickopen-file","").pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) ); - txt = tr("Click to Set"); - if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); } - }else{ - button->setWhatsThis(file.filePath); - button->setIcon( QIcon(LXDG::findIcon(file.icon,"system-run").pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) ); - txt = file.name; - if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); } - watcher->addPath(file.filePath); //make sure to update this shortcut if the file changes - } - }else if(ok){ - QFileInfo info(path); - button->setWhatsThis(info.absoluteFilePath()); - if(info.isDir()){ - button->setIcon( LXDG::findIcon("folder","") ); - }else if(LUtils::imageExtensions().contains(info.suffix().toLower()) ){ - QPixmap pix; - if(pix.load(path)){ button->setIcon( QIcon(pix.scaled(256,256)) ); } //max size for thumbnails in memory - else{ button->setIcon( LXDG::findIcon("dialog-cancel","") ); } - }else{ - button->setIcon( QIcon(LXDG::findMimeIcon(path).pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) ); - } - txt = info.fileName(); - if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); } - watcher->addPath(path); //make sure to update this shortcut if the file changes - }else{ - //InValid File - button->setWhatsThis(""); - button->setIcon( QIcon(LXDG::findIcon("quickopen","dialog-cancel").pixmap(QSize(icosize,icosize)).scaledToHeight(icosize, Qt::SmoothTransformation) ) ); - button->setText( tr("Click to Set") ); - if(!watcher->files().isEmpty()){ watcher->removePaths(watcher->files()); } - } - //If the file is a symlink, put the overlay on the icon - if(QFileInfo(path).isSymLink()){ - QImage img = button->icon().pixmap(QSize(icosize,icosize)).toImage(); - int oSize = icosize/3; //overlay size - QPixmap overlay = LXDG::findIcon("emblem-symbolic-link").pixmap(oSize,oSize).scaled(oSize,oSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); - QPainter painter(&img); - painter.drawPixmap(icosize-oSize,icosize-oSize,overlay); //put it in the bottom-right corner - button->setIcon( QIcon(QPixmap::fromImage(img)) ); - } - //Now adjust the visible text as necessary based on font/grid sizing - button->setToolTip(txt); - //Double check that the visual icon size matches the requested size - otherwise upscale the icon - if(button->fontMetrics().width(txt) > (button->width()-OUTMARGIN) ){ - //Text too long, try to show it on two lines - //txt = button->fontMetrics().elidedText(txt, Qt::ElideRight, 2*(button->width()-OUTMARGIN), Qt::TextWordWrap); - txt =txt.section(" ",0,2).replace(" ","\n"); //First take care of any natural breaks - //Go through and combine any lines - if(txt.contains("\n")){ - //need to check each line - QStringList txtL = txt.split("\n"); - for(int i=0; ifontMetrics().width(txtL[i]) < button->width()/2) ){ - txtL[i] = txtL[i]+" "+txtL[i+1]; - txtL.removeAt(i+1); - } - } - txt = txtL.join("\n").section("\n",0,2); - } - - if(txt.contains("\n")){ - //need to check each line - QStringList txtL = txt.split("\n"); - for(int i=0; i1){ txtL.removeAt(i); i--; } //Only take the first two lines - else{ txtL[i] = button->fontMetrics().elidedText(txtL[i], Qt::ElideRight, (button->width()-OUTMARGIN) ); } - } - txt = txtL.join("\n"); - }else{ - txt = this->fontMetrics().elidedText(txt,Qt::ElideRight, 2*(button->width()-OUTMARGIN)); - //Now split the line in half for the two lines - txt.insert( ((txt.count())/2), "\n"); - } - } - if(!txt.contains("\n")){ txt.append("\n "); } //always use two lines - //qDebug() << " - Setting Button Text:" << txt; - button->setText(txt); - - QTimer::singleShot(100, this, SLOT(update()) ); //Make sure to re-draw the image in a moment -} - -void AppLauncherPlugin::buttonClicked(){ - QString path = button->whatsThis(); - if(path.isEmpty() || !QFile::exists(path) ){ - //prompt for the user to select an application - QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); //LXDG::sortDesktopNames( LXDG::systemDesktopFiles() ); - QStringList names; - for(int i=0; iname; } - bool ok = false; - QString app = QInputDialog::getItem(this, tr("Select Application"), tr("Name:"), names, 0, false, &ok); - if(!ok || names.indexOf(app)<0){ return; } //cancelled - this->saveSetting("applicationpath", apps[ names.indexOf(app) ]->filePath); - QTimer::singleShot(0,this, SLOT(loadButton())); - }else{ - LSession::LaunchApplication("lumina-open \""+path+"\""); - } - -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.h deleted file mode 100644 index a0f6a7cd..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/AppLauncherPlugin.h +++ /dev/null @@ -1,59 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is a quick sample desktop plugin -//=========================================== -#ifndef _LUMINA_DESKTOP_DESKTOP_PLUGIN_APPLICATION_LAUNCHER_H -#define _LUMINA_DESKTOP_DESKTOP_PLUGIN_APPLICATION_LAUNCHER_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../LDPlugin.h" - -#include - -class AppLauncherPlugin : public LDPlugin{ - Q_OBJECT -public: - AppLauncherPlugin(QWidget* parent, QString ID); - ~AppLauncherPlugin(){} - - void Cleanup(); //special function for final cleanup - -private: - QToolButton *button; - QFileSystemWatcher *watcher; - //QMenu *menu; - -private slots: - void loadButton(); - void buttonClicked(); - //void openContextMenu(); - - //void increaseIconSize(); - //void decreaseIconSize(); - //void deleteFile(); - -public slots: - void LocaleChange(){ - loadButton(); //force reload - } - -protected: - void resizeEvent(QResizeEvent *ev){ - LDPlugin::resizeEvent(ev); - QTimer::singleShot(100, this, SLOT(loadButton()) ); - } -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/OutlineToolButton.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/OutlineToolButton.h deleted file mode 100644 index 24410e75..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/applauncher/OutlineToolButton.h +++ /dev/null @@ -1,99 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is a simple subclass for a QToolButton with black/white text (for transparent backgrounds) -//=========================================== -#ifndef _LUMINA_DESKTOP_PLUGIN_APPLAUNCHER_OUTLINE_TOOLBUTTON_H -#define _LUMINA_DESKTOP_PLUGIN_APPLAUNCHER_OUTLINE_TOOLBUTTON_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -class OutlineToolButton : public QToolButton{ - Q_OBJECT -public: - OutlineToolButton(QWidget *parent=0) : QToolButton(parent){ - //This button needs slightly different font settings - do this in the constructor so that other widgets can take it into account. - QFont font = this->font(); - font.setStyleStrategy(QFont::PreferAntialias); //Always set the font strategy (just in case it starts working down the road) - this->setFont(font); - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - } - ~OutlineToolButton(){} - -signals: - void DoubleClicked(); - -protected: - void mouseDoubleClickEvent(QMouseEvent *ev){ - ev->accept(); - emit DoubleClicked(); - } - void mousePressEvent(QMouseEvent *ev){ - ev->ignore(); - } - void mouseReleaseEvent(QMouseEvent *ev){ - ev->ignore(); - } - - void paintEvent(QPaintEvent*){ - /* NOTE: This is what a standard QToolButton performs (peeked at Qt source code for this tidbit) - QStylePainter p(this); - QStyleOptionToolButton opt; - initStyleOption(&opt); - p.drawComplexControl(QStyle::CC_ToolButton, opt); - */ - - //Modify the standard QToolButton routine to paint the text differently - QStylePainter p(this); - QStyleOptionToolButton opt; - initStyleOption(&opt); - opt.font = this->property("font").value(); //This ensures that the stylesheet values are incorporated - opt.font.setStyleStrategy(QFont::PreferAntialias); //Always set the font strategy (just in case it starts working down the road) - opt.font.setKerning(true); - opt.fontMetrics = QFontMetrics(opt.font); - opt.text.clear(); //Don't paint the text yet - just the background/icon - p.drawComplexControl(QStyle::CC_ToolButton, opt); //This does all the normal QToolButton stuff - just not text - //Now get the text rectangle for the widget - QRect box = p.style()->itemTextRect(opt.fontMetrics, opt.rect, Qt::AlignHCenter | Qt::AlignBottom, true, this->text()); - //Get the QColors for the outline/text - QColor textC = opt.palette.text().color().toHsl(); //need the lightness value in a moment - QColor outC = textC; - //qDebug() << "Font Color Values:" << textC << textC.lightness() << textC.lightnessF(); - if(textC.lightnessF() > 0.5){ outC.setHsl(textC.hue(), textC.hslSaturation(), 0, 90); } - else{outC.setHsl(textC.hue(), textC.hslSaturation(), 255, 50); } - //qDebug() << "Outline Color Values:" << outC; - //Now get the size of the outline border (need to scale for high-res monitors) - qreal OWidth = opt.fontMetrics.width("o")/2.0; - //qDebug() << "Outline Width:" << OWidth; - //Now generate a QPainterPath for the text - QPainterPath path; - QStringList txt = this->text().split("\n"); //need each line independently, the newline actually gets painted otherwise - for(int i=0; i -#include -#include -#include -#include -#include -#include - -PlayerWidget::PlayerWidget(QWidget *parent) : QWidget(parent), ui(new Ui::PlayerWidget()){ - ui->setupUi(this); //load the designer form - PLAYER = new QMediaPlayer(this); - PLAYER->setVolume(100); - PLAYER->setNotifyInterval(1000); //1 second interval (just needs to be a rough estimate) - PLAYLIST = new QMediaPlaylist(this); - PLAYLIST->setPlaybackMode(QMediaPlaylist::Sequential); - PLAYER->setPlaylist(PLAYLIST); - - configMenu = new QMenu(this); - ui->tool_config->setMenu(configMenu); - addMenu = new QMenu(this); - ui->tool_add->setMenu(addMenu); - - updatinglists = false; //start off as false - - ui->combo_playlist->setContextMenuPolicy(Qt::NoContextMenu); - - LoadIcons(); - playerStateChanged(); //update button visibility - currentSongChanged(); - //Connect all the signals/slots - //connect(infoTimer, SIGNAL(timeout()), this, SLOT(rotateTrackInfo()) ); - connect(PLAYER, SIGNAL(positionChanged(qint64)),this, SLOT(updateProgress(qint64)) ); - connect(PLAYER, SIGNAL(durationChanged(qint64)), this, SLOT(updateMaxProgress(qint64)) ); - connect(PLAYLIST, SIGNAL(mediaChanged(int, int)), this, SLOT(playlistChanged()) ); - connect(PLAYER, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(playerStateChanged()) ); - connect(PLAYLIST, SIGNAL(currentMediaChanged(const QMediaContent&)), this, SLOT(currentSongChanged()) ); - connect(ui->combo_playlist, SIGNAL(currentIndexChanged(int)), this, SLOT(userlistSelectionChanged()) ); - connect(ui->tool_play, SIGNAL(clicked()), this, SLOT(playClicked()) ); - connect(ui->tool_pause, SIGNAL(clicked()), this, SLOT(pauseClicked()) ); - connect(ui->tool_stop, SIGNAL(clicked()), this, SLOT(stopClicked()) ); - connect(ui->tool_next, SIGNAL(clicked()), this, SLOT(nextClicked()) ); - connect(ui->tool_prev, SIGNAL(clicked()), this, SLOT(prevClicked()) ); - -} - -PlayerWidget::~PlayerWidget(){ - //qDebug() << "Removing PlayerWidget"; -} - -void PlayerWidget::LoadIcons(){ - ui->tool_stop->setIcon( LXDG::findIcon("media-playback-stop","") ); - ui->tool_play->setIcon( LXDG::findIcon("media-playback-start","") ); - ui->tool_pause->setIcon( LXDG::findIcon("media-playback-pause","") ); - ui->tool_next->setIcon( LXDG::findIcon("media-skip-forward","") ); - ui->tool_prev->setIcon( LXDG::findIcon("media-skip-backward","") ); - ui->tool_add->setIcon( LXDG::findIcon("list-add","") ); - ui->tool_config->setIcon( LXDG::findIcon("configure","") ); - //Now re-assemble the menus as well - configMenu->clear(); - configMenu->addAction(LXDG::findIcon("media-eject",""), tr("Clear Playlist"), this, SLOT(ClearPlaylist())); - configMenu->addAction(LXDG::findIcon("roll",""), tr("Shuffle Playlist"), this, SLOT(ShufflePlaylist())); - addMenu->clear(); - addMenu->addAction(LXDG::findIcon("document-new",""), tr("Add Files"), this, SLOT(AddFilesToPlaylist())); - addMenu->addAction(LXDG::findIcon("folder-new",""), tr("Add Directory"), this, SLOT(AddDirToPlaylist())); - addMenu->addAction(LXDG::findIcon("download",""), tr("Add URL"), this, SLOT(AddURLToPlaylist())); -} - -void PlayerWidget::playClicked(){ - PLAYER->play(); -} - -void PlayerWidget::pauseClicked(){ - PLAYER->pause(); -} - -void PlayerWidget::stopClicked(){ - PLAYER->stop(); -} - -void PlayerWidget::nextClicked(){ - PLAYLIST->next(); -} - -void PlayerWidget::prevClicked(){ - PLAYLIST->previous(); -} - -void PlayerWidget::AddFilesToPlaylist(){ - //Prompt the user to select multimedia files - QFileDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setFileMode(QFileDialog::ExistingFiles); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setNameFilter( tr("Multimedia Files")+" ("+LXDG::findAVFileExtensions().join(" ")+")"); - dlg.setWindowTitle(tr("Select Multimedia Files")); - dlg.setWindowIcon( LXDG::findIcon("file-open","") ); - dlg.setDirectory(QDir::homePath()); //start in the home directory - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - QApplication::processEvents(); - } - QList files = dlg.selectedUrls(); - if(files.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled - //Make this use show/processEvents later - //QList files = QFileDialog::getOpenFileUrls(0, tr("Select Multimedia Files"), QDir::homePath(), "Multimedia Files ("+LXDG::findAVFileExtensions().join(" ")+")"); - QList urls; - for(int i=0; iaddMedia(urls); - playlistChanged(); -} - -void PlayerWidget::AddDirToPlaylist(){ - QFileDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setFileMode(QFileDialog::Directory); - dlg.setOption(QFileDialog::ShowDirsOnly, true); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setWindowTitle(tr("Select Multimedia Directory")); - dlg.setWindowIcon( LXDG::findIcon("folder-open","") ); - dlg.setDirectory(QDir::homePath()); //start in the home directory - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - QApplication::processEvents(); - } - if(dlg.result() != QDialog::Accepted){ return; } //cancelled - QStringList sel = dlg.selectedFiles(); - if(sel.isEmpty()){ return; } //cancelled - QString dirpath = sel.first(); //QFileDialog::getExistingDirectory(0, tr("Select a Multimedia Directory"), QDir::homePath() ); - if(dirpath.isEmpty()){ return; } //cancelled - QDir dir(dirpath); - QFileInfoList files = dir.entryInfoList(LXDG::findAVFileExtensions(), QDir::Files | QDir::NoDotAndDotDot, QDir::Name); - if(files.isEmpty()){ return; } //nothing in this directory - QList urls; - for(int i=0; iaddMedia(urls); - playlistChanged(); -} - -void PlayerWidget::AddURLToPlaylist(){ - QInputDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setInputMode(QInputDialog::TextInput); - dlg.setLabelText(tr("Enter a valid URL for a multimedia file or stream:")); - dlg.setTextEchoMode(QLineEdit::Normal); - dlg.setWindowTitle(tr("Multimedia URL")); - dlg.setWindowIcon( LXDG::findIcon("download","") ); - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - QApplication::processEvents(); - } - QString url = dlg.textValue(); - if(url.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled - - //QString url = QInputDialog::getText(0, tr("Multimedia URL"), tr("Enter a valid URL for a multimedia file or stream"), QLineEdit::Normal); - //if(url.isEmpty()){ return; } - QUrl newurl(url); - if(!newurl.isValid()){ return; } //invalid URL - PLAYLIST->addMedia(newurl); - playlistChanged(); -} - -void PlayerWidget::ClearPlaylist(){ - PLAYER->stop(); - PLAYLIST->clear(); - playlistChanged(); -} - -void PlayerWidget::ShufflePlaylist(){ - PLAYLIST->shuffle(); -} - - -void PlayerWidget::userlistSelectionChanged(){ //front-end combobox was changed by the user - if(updatinglists){ return; } - PLAYLIST->setCurrentIndex( ui->combo_playlist->currentIndex() ); -} - -void PlayerWidget::playerStateChanged(){ - switch( PLAYER->state() ){ - case QMediaPlayer::StoppedState: - ui->tool_stop->setVisible(false); - ui->tool_play->setVisible(true); - ui->tool_pause->setVisible(false); - ui->progressBar->setVisible(false); - break; - case QMediaPlayer::PausedState: - ui->tool_stop->setVisible(true); - ui->tool_play->setVisible(true); - ui->tool_pause->setVisible(false); - ui->progressBar->setVisible(true); - break; - case QMediaPlayer::PlayingState: - ui->tool_stop->setVisible(true); - ui->tool_play->setVisible(false); - ui->tool_pause->setVisible(true); - ui->progressBar->setVisible(true); - break; - } - -} - -void PlayerWidget::playlistChanged(){ - updatinglists = true; - ui->combo_playlist->clear(); - for(int i=0; imediaCount(); i++){ - QUrl url = PLAYLIST->media(i).canonicalUrl(); - if(url.isLocalFile()){ - ui->combo_playlist->addItem(LXDG::findMimeIcon(url.fileName().section(".",-1)), url.fileName() ); - }else{ - ui->combo_playlist->addItem(LXDG::findIcon("download",""), url.toString() ); - } - } - if(PLAYLIST->currentIndex()<0 && PLAYLIST->mediaCount()>0){ PLAYLIST->setCurrentIndex(0); } - ui->combo_playlist->setCurrentIndex(PLAYLIST->currentIndex()); - - updatinglists = false; -} - -void PlayerWidget::currentSongChanged(){ - if(PLAYLIST->currentIndex() != ui->combo_playlist->currentIndex()){ - updatinglists = true; - ui->combo_playlist->setCurrentIndex(PLAYLIST->currentIndex()); - updatinglists = false; - } - ui->tool_next->setEnabled( PLAYLIST->nextIndex() >= 0 ); - ui->tool_prev->setEnabled( PLAYLIST->previousIndex() >= 0); - ui->label_num->setText( QString::number( PLAYLIST->currentIndex()+1)+"/"+QString::number(PLAYLIST->mediaCount()) ); - ui->progressBar->setRange(0, PLAYER->duration() ); - ui->progressBar->setValue(0); -} - -void PlayerWidget::updateProgress(qint64 val){ - //qDebug() << "Update Progress Bar:" << val; - ui->progressBar->setValue(val); -} - -void PlayerWidget::updateMaxProgress(qint64 val){ - ui->progressBar->setRange(0,val); -} - - -AudioPlayerPlugin::AudioPlayerPlugin(QWidget *parent, QString ID) : LDPlugin(parent, ID){ - player = new PlayerWidget(this); - this->setLayout( new QVBoxLayout() ); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(player); - -} - -AudioPlayerPlugin::~AudioPlayerPlugin(){ - //qDebug() << "Remove AudioPlayerPlugin"; -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.h deleted file mode 100644 index 6aaeac4c..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.h +++ /dev/null @@ -1,84 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin is a simple audio player on the desktop -//=========================================== -#ifndef _LUMINA_DESKTOP_PLUGIN_AUDIO_PLAYER_WIDGET_H -#define _LUMINA_DESKTOP_PLUGIN_AUDIO_PLAYER_WIDGET_H - -#include -#include -#include -#include -#include - -#include "../LDPlugin.h" - -namespace Ui{ - class PlayerWidget; -}; - -class PlayerWidget : public QWidget{ - Q_OBJECT -public: - PlayerWidget(QWidget *parent = 0); - ~PlayerWidget(); - -public slots: - void LoadIcons(); - -private: - Ui::PlayerWidget *ui; - QMediaPlaylist *PLAYLIST; - QMediaPlayer *PLAYER; - QMenu *configMenu, *addMenu; - bool updatinglists; - -private slots: - void playClicked(); - void pauseClicked(); - void stopClicked(); - void nextClicked(); - void prevClicked(); - - void AddFilesToPlaylist(); - void AddDirToPlaylist(); - void AddURLToPlaylist(); - void ClearPlaylist(); - void ShufflePlaylist(); - void userlistSelectionChanged(); //front-end combobox was changed by the user - void playerStateChanged(); - void playlistChanged(); //list of items changed - void currentSongChanged(); - void updateProgress(qint64 val); - void updateMaxProgress(qint64 val); -}; - -// Wrapper class to put this into a desktop plugin container -class AudioPlayerPlugin : public LDPlugin{ - Q_OBJECT -public: - AudioPlayerPlugin(QWidget* parent, QString ID); - ~AudioPlayerPlugin(); - - virtual QSize defaultPluginSize(){ - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(3,1); - } - -private: - PlayerWidget *player; - -public slots: - void LocaleChange(){ - QTimer::singleShot(0,player, SLOT(LoadIcons())); - } - void ThemeChange(){ - QTimer::singleShot(0,player, SLOT(LoadIcons())); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.ui b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.ui deleted file mode 100644 index b1e7ee59..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/audioplayer/PlayerWidget.ui +++ /dev/null @@ -1,182 +0,0 @@ - - - PlayerWidget - - - - 0 - 0 - 346 - 81 - - - - Form - - - QToolButton::menu-indicator{ image: none; } - - - - 4 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Config - - - QToolButton::InstantPopup - - - true - - - - - - - Add - - - QToolButton::InstantPopup - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - prev - - - true - - - - - - - 1/10 - - - - - - - next - - - true - - - - - - - - - - - - - - Play - - - true - - - - - - - Pause - - - true - - - - - - - Stop - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 24 - - - false - - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/calendar/CalendarPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/calendar/CalendarPlugin.h deleted file mode 100644 index abb138f7..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/calendar/CalendarPlugin.h +++ /dev/null @@ -1,59 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is a quick sample desktop plugin -//=========================================== -#ifndef _LUMINA_DESKTOP_DESKTOP_PLUGIN_CALENDAR_H -#define _LUMINA_DESKTOP_DESKTOP_PLUGIN_CALENDAR_H - -#include -#include -#include -#include -#include "../LDPlugin.h" - -class CalendarPlugin : public LDPlugin{ - Q_OBJECT -private: - QCalendarWidget *cal; - QTimer *timer; - -public: - CalendarPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - this->setLayout( new QVBoxLayout()); - this->layout()->setContentsMargins(0,0,0,0); - cal = new QCalendarWidget(this); - cal->setSelectionMode(QCalendarWidget::NoSelection); - this->layout()->addWidget(cal); - timer = new QTimer(this); - timer->setInterval(1800000); //30 minute refresh timer - timer->start(); - connect(timer, SIGNAL(timeout()), this, SLOT(updateDate()) ); - QTimer::singleShot(0,this, SLOT(updateDate()) ); - connect(this, SIGNAL(PluginResized()), this, SLOT(UpdateCalendarSize())); - } - - ~CalendarPlugin(){ timer->stop(); } - - virtual QSize defaultPluginSize(){ - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(3,2); - } - -private slots: - void updateDate(){ - if(cal->selectedDate() != QDate::currentDate()){ - cal->setSelectedDate(QDate::currentDate()); - cal->showSelectedDate(); - } - } - void UpdateCalendarSize(){ - cal->setFixedSize(this->size()); - } - - -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktop-plugins.pri b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktop-plugins.pri deleted file mode 100644 index 8376316a..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktop-plugins.pri +++ /dev/null @@ -1,24 +0,0 @@ -SOURCES += $$PWD/applauncher/AppLauncherPlugin.cpp \ - $$PWD/desktopview/DesktopViewPlugin.cpp \ - $$PWD/notepad/NotepadPlugin.cpp \ - $$PWD/audioplayer/PlayerWidget.cpp \ - $$PWD/systemmonitor/MonitorWidget.cpp \ - $$PWD/rssreader/RSSFeedPlugin.cpp \ - $$PWD/rssreader/RSSObjects.cpp -# $$PWD/messagecenter/MessageCenter.cpp - -HEADERS += $$PWD/calendar/CalendarPlugin.h \ - $$PWD/applauncher/AppLauncherPlugin.h \ - $$PWD/applauncher/OutlineToolButton.h \ - $$PWD/desktopview/DesktopViewPlugin.h \ - $$PWD/notepad/NotepadPlugin.h \ - $$PWD/audioplayer/PlayerWidget.h \ - $$PWD/systemmonitor/MonitorWidget.h \ - $$PWD/rssreader/RSSFeedPlugin.h \ - $$PWD/rssreader/RSSObjects.h -# $$PWD/quickcontainer/QuickDPlugin.h -# $$PWD/messagecenter/MessageCenter.h - -FORMS += $$PWD/audioplayer/PlayerWidget.ui \ - $$PWD/systemmonitor/MonitorWidget.ui \ - $$PWD/rssreader/RSSFeedPlugin.ui diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.cpp deleted file mode 100644 index 90f3374b..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.cpp +++ /dev/null @@ -1,214 +0,0 @@ -#include "DesktopViewPlugin.h" - -#include -#include -#include -#include -#include - -#include -#include "LSession.h" - - -DesktopViewPlugin::DesktopViewPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - this->setLayout( new QVBoxLayout()); - this->layout()->setContentsMargins(0,0,0,0); - - list = new QListWidget(this); - list->setViewMode(QListView::IconMode); - list->setFlow(QListWidget::TopToBottom); //Qt bug workaround - need the opposite flow in the widget constructor - list->setWrapping(true); - list->setSpacing(4); - list->setSelectionBehavior(QAbstractItemView::SelectItems); - list->setSelectionMode(QAbstractItemView::ExtendedSelection); - list->setContextMenuPolicy(Qt::CustomContextMenu); - list->setMovement(QListView::Snap); //make sure items are "stuck" in the grid - - menu = new QMenu(this); - menu->addAction( LXDG::findIcon("run-build-file",""), tr("Open"), this, SLOT(runItems()) ); - menu->addSeparator(); - menu->addAction( LXDG::findIcon("edit-cut",""), tr("Cut"), this, SLOT(cutItems()) ); - menu->addAction( LXDG::findIcon("edit-copy",""), tr("Copy"), this, SLOT(copyItems()) ); - menu->addSeparator(); - menu->addAction( LXDG::findIcon("zoom-in",""), tr("Increase Icons"), this, SLOT(increaseIconSize()) ); - menu->addAction( LXDG::findIcon("zoom-out",""), tr("Decrease Icons"), this, SLOT(decreaseIconSize()) ); - menu->addSeparator(); - menu->addAction( LXDG::findIcon("edit-delete",""), tr("Delete"), this, SLOT(deleteItems()) ); - menu->addSeparator(); - if(LUtils::isValidBinary("lumina-fileinfo")){ - menu->addAction( LXDG::findIcon("system-search",""), tr("Properties"), this, SLOT(displayProperties()) ); - } - this->layout()->addWidget(list); - - connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(updateContents()) ); - connect(list, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(runItems()) ); - connect(list, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showMenu(const QPoint&)) ); - QTimer::singleShot(1000,this, SLOT(updateContents()) ); //wait a second before loading contents -} - -DesktopViewPlugin::~DesktopViewPlugin(){ - -} - -void DesktopViewPlugin::runItems(){ - QList sel = list->selectedItems(); - for(int i=0; iwhatsThis()+"\""); - } -} - -void DesktopViewPlugin::copyItems(){ - QList sel = list->selectedItems(); - if(sel.isEmpty()){ return; } //nothing selected - QStringList items; - //Format the data string - for(int i=0; iwhatsThis(); - } - //Now save that data to the global clipboard - QMimeData *dat = new QMimeData; - dat->clear(); - dat->setData("x-special/lumina-copied-files", items.join("\n").toLocal8Bit()); - QApplication::clipboard()->clear(); - QApplication::clipboard()->setMimeData(dat); -} - -void DesktopViewPlugin::cutItems(){ - QList sel = list->selectedItems(); - if(sel.isEmpty()){ return; } //nothing selected - QStringList items; - //Format the data string - for(int i=0; iwhatsThis(); - } - //Now save that data to the global clipboard - QMimeData *dat = new QMimeData; - dat->clear(); - dat->setData("x-special/lumina-copied-files", items.join("\n").toLocal8Bit()); - QApplication::clipboard()->clear(); - QApplication::clipboard()->setMimeData(dat); -} - -void DesktopViewPlugin::deleteItems(){ - QList sel = list->selectedItems(); - for(int i=0; iwhatsThis()).isDir()){ - QProcess::startDetached("rm -r \""+sel[i]->whatsThis()+"\""); - }else{ - QFile::remove(sel[i]->whatsThis()); - } - } -} - -void DesktopViewPlugin::showMenu(const QPoint &pos){ - //Make sure there is an item underneath the mouse first - if(list->itemAt(pos)!=0){ - menu->popup(this->mapToGlobal(pos)); - }else{ - //Pass the context menu request on to the desktop (emit it from the plugin) - this->showPluginMenu(); - //emit OpenDesktopMenu(); - } -} - -void DesktopViewPlugin::increaseIconSize(){ - int icosize = this->readSetting("IconSize",64).toInt(); - icosize+=16; //go in orders of 16 pixels - //list->setIconSize(QSize(icosize,icosize)); - this->saveSetting("IconSize",icosize); - QTimer::singleShot(10, this, SLOT(updateContents())); -} - -void DesktopViewPlugin::decreaseIconSize(){ - int icosize = this->readSetting("IconSize",64).toInt(); - if(icosize < 20){ return; } //too small to decrease more - icosize-=16; //go in orders of 16 pixels - //list->setIconSize(QSize(icosize,icosize)); - this->saveSetting("IconSize",icosize); - QTimer::singleShot(10,this, SLOT(updateContents())); -} - -void DesktopViewPlugin::updateContents(){ - list->clear(); - - int icosize = this->readSetting("IconSize",64).toInt(); - QSize gridSZ = QSize(qRound(1.8*icosize),icosize+4+(2*this->fontMetrics().height()) ); - //qDebug() << "Icon Size:" << icosize <<"Grid Size:" << gridSZ.width() << gridSZ.height(); - list->setGridSize(gridSZ); - list->setIconSize(QSize(icosize,icosize)); - QDir dir(QDir::homePath()+"/Desktop"); - QFileInfoList files = dir.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Type | QDir::DirsFirst); - for(int i=0; isetSizeHint(gridSZ); //ensure uniform item sizes - //it->setForeground(QBrush(Qt::black, Qt::Dense2Pattern)); //Try to use a font color which will always be visible - it->setTextAlignment(Qt::AlignCenter); - it->setWhatsThis(files[i].absoluteFilePath()); - QString txt; - if(files[i].isDir()){ - it->setIcon( LXDG::findIcon("folder","") ); - txt = files[i].fileName(); - }else if(files[i].suffix() == "desktop" ){ - XDGDesktop desk(files[i].absoluteFilePath()); - if(desk.isValid()){ - it->setIcon( LXDG::findIcon(desk.icon,"unknown") ); - if(desk.name.isEmpty()){ - txt = files[i].fileName(); - }else{ - txt = desk.name; - } - }else{ - //Revert back to a standard file handling - it->setIcon( LXDG::findMimeIcon(files[i].fileName()) ); - txt = files[i].fileName(); - } - }else if(LUtils::imageExtensions().contains(files[i].suffix().toLower()) ){ - it->setIcon( QIcon( QPixmap(files[i].absoluteFilePath()).scaled(icosize,icosize,Qt::IgnoreAspectRatio, Qt::SmoothTransformation) ) ); - txt = files[i].fileName(); - }else{ - it->setIcon( LXDG::findMimeIcon( files[i].fileName() ) ); - txt = files[i].fileName(); - } - //Add the sym-link overlay to the icon as necessary - if(files[i].isSymLink()){ - QImage img = it->icon().pixmap(QSize(icosize,icosize)).toImage(); - int oSize = icosize/2; //overlay size - QPixmap overlay = LXDG::findIcon("emblem-symbolic-link").pixmap(oSize,oSize).scaled(oSize,oSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); - QPainter painter(&img); - painter.drawPixmap(icosize-oSize,icosize-oSize,overlay); //put it in the bottom-right corner - it->setIcon( QIcon(QPixmap::fromImage(img)) ); - } - //Now adjust the visible text as necessary based on font/grid sizing - it->setToolTip(txt); - if(this->fontMetrics().width(txt) > (gridSZ.width()-4) ){ - //int dash = this->fontMetrics().width("-"); - //Text too long, try to show it on two lines - txt = txt.section(" ",0,2).replace(" ","\n"); //First take care of any natural breaks - if(txt.contains("\n")){ - //need to check each line - QStringList txtL = txt.split("\n"); - for(int i=0; ifontMetrics().elidedText(txtL[i], Qt::ElideRight, gridSZ.width()-4); } - txt = txtL.join("\n"); - if(txtL.length()>2){ txt = txt.section("\n",0,1); } //only keep the first two lines - }else{ - txt = this->fontMetrics().elidedText(txt,Qt::ElideRight, 2*(gridSZ.width()-4)); - //Now split the line in half for the two lines - txt.insert( (txt.count()/2), "\n"); - } - }else{ - txt.append("\n "); //ensure two lines (2nd one invisible) - keeps formatting sane - } - it->setText(txt); - list->addItem(it); - if( (i%10) == 0){ QApplication::processEvents(); }//keep the UI snappy, every 10 items - } - list->setFlow(QListWidget::TopToBottom); //To ensure this is consistent - issues with putting it in the constructor - list->update(); //Re-paint the widget after all items are added -} - -void DesktopViewPlugin::displayProperties(){ - QList sel = list->selectedItems(); - for(int i=0; iwhatsThis()); - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.h deleted file mode 100644 index 046b6e5c..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/desktopview/DesktopViewPlugin.h +++ /dev/null @@ -1,55 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin is a listing/launcher for things in the ~/Desktop folder -//=========================================== -#ifndef _LUMINA_DESKTOP_DESKTOP_VIEW_PLUGIN_H -#define _LUMINA_DESKTOP_DESKTOP_VIEW_PLUGIN_H - -#include -#include -#include -#include -#include - -#include "../LDPlugin.h" - -class DesktopViewPlugin : public LDPlugin{ - Q_OBJECT -public: - DesktopViewPlugin(QWidget* parent, QString ID); - ~DesktopViewPlugin(); - - virtual QSize defaultPluginSize(){ - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(3,3); - } -private: - QListWidget *list; - QMenu *menu; - -private slots: - void runItems(); - void copyItems(); - void cutItems(); - void deleteItems(); - void showMenu(const QPoint&); - void increaseIconSize(); - void decreaseIconSize(); - void updateContents(); - void displayProperties(); - - -public slots: - void LocaleChange(){ - QTimer::singleShot(0,this, SLOT(updateContents())); - } - void ThemeChange(){ - QTimer::singleShot(0,this, SLOT(updateContents())); - } - -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/LXDG-DBusNotifier.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/LXDG-DBusNotifier.h deleted file mode 100644 index 64413e95..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/LXDG-DBusNotifier.h +++ /dev/null @@ -1,17 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// Simple DBUS message handler for the FreeDesktop desktop notifications specification - - -class LXDG-DBusNotifier : public QDBusVirtualObkect{ - Q_OBJECT -public: - -private: - - -}; diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.cpp deleted file mode 100644 index df07a122..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include "MessageCenter.h" - -#include -#include -#include -#include -#include - -MessageCenterPlugin::MessageCenterPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - //Setup the UI - QVBoxLayout *vlay = new QVBoxLayout(); - this->setLayout( new QVBoxLayout() ); - this->layout()->setContentsMargins(0,0,0,0); - vlay->setContentsMargins(3,3,3,3); - frame = new QFrame(this); - frame->setObjectName("messagecenterbase"); - this->layout()->addWidget(frame); - frame->setLayout(vlay); - - - //Setup the title bar header buttons - QHBoxLayout *hlay = new QHBoxLayout(); - tool_clearall = new QToolButton(this); - tool_clearall->setAutoRaise(true); - tool_clearone = new QToolButton(this); - tool_clearone->setAutoRaise(true); - QWidget *spacer = new QWidget(this); - spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - hlay->addWidget(spacer); - hlay->addWidget(tool_clearone); - hlay->addWidget(tool_clearall); - vlay->addLayout(hlay); - - //Setup the main text widget - list_messages = new QListWidget(this); - list_messages->setSelectionMode(QAbstractItemView::SingleSelection); - list_messages->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - vlay->addWidget(list_messages); - - //Now setup the initial values - this->setInitialSize(200,300); - //Setup the button connections - connect(tool_clearall, SIGNAL(clicked()), this, SLOT(clearAllMessages()) ); - connect(tool_clearone, SIGNAL(clicked()), this, SLOT(clearSelectedMessage()) ); - - //Setup the DBUS signals/slots - if(QDBusConnection::sessionBus().isConnected()){ - if( QDBusConnection::sessionBus().registerService("org.freedesktop.Notifications") ){ - //Was able to register this service, also register everything it can do... - //SUPPORTED: "body", "body-hyperlinks", "body-markup", "icon-static" - - - } - QDBusConnection::sessionBus().connect("", "", "org.freedesktop.Notifications", "Notify", this, SLOT(newMessage(QString, uint, QString, QString, QString, QStringList, dict, int)) ); - QDBusConnection::sessionBus().interface().call("AddMatch", "interface='org.freedesktop.Notifications',member='Notify',type='method_call',eavesdrop='true'"); - qDebug() << "Available Session DBUS Services:" << QDBusConnection::sessionBus().interface()->registeredServiceNames().value(); - //connect(QString(), QString(), - } - if(QDBusConnection::systemBus().isConnected()){ - qDebug() << "Available System DBUS Services:" << QDBusConnection::systemBus().interface()->registeredServiceNames().value(); - } - - QTimer::singleShot(0,this, SLOT(loadIcons()) ); -} - -MessageCenterPlugin::~MessageCenterPlugin(){ - -} - -void MessageCenterPlugin::newMessage(QString summary, QString body){ - qDebug() << "New Message:" << summary, body; -} - -void MessageCenterPlugin::clearAllMessages(){ - list_messages->clear(); -} - -void MessageCenterPlugin::clearSelectedMessage(){ - if( list_messages->currentItem()==0){ return; } //nothing selected - list_messages->removeItemWidget( list_messages->currentItem() ); -} - - -void MessageCenterPlugin::loadIcons(){ - tool_clearall->setIcon( LXDG::findIcon("edit-clear-list","") ); - tool_clearall->setToolTip( tr("Clear all messages") ); - tool_clearone->setIcon( LXDG::findIcon("edit-delete","") ); - tool_clearone->setToolTip( tr("Clear selected message") ); - -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.h deleted file mode 100644 index 8491546f..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/messagecenter/MessageCenter.h +++ /dev/null @@ -1,48 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin is a simple DBUS monitor which display's messages that come in -//=========================================== -#ifndef _LUMINA_DESKTOP_MESSAGE_CENTER_PLUGIN_H -#define _LUMINA_DESKTOP_MESSAGE_CENTER_PLUGIN_H - -#include -#include -#include - -#include -#include "../LDPlugin.h" - -class MessageCenterPlugin : public LDPlugin{ - Q_OBJECT -public: - MessageCenterPlugin(QWidget* parent, QString ID); - ~MessageCenterPlugin(); - -private: - //QDBusConnection *sess, *sys; - QListWidget *list_messages; - QFrame *frame; - QToolButton *tool_clearall; //clear all messages - QToolButton *tool_clearone; //clear selected message - -private slots: - //void newMessage(QDBusMessage *message); - void clearAllMessages(); - void clearSelectedMessage(); - - void loadIcons(); - -public slots: - void LocaleChange(){ - QTimer::singleShot(0,this, SLOT(loadIcons())); - } - void ThemeChange(){ - QTimer::singleShot(0,this, SLOT(loadIcons())); - } - -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.cpp deleted file mode 100644 index 6d321305..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.cpp +++ /dev/null @@ -1,330 +0,0 @@ -#include "NotepadPlugin.h" - -#include -#include "LSession.h" -#include -#include -#include -#include -#include - -NotePadPlugin::NotePadPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - //qDebug() << "Creating Notepad Plugin:"; - QVBoxLayout *vlay = new QVBoxLayout(); - this->setLayout( new QVBoxLayout() ); - this->layout()->setContentsMargins(0,0,0,0); - vlay->setContentsMargins(3,3,3,3); - frame = new QFrame(this); - frame->setObjectName("notepadbase"); - //frame->setStyleSheet("QFrame#notepadbase{border-width: 1px; background: rgba(255,255,255,50); color: black;} QFrame{ border: none; border-radius: 3px; background: rgba(255,255,255,100); color: black;}"); - this->layout()->addWidget(frame); - frame->setLayout(vlay); - - if(!QFile::exists(QDir::homePath()+"/Notes")){ - //Create the notes directory if non-existant - QDir dir; - dir.mkpath(QDir::homePath()+"/Notes"); - } - watcher = new QFileSystemWatcher(this); - //Always watch the notes directory for new files/changes - watcher->addPath(QDir::homePath()+"/Notes"); - - typeTimer = new QTimer(this); - typeTimer->setInterval(1000); // 1 second before it saves - typeTimer->setSingleShot(true); //compress lots of signals into a single save - - updating = false; - //Setup the title bar header buttons - QHBoxLayout *hlay = new QHBoxLayout(); - config = new QToolButton(this); - config->setAutoRaise(true); - config->setMenu(new QMenu(this)); - config->setPopupMode(QToolButton::InstantPopup); - /*open = new QToolButton(this); - open->setAutoRaise(true); - add = new QToolButton(this); - add->setAutoRaise(true); - rem = new QToolButton(this); - rem->setAutoRaise(true);*/ - cnote = new QComboBox(this); - - hlay->addWidget(cnote); - hlay->addWidget(config); - //hlay->addWidget(open); - //hlay->addWidget(add); - //hlay->addWidget(rem); - vlay->addLayout(hlay); - - //Setup the main text widget - edit = new QPlainTextEdit(this); - edit->setReadOnly(false); - edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - vlay->addWidget(edit); - edit->setContextMenuPolicy(Qt::NoContextMenu); - - //Now load the new file-based system for saving notes - //qDebug() << "Saving a new setting"; - this->saveSetting("customFile",""); //always clear this when the plugin is initialized (only maintained per-session) - //qDebug() << "Loading Notes Dir"; - QTimer::singleShot(10, this, SLOT(notesDirChanged())); - //qDebug() << "Set Sizing"; - - //qDebug() << "Connect Signals/slots"; - //Setup the button connections - /*connect(open, SIGNAL(clicked()), this, SLOT(openNoteClicked()) ); - connect(add, SIGNAL(clicked()), this, SLOT(newNoteClicked()) ); - connect(rem, SIGNAL(clicked()), this, SLOT(remNote()) );*/ - //connect(config, SIGNAL(clicked()), this, SLOT(openConfigMenu()) ); - connect(edit, SIGNAL(textChanged()), this, SLOT(newTextAvailable()) ); - connect(cnote, SIGNAL(currentIndexChanged(QString)), this, SLOT(noteChanged()) ); - connect(typeTimer, SIGNAL(timeout()), this, SLOT(updateContents()) ); - connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(notesDirChanged()) ); //re-load the available notes - connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(noteChanged()) ); //re-load the current file - QTimer::singleShot(0,this, SLOT(loadIcons()) ); - //qDebug() << " - Done with init"; -} - -NotePadPlugin::~NotePadPlugin(){ - -} - - -void NotePadPlugin::openNote(){ - //qDebug() << "Open New Note:"; - //Prompt for a name for the new note - QFileDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setFileMode(QFileDialog::ExistingFile); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setNameFilters( QStringList() << tr("Note Files (*.note)") << tr("Text Files (*)")); - dlg.setWindowTitle(tr("Open a note file")); - dlg.setWindowIcon( LXDG::findIcon("document-open","") ); - dlg.setDirectory(QDir::homePath()); //start in the home directory - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - QApplication::processEvents(); - } - QStringList sel = dlg.selectedFiles(); - if(sel.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled - QString fullpath = sel.first(); - QString name = fullpath.section("/",-1); - //qDebug() << " - Found Note:" << name << fullpath; - int index = cnote->findText(name, Qt::MatchExactly | Qt::MatchCaseSensitive); - if(QFile::exists(fullpath) && index <0){ - //Alternate option of searching for the file in the list - index = cnote->findText(fullpath, Qt::MatchExactly | Qt::MatchCaseSensitive); - } - if(index>=0){ - //This note already exists: just load it - cnote->setCurrentIndex(index); - }else{ - //New note - add it to the end of the list and then load it - cnote->addItem(name, fullpath); - this->saveSetting("customFile", fullpath); //save this as a custom file - cnote->setCurrentIndex( cnote->count()-1 ); - QTimer::singleShot(1000, this, SLOT(notesDirChanged())); //Make sure to refresh the list (only one custom file at a time) - } -} - -QString NotePadPlugin::newNoteName(QString oldname, bool tryagain){ - //Prompt for a name for the new note - //qDebug() << "Create new note"; - QInputDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setInputMode(QInputDialog::TextInput); - dlg.setLabelText(tr("Name:")); - dlg.setTextEchoMode(QLineEdit::Normal); - if(tryagain){ dlg.setWindowTitle(tr("Invalid Note Name: Try Again")); } - else{ dlg.setWindowTitle(tr("Select a Note Name")); } - dlg.setWindowIcon( LXDG::findIcon("document-new","") ); - dlg.setTextValue(oldname); - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - //this->thread()->usleep(300000); //300 ms between updates - QApplication::processEvents(); - } - QString name = dlg.textValue(); - //make sure to remove any "bad" characters from the name - name.remove("\""); name.remove(";"); name.remove("\'"); name.replace("/","_"); - if(name.isEmpty() || dlg.result()!=QDialog::Accepted){ return ""; } //cancelled - //Check validity of the new note filename - QString fullpath = QDir::homePath()+"/Notes/"+name; - if(!fullpath.endsWith(".note")){ fullpath.append(".note"); } - if(QFile::exists(fullpath)){ - return newNoteName(name, true); //try again - } - return name; //good name - go ahead and return it -} - -void NotePadPlugin::updateConfigMenu(){ - //Re-create the menu and open it - config->menu()->clear(); - config->menu()->addAction(LXDG::findIcon("document-open",""), tr("Open Text File"), this, SLOT(openNoteClicked()) ); - config->menu()->addAction(LXDG::findIcon("document-new",""), tr("Create a Note"), this, SLOT(newNoteClicked()) ); - if(cnote->currentIndex()>=0){ - config->menu()->addSeparator(); - config->menu()->addAction(LXDG::findIcon("document-edit",""), tr("Rename Note"), this, SLOT(renameNote()) ); - config->menu()->addAction(LXDG::findIcon("document-close",""), tr("Delete Note"), this, SLOT(remNote()) ); - } -} - -void NotePadPlugin::openNoteClicked(){ - openNote(); -} - -void NotePadPlugin::newNoteClicked(){ - //QtConcurrent::run(this, &NotePadPlugin::newNote); - QString name = newNoteName(); - if(name.isEmpty()){ return; } - QString fullpath = QDir::homePath()+"/Notes/"+name; - if(!fullpath.endsWith(".note")){ fullpath.append(".note"); } - //qDebug() << " - New Note:" << name << fullpath; - int index = cnote->findText(name, Qt::MatchExactly | Qt::MatchCaseSensitive); - if(QFile::exists(fullpath) && index <0){ - //Alternate option of searching for the file in the list - index = cnote->findText(fullpath, Qt::MatchExactly | Qt::MatchCaseSensitive); - } - if(index>=0){ - //This note already exists: just load it - cnote->setCurrentIndex(index); - }else{ - //New note - add it to the end of the list and then load it - cnote->addItem(name, fullpath); - cnote->setCurrentIndex( cnote->count()-1 ); - } -} - -void NotePadPlugin::remNote(){ - QString note = cnote->currentData().toString(); - if(note.isEmpty()){ return; } - watcher->removePath(note); //remove this file from the watcher - this->saveSetting("currentFile",""); //reset the internal value - QFile::remove(note); //remove the file - //if(!note.startsWith(QDir::homePath()+"/Notes/") ){ - //If the file was not in the notes directory, need to manually prompt for a re-load - // otherwise, the directory watcher will catch it and trigger a re-load (no need to double-load) - notesDirChanged(); - //} -} - -void NotePadPlugin::renameNote(){ - int item = cnote->currentIndex(); - if(item<0){ return; } //nothing selected - QString oldpath = cnote->currentData().toString(); - if(oldpath.isEmpty() || !oldpath.endsWith(".note")){ return; } - QString name = newNoteName(cnote->currentText()); - if(name.isEmpty()){ return; } - QString fullpath = QDir::homePath()+"/Notes/"+name; - if(!fullpath.endsWith(".note")){ fullpath.append(".note"); } - //qDebug() << " - New Note:" << name << fullpath; - //Update the current item data to point to this file - cnote->setItemText(item, name); - cnote->setItemData(item, fullpath); - //Now move the file over - QFile::rename(oldpath, fullpath); - noteChanged(); -} - -void NotePadPlugin::newTextAvailable(){ - if(updating){ return; } //programmatic change of the widget - if(typeTimer->isActive()){ typeTimer->stop(); } - typeTimer->start(); -} - -void NotePadPlugin::updateContents(){ - if(updating){ return; } //this was a programmatic change to the widget - //The text was changed in the plugin - save it in the file - QString note = cnote->currentData().toString(); - updating = true; - LUtils::writeFile(note, edit->toPlainText().split("\n"), true); - QApplication::processEvents(); //make sure to process/discard the file changed signal before disabling the flag - updating = false; -} - -void NotePadPlugin::notesDirChanged(){ - if(updating){ return; } - QString cfile = this->readSetting("currentFile","").toString(); - QStringList notes; - QDir dir(QDir::homePath()+"/Notes"); - QStringList files = dir.entryList(QStringList() << "*.note", QDir::Files | QDir::NoDotAndDotDot, QDir::Name); - for(int i=0; ireadSetting("customFile","").toString(); - if(!custom.isEmpty() && QFile::exists(custom) ){ notes << custom; } - //qDebug() << "Available Notes:" << notes << cfile; - //Now update the UI list - updating = true; //don't refresh the UI until done changing lists - cnote->clear(); - bool found = false; - for(int i=0; iaddItem(name, notes[i]); - if(notes[i]==cfile){ cnote->setCurrentIndex(i); found = true;} - } - if(!found && !cfile.isEmpty() && QFile::exists(cfile)){ - //Current note is a manually-loaded text file - cnote->addItem(cfile.section("/",-1), cfile); - cnote->setCurrentIndex( cnote->count()-1 ); //last item - found = true; - } - if(!found && cnote->count()>0){ cnote->setCurrentIndex(0); } - updating =false; - noteChanged(); -} - -void NotePadPlugin::noteChanged(){ - if(updating){ return; } - updating =true; - QString note; - if(cnote->currentIndex()>=0){ - note = cnote->currentData().toString(); - } - QTimer::singleShot(0, this, SLOT(updateConfigMenu()) ); - if(note.isEmpty() && cnote->count()>0){ - updating=false; - cnote->setCurrentIndex(0); - return; - } - QString oldnote = this->readSetting("currentFile","").toString(); - //qDebug() << "Note Changed:" << note << oldnote; - if( oldnote!=note ){ - //Clear the old note file/setting - if(!oldnote.isEmpty()){ - watcher->removePath(oldnote); - this->saveSetting("currentFile",""); - } - if(!note.isEmpty()){ - this->saveSetting("currentFile",note); - watcher->addPath(note); - } - } - - if(!note.isEmpty()){ - QString text = LUtils::readFile(note).join("\n"); - if(text!=edit->toPlainText()){ - edit->setPlainText( text ); - } - }else{ - edit->clear(); - } - //If no notes available - disable the editor until a new one is created - edit->setEnabled(!note.isEmpty()); - //rem->setEnabled(!note.isEmpty()); - cnote->setEnabled(!note.isEmpty()); - //leave the new/open buttons enabled all the time - updating = false; -} - - -void NotePadPlugin::loadIcons(){ - /*open->setIcon( LXDG::findIcon("document-open","") ); - add->setIcon( LXDG::findIcon("document-new","") ); - rem->setIcon( LXDG::findIcon("document-close","") );*/ - config->setIcon( LXDG::findIcon("configure","") ); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.h deleted file mode 100644 index 5084dadf..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/notepad/NotepadPlugin.h +++ /dev/null @@ -1,66 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin is a simple text editor for notes on the desktop -//=========================================== -#ifndef _LUMINA_DESKTOP_NOTEPAD_PLUGIN_H -#define _LUMINA_DESKTOP_NOTEPAD_PLUGIN_H - -#include -#include -#include -#include -#include -#include -#include "../LDPlugin.h" - -class NotePadPlugin : public LDPlugin{ - Q_OBJECT -public: - NotePadPlugin(QWidget* parent, QString ID); - ~NotePadPlugin(); - - virtual QSize defaultPluginSize(){ - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(3,3); - } -private: - QPlainTextEdit *edit; - QToolButton *config; //*open, *add, *rem; - QComboBox *cnote; - QFrame *frame; - QFileSystemWatcher *watcher; - bool updating; - QTimer *typeTimer; - - void openNote(); - QString newNoteName(QString oldname = "", bool tryagain = false); - -private slots: - void updateConfigMenu(); - - void openNoteClicked(); - void newNoteClicked(); - void remNote(); - void renameNote(); - void newTextAvailable(); - void updateContents(); - - void notesDirChanged(); - void noteChanged(); - - void loadIcons(); - -public slots: - void LocaleChange(){ - QTimer::singleShot(0,this, SLOT(noteChanged())); - } - void ThemeChange(){ - QTimer::singleShot(0,this, SLOT(loadIcons())); - } - -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/quickcontainer/QuickDPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/quickcontainer/QuickDPlugin.h deleted file mode 100644 index d6039ac0..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/quickcontainer/QuickDPlugin.h +++ /dev/null @@ -1,51 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is a simple container for a QtQuick plugin -//=========================================== -#ifndef _LUMINA_DESKTOP_DESKTOP_PLUGIN_QUICK_H -#define _LUMINA_DESKTOP_DESKTOP_PLUGIN_QUICK_H - -#include -#include -#include "../LDPlugin.h" - -#include - -class QuickDPlugin : public LDPlugin{ - Q_OBJECT -public: - QuickDPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ - this->setLayout( new QVBoxLayout()); - this->layout()->setContentsMargins(0,0,0,0); - container = new QQuickWidget(this); - container->setResizeMode(QQuickWidget::SizeRootObjectToView); - connect(container, SIGNAL(statusChanged(QQuickWidget::Status)), this, SLOT(statusChange(QQuickWidget::Status)) ); - this->layout()->addWidget(container); - container->setSource(QUrl::fromLocalFile( LUtils::findQuickPluginFile(ID.section("---",0,0)) )); - QApplication::processEvents(); //to check for errors right away - //this->setInitialSize(container->initialSize().width(), container->initialSize().height()); - } - - ~QuickDPlugin(){} - - virtual QSize defaultPluginSize(){ - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(2,2); - } -private: - QQuickWidget *container; - -private slots: - void statusChange(QQuickWidget::Status status){ - if(status == QQuickWidget::Error){ - qDebug() << "Quick Widget Error:" << this->ID(); - container->setSource(QUrl()); //clear out the script - experienced an error - } - } - -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.cpp deleted file mode 100644 index c330d6c0..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.cpp +++ /dev/null @@ -1,363 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "RSSFeedPlugin.h" -#include "ui_RSSFeedPlugin.h" - -#include -#include "LSession.h" -#include -#include -#include -#include -#include - -RSSFeedPlugin::RSSFeedPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID), ui(new Ui::RSSFeedPlugin()){ - ui->setupUi(this); - //Load the global settings - setprefix = "rssreader/"; //this structure/prefix should be used for *all* plugins of this type - RSS = new RSSReader(this, setprefix); - ui->text_feed->setContextMenuPolicy(Qt::NoContextMenu); - //Create the options menu - optionsMenu = new QMenu(this); - ui->tool_options->setMenu(optionsMenu); - presetMenu = new QMenu(this); - ui->tool_add_preset->setMenu(presetMenu); - - //Setup any signal/slot connections - connect(ui->push_back1, SIGNAL(clicked()), this, SLOT(backToFeeds()) ); - connect(ui->push_back2, SIGNAL(clicked()), this, SLOT(backToFeeds()) ); - connect(ui->push_back3, SIGNAL(clicked()), this, SLOT(backToFeeds()) ); - connect(ui->push_save_settings, SIGNAL(clicked()), this, SLOT(saveSettings()) ); - connect(RSS, SIGNAL(rssChanged(QString)), this, SLOT(RSSItemChanged(QString)) ); - connect(RSS, SIGNAL(newChannelsAvailable()), this, SLOT(UpdateFeedList())); - connect(ui->tool_gotosite, SIGNAL(clicked()), this, SLOT(openFeedPage()) ); - connect(ui->push_rm_feed, SIGNAL(clicked()), this, SLOT(removeFeed()) ); - connect(ui->push_add_url, SIGNAL(clicked()), this, SLOT(addNewFeed()) ); - connect(ui->combo_feed, SIGNAL(currentIndexChanged(int)), this, SLOT(currentFeedChanged()) ); - - connect(presetMenu, SIGNAL(triggered(QAction*)), this, SLOT(loadPreset(QAction*)) ); - - updateOptionsMenu(); - QTimer::singleShot(0,this, SLOT(ThemeChange()) ); - //qDebug() << " - Done with init"; - QStringList feeds; - if( !LSession::handle()->DesktopPluginSettings()->contains(setprefix+"currentfeeds") ){ - //First-time run of the plugin - automatically load the default feeds - feeds = LOS::RSSFeeds(); - for(int i=0; iDesktopPluginSettings()->setValue(setprefix+"currentfeeds", feeds); - }else{ - feeds = LSession::handle()->DesktopPluginSettings()->value(setprefix+"currentfeeds",QStringList()).toStringList(); - } - RSS->addUrls(feeds); - backToFeeds(); //always load the first page -} - -RSSFeedPlugin::~RSSFeedPlugin(){ - -} - -//================ -// PRIVATE -//================ -void RSSFeedPlugin::updateOptionsMenu(){ - optionsMenu->clear(); - optionsMenu->addAction(LXDG::findIcon("list-add",""), tr("Add RSS Feed"), this, SLOT(openFeedNew()) ); - optionsMenu->addAction(LXDG::findIcon("help-about",""), tr("View Feed Details"), this, SLOT(openFeedInfo()) ); - optionsMenu->addAction(LXDG::findIcon("configure",""), tr("Settings"), this, SLOT(openSettings()) ); - optionsMenu->addSeparator(); - optionsMenu->addAction(LXDG::findIcon("download",""), tr("Update Feeds Now"), this, SLOT(resyncFeeds()) ); - - presetMenu->clear(); - QStringList feeds = LOS::RSSFeeds(); - feeds << tr("Lumina Desktop RSS")+"::::http://lumina-desktop.org/?feed=rss2"; - feeds.sort(); - for(int i=0; iaddAction(feeds[i].section("::::",0,0) ); - tmp->setWhatsThis( feeds[i].section("::::",1,-1) ); - } -} - -void RSSFeedPlugin::checkFeedNotify(){ - bool notify = false; - for(int i=0; icombo_feed->count() && !notify; i++){ - if( !ui->combo_feed->itemData(i, Qt::WhatsThisRole).toString().isEmpty()){ notify = true; } - } - QString style; - if(notify){ style = "QComboBox{ background-color: rgba(255,0,0,120); }"; } - ui->combo_feed->setStyleSheet(style); -} - -//Simplification functions for loading feed info onto widgets -void RSSFeedPlugin::updateFeed(QString ID){ - //Now clear/update the feed viewer (HTML) - ui->text_feed->clear(); - if(ID.isEmpty()){ return; } //nothing to show - - //Save the datetime this feed was read - LSession::handle()->DesktopPluginSettings()->setValue(setprefix+"feedReads/"+ID, QDateTime::currentDateTime() ); - //Get the color to use for hyperlinks (need to specify in html) - QString color = ui->text_feed->palette().text().color().name(); //keep the hyperlinks the same color as the main text (different formatting still applies) - QString html; - RSSchannel data = RSS->dataForID(ID); - ui->label_lastupdate->setText( data.lastsync.toString(Qt::DefaultLocaleShortDate) ); - // - generate the html - // html.append("
    \n"); - for(int i=0; i"); - html.append("

    "+data.items[i].title+"

    "); - if(!data.items[i].pubdate.isNull() || !data.items[i].author.isEmpty()){ - html.append("("); - if(!data.items[i].pubdate.isNull()){ html.append(data.items[i].pubdate.toString(Qt::DefaultLocaleShortDate)); } - if(!data.items[i].author.isEmpty()){ - if(!html.endsWith("(")){ html.append(", "); } //spacing between date/author - if(!data.items[i].author_email.isEmpty()){ html.append(""+data.items[i].author+""); } - else{ html.append(data.items[i].author); } - } - html.append(")
    "); - } - html.append(data.items[i].description); - //html.append("\n"); - if(i+1 < data.items.length()){ html.append("
    "); } - } - //html.append("
\n"); - // - load that html into the viewer - ui->text_feed->setHtml(html); -} - -void RSSFeedPlugin::updateFeedInfo(QString ID){ - ui->page_feed_info->setWhatsThis(ID); - ui->text_feed_info->clear(); - if(ID.isEmpty()){ return; } - //Get the color to use for hyperlinks (need to specify in html) - QString color = ui->text_feed->palette().text().color().name(); //keep the hyperlinks the same color as the main text (different formatting still applies) - QString html; - RSSchannel data = RSS->dataForID(ID); - // - generate the html - // "+TEXT+" - html.append( QString(tr("Feed URL: %1")).arg(""+data.originalURL+"") +"

"); - html.append( QString(tr("Title: %1")).arg(data.title) +"
"); - html.append( QString(tr("Description: %1")).arg(data.description) +"
"); - html.append( QString(tr("Website: %1")).arg(""+data.link+"") +"

"); - if(!data.lastBuildDate.isNull()){ html.append( QString(tr("Last Build Date: %1")).arg(data.lastBuildDate.toString(Qt::DefaultLocaleShortDate)) +"
"); } - html.append( QString(tr("Last Sync: %1")).arg(data.lastsync.toString(Qt::DefaultLocaleShortDate)) +"
"); - html.append( QString(tr("Next Sync: %1")).arg(data.nextsync.toString(Qt::DefaultLocaleShortDate)) +"
"); - // - load that html into the viewer - ui->text_feed_info->setHtml(html); -} - -//================ -// PRIVATE SLOTS -//================ -void RSSFeedPlugin::loadIcons(){ - ui->tool_options->setIcon( LXDG::findIcon("configure","") ); - ui->tool_gotosite->setIcon( LXDG::findIcon("applications-internet","") ); - ui->push_back1->setIcon( LXDG::findIcon("go-previous","") ); - ui->push_back2->setIcon( LXDG::findIcon("go-previous","") ); - ui->push_back3->setIcon( LXDG::findIcon("go-previous","") ); - ui->push_rm_feed->setIcon( LXDG::findIcon("list-remove","") ); - ui->push_add_url->setIcon( LXDG::findIcon("list-add","") ); - ui->push_save_settings->setIcon( LXDG::findIcon("document-save","") ); - ui->tool_add_preset->setIcon( LXDG::findIcon("bookmark-new-list","") ); -} - -//GUI slots -// - Page management -void RSSFeedPlugin::backToFeeds(){ - ui->stackedWidget->setCurrentWidget(ui->page_feed); -} - -void RSSFeedPlugin::openFeedInfo(){ - QString ID = ui->combo_feed->currentData().toString(); - if(ID.isEmpty()){ return; } - updateFeedInfo(ID); - ui->stackedWidget->setCurrentWidget(ui->page_feed_info); - -} - -void RSSFeedPlugin::openFeedNew(){ - ui->line_new_url->setText(""); - ui->stackedWidget->setCurrentWidget(ui->page_new_feed); -} - -void RSSFeedPlugin::openSettings(){ - //Sync the widget with the current settings - QSettings *set = LSession::handle()->DesktopPluginSettings(); - - ui->check_manual_sync->setChecked( set->value(setprefix+"manual_sync_only", false).toBool() ); - int DI = set->value(setprefix+"default_interval_minutes", 60).toInt(); - if(DI<1){ DI = 60; } - if( (DI%60) == 0 ){DI = DI/60; ui->combo_sync_units->setCurrentIndex(1); } //hourly setting - else{ ui->combo_sync_units->setCurrentIndex(1); } //minutes setting - ui->spin_synctime->setValue(DI); - - //Now show the page - ui->stackedWidget->setCurrentWidget(ui->page_settings); -} - -// - Feed Management -void RSSFeedPlugin::addNewFeed(){ - if(ui->line_new_url->text().isEmpty()){ return; } //nothing to add - //Validate the URL - QUrl url(ui->line_new_url->text()); - if(!url.isValid()){ - ui->line_new_url->setFocus(); - return; - } - //Add the URL to the settings file for next login - QStringList feeds = LSession::handle()->DesktopPluginSettings()->value(setprefix+"currentfeeds",QStringList()).toStringList(); - feeds << url.toString(); - LSession::handle()->DesktopPluginSettings()->setValue(setprefix+"currentfeeds", feeds); - - //Set this URL as the current selection - ui->combo_feed->setWhatsThis(url.toString()); //hidden field - will trigger an update in a moment - //Add the URL to the backend - RSS->addUrls(QStringList() << url.toString()); - //UpdateFeedList(); //now re-load the feeds which are available - - //Now go back to the main page - backToFeeds(); -} - -void RSSFeedPlugin::loadPreset(QAction *act){ - ui->line_new_url->setText( act->whatsThis() ); -} - -void RSSFeedPlugin::removeFeed(){ - QString ID = ui->page_feed_info->whatsThis(); - if(ID.isEmpty()){ return; } - //Remove from the RSS feed object - RSSchannel info = RSS->dataForID(ID); - RSS->removeUrl(ID); - //Remove the URL from the settings file for next login - QStringList feeds = LSession::handle()->DesktopPluginSettings()->value(setprefix+"currentfeeds",QStringList()).toStringList(); - feeds.removeAll(info.originalURL); - LSession::handle()->DesktopPluginSettings()->setValue(setprefix+"currentfeeds", feeds); - LSession::handle()->DesktopPluginSettings()->remove(setprefix+"feedReads/"+ID); - //Now go back to the main page - backToFeeds(); -} - -void RSSFeedPlugin::resyncFeeds(){ - RSS->addUrls( LSession::handle()->DesktopPluginSettings()->value(setprefix+"currentfeeds",QStringList()).toStringList() ); - RSS->syncNow(); -} - -// - Feed Interactions -void RSSFeedPlugin::currentFeedChanged(){ - QString ID = ui->combo_feed->currentData().toString(); - //Remove the "unread" color/flag from the feed - ui->combo_feed->setItemData( ui->combo_feed->currentIndex(), QBrush(Qt::transparent) , Qt::BackgroundRole); - ui->combo_feed->setItemData( ui->combo_feed->currentIndex(), "", Qt::WhatsThisRole); - checkFeedNotify(); - updateFeed(ID); -} - -void RSSFeedPlugin::openFeedPage(){ //Open main website for feed - QString ID = ui->combo_feed->currentData().toString(); - //Find the data associated with this feed - RSSchannel data = RSS->dataForID(ID); - QString url = data.link; - //qDebug() << "Open Feed Page:" << url; - //Now launch the browser - if(!url.isEmpty()){ - LSession::LaunchApplication("lumina-open \""+url+"\""); - } -} - -void RSSFeedPlugin::saveSettings(){ - QSettings *set = LSession::handle()->DesktopPluginSettings(); - set->setValue(setprefix+"manual_sync_only", ui->check_manual_sync->isChecked() ); - int DI = ui->spin_synctime->value(); - if(ui->combo_sync_units->currentIndex()==1){ DI = DI*60; } //convert from hours to minutes - set->setValue(setprefix+"default_interval_minutes", DI); - set->sync(); - - //Now go back to the feeds - backToFeeds(); -} - -//Feed Object interactions -void RSSFeedPlugin::UpdateFeedList(){ - - QString activate = ui->combo_feed->whatsThis(); - if(!activate.isEmpty()){ ui->combo_feed->setWhatsThis(""); } - if(activate.isEmpty()){ activate = ui->combo_feed->currentData().toString(); } // keep current item selected - //Now get/list all the available feeds - QStringList IDS = RSS->channels(); //this is pre-sorted by title of the feed - //qDebug() << "Update RSS Feed List:" << IDS << activate; - for(int i=0; icombo_feed->count()<=i){ newitem = true; } - else{ - QString cid = ui->combo_feed->itemData(i).toString(); - if(IDS[i]!=cid){ - if(IDS.contains(cid)){ newitem = true; } //this item is just out of order - else{ ui->combo_feed->removeItem(i); } //item no longer is valid - } - } - if(newitem){ - //Need to add a new item at this point in the menu - RSSchannel info = RSS->dataForID(IDS[i]); - if(info.title.isEmpty()){ - //invalid/empty channel - ui->combo_feed->insertItem(i, IDS[i], IDS[i]); //just show the URL - }else{ - ui->combo_feed->insertItem(i, info.icon, info.title, IDS[i]); - } - } - } - //Remove any extra items on the end of the list - for(int i=IDS.length(); icombo_feed->count(); i++){ - ui->combo_feed->removeItem(i); i--; - } - //Now activate the proper item as needed - if(IDS.contains(activate)){ - ui->combo_feed->setCurrentIndex( IDS.indexOf(activate) ); - } - checkFeedNotify(); -} - -void RSSFeedPlugin::RSSItemChanged(QString ID){ - for(int i=0; icombo_feed->count(); i++){ - if(ui->combo_feed->itemData(i).toString()!=ID){ continue; } - RSSchannel info = RSS->dataForID(ID); - if(info.title.isEmpty()){ - ui->combo_feed->setItemText(i, ID); - ui->combo_feed->setItemIcon(i, LXDG::findIcon("dialog-cancel","") ); - }else{ - ui->combo_feed->setItemText(i, info.title); - ui->combo_feed->setItemIcon(i, info.icon ); - QColor color(Qt::transparent); - if( info.lastBuildDate > LSession::handle()->DesktopPluginSettings()->value(setprefix+"feedReads/"+ID,QDateTime()).toDateTime() ){ - color = QColor(255,10,10,100); //semi-transparent red - ui->combo_feed->setItemData(i, "notify", Qt::WhatsThisRole); - }else{ - ui->combo_feed->setItemData(i, "", Qt::WhatsThisRole); - } - ui->combo_feed->setItemData(i, QBrush(color) , Qt::BackgroundRole); - } - } - if(ID == ui->combo_feed->currentData().toString()){ - currentFeedChanged(); //re-load the current feed - }else{ - checkFeedNotify(); - } -} - -//================== -// PUBLIC SLOTS -//================== -void RSSFeedPlugin::LocaleChange(){ - ui->retranslateUi(this); - updateOptionsMenu(); -} -void RSSFeedPlugin::ThemeChange(){ - QTimer::singleShot(0,this, SLOT(loadIcons())); - updateOptionsMenu(); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.h deleted file mode 100644 index 68b36760..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.h +++ /dev/null @@ -1,72 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin is a simple RSS feed reader for the desktop -//=========================================== -#ifndef _LUMINA_DESKTOP_RSS_FEEDER_PLUGIN_H -#define _LUMINA_DESKTOP_RSS_FEEDER_PLUGIN_H - -#include -#include "../LDPlugin.h" - -#include "RSSObjects.h" - -namespace Ui{ - class RSSFeedPlugin; -}; - -class RSSFeedPlugin : public LDPlugin{ - Q_OBJECT -public: - RSSFeedPlugin(QWidget* parent, QString ID); - ~RSSFeedPlugin(); - - virtual QSize defaultPluginSize(){ - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(3,3); - } -private: - Ui::RSSFeedPlugin *ui; - QMenu *optionsMenu, *presetMenu; - QString setprefix; //settings prefix - RSSReader *RSS; - - void updateOptionsMenu(); - void checkFeedNotify(); //check if unread feeds are available and change the styling a bit as needed - - //Simplification functions for loading feed info onto widgets - void updateFeed(QString ID); - void updateFeedInfo(QString ID); - -private slots: - void loadIcons(); - - //GUI slots - // - Page management - void backToFeeds(); - void openFeedInfo(); - void openFeedNew(); - void openSettings(); - // - Feed Management - void addNewFeed(); // the "add" button (current url in widget on page) - void loadPreset(QAction*); //the add-preset menu - void removeFeed(); // the "remove" button (current feed for page) - void resyncFeeds(); - // - Feed Interactions - void currentFeedChanged(); - void openFeedPage(); //Open the website in a browser - void saveSettings(); - - //Feed Object interactions - void UpdateFeedList(); - void RSSItemChanged(QString ID); - -public slots: - void LocaleChange(); - void ThemeChange(); - -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.ui b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.ui deleted file mode 100644 index dc7acd0b..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSFeedPlugin.ui +++ /dev/null @@ -1,552 +0,0 @@ - - - RSSFeedPlugin - - - - 0 - 0 - 238 - 278 - - - - Form - - - - 0 - - - 3 - - - 3 - - - 3 - - - 3 - - - - - 1 - - - - - 3 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - View Options - - - - - - QToolButton::InstantPopup - - - true - - - - - - - - - - - - - - - - - - Open Website - - - More - - - true - - - Qt::NoArrow - - - - - - - - - false - - - true - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - - true - - - true - - - - - - - - - 4 - - - 0 - - - 0 - - - 0 - - - 5 - - - - - - - Back to Feeds - - - true - - - - - - - - - - 0 - 0 - - - - Feed Information - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> - - - true - - - - - - - - - - - - Remove Feed - - - true - - - - - - - - - - - 4 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Back to Feeds - - - true - - - - - - - - - - 0 - 0 - - - - New Feed Subscription - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - RSS URL - - - Qt::AlignCenter - - - - - - - - - - - - Load a preset RSS Feed - - - - - - QToolButton::InstantPopup - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Add to Feeds - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - 4 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Back to Feeds - - - true - - - - - - - - - - 0 - 0 - - - - Feed Reader Settings - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - Manual Sync Only - - - - - - - Some RSS feeds may request custom update intervals instead of using this setting - - - Default Sync Interval - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - 1 - - - 60 - - - - - - - Hour(s) - - - 1 - - - - Minutes - - - - - Hour(s) - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Save Settings - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSObjects.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSObjects.cpp deleted file mode 100644 index 0a805252..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/rssreader/RSSObjects.cpp +++ /dev/null @@ -1,287 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "RSSObjects.h" -#include -#include - -#include "LSession.h" - -//============ -// PUBLIC -//============ -RSSReader::RSSReader(QObject *parent, QString settingsPrefix) : QObject(parent){ - NMAN = new QNetworkAccessManager(this); - connect(NMAN, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)) ); - connect(NMAN, SIGNAL(sslErrors(QNetworkReply*, const QList&)), this, SLOT(sslErrors(QNetworkReply*, const QList&)) ); - - setprefix = settingsPrefix; - syncTimer = new QTimer(this); - syncTimer->setInterval(300000); //5 minutes - connect(syncTimer, SIGNAL(timeout()), this, SLOT(checkTimes())); - syncTimer->start(); -} - -RSSReader::~RSSReader(){ - -} - -//Information retrieval -QStringList RSSReader::channels(){ - QStringList urls = hash.keys(); - QStringList ids; - //sort all the channels by title before output - for(int i=0; iget( QNetworkRequest( QUrl(url) ) ); - outstandingURLS << url; - } -} - -//RSS parsing functions -RSSchannel RSSReader::readRSS(QByteArray bytes){ - //Note: We could expand this later to support multiple "channel"s per Feed - // but it seems like there is normally only one channel anyway - //qDebug() << "Read RSS:" << bytes.left(100); - QXmlStreamReader xml(bytes); - RSSchannel rssinfo; - //qDebug() << "Can Read XML Stream:" << !xml.hasError(); - if(xml.readNextStartElement()){ - //qDebug() << " - RSS Element:" << xml.name(); - if(xml.name() == "rss" && (xml.attributes().value("version") =="2.0" || xml.attributes().value("version") =="0.91") ){ - while(xml.readNextStartElement()){ - //qDebug() << " - RSS Element:" << xml.name(); - if(xml.name()=="channel"){ rssinfo = readRSSChannel(&xml); } - else{ xml.skipCurrentElement(); } - } - } - } - if(xml.hasError()){ qDebug() << " - XML Read Error:" << xml.errorString() << "\n" << bytes; } - return rssinfo; -} -RSSchannel RSSReader::readRSSChannel(QXmlStreamReader *rss){ - RSSchannel info; - info.timetolive = -1; - while(rss->readNextStartElement()){ - //qDebug() << " - RSS Element (channel):" <name(); - if(rss->name()=="item"){ info.items << readRSSItem(rss); } - else if(rss->name()=="title"){ info.title = rss->readElementText(); } - else if(rss->name()=="link"){ - QString txt = rss->readElementText(); - if(!txt.isEmpty()){ info.link = txt; } - } - else if(rss->name()=="description"){ info.description = rss->readElementText(); } - else if(rss->name()=="lastBuildDate"){ info.lastBuildDate = RSSDateTime(rss->readElementText()); } - else if(rss->name()=="pubDate"){ info.lastPubDate = RSSDateTime(rss->readElementText()); } - else if(rss->name()=="image"){ readRSSImage(&info, rss); } - //else if(rss->name()=="skipHours"){ info.link = rss->readElementText(); } - //else if(rss->name()=="skipDays"){ info.link = rss->readElementText(); } - else if(rss->name()=="ttl"){ info.timetolive = rss->readElementText().toInt(); } - else{ rss->skipCurrentElement(); } - } - return info; -} - -RSSitem RSSReader::readRSSItem(QXmlStreamReader *rss){ - RSSitem item; - while(rss->readNextStartElement()){ - //qDebug() << " - RSS Element (Item):" << rss->name(); - if(rss->name()=="title"){ item.title = rss->readElementText(); } - else if(rss->name()=="link"){ item.link = rss->readElementText(); } - else if(rss->name()=="description"){ item.description = rss->readElementText(); } - else if(rss->name()=="comments"){ item.comments_url = rss->readElementText(); } - else if(rss->name()=="author"){ - //Special handling - this field can contain both email and name - QString raw = rss->readElementText(); - if(raw.contains("@")){ - item.author_email = raw.split(" ").filter("@").first(); - item.author = raw.remove(item.author_email).remove("(").remove(")").simplified(); //the name is often put within parentheses after the email - }else{ item.author = raw; } - } - else if(rss->name()=="guid"){ item.guid = rss->readElementText(); } - else if(rss->name()=="pubDate"){ item.pubdate = RSSDateTime(rss->readElementText()); } - else{ rss->skipCurrentElement(); } - } - return item; -} - -void RSSReader::readRSSImage(RSSchannel *item, QXmlStreamReader *rss){ - while(rss->readNextStartElement()){ - //qDebug() << " - RSS Element (Image):" << rss->name(); - if(rss->name()=="url"){ item->icon_url = rss->readElementText(); } - else if(rss->name()=="title"){ item->icon_title = rss->readElementText(); } - else if(rss->name()=="link"){ item->icon_link = rss->readElementText(); } - else if(rss->name()=="width"){ item->icon_size.setWidth(rss->readElementText().toInt()); } - else if(rss->name()=="height"){ item->icon_size.setHeight(rss->readElementText().toInt()); } - else if(rss->name()=="description"){ item->icon_description = rss->readElementText(); } - } - //Go ahead and kick off the request for the icon - if(!item->icon_url.isEmpty()){ requestRSS(item->icon_url); } -} - -QDateTime RSSReader::RSSDateTime(QString datetime){ - return QDateTime::fromString(datetime, Qt::RFC2822Date); -} - -//================= -// PRIVATE SLOTS -//================= -void RSSReader::replyFinished(QNetworkReply *reply){ - QString url = reply->request().url().toString(); - //qDebug() << "Got Reply:" << url; - QString key = keyForUrl(url); //current hash key for this URL - QByteArray data = reply->readAll(); - outstandingURLS.removeAll(url); - if(data.isEmpty()){ - //qDebug() << "No data returned:" << url; - //see if the URL can be adjusted for known issues - bool handled = false; - QUrl redirecturl = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); - if(redirecturl.isValid() && (redirecturl.toString() != url )){ - //New URL redirect - make the change and send a new request - QString newurl = redirecturl.toString(); - //qDebug() << " - Redirect to:" << newurl; - if(hash.contains(key) && !hash.contains(newurl)){ - hash.insert(newurl, hash.take(key) ); //just move the data over to the new url - requestRSS(newurl); - emit newChannelsAvailable(); - handled = true; - } - } - if(!handled && hash.contains(key) ){ - emit rssChanged(hash[key].originalURL); - } - return; - } - - if(!hash.contains(key)){ - //qDebug() << " - hash does not contain URL:" << url; - //URL removed from list while a request was outstanding? - //Could also be an icon fetch response - QStringList keys = hash.keys(); - for(int i=0; ideleteLater(); - }else{ - //RSS reply - RSSchannel info = readRSS(data); //QNetworkReply can be used as QIODevice - reply->deleteLater(); //clean up - //Validate the info and announce any changes - if(info.title.isEmpty() || info.link.isEmpty() || info.description.isEmpty()){ - qDebug() << "Missing XML Information:" << url << info.title << info.link << info.description; - return; - } //bad info/read - //Update the bookkeeping elements of the info - if(info.timetolive<=0){ info.timetolive = LSession::handle()->DesktopPluginSettings()->value(setprefix+"default_interval_minutes", 60).toInt(); } - if(info.timetolive <=0){ info.timetolive = 60; } //error in integer conversion from settings? - info.lastsync = QDateTime::currentDateTime(); info.nextsync = info.lastsync.addSecs(info.timetolive * 60); - //Now see if anything changed and save the info into the hash - bool changed = (hash[key].lastBuildDate.isNull() || (hash[key].lastBuildDate < info.lastBuildDate) ); - bool newinfo = false; - if(changed){ newinfo = hash[key].title.isEmpty(); } //no previous info from this URL - info.originalURL = hash[key].originalURL; //make sure this info gets preserved across updates - if(!hash[key].icon.isNull()){ info.icon = hash[key].icon; } //copy over the icon from the previous reply - hash.insert(key, info); - if(newinfo){ emit newChannelsAvailable(); } //new channel - else if(changed){ emit rssChanged(info.originalURL); } //update to existing channel - } -} - -void RSSReader::sslErrors(QNetworkReply *reply, const QList &errors){ - int ok = 0; - qDebug() << "SSL Errors Detected (RSS Reader):" << reply->url(); - for(int i=0; iurl(); reply->ignoreSslErrors(); } - else{ qDebug() << " - Denied:" << reply->url(); } -} - -void RSSReader::checkTimes(){ - if(LSession::handle()->DesktopPluginSettings()->value(setprefix+"manual_sync_only", false).toBool()){ return; } - QStringList urls = hash.keys(); - QDateTime cdt = QDateTime::currentDateTime(); - for(int i=0; i -#include -#include -#include -#include -#include -#include -#include //Contained in the Qt "core" module - don't need the full "xml" module for this -#include - -struct RSSitem{ - //Required Fields - QString title, link, description; - - //Optional Fields - QString comments_url, author_email, author, guid; - QDateTime pubdate; //when the item was published - //IGNORED INFO from RSS2 spec: "category", "source", "enclosure" -}; - -struct RSSchannel{ - //Required fields - QString title, link, description; - - //Optional Fields - QDateTime lastBuildDate, lastPubDate; //last build/publish dates - // - channel refresh information - int timetolive; //in minutes - time until next sync should be performed - //QList skiphours; - //QStringList skipdays; - // - icon info - QIcon icon; - QString icon_url, icon_title, icon_link, icon_description; - QSize icon_size; - //All items within this channel - QList items; - - //Optional RSS2 elements ignored: - // "cloud", "textInput", "rating", "language", "copyright", "managingEditor", "webMaster", - // "category", "generator", "docs" - - //Internal data for bookkeeping - QDateTime lastsync, nextsync; - QString originalURL; //in case it was redirected to some "fixed" url later -}; - -class RSSReader : public QObject{ - Q_OBJECT -public: - RSSReader(QObject *parent, QString settingsPrefix); - ~RSSReader(); - - //Information retrieval - QStringList channels(); //returns all ID's - RSSchannel dataForID(QString ID); - - //Initial setup - void addUrls(QStringList urls); - void removeUrl(QString ID); - -public slots: - void syncNow(); //not generally needed - -private: - //Internal data objects - QHash hash; // ID/data - QString setprefix; - QTimer *syncTimer; - QNetworkAccessManager *NMAN; - QStringList outstandingURLS; - - - //Simple hash data search functions - QString keyForUrl(QString url); - - //Network request function - void requestRSS(QString url); - - //RSS parsing functions - RSSchannel readRSS(QByteArray bytes); - RSSchannel readRSSChannel(QXmlStreamReader *rss); - RSSitem readRSSItem(QXmlStreamReader *rss); - void readRSSImage(RSSchannel *item, QXmlStreamReader *rss); - QDateTime RSSDateTime(QString datetime); - -private slots: - void replyFinished(QNetworkReply *reply); - void sslErrors(QNetworkReply *reply, const QList &errors); - void checkTimes(); - -signals: - void rssChanged(QString); //ID - void newChannelsAvailable(); -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.cpp deleted file mode 100644 index 951bcc98..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.cpp +++ /dev/null @@ -1,63 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "MonitorWidget.h" -#include "ui_MonitorWidget.h" - - -#include -#include - -MonitorWidget::MonitorWidget(QWidget *parent) : QWidget(parent), ui(new Ui::MonitorWidget()){ - ui->setupUi(this); //load the designer form - upTimer = new QTimer(this); - upTimer->setInterval(2000); //update every 2 seconds - connect(upTimer, SIGNAL(timeout()), this, SLOT(UpdateStats()) ); - LoadIcons(); - upTimer->start(); -} - -MonitorWidget::~MonitorWidget(){ - //qDebug() << "Removing MonitorWidget"; -} - -void MonitorWidget::LoadIcons(){ - ui->tabWidget->setTabIcon(0,LXDG::findIcon("appointment-recurring","") ); //Summary - ui->tabWidget->setTabIcon(1,LXDG::findIcon("drive-harddisk","") ); //Disk Usage - //ui->tabWidget->setTabIcon(1,LXDG::findIcon("cpu","") ); //CPU Log - //ui->tabWidget->setTabIcon(2,LXDG::findIcon("media-flash-memory-stick","") ); //Mem Log -} - -void MonitorWidget::UpdateStats(){ - //qDebug() << "Updating System statistics..."; - ui->label_temps->setText( LOS::CPUTemperatures().join(", ") ); - if(ui->progress_cpu->isEnabled()){ - int perc = LOS::CPUUsagePercent(); - ui->progress_cpu->setValue(perc); - if(perc<0){ ui->progress_cpu->setEnabled(false); } //disable this for future checks - } - if(ui->progress_mem->isEnabled()){ - int perc = LOS::MemoryUsagePercent(); - ui->progress_mem->setValue(perc); - if(perc<0){ ui->progress_mem->setEnabled(false); } //disable this for future checks - } - ui->label_diskinfo->setText( LOS::DiskUsage().join("\n") ); - //Also perform/update the logs as necessary - // -- TO DO -- -} - -SysMonitorPlugin::SysMonitorPlugin(QWidget *parent, QString ID) : LDPlugin(parent, ID){ - monitor = new MonitorWidget(this); - this->setLayout( new QVBoxLayout() ); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(monitor); - - //this->setInitialSize(monitor->sizeHint().width(),monitor->sizeHint().height()); -} - -SysMonitorPlugin::~SysMonitorPlugin(){ - //qDebug() << "Remove SysMonitorPlugin"; -} \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.h b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.h deleted file mode 100644 index 618ac8f4..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.h +++ /dev/null @@ -1,62 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin is a simple hardware status monitor on the desktop -//=========================================== -#ifndef _LUMINA_DESKTOP_PLUGIN_HW_MONITOR_WIDGET_H -#define _LUMINA_DESKTOP_PLUGIN_HW_MONITOR_WIDGET_H - -#include -#include - -#include "../LDPlugin.h" - -namespace Ui{ - class MonitorWidget; -}; - -class MonitorWidget : public QWidget{ - Q_OBJECT -public: - MonitorWidget(QWidget *parent = 0); - ~MonitorWidget(); - -public slots: - void LoadIcons(); - -private: - Ui::MonitorWidget *ui; - QTimer *upTimer; - -private slots: - void UpdateStats(); -}; - -// Wrapper class to put this into a desktop plugin container -class SysMonitorPlugin : public LDPlugin{ - Q_OBJECT -public: - SysMonitorPlugin(QWidget* parent, QString ID); - ~SysMonitorPlugin(); - - virtual QSize defaultPluginSize(){ - // The returned QSize is in grid points (typically 100 or 200 pixels square) - return QSize(3,2); - } - -private: - MonitorWidget *monitor; - -public slots: - void LocaleChange(){ - QTimer::singleShot(0,monitor, SLOT(LoadIcons())); - } - void ThemeChange(){ - QTimer::singleShot(0,monitor, SLOT(LoadIcons())); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.ui b/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.ui deleted file mode 100644 index 8798bc25..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/desktop-plugins/systemmonitor/MonitorWidget.ui +++ /dev/null @@ -1,143 +0,0 @@ - - - MonitorWidget - - - - 0 - 0 - 300 - 122 - - - - Form - - - - 2 - - - 2 - - - 2 - - - 2 - - - - - 0 - - - - Summary - - - - - - CPU Temp: - - - - - - - - - - - - - - CPU Usage: - - - - - - - 0 - - - - - - - Mem Usage: - - - - - - - 0 - - - - - - - - Disk I/O - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - QFrame::NoFrame - - - true - - - - - 0 - 0 - 292 - 89 - - - - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - - - - - - - - - - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LPPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LPPlugin.h deleted file mode 100644 index c4c76297..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LPPlugin.h +++ /dev/null @@ -1,77 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is the generic container layout for all panel plugins -// Simply subclass this when creating a new plugin to enable correct -// visibility and usage within a panel -//=========================================== -#ifndef _LUMINA_DESKTOP_PANEL_PLUGIN_H -#define _LUMINA_DESKTOP_PANEL_PLUGIN_H - -#include -#include -#include -#include -#include - -class LPPlugin : public QWidget{ - Q_OBJECT - -private: - QBoxLayout *LY; - QString plugintype; - -public: - LPPlugin(QWidget *parent = 0, QString ptype="unknown", bool horizontal = true) : QWidget(parent){ - plugintype=ptype; - this->setContentsMargins(1,1,1,1); - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - this->setFocusPolicy(Qt::NoFocus); //no keyboard focus on the panel/plugins - if(horizontal){LY = new QBoxLayout(QBoxLayout::LeftToRight, this); } - else{ LY = new QBoxLayout(QBoxLayout::TopToBottom, this); } - this->setObjectName(ptype.section("---",0,0)); - LY->setContentsMargins(0,0,0,0); - LY->setSpacing(1); - this->setLayout(LY); - connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(LocaleChange()) ); - connect(QApplication::instance(), SIGNAL(IconThemeChanged()), this, SLOT(ThemeChange()) ); - } - - ~LPPlugin(){ - } - - QBoxLayout* layout(){ - return LY; - } - - QString type(){ - return plugintype; - } - - virtual void AboutToClose(){ - //This needs to be re-implemented in the subclasses plugin - //This is for any last-minute cleanup before the plugin gets deleted - } - -public slots: - virtual void LocaleChange(){ - //This needs to be re-implemented in the subclassed plugin - //This is where all text is set/translated - } - virtual void ThemeChange(){ - //This needs to be re-implemented in the subclasses plugin - //This is where all the visuals are set if using Theme-dependant icons. - } - virtual void OrientationChange(){ - //This needs to be re-implemented in the subclasses plugin - //This is where any horizontal/vertical orientations can be changed appropriately - } - -signals: - void MenuClosed(); //This needs to be emitted when any plugin's menu is closed for some reason (check/set focus properly) -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LTBWidget.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LTBWidget.h deleted file mode 100644 index 560e5811..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/LTBWidget.h +++ /dev/null @@ -1,71 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2013, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_TOOLBAR_WIDGET_H -#define _LUMINA_TOOLBAR_WIDGET_H - -#include -#include -#include - -#include "Globals.h" -#include - -class LTBWidget : public QToolButton{ - Q_OBJECT - -private: - LXCB::WINDOWVISIBILITY cstate; - //QString rawstyle; - void updateBackground(){ - //QString background = "background: transparent; "; //default value - //QString border = "border: 1px solid transparent;"; - if(cstate == LXCB::IGNORE){ this->setObjectName(""); } //just use the defaults - else if(cstate == LXCB::VISIBLE){ this->setObjectName("WindowVisible"); }//background = "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 255, 255, 240), stop:0.505682 rgba(240, 240, 240, 150), stop:1 rgba(210, 210, 210, 55));"; border="border: 1px solid transparent;"; } - else if(cstate == LXCB::INVISIBLE){this->setObjectName("WindowInvisible"); } //background = "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(215, 215, 215, 240), stop:0.505682 rgba(184, 185, 186, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent;"; } - else if(cstate == LXCB::ACTIVE){ this->setObjectName("WindowActive"); }//background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(241, 233, 156, 240), stop:0.355682 rgba(255, 243, 127, 150), stop:1 rgba(221, 246, 255, 55));"; border ="border: 1px solid transparent;"; } - else if(cstate == LXCB::ATTENTION){ this->setObjectName("WindowAttention"); }//background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(252, 187, 127, 240), stop:0.505682 rgba(255, 222, 197, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent;"; } - this->setStyleSheet(""); //force the object to re-evaluate the current theme stylesheet and update visuals - //QString raw = rawstyle; - //this->setStyleSheet( raw.replace("%1",background).replace("%2", border) ); - } - -signals: - - void wheelScroll(int change); - -public: - LTBWidget(QWidget* parent) : QToolButton(parent){ - //this->setStyleSheet( this->styleSheet()+" LTBWidget::menu-indicator{image: none;}"); - cstate = LXCB::IGNORE; - - this->setPopupMode(QToolButton::InstantPopup); - this->setAutoRaise(true); - - //rawstyle = "LTBWidget{ %1 %2 border-radius: 5px;} LTBWidget::menu-indicator{image: none;} LTBWidget::hover{ %1 border: 1px solid black; border-radius: 5px; } LTBWidget::menu-button{ background: transparent; width: 15px; } LTBWidget[popupMode=\"1\"]{%1 %2 border-radius: 5px; padding-right: 15px;} LTBWidget[popupMode=\"1\"]::hover{%1 border: 1px solid black; border-radius: 5px; padding-right: 15px}"; - updateBackground(); - } - - ~LTBWidget(){ - } - - void setState(LXCB::WINDOWVISIBILITY newstate){ - cstate = newstate; - updateBackground(); - } - -public slots: - - -protected: - void wheelEvent(QWheelEvent *event){ - int change = event->delta()/120; // 1/15th of a rotation (delta/120) is usually one "click" of the wheel - emit wheelScroll(change); - } - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/NewPP.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/NewPP.h deleted file mode 100644 index 3a5f6a5b..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/NewPP.h +++ /dev/null @@ -1,82 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is the interface to load all the different panel plugins -//=========================================== -#ifndef _LUMINA_DESKTOP_NEW_PANEL_PLUGIN_H -#define _LUMINA_DESKTOP_NEW_PANEL_PLUGIN_H - -#include - -//List all the individual plugin includes here -#include "LPPlugin.h" -#include "userbutton/LUserButton.h" -#include "desktopbar/LDeskBar.h" -#include "spacer/LSpacer.h" -#include "line/LLine.h" -#include "clock/LClock.h" -#include "battery/LBattery.h" -#include "desktopswitcher/LDesktopSwitcher.h" -#include "taskmanager/LTaskManagerPlugin.h" -#include "systemdashboard/LSysDashboard.h" -#include "showdesktop/LHomeButton.h" -#include "appmenu/LAppMenuPlugin.h" -#include "applauncher/AppLaunchButton.h" -#include "systemstart/LStartButton.h" -#include "audioplayer/LPAudioPlayer.h" -#include "jsonmenu/PPJsonMenu.h" -//#include "quickcontainer/QuickPPlugin.h" -#include "systemtray/LSysTray.h" //must be last due to X11 compile issues - - -class NewPP{ -public: - static LPPlugin* createPlugin(QString plugin, QWidget* parent = 0, bool horizontal = true){ - LPPlugin *plug = 0; - if(plugin.startsWith("userbutton---")){ - plug = new LUserButtonPlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("homebutton---")){ - plug = new LHomeButtonPlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("desktopbar---")){ - plug = new LDeskBarPlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("spacer---")){ - plug = new LSpacerPlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("line---")){ - plug = new LLinePlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("taskmanager")){ - //This one can be "taskmanager[-nogroups]---" - plug = new LTaskManagerPlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("systemtray---")){ - plug = new LSysTray(parent, plugin, horizontal); - }else if(plugin.startsWith("desktopswitcher---")){ - plug = new LDesktopSwitcher(parent, plugin, horizontal); - }else if(plugin.startsWith("battery---") && LOS::hasBattery()){ - plug = new LBattery(parent, plugin, horizontal); - }else if(plugin.startsWith("clock---")){ - plug = new LClock(parent, plugin, horizontal); - }else if(plugin.startsWith("systemdashboard---")){ - plug = new LSysDashboard(parent, plugin, horizontal); - }else if(plugin.startsWith("appmenu---")){ - plug = new LAppMenuPlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("systemstart---")){ - plug = new LStartButtonPlugin(parent, plugin, horizontal); - }else if(plugin.startsWith("audioplayer---")){ - plug = new LPAudioPlayer(parent, plugin, horizontal); - }else if(plugin.section("::::",0,0)=="jsonmenu" && plugin.split("::::").length()>=3 ){ - plug = new LPJsonMenu(parent, plugin, horizontal); - }else if(plugin.section("---",0,0).section("::",0,0)=="applauncher"){ - plug = new AppLaunchButtonPlugin(parent, plugin, horizontal); - //}else if( plugin.section("---",0,0).startsWith("quick-") && LUtils::validQuickPlugin(plugin.section("---",0,0)) ){ - //plug = new QuickPPlugin(parent, plugin, horizontal); - }else{ - qWarning() << "Invalid Panel Plugin:"< -#include -#include -#include - -class RotateToolButton : public QToolButton{ - Q_OBJECT - -private: - int rotate_degrees; - void paintEvent(QPaintEvent*){ - /* NOTE: This is what a standard QToolButton performs (peeked at Qt source code for this tidbit) - QStylePainter p(this); - QStyleOptionToolButton opt; - initStyleOption(&opt); - p.drawComplexControl(QStyle::CC_ToolButton, opt); - */ - QStylePainter p(this); - QStyleOptionToolButton opt; - initStyleOption(&opt); - //Apply the rotation matrix to the painter before starting the paint - QTransform trans = QTransform( p.transform() ).rotate(rotate_degrees); - p.setTransform(trans, false); //merging already taken care of - //Now do the normal painting procedure - p.drawComplexControl(QStyle::CC_ToolButton, opt); - } - -public: - RotateToolButton(QWidget *parent = Q_NULLPTR) : QToolButton(parent){ - rotate_degrees = 0; //no rotation initially - } - - void setRotation(int degrees){ - rotate_degrees = degrees; - this->update(); //trigger a paint event - } - - /*virtual void setText(QString text){ - this->setText(text); - if(rotate_degrees !=0){ - this->setSizeHint( this->sizeHint() - } - }*/ -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.cpp deleted file mode 100644 index 1fd819b5..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.cpp +++ /dev/null @@ -1,77 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "AppLaunchButton.h" -#include "../../LSession.h" - -#include -#include -#include - -AppLaunchButtonPlugin::AppLaunchButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonIconOnly); - appfile = id.section("---",0,0).section("::",1,1); - if(!QFile::exists(appfile) && appfile.endsWith(".desktop")){ - //might be a relative path - try to find the file - appfile = LUtils::AppToAbsolute(appfile.section("/",-1) ); - } - if(!QFile::exists(appfile)){ appfile.clear(); } - connect(button, SIGNAL(clicked()), this, SLOT(AppClicked())); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - - QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes -} - -AppLaunchButtonPlugin::~AppLaunchButtonPlugin(){ - -} - -void AppLaunchButtonPlugin::updateButtonVisuals(){ - QIcon icon; - QString tooltip = tr("Click to assign an application"); - if(appfile.endsWith(".desktop")){ - XDGDesktop desk(appfile); - if(desk.isValid()){ - icon = LXDG::findIcon(desk.icon, "unknown"); - tooltip = QString(tr("Launch %1")).arg(desk.name); - }else{ - icon = LXDG::findIcon("task-attention",""); - appfile.clear(); - } - }else if(QFile::exists(appfile)){ - icon = LXDG::findMimeIcon(appfile.section("/",-1)); - tooltip = QString(tr("Open %1")).arg(appfile.section("/",-1)); - }else{ - icon = LXDG::findIcon("task-attention", ""); - } - button->setIcon( icon ); - button->setToolTip(tooltip); -} - -// ======================== -// PRIVATE FUNCTIONS -// ======================== -void AppLaunchButtonPlugin::AppClicked(){ - if(appfile.isEmpty()){ - //No App File selected - QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); - QStringList names; - for(int i=0; iname; } - bool ok = false; - QString app = QInputDialog::getItem(this, tr("Select Application"), tr("Name:"), names, 0, false, &ok); - if(!ok || names.indexOf(app)<0){ return; } //cancelled - appfile = apps[ names.indexOf(app) ]->filePath; - //Still need to find a way to set this value persistently - // --- perhaps replace the plugin in the desktop settings file with the new path? - // --- "applauncher::broken---" -> "applauncher::fixed---" ? - QTimer::singleShot(0,this, SLOT(updateButtonVisuals())); - }else{ - LSession::LaunchApplication("lumina-open \""+appfile+"\""); - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.h deleted file mode 100644 index 3aa3c7ad..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/applauncher/AppLaunchButton.h +++ /dev/null @@ -1,63 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin is a simple button to launch a single application -//=========================================== -#ifndef _LUMINA_DESKTOP_LAUNCH_APP_PANEL_PLUGIN_H -#define _LUMINA_DESKTOP_LAUNCH_APP_PANEL_PLUGIN_H - -// Qt includes -#include -#include -#include - - -// Lumina-desktop includes -#include "../LPPlugin.h" //main plugin widget - -// libLumina includes -#include "LuminaXDG.h" - -// PANEL PLUGIN BUTTON -class AppLaunchButtonPlugin : public LPPlugin{ - Q_OBJECT - -public: - AppLaunchButtonPlugin(QWidget *parent = 0, QString id = "applauncher", bool horizontal=true); - ~AppLaunchButtonPlugin(); - -private: - QToolButton *button; - QString appfile; - - void updateButtonVisuals(); - -private slots: - void AppClicked(); - -public slots: - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - } - this->layout()->update(); - updateButtonVisuals(); - } - - void LocaleChange(){ - updateButtonVisuals(); - } - - void ThemeChange(){ - updateButtonVisuals(); - } -}; - -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.cpp deleted file mode 100644 index e3be55c2..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.cpp +++ /dev/null @@ -1,142 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LAppMenuPlugin.h" -#include "../../LSession.h" - -#include - -LAppMenuPlugin::LAppMenuPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - mainmenu = new QMenu(this); - button->setMenu( mainmenu ); - button->setPopupMode(QToolButton::InstantPopup); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - - connect(mainmenu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - connect(mainmenu, SIGNAL(triggered(QAction*)), this, SLOT(LaunchItem(QAction*)) ); - connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SLOT(UpdateMenu())); - QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes - QTimer::singleShot(0,this, SLOT(UpdateMenu()) ); - //Setup the global shortcut handling for opening the start menu - connect(QApplication::instance(), SIGNAL(StartButtonActivated()), this, SLOT(shortcutActivated()) ); - LSession::handle()->registerStartButton(this->type()); -} - -LAppMenuPlugin::~LAppMenuPlugin(){ - -} - -void LAppMenuPlugin::updateButtonVisuals(){ - button->setToolTip( tr("Quickly launch applications or open files")); - button->setText( tr("Applications") ); - //Use the TrueOS icon by default (or the Lumina icon for non-TrueOS systems) - button->setIcon( LXDG::findIcon("start-here-lumina","Lumina-DE") ); -} - -// ======================== -// PRIVATE FUNCTIONS -// ======================== -void LAppMenuPlugin::shortcutActivated(){ - if(LSession::handle()->registerStartButton(this->type())){ - if(button->menu()->isVisible()){ button->menu()->hide(); } - else{ button->showMenu(); } - } -} - -void LAppMenuPlugin::LaunchItem(QAction* item){ - QString appFile = item->whatsThis(); - if(appFile.startsWith("internal::")){ - appFile = appFile.section("::",1,50); //cut off the "internal" flag - if(appFile=="logout"){ LSession::handle()->systemWindow(); } - }else if(!appFile.isEmpty()){ - LSession::LaunchApplication("lumina-open "+appFile); - } -} - -void LAppMenuPlugin::UpdateMenu(){ - mainmenu->clear(); - QHash > *HASH = LSession::handle()->applicationMenu()->currentAppHash(); - //Now Re-create the menu (orignally copied from the AppMenu class) - //Add link to the file manager - QAction *tmpact = mainmenu->addAction( LXDG::findIcon("user-home", ""), tr("Browse Files") ); - tmpact->setWhatsThis("\""+QDir::homePath()+"\""); - //--Look for the app store - XDGDesktop store(LOS::AppStoreShortcut()); - if(store.isValid()){ - tmpact = mainmenu->addAction( LXDG::findIcon(store.icon, ""), tr("Install Applications") ); - tmpact->setWhatsThis("\""+store.filePath+"\""); - } - //--Look for the control panel - XDGDesktop controlp(LOS::ControlPanelShortcut()); - if(controlp.isValid()){ - tmpact = mainmenu->addAction( LXDG::findIcon(controlp.icon, ""), tr("Control Panel") ); - tmpact->setWhatsThis("\""+controlp.filePath+"\""); - } - mainmenu->addSeparator(); - //--Now create the sub-menus - QStringList cats = HASH->keys(); - cats.sort(); //make sure they are alphabetical - for(int i=0; isetIcon(LXDG::findIcon(icon,"")); - QList appL = HASH->value(cats[i]); - for( int a=0; aactions.isEmpty()){ - //Just a single entry point - no extra actions - QAction *act = new QAction(LXDG::findIcon(appL[a]->icon, ""), appL[a]->name, menu); - act->setToolTip(appL[a]->comment); - act->setWhatsThis("\""+appL[a]->filePath+"\""); - menu->addAction(act); - }else{ - //This app has additional actions - make this a sub menu - // - first the main menu/action - QMenu *submenu = new QMenu(appL[a]->name, menu); - submenu->setIcon( LXDG::findIcon(appL[a]->icon,"") ); - //This is the normal behavior - not a special sub-action (although it needs to be at the top of the new menu) - QAction *act = new QAction(LXDG::findIcon(appL[a]->icon, ""), appL[a]->name, submenu); - act->setToolTip(appL[a]->comment); - act->setWhatsThis(appL[a]->filePath); - submenu->addAction(act); - //Now add entries for every sub-action listed - for(int sa=0; saactions.length(); sa++){ - QAction *sact = new QAction(LXDG::findIcon(appL[a]->actions[sa].icon, appL[a]->icon), appL[a]->actions[sa].name, this); - sact->setToolTip(appL[a]->comment); - sact->setWhatsThis("-action \""+appL[a]->actions[sa].ID+"\" \""+appL[a]->filePath+"\""); - submenu->addAction(sact); - } - menu->addMenu(submenu); - } - }//end loop over apps within this category - mainmenu->addMenu(menu); - } //end loop over categories - //Now add any logout options - mainmenu->addSeparator(); - //QMenu *tmpmenu = mainmenu->addMenu(LXDG::findIcon("system-log-out",""), tr("Leave")); - tmpact =mainmenu->addAction(LXDG::findIcon("system-log-out"),tr("Leave")); - tmpact->setWhatsThis("internal::logout"); - -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.h deleted file mode 100644 index 659d781f..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/appmenu/LAppMenuPlugin.h +++ /dev/null @@ -1,64 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin is a re-creation of the classic "start" menu -//=========================================== -#ifndef _LUMINA_DESKTOP_APP_MENU_PANEL_PLUGIN_H -#define _LUMINA_DESKTOP_APP_MENU_PANEL_PLUGIN_H - -// Qt includes -#include -#include -#include -#include - - -// Lumina-desktop includes -#include "../LPPlugin.h" //main plugin widget - - -// PANEL PLUGIN BUTTON -class LAppMenuPlugin : public LPPlugin{ - Q_OBJECT - -public: - LAppMenuPlugin(QWidget *parent = 0, QString id = "appmenu", bool horizontal=true); - ~LAppMenuPlugin(); - -private: - QToolButton *button; - QMenu *mainmenu; - - void updateButtonVisuals(); - -private slots: - void shortcutActivated(); - void LaunchItem(QAction* item); - void UpdateMenu(); - -public slots: - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - } - this->layout()->update(); - updateButtonVisuals(); - } - - void LocaleChange(){ - updateButtonVisuals(); - } - - void ThemeChange(){ - updateButtonVisuals(); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.cpp deleted file mode 100644 index 5669aaf5..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Susanne Jaeckel -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LPAudioPlayer.h" -#include "LSession.h" - -LPAudioPlayer::LPAudioPlayer(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - //Setup the button - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonIconOnly); - button->setPopupMode(QToolButton::InstantPopup); //make sure it runs the update routine first - //connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - wact = new QWidgetAction(this); - aplayer = new PPlayerWidget(this); - button ->setMenu(new QMenu(this) ); - wact->setDefaultWidget(aplayer); - button->menu()->addAction(wact); - //Now start up the widgets - button->setIcon( LXDG::findIcon("audio-volume-high","") ); - QTimer::singleShot(0,this,SLOT(OrientationChange()) ); //update the sizing/icon -} - -LPAudioPlayer::~LPAudioPlayer(){ -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.h deleted file mode 100644 index e5132b1f..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/LPAudioPlayer.h +++ /dev/null @@ -1,49 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_PANEL_AUDIO_PLAYER_PLUGIN_H -#define _LUMINA_PANEL_AUDIO_PLAYER_PLUGIN_H - -#include "../../Globals.h" -#include "../LTBWidget.h" -#include "../LPPlugin.h" -#include "PPlayerWidget.h" - -class LPAudioPlayer : public LPPlugin{ - Q_OBJECT -public: - LPAudioPlayer(QWidget *parent = 0, QString id = "audioplayer", bool horizontal=true); - ~LPAudioPlayer(); - -private: - QToolButton *button; - QWidgetAction *wact; - PPlayerWidget *aplayer; - - //int iconOld; - -private slots: - //void updateBattery(bool force = false); - //QString getRemainingTime(); - -public slots: - void LocaleChange(){ - //updateBattery(true); - } - - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - } - this->layout()->update(); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.cpp deleted file mode 100644 index 023e20c7..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.cpp +++ /dev/null @@ -1,258 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "PPlayerWidget.h" -#include "ui_PPlayerWidget.h" - -#include -#include -#include -#include -#include -#include -#include - -PPlayerWidget::PPlayerWidget(QWidget *parent) : QWidget(parent), ui(new Ui::PPlayerWidget()){ - ui->setupUi(this); //load the designer form - PLAYER = new QMediaPlayer(this); - PLAYER->setVolume(100); - PLAYER->setNotifyInterval(1000); //1 second interval (just needs to be a rough estimate) - PLAYLIST = new QMediaPlaylist(this); - PLAYLIST->setPlaybackMode(QMediaPlaylist::Sequential); - PLAYER->setPlaylist(PLAYLIST); - - configMenu = new QMenu(this); - ui->tool_config->setMenu(configMenu); - addMenu = new QMenu(this); - ui->tool_add->setMenu(addMenu); - - updatinglists = false; //start off as false - - ui->combo_playlist->setContextMenuPolicy(Qt::NoContextMenu); - - LoadIcons(); - playerStateChanged(); //update button visibility - currentSongChanged(); - //Connect all the signals/slots - //connect(infoTimer, SIGNAL(timeout()), this, SLOT(rotateTrackInfo()) ); - connect(PLAYER, SIGNAL(positionChanged(qint64)),this, SLOT(updateProgress(qint64)) ); - connect(PLAYER, SIGNAL(durationChanged(qint64)), this, SLOT(updateMaxProgress(qint64)) ); - connect(PLAYLIST, SIGNAL(mediaChanged(int, int)), this, SLOT(playlistChanged()) ); - connect(PLAYER, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(playerStateChanged()) ); - connect(PLAYLIST, SIGNAL(currentMediaChanged(const QMediaContent&)), this, SLOT(currentSongChanged()) ); - connect(ui->combo_playlist, SIGNAL(currentIndexChanged(int)), this, SLOT(userlistSelectionChanged()) ); - connect(ui->tool_play, SIGNAL(clicked()), this, SLOT(playClicked()) ); - connect(ui->tool_pause, SIGNAL(clicked()), this, SLOT(pauseClicked()) ); - connect(ui->tool_stop, SIGNAL(clicked()), this, SLOT(stopClicked()) ); - connect(ui->tool_next, SIGNAL(clicked()), this, SLOT(nextClicked()) ); - connect(ui->tool_prev, SIGNAL(clicked()), this, SLOT(prevClicked()) ); - -} - -PPlayerWidget::~PPlayerWidget(){ - //qDebug() << "Removing PPlayerWidget"; -} - -void PPlayerWidget::LoadIcons(){ - ui->tool_stop->setIcon( LXDG::findIcon("media-playback-stop","") ); - ui->tool_play->setIcon( LXDG::findIcon("media-playback-start","") ); - ui->tool_pause->setIcon( LXDG::findIcon("media-playback-pause","") ); - ui->tool_next->setIcon( LXDG::findIcon("media-skip-forward","") ); - ui->tool_prev->setIcon( LXDG::findIcon("media-skip-backward","") ); - ui->tool_add->setIcon( LXDG::findIcon("list-add","") ); - ui->tool_config->setIcon( LXDG::findIcon("configure","") ); - //Now re-assemble the menus as well - configMenu->clear(); - configMenu->addAction(LXDG::findIcon("media-eject",""), tr("Clear Playlist"), this, SLOT(ClearPlaylist())); - configMenu->addAction(LXDG::findIcon("roll",""), tr("Shuffle Playlist"), this, SLOT(ShufflePlaylist())); - addMenu->clear(); - addMenu->addAction(LXDG::findIcon("document-new",""), tr("Add Files"), this, SLOT(AddFilesToPlaylist())); - addMenu->addAction(LXDG::findIcon("folder-new",""), tr("Add Directory"), this, SLOT(AddDirToPlaylist())); - addMenu->addAction(LXDG::findIcon("download",""), tr("Add URL"), this, SLOT(AddURLToPlaylist())); -} - -void PPlayerWidget::playClicked(){ - PLAYER->play(); -} - -void PPlayerWidget::pauseClicked(){ - PLAYER->pause(); -} - -void PPlayerWidget::stopClicked(){ - PLAYER->stop(); -} - -void PPlayerWidget::nextClicked(){ - PLAYLIST->next(); -} - -void PPlayerWidget::prevClicked(){ - PLAYLIST->previous(); -} - -void PPlayerWidget::AddFilesToPlaylist(){ - //Prompt the user to select multimedia files - QFileDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setFileMode(QFileDialog::ExistingFiles); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setNameFilter( tr("Multimedia Files")+" ("+LXDG::findAVFileExtensions().join(" ")+")"); - dlg.setWindowTitle(tr("Select Multimedia Files")); - dlg.setWindowIcon( LXDG::findIcon("file-open","") ); - dlg.setDirectory(QDir::homePath()); //start in the home directory - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - QApplication::processEvents(); - } - QList files = dlg.selectedUrls(); - if(files.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled - //Make this use show/processEvents later - //QList files = QFileDialog::getOpenFileUrls(0, tr("Select Multimedia Files"), QDir::homePath(), "Multimedia Files ("+LXDG::findAVFileExtensions().join(" ")+")"); - QList urls; - for(int i=0; iaddMedia(urls); - playlistChanged(); -} - -void PPlayerWidget::AddDirToPlaylist(){ - QFileDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setFileMode(QFileDialog::Directory); - dlg.setOption(QFileDialog::ShowDirsOnly, true); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setWindowTitle(tr("Select Multimedia Directory")); - dlg.setWindowIcon( LXDG::findIcon("folder-open","") ); - dlg.setDirectory(QDir::homePath()); //start in the home directory - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - QApplication::processEvents(); - } - if(dlg.result() != QDialog::Accepted){ return; } //cancelled - QStringList sel = dlg.selectedFiles(); - if(sel.isEmpty()){ return; } //cancelled - QString dirpath = sel.first(); //QFileDialog::getExistingDirectory(0, tr("Select a Multimedia Directory"), QDir::homePath() ); - if(dirpath.isEmpty()){ return; } //cancelled - QDir dir(dirpath); - QFileInfoList files = dir.entryInfoList(LXDG::findAVFileExtensions(), QDir::Files | QDir::NoDotAndDotDot, QDir::Name); - if(files.isEmpty()){ return; } //nothing in this directory - QList urls; - for(int i=0; iaddMedia(urls); - playlistChanged(); -} - -void PPlayerWidget::AddURLToPlaylist(){ - QInputDialog dlg(0, Qt::Dialog | Qt::WindowStaysOnTopHint ); - dlg.setInputMode(QInputDialog::TextInput); - dlg.setLabelText(tr("Enter a valid URL for a multimedia file or stream:")); - dlg.setTextEchoMode(QLineEdit::Normal); - dlg.setWindowTitle(tr("Multimedia URL")); - dlg.setWindowIcon( LXDG::findIcon("download","") ); - //ensure it is centered on the current screen - QPoint center = QApplication::desktop()->screenGeometry(this).center(); - dlg.move( center.x()-(dlg.width()/2), center.y()-(dlg.height()/2) ); - dlg.show(); - while( dlg.isVisible() ){ - QApplication::processEvents(); - } - QString url = dlg.textValue(); - if(url.isEmpty() || dlg.result()!=QDialog::Accepted){ return; } //cancelled - - //QString url = QInputDialog::getText(0, tr("Multimedia URL"), tr("Enter a valid URL for a multimedia file or stream"), QLineEdit::Normal); - //if(url.isEmpty()){ return; } - QUrl newurl(url); - if(!newurl.isValid()){ return; } //invalid URL - PLAYLIST->addMedia(newurl); - playlistChanged(); -} - -void PPlayerWidget::ClearPlaylist(){ - PLAYER->stop(); - PLAYLIST->clear(); - playlistChanged(); -} - -void PPlayerWidget::ShufflePlaylist(){ - PLAYLIST->shuffle(); -} - - -void PPlayerWidget::userlistSelectionChanged(){ //front-end combobox was changed by the user - if(updatinglists){ return; } - PLAYLIST->setCurrentIndex( ui->combo_playlist->currentIndex() ); -} - -void PPlayerWidget::playerStateChanged(){ - switch( PLAYER->state() ){ - case QMediaPlayer::StoppedState: - ui->tool_stop->setVisible(false); - ui->tool_play->setVisible(true); - ui->tool_pause->setVisible(false); - ui->progressBar->setVisible(false); - break; - case QMediaPlayer::PausedState: - ui->tool_stop->setVisible(true); - ui->tool_play->setVisible(true); - ui->tool_pause->setVisible(false); - ui->progressBar->setVisible(true); - break; - case QMediaPlayer::PlayingState: - ui->tool_stop->setVisible(true); - ui->tool_play->setVisible(false); - ui->tool_pause->setVisible(true); - ui->progressBar->setVisible(true); - break; - } - -} - -void PPlayerWidget::playlistChanged(){ - updatinglists = true; - ui->combo_playlist->clear(); - for(int i=0; imediaCount(); i++){ - QUrl url = PLAYLIST->media(i).canonicalUrl(); - if(url.isLocalFile()){ - ui->combo_playlist->addItem(LXDG::findMimeIcon(url.fileName().section(".",-1)), url.fileName() ); - }else{ - ui->combo_playlist->addItem(LXDG::findIcon("download",""), url.toString() ); - } - } - if(PLAYLIST->currentIndex()<0 && PLAYLIST->mediaCount()>0){ PLAYLIST->setCurrentIndex(0); } - ui->combo_playlist->setCurrentIndex(PLAYLIST->currentIndex()); - - updatinglists = false; -} - -void PPlayerWidget::currentSongChanged(){ - if(PLAYLIST->currentIndex() != ui->combo_playlist->currentIndex()){ - updatinglists = true; - ui->combo_playlist->setCurrentIndex(PLAYLIST->currentIndex()); - updatinglists = false; - } - ui->tool_next->setEnabled( PLAYLIST->nextIndex() >= 0 ); - ui->tool_prev->setEnabled( PLAYLIST->previousIndex() >= 0); - ui->label_num->setText( QString::number( PLAYLIST->currentIndex()+1)+"/"+QString::number(PLAYLIST->mediaCount()) ); - ui->progressBar->setRange(0, PLAYER->duration() ); - ui->progressBar->setValue(0); -} - -void PPlayerWidget::updateProgress(qint64 val){ - //qDebug() << "Update Progress Bar:" << val; - ui->progressBar->setValue(val); -} - -void PPlayerWidget::updateMaxProgress(qint64 val){ - ui->progressBar->setRange(0,val); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.h deleted file mode 100644 index a551d74f..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.h +++ /dev/null @@ -1,59 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin is a simple audio player on the desktop -//=========================================== -#ifndef _LUMINA_PANEL_PLUGIN_AUDIO_PLAYER_WIDGET_H -#define _LUMINA_PANEL_PLUGIN_AUDIO_PLAYER_WIDGET_H - -#include -#include -#include -#include -#include - - -namespace Ui{ - class PPlayerWidget; -}; - -class PPlayerWidget : public QWidget{ - Q_OBJECT -public: - PPlayerWidget(QWidget *parent = 0); - ~PPlayerWidget(); - -public slots: - void LoadIcons(); - -private: - Ui::PPlayerWidget *ui; - QMediaPlaylist *PLAYLIST; - QMediaPlayer *PLAYER; - QMenu *configMenu, *addMenu; - bool updatinglists; - -private slots: - void playClicked(); - void pauseClicked(); - void stopClicked(); - void nextClicked(); - void prevClicked(); - - void AddFilesToPlaylist(); - void AddDirToPlaylist(); - void AddURLToPlaylist(); - void ClearPlaylist(); - void ShufflePlaylist(); - void userlistSelectionChanged(); //front-end combobox was changed by the user - void playerStateChanged(); - void playlistChanged(); //list of items changed - void currentSongChanged(); - void updateProgress(qint64 val); - void updateMaxProgress(qint64 val); -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.ui b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.ui deleted file mode 100644 index 2d2450be..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/audioplayer/PPlayerWidget.ui +++ /dev/null @@ -1,182 +0,0 @@ - - - PPlayerWidget - - - - 0 - 0 - 346 - 90 - - - - Form - - - QToolButton::menu-indicator{ image: none; } - - - - 4 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Config - - - QToolButton::InstantPopup - - - true - - - - - - - Add - - - QToolButton::InstantPopup - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - prev - - - true - - - - - - - 1/10 - - - - - - - next - - - true - - - - - - - - - - - - - - Play - - - true - - - - - - - Pause - - - true - - - - - - - Stop - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 24 - - - false - - - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.cpp deleted file mode 100644 index ee379613..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.cpp +++ /dev/null @@ -1,115 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Susanne Jaeckel, 2015-2016 Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LBattery.h" -#include "LSession.h" - -LBattery::LBattery(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - iconOld = -1; - //Setup the widget - label = new QLabel(this); - label->setScaledContents(true); - //label->setAlignment(Qt::AlignCenter); - this->layout()->addWidget(label); - //Setup the timer - timer = new QTimer(); - timer->setInterval(5000); //update every 5 seconds - connect(timer,SIGNAL(timeout()), this, SLOT(updateBattery()) ); - timer->start(); - QTimer::singleShot(0,this,SLOT(OrientationChange()) ); //update the sizing/icon -} - -LBattery::~LBattery(){ - timer->stop(); - delete timer; -} - -void LBattery::updateBattery(bool force){ - // Get current state of charge - //QStringList result = LUtils::getCmdOutput("/usr/sbin/apm", QStringList() << "-al"); - int charge = LOS::batteryCharge(); //result.at(1).toInt(); -//qDebug() << "1: " << result.at(0).toInt() << " 2: " << result.at(1).toInt(); - int icon = -1; - if (charge > 90) { icon = 4; } - else if (charge > 70) { icon = 3; } - else if (charge > 20) { icon = 2; } - else if (charge > 5) { icon = 1; } - else if (charge > 0 ) { icon = 0; } - if(LOS::batteryIsCharging()){ icon = icon+10; } - //icon = icon + result.at(0).toInt() * 10; - if (icon != iconOld || force) { - switch (icon) { - case 0: - label->setPixmap( LXDG::findIcon("battery-caution", "").pixmap(label->size()) ); - break; - case 1: - label->setPixmap( LXDG::findIcon("battery-040", "").pixmap(label->size()) ); - break; - case 2: - label->setPixmap( LXDG::findIcon("battery-060", "").pixmap(label->size()) ); - break; - case 3: - label->setPixmap( LXDG::findIcon("battery-080", "").pixmap(label->size()) ); - break; - case 4: - label->setPixmap( LXDG::findIcon("battery-100", "").pixmap(label->size()) ); - break; - case 10: - label->setPixmap( LXDG::findIcon("battery-charging-caution", "").pixmap(label->size()) ); - break; - case 11: - label->setPixmap( LXDG::findIcon("battery-charging-040", "").pixmap(label->size()) ); - break; - case 12: - label->setPixmap( LXDG::findIcon("battery-charging-060", "").pixmap(label->size()) ); - break; - case 13: - label->setPixmap( LXDG::findIcon("battery-charging-080", "").pixmap(label->size()) ); - break; - case 14: - label->setPixmap( LXDG::findIcon("battery-charging", "").pixmap(label->size()) ); - break; - default: - label->setPixmap( LXDG::findIcon("battery-missing", "").pixmap(label->size()) ); - break; - } - if(iconplayAudioFile(LOS::LuminaShare()+"low-battery.ogg"); - } - if(icon==0){ label->setStyleSheet("QLabel{ background: red;}"); } - else if(icon==14 && charge>98){ label->setStyleSheet("QLabel{ background: green;}"); } - else{ label->setStyleSheet("QLabel{ background: transparent;}"); } - iconOld = icon; - - } - //Now update the display - QString tt; - //Make sure the tooltip can be properly translated as necessary (Ken Moore 5/9/14) - if(icon > 9 && icon < 15){ tt = QString(tr("%1 % (Charging)")).arg(QString::number(charge)); } - else{ tt = QString( tr("%1 % (%2 Remaining)") ).arg(QString::number(charge), getRemainingTime() ); } - label->setToolTip(tt); -} - -QString LBattery::getRemainingTime(){ - int secs = LOS::batterySecondsLeft(); - if(secs < 0){ return "??"; } - QString rem; //remaining - if(secs > 3600){ - int hours = secs/3600; - rem.append( QString::number(hours)+"h "); - secs = secs - (hours*3600); - } - if(secs > 60){ - int min = secs/60; - rem.append( QString::number(min)+"m "); - secs = secs - (min*60); - } - if(secs > 0){ - rem.append(QString::number(secs)+"s"); - } - return rem; -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.h deleted file mode 100644 index 29562d5d..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/LBattery.h +++ /dev/null @@ -1,53 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Susanne Jaeckel -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_BATTERY_H -#define _LUMINA_DESKTOP_BATTERY_H - -#include -#include -#include -#include - -#include -#include -#include - -#include "../../Globals.h" -//#include "../LTBWidget.h" -#include "../LPPlugin.h" - -class LBattery : public LPPlugin{ - Q_OBJECT -public: - LBattery(QWidget *parent = 0, QString id = "battery", bool horizontal=true); - ~LBattery(); - -private: - QTimer *timer; - QLabel *label; - int iconOld; - -private slots: - void updateBattery(bool force = false); - QString getRemainingTime(); - -public slots: - void LocaleChange(){ - updateBattery(true); - } - - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - label->setFixedSize( QSize(this->height(), this->height()) ); - }else{ - label->setFixedSize( QSize(this->width(), this->width()) ); - } - updateBattery(true); //force icon refresh - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/NOTES b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/NOTES deleted file mode 100644 index 3d93267e..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/battery/NOTES +++ /dev/null @@ -1,49 +0,0 @@ -Eventuell mit einem Menü implementieren, mit Einträgen für: -Anzeige des kompletten Status und Infos -Herunterfahren des Systems etc. - -apm -a - Zeigt den AC line status an - 0 = off-line - 1 = on-line - 2 = backup-power - -apm -b - Zeigt - 0 = high - 1 = low - 2 = critical - 3 = charging - -apm -l - Zeit die prozentuale Kapazitaet - 255 = nicht unterstuetzt - -apm -t - Zeigt die verbleibende Zeit in Sekunden - -Aufruf Systemfunktionen: LUtils.h - -mit der Methode: -QStringList LUtils::getCmdOutput(QString cmd, QStringList args) - -Icons: -/usr/local/share/icons/oxygen/22x22/status -oder unter: -/usr/local/share/icons/oxygen/16x16/status - -battery-040.png // 40 % -battery-060.png -battery-080.png -battery-100.png - -battery-caution.png -battery-charging.png -battery-charging-040.png -battery-charging-060.png -battery-charging-080.png -battery-charging-caution.png - -battery-charging-log.png -battery-log.png -battery-missing.png diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.cpp deleted file mode 100644 index b370c536..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.cpp +++ /dev/null @@ -1,230 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LClock.h" -#include "LSession.h" -#include -#include - -LClock::LClock(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - button = new QToolButton(this); //RotateToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonTextOnly); - button->setStyleSheet("font-weight: bold;"); - button->setPopupMode(QToolButton::DelayedPopup); //make sure it runs the update routine first - button->setMenu(new QMenu()); - //button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); - //this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); - connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); - connect(button->menu(), SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - calendar = new QCalendarWidget(this); - calAct = new QWidgetAction(this); - calAct->setDefaultWidget(calendar); - TZMenu = new QMenu(this); - connect(TZMenu, SIGNAL(triggered(QAction*)), this, SLOT(ChangeTZ(QAction*)) ); - - //Now assemble the menu - button->menu()->addAction(calAct); - button->menu()->addMenu(TZMenu); - - this->layout()->setContentsMargins(0,0,0,0); //reserve some space on left/right - this->layout()->addWidget(button); - - //Setup the timer - timer = new QTimer(); - //Load all the initial settings - updateFormats(); - LocaleChange(); - ThemeChange(); - OrientationChange(); - //Now connect/start the timer - connect(timer,SIGNAL(timeout()), this, SLOT(updateTime()) ); - connect(QApplication::instance(), SIGNAL(SessionConfigChanged()), this, SLOT(updateFormats()) ); - timer->start(); -} - -LClock::~LClock(){ - timer->stop(); - delete timer; -} - - -void LClock::updateTime(bool adjustformat){ - QDateTime CT = QDateTime::currentDateTime(); - //Now update the display - QString label; - QString timelabel; - QString datelabel; - if(deftime){ timelabel = CT.time().toString(Qt::DefaultLocaleShortDate) ; } - else{ timelabel=CT.toString(timefmt); } - if(defdate){ datelabel = CT.date().toString(Qt::DefaultLocaleShortDate); } - else{ datelabel = CT.toString(datefmt); } - if(datetimeorder == "dateonly"){ - label = datelabel; - button->setToolTip(timelabel); - }else if(datetimeorder == "timedate"){ - label = timelabel + "\n" + datelabel; - button->setToolTip(""); - }else if(datetimeorder == "datetime"){ - label = datelabel + "\n" + timelabel; - button->setToolTip(""); - }else{ - label = timelabel; - button->setToolTip(datelabel); - } - if( this->layout()->direction() == QBoxLayout::TopToBottom ){ - //different routine for vertical text (need newlines instead of spaces) - for(int i=0; isize().width() < (this->fontMetrics().width(label.section("\n",i,i))+10 )&& label.section("\n",i,i).contains(" ")){ - label.replace(label.section("\n",i,i), label.section("\n",i,i).replace(" ", "\n")); - i--; - } - } - //label.replace(" ","\n"); - }else if( this->size().height() < 2*this->fontMetrics().height() ){ - label.replace("\n",", "); - } - if(adjustformat){ - //Check the font/spacing for the display and adjust as necessary - /*double efflines = label.count("\n")+1; //effective lines (with wordwrap) - if( (button->fontMetrics().height()*efflines) > button->height() ){ - //Force a pixel metric font size to fit everything - int szH = qRound( (button->height() - button->fontMetrics().lineSpacing() )/efflines ); - //Need to supply a *width* pixel, not a height metric - int szW = qRound( (szH*button->fontMetrics().maxWidth())/( (double) button->fontMetrics().height()) ); - qDebug() << "Change Clock font:" << button->height() << szH << szW << efflines << button->fontMetrics().height() << button->fontMetrics().lineSpacing(); - button->setStyleSheet("font-weight: bold; font-size: "+QString::number(szW)+"px;"); - }else{ - button->setStyleSheet("font-weight: bold;"); - }*/ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - //horizontal layout - this->setFixedWidth( this->sizeHint().width() +6); - }else{ - //vertical layout - this->setMaximumWidth(100000); - } - } - button->setText(label); -} - -void LClock::updateFormats(){ - qDebug() << "Updating clock format"; - timefmt = LSession::handle()->sessionSettings()->value("TimeFormat","").toString(); - datefmt = LSession::handle()->sessionSettings()->value("DateFormat","").toString(); - deftime = timefmt.simplified().isEmpty(); - defdate = datefmt.simplified().isEmpty(); - //Adjust the timer interval based on the smallest unit displayed - if(deftime){ timer->setInterval(500); } //1/2 second - else if(timefmt.contains("z")){ timer->setInterval(1); } //every millisecond (smallest unit) - else if(timefmt.contains("s")){ timer->setInterval(500); } //1/2 second - else if(timefmt.contains("m")){ timer->setInterval(2000); } //2 seconds - else{ timer->setInterval(1000); } //unknown format - use 1 second interval - datetimeorder = LSession::handle()->sessionSettings()->value("DateTimeOrder", "timeonly").toString().toLower(); - //this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - updateTime(true); - //Now fix the size of the widget with the new size hint - //this->setFixedWidth( this->sizeHint().width() +6); -} - -void LClock::updateMenu(){ - QDateTime cdt = QDateTime::currentDateTime(); - TZMenu->setTitle(QString(tr("Time Zone (%1)")).arg(cdt.timeZoneAbbreviation()) ); - calendar->showToday(); //make sure the current month is visible - calendar->setSelectedDate(QDate::currentDate()); //select the actual date for today -} - -void LClock::openMenu(){ - updateMenu(); - button->showMenu(); -} - -void LClock::closeMenu(){ - button->menu()->hide(); -} - -void LClock::ChangeTZ(QAction *act){ - LTHEME::setCustomEnvSetting("TZ",act->whatsThis()); - QTimer::singleShot(500, this, SLOT(updateTime()) ); -} - -void LClock::LocaleChange(){ - //Refresh all the time zone information - TZMenu->clear(); - TZMenu->addAction(tr("Use System Time")); - TZMenu->addSeparator(); - QList TZList = QTimeZone::availableTimeZoneIds(); - //Orgnize time zones for smaller menus (Continent/Country/City) - // Note: id = Continent/City - QStringList info; - for(int i=0; iisEmpty()){ - tmpC->addMenu(tmpCM); - } - if(!tmpC->isEmpty()){ TZMenu->addMenu(tmpC); } - } - tmpC = new QMenu(this); - tmpC->setTitle(info[i].section("::::",1,1)); - tmpCM = new QMenu(this); - tmpCM->setTitle(info[i].section("::::",2,2)); - //Check if different country - }else if(info[i].section("::::",2,2)!=country){ - if(tmpC!=0 && tmpCM!=0 && !tmpCM->isEmpty()){ - tmpC->addMenu(tmpCM); - } - tmpCM = new QMenu(this); - tmpCM->setTitle(info[i].section("::::",2,2)); - } - //Now create the entry within the country menu - if(tmpCM!=0){ - QAction *act = new QAction(info[i].section("::::",3,3), this); - act->setWhatsThis(info[i].section("::::",4,4) ); - tmpCM->addAction(act); - } - //Save the values for the next run - continent = info[i].section("::::",1,1); - country = info[i].section("::::",2,2); - - if(i== info.length()-1){ - //last go through - save all menus - if(tmpCM!=0 && tmpC!=0 && !tmpCM->isEmpty()){ tmpC->addMenu(tmpCM); } - if(tmpC!=0 && !tmpC->isEmpty()){ TZMenu->addMenu(tmpC); } - } - } - -} - -void LClock::ThemeChange(){ - TZMenu->setIcon(LXDG::findIcon("clock","")); -} - -void LClock::OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ //horizontal panel - //button->setRotation(0); //no rotation of text - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); - button->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); - }else{ //vertical panel - //button->setRotation(90); //90 degree rotation - this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - } - updateTime(true); //re-adjust the font/spacings - this->layout()->update(); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.h deleted file mode 100644 index eddf782c..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/clock/LClock.h +++ /dev/null @@ -1,58 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_CLOCK_H -#define _LUMINA_DESKTOP_CLOCK_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../LPPlugin.h" - -//#include "../RotateToolButton.h" - -class LClock : public LPPlugin{ - Q_OBJECT -public: - LClock(QWidget *parent = 0, QString id = "clock", bool horizontal=true); - ~LClock(); - -private: - QTimer *timer; - QToolButton *button; //RotateToolButton - QString timefmt, datefmt, datetimeorder; - bool deftime, defdate; - QMenu *TZMenu; - QCalendarWidget *calendar; - QWidgetAction *calAct; - -private slots: - void updateTime(bool adjustformat = false); - void updateFormats(); - - void updateMenu(); - void openMenu(); - void closeMenu(); - - void ChangeTZ(QAction*); - -public slots: - void LocaleChange(); - void ThemeChange(); - void OrientationChange(); -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.cpp deleted file mode 100644 index 90d942de..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.cpp +++ /dev/null @@ -1,207 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LDeskBar.h" -#include "../../LSession.h" - -LDeskBarPlugin::LDeskBarPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - this->layout()->setContentsMargins(0,0,0,0); - this->setStyleSheet( "QToolButton::menu-indicator{ image: none; } QToolButton{ padding: 0px; }"); - - //initialize the desktop bar items - initializeDesktop(); - //setup the directory watcher - QString fav = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/favorites.list"; - if(!QFile::exists(fav)){ QProcess::execute("touch \""+fav+"\""); } - watcher = new QFileSystemWatcher(this); - watcher->addPath( fav ); - connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(filechanged(QString)) ); - QTimer::singleShot(1,this, SLOT(updateFiles()) ); //make sure to load it the first time - QTimer::singleShot(0,this, SLOT(OrientationChange()) ); //adjust sizes/layout - connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(updateFiles()) ); -} - -LDeskBarPlugin::~LDeskBarPlugin(){ -} - -// ======================= -// PRIVATE FUNCTIONS -// ======================= -void LDeskBarPlugin::initializeDesktop(){ - //Applications on the desktop - appB = new QToolButton(this); - appB->setToolButtonStyle(Qt::ToolButtonIconOnly); - appB->setAutoRaise(true); - appB->setPopupMode(QToolButton::InstantPopup); - appM = new QMenu(this); - appB->setMenu(appM); - this->layout()->addWidget(appB); - connect(appM,SIGNAL(triggered(QAction*)),this,SLOT(ActionTriggered(QAction*)) ); - connect(appM, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - //Directories on the desktop - dirB = new QToolButton(this); - dirB->setToolButtonStyle(Qt::ToolButtonIconOnly); - dirB->setAutoRaise(true); - dirB->setPopupMode(QToolButton::InstantPopup); - dirM = new QMenu(this); - dirB->setMenu(dirM); - this->layout()->addWidget(dirB); - connect(dirM,SIGNAL(triggered(QAction*)),this,SLOT(ActionTriggered(QAction*)) ); - connect(dirM, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - //Audio Files on the desktop - audioM = new QMenu(this); - connect(audioM,SIGNAL(triggered(QAction*)),this,SLOT(ActionTriggered(QAction*)) ); - //Video Files on the desktop - videoM = new QMenu(this); - connect(videoM,SIGNAL(triggered(QAction*)),this,SLOT(ActionTriggered(QAction*)) ); - //Picture Files on the desktop - pictureM = new QMenu(this); - connect(pictureM,SIGNAL(triggered(QAction*)),this,SLOT(ActionTriggered(QAction*)) ); - //Other Files on the desktop - otherM = new QMenu(this); - connect(otherM,SIGNAL(triggered(QAction*)),this,SLOT(ActionTriggered(QAction*)) ); - docM = new QMenu(this); - connect(docM,SIGNAL(triggered(QAction*)), this,SLOT(ActionTriggered(QAction*)) ); - //All Files Button - fileB = new QToolButton(this); - fileB->setToolButtonStyle(Qt::ToolButtonIconOnly); - fileB->setAutoRaise(true); - fileB->setPopupMode(QToolButton::InstantPopup); - fileM = new QMenu(this); - fileB->setMenu(fileM); - this->layout()->addWidget(fileB); - - updateIcons(); //set all the text/icons -} - -QAction* LDeskBarPlugin::newAction(QString filepath, QString name, QString iconpath){ - return newAction(filepath, name, QIcon(iconpath)); -} - -QAction* LDeskBarPlugin::newAction(QString filepath, QString name, QIcon icon){ - QAction *act = new QAction(icon, name, this); - act->setWhatsThis(filepath); - return act; -} - -// ======================= -// PRIVATE SLOTS -// ======================= -void LDeskBarPlugin::ActionTriggered(QAction* act){ - //Open up the file with the appropriate application - QString cmd = "lumina-open \""+act->whatsThis()+"\""; - qDebug() << "Open File:" << cmd; - LSession::LaunchApplication(cmd); -} -void LDeskBarPlugin::filechanged(QString file){ - updateFiles(); - if(!watcher->files().contains(file)){ watcher->addPath(file); } //make sure the file does not get removed from the watcher -} -void LDeskBarPlugin::updateFiles(){ - QFileInfoList homefiles = LSession::handle()->DesktopFiles(); - QStringList favitems = LDesktopUtils::listFavorites(); - //Remember for format for favorites: ::::[app/dir/]:::: - for(int i=0; iclear(); - dirM->clear(); - audioM->clear(); - videoM->clear(); - pictureM->clear(); - docM->clear(); - otherM->clear(); - for(int i=0; iaddAction( newAction(df.filePath, df.name, LXDG::findIcon(df.icon, ":/images/default-application.png")) ); - } - }else if(type=="dir"){ - //Add it to dirM - dirM->addAction( newAction(path, name, LXDG::findIcon("folder","")) ); - }else if(type.startsWith("audio/")){ - //Add it to audioM - audioM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) ); - }else if(type.startsWith("video/")){ - //Add it to videoM - videoM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) ); - }else if(type.startsWith("image/")){ - //Add it to pictureM - if(LUtils::imageExtensions().contains(path.section("/",-1).section(".",-1).toLower()) ){ - pictureM->addAction( newAction(path, name, QIcon(path)) ); - }else{ - pictureM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) ); - } - }else if(type.startsWith("text/")){ - //Add it to docM - docM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) ); - }else{ - //Add it to otherM - otherM->addAction( newAction(path, name, LXDG::findMimeIcon(type)) ); - } - - } - - //Now update the file menu as appropriate - fileM->clear(); - if(!audioM->isEmpty()){ fileM->addMenu(audioM); } - if(!docM->isEmpty()){ fileM->addMenu(docM); } - if(!pictureM->isEmpty()){ fileM->addMenu(pictureM); } - if(!videoM->isEmpty()){ fileM->addMenu(videoM); } - if(!otherM->isEmpty()){ fileM->addMenu(otherM); } - //Check for a single submenu, and skip the main if need be - disconnect(fileB->menu(), SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed()) ); - if(fileM->actions().length()==1){ - if(!audioM->isEmpty()){ fileB->setMenu(audioM); } - else if(!pictureM->isEmpty()){ fileB->setMenu(pictureM); } - else if(!videoM->isEmpty()){ fileB->setMenu(videoM); } - else if(!docM->isEmpty()){ fileB->setMenu(docM); } - else if(!otherM->isEmpty()){ fileB->setMenu(otherM); } - }else{ - fileB->setMenu(fileM); - } - connect(fileB->menu(), SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - - //Setup the visibility of the buttons - appB->setVisible( !appM->isEmpty() ); - dirB->setVisible( !dirM->isEmpty() ); - fileB->setVisible( !fileM->isEmpty() ); -} - -void LDeskBarPlugin::updateIcons(){ - //Set all the text/icons - appB->setIcon( LXDG::findIcon("favorites", "") ); - appB->setToolTip(tr("Favorite Applications")); - dirB->setIcon( LXDG::findIcon("folder", "") ); - dirB->setToolTip(tr("Favorite Folders")); - audioM->setTitle( tr("Audio") ); - audioM->setIcon( LXDG::findIcon("audio-x-generic","") ); - videoM->setTitle( tr("Video") ); - videoM->setIcon( LXDG::findIcon("video-x-generic","") ); - pictureM->setTitle( tr("Pictures") ); - pictureM->setIcon( LXDG::findIcon("image-x-generic","") ); - otherM->setTitle( tr("Other Files") ); - otherM->setIcon( LXDG::findIcon("unknown","") ); - docM->setTitle( tr("Documents") ); - docM->setIcon( LXDG::findIcon("x-office-document","") ); - fileB->setIcon( LXDG::findIcon("document-multiple", "") ); - fileB->setToolTip(tr("Favorite Files") ); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.h deleted file mode 100644 index 74f41230..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopbar/LDeskBar.h +++ /dev/null @@ -1,88 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This plugin displays the contents of the user's home directory -// as organized within a couple buttons on the panel (apps, dirs, files) -//=========================================== -#ifndef _LUMINA_DESKTOP_DESKBAR_H -#define _LUMINA_DESKTOP_DESKBAR_H - -// Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// libLumina includes -#include - -// local includes -//#include "../LTBWidget.h" -#include "../LPPlugin.h" - -class LDeskBarPlugin : public LPPlugin{ - Q_OBJECT -public: - LDeskBarPlugin(QWidget* parent=0, QString id = "desktopbar", bool horizontal=true); - ~LDeskBarPlugin(); - -private: - QFileSystemWatcher *watcher; - //Special toolbuttons and menus - QToolButton *appB, *fileB, *dirB; - QMenu *appM, *dirM, *audioM, *videoM, *pictureM, *fileM, *otherM, *docM; - QList APPLIST; - QDateTime lastHomeUpdate; - - void initializeDesktop(); - //bool readDesktopFile(QString path, QString &name, QString &iconpath); - - QAction* newAction(QString filepath, QString name, QString iconpath); - QAction* newAction(QString filepath, QString name, QIcon icon); - - //void updateMenu(QMenu* menu, QFileInfoList files, bool trim = true); - - -private slots: - void ActionTriggered(QAction* act); - void filechanged(QString); - void updateFiles(); - void updateIcons(); - -public slots: - void LocaleChange(){ - updateIcons(); - updateFiles(); - } - - void OrientationChange(){ - QSize sz; - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - sz = QSize(this->height(), this->height()); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - sz = QSize(this->width(), this->width()); - } - appB->setIconSize(sz); - fileB->setIconSize(sz); - dirB->setIconSize(sz); - for(int i=0; isetIconSize(sz); - } - this->layout()->update(); - } -}; - - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp deleted file mode 100644 index 8e0a9d28..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp +++ /dev/null @@ -1,148 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Susanne Jaeckel -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LDesktopSwitcher.h" -#include - -LDesktopSwitcher::LDesktopSwitcher(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal) { - iconOld = -1; - this->setStyleSheet( "QToolButton::menu-indicator{ image: none; } QToolButton{padding: 0px;}"); - //Setup the widget - label = new QToolButton(this); - label->setPopupMode(QToolButton::DelayedPopup); - label->setAutoRaise(true); - label->setToolButtonStyle(Qt::ToolButtonIconOnly); - label->setIcon( LXDG::findIcon("format-view-carousel", "preferences-desktop-display") ); - label->setToolTip(QString("Workspace 1")); - connect(label, SIGNAL(clicked()), this, SLOT(openMenu())); - menu = new QMenu(this); - connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(menuActionTriggered(QAction*))); - connect(menu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - label->setMenu(menu); - this->layout()->addWidget(label); - - // Maybe a timer should be set to set the toolTip of the button, - // becasue the workspace could be switched via Keyboard-shortcuts ... - - QTimer::singleShot(500, this, SLOT(createMenu()) ); //needs a delay to make sure it works right the first time - QTimer::singleShot(0,this, SLOT(OrientationChange()) ); //adjust icon size - - //Process the signal which is sent when the workspace is changed via keyboard-shortcuts - connect(QApplication::instance(), SIGNAL(WorkspaceChanged()), this, SLOT(updateWorkspaceMenu())); -} - -LDesktopSwitcher::~LDesktopSwitcher(){ -} -/* MOVED THESE FUNCTIONS TO LIBLUMINA (LuminaX11.h) -- Ken Moore 5/9/14 -void LDesktopSwitcher::setNumberOfDesktops(int number) { - Display *display = QX11Info::display(); - Window rootWindow = QX11Info::appRootWindow(); - - Atom atom = XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False); - XEvent xevent; - xevent.type = ClientMessage; - xevent.xclient.type = ClientMessage; - xevent.xclient.display = display; - xevent.xclient.window = rootWindow; - xevent.xclient.message_type = atom; - xevent.xclient.format = 32; - xevent.xclient.data.l[0] = number; - xevent.xclient.data.l[1] = CurrentTime; - xevent.xclient.data.l[2] = 0; - xevent.xclient.data.l[3] = 0; - xevent.xclient.data.l[4] = 0; - XSendEvent(display, rootWindow, False, SubstructureNotifyMask | SubstructureRedirectMask, &xevent); - - XFlush(display); -} - -void LDesktopSwitcher::setCurrentDesktop(int number) { - Display *display = QX11Info::display(); - Window rootWindow = QX11Info::appRootWindow(); - - Atom atom = XInternAtom(display, "_NET_CURRENT_DESKTOP", False); - XEvent xevent; - xevent.type = ClientMessage; - xevent.xclient.type = ClientMessage; - xevent.xclient.display = display; - xevent.xclient.window = rootWindow; - xevent.xclient.message_type = atom; - xevent.xclient.format = 32; - xevent.xclient.data.l[0] = number; - xevent.xclient.data.l[1] = CurrentTime; - xevent.xclient.data.l[2] = 0; - xevent.xclient.data.l[3] = 0; - xevent.xclient.data.l[4] = 0; - XSendEvent(display, rootWindow, False, SubstructureNotifyMask | SubstructureRedirectMask, &xevent); - - XFlush(display); -} - -int LDesktopSwitcher::getNumberOfDesktops() { - int number = -1; - Atom a = XInternAtom(QX11Info::display(), "_NET_NUMBER_OF_DESKTOPS", true); - Atom realType; - int format; - unsigned long num, bytes; - unsigned char *data = 0; - int status = XGetWindowProperty(QX11Info::display(), QX11Info::appRootWindow(), a, 0L, (~0L), - false, AnyPropertyType, &realType, &format, &num, &bytes, &data); - if( (status >= Success) && (num > 0) ){ - number = *data; - XFree(data); - } - return number; -} - -int LDesktopSwitcher::getCurrentDesktop() { - int number = -1; - Atom a = XInternAtom(QX11Info::display(), "_NET_CURRENT_DESKTOP", true); - Atom realType; - int format; - unsigned long num, bytes; - unsigned char *data = 0; - int status = XGetWindowProperty(QX11Info::display(), QX11Info::appRootWindow(), a, 0L, (~0L), - false, AnyPropertyType, &realType, &format, &num, &bytes, &data); - if( (status >= Success) && (num > 0) ){ - number = *data; - XFree(data); - } - return number; -} */ - -void LDesktopSwitcher::openMenu(){ - //Make sure the menu is refreshed right before it opens - createMenu(); - label->showMenu(); -} - -QAction* LDesktopSwitcher::newAction(int what, QString name) { - QAction *act = new QAction(LXDG::findIcon("preferences-desktop-display", ""), name, this); - act->setWhatsThis(QString::number(what)); - return act; -} - -void LDesktopSwitcher::createMenu() { - int cur = LSession::handle()->XCB->CurrentWorkspace(); //current desktop number - int tot = LSession::handle()->XCB->NumberOfWorkspaces(); //total number of desktops - //qDebug() << "-- vor getCurrentDesktop SWITCH"; - qDebug() << "Virtual Desktops:" << tot << cur; - menu->clear(); - for (int i = 0; i < tot; i++) { - QString name = QString(tr("Workspace %1")).arg( QString::number(i+1) ); - if(i == cur){ name.prepend("*"); name.append("*");} //identify which desktop this is currently - menu->addAction(newAction(i, name)); - } - label->setToolTip(QString(tr("Workspace %1")).arg(QString::number(cur + 1))); -} - -void LDesktopSwitcher::menuActionTriggered(QAction* act) { - LSession::handle()->XCB->SetCurrentWorkspace(act->whatsThis().toInt()); -} - -void LDesktopSwitcher::updateWorkspaceMenu() { - createMenu(); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.h deleted file mode 100644 index 69fe46da..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/desktopswitcher/LDesktopSwitcher.h +++ /dev/null @@ -1,73 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Susanne Jaeckel -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_SWITCHER_H -#define _LUMINA_DESKTOP_SWITCHER_H - -#include -#include -#include -//#include -#include -#include - -#include -#include -#include - -//#include "../LTBWidget.h" -#include "../LPPlugin.h" - -//#include -//#include -//#include - -class LDesktopSwitcher : public LPPlugin{ - Q_OBJECT -public: - LDesktopSwitcher(QWidget *parent = 0, QString id = "desktopswitcher", bool horizontal=true); - ~LDesktopSwitcher(); - -private: - QTimer *timer; - QToolButton *label; - QMenu *menu; - int iconOld; - - //void setNumberOfDesktops(int); - //void setCurrentDesktop(int); - //int getNumberOfDesktops(); - //int getCurrentDesktop(); - - - QAction* newAction(int, QString); - -private slots: - void openMenu(); - void createMenu(); - void menuActionTriggered(QAction*); - void updateWorkspaceMenu(); - -public slots: - void LocaleChange(){ - createMenu(); - } - - void OrientationChange(){ - QSize sz; - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - sz = QSize(this->height(), this->height()); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - sz = QSize(this->width(), this->width()); - } - label->setIconSize(sz); - this->layout()->update(); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.cpp deleted file mode 100644 index 14880f9b..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.cpp +++ /dev/null @@ -1,35 +0,0 @@ -//=========================================== -// Lumina Desktop source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "PPJsonMenu.h" -#include "../../JsonMenu.h" - -LPJsonMenu::LPJsonMenu(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - //Setup the button - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonIconOnly); - button->setPopupMode(QToolButton::InstantPopup); //make sure it runs the update routine first - //connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - //Parse the id and get the extra information needed for the plugin - QStringList info = id.section("---",0,0).split("::::"); //FORMAT:[ "jsonmenu---",exec,name, icon(optional)] - if(info.length()>=3){ - qDebug() << "Custom JSON Menu Loaded:" << info; - JsonMenu *menu = new JsonMenu(info[1], button); - button->setText(info[2]); - //connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) ); - if(info.length()>=4){ button->setIcon( LXDG::findIcon(info[3],"run-build") ); } - else{ button->setIcon( LXDG::findIcon("run-build","") ); } - button->setMenu(menu); - } - //Now start up the widgets - QTimer::singleShot(0,this,SLOT(OrientationChange()) ); //update the sizing/icon -} - -LPJsonMenu::~LPJsonMenu(){ -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.h deleted file mode 100644 index d0827fd2..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/jsonmenu/PPJsonMenu.h +++ /dev/null @@ -1,42 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_PANEL_JSON_PLUGIN_H -#define _LUMINA_PANEL_JSON_PLUGIN_H - -#include "../../Globals.h" -#include "../LPPlugin.h" - - -class LPJsonMenu : public LPPlugin{ - Q_OBJECT -public: - LPJsonMenu(QWidget *parent = 0, QString id = "jsonmenu", bool horizontal=true); - ~LPJsonMenu(); - -private: - QToolButton *button; - -private slots: - //void SystemApplication(QAction*); - -public slots: - void LocaleChange(){ - } - - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - } - this->layout()->update(); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/line/LLine.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/line/LLine.h deleted file mode 100644 index 94de486e..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/line/LLine.h +++ /dev/null @@ -1,40 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is a generic line separator for the panel -//=========================================== -#ifndef _LUMINA_DESKTOP_PANEL_PLUGIN_LINE_H -#define _LUMINA_DESKTOP_PANEL_PLUGIN_LINE_H - -#include "../LPPlugin.h" -#include - -class LLinePlugin : public LPPlugin{ - Q_OBJECT -private: - QFrame *line; - -public: - LLinePlugin(QWidget *parent=0, QString id="spacer", bool horizontal=true) : LPPlugin(parent, id, horizontal){ - line = new QFrame(this); - line->setObjectName("LuminaPanelLine"); - this->layout()->addWidget(line); - OrientationChange(); - } - ~LLinePlugin(){} - -public slots: - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ //horizontal - line->setFrameShape(QFrame::VLine); - }else{ //vertical - line->setFrameShape(QFrame::HLine); - } - } -}; - - -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/panel-plugins.pri b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/panel-plugins.pri deleted file mode 100644 index c40c4725..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/panel-plugins.pri +++ /dev/null @@ -1,57 +0,0 @@ -#Lumina Desktop Panel Plugin files - -SOURCES += $$PWD/userbutton/LUserButton.cpp \ - $$PWD/userbutton/UserWidget.cpp \ - $$PWD/userbutton/UserItemWidget.cpp \ - $$PWD/desktopbar/LDeskBar.cpp \ - $$PWD/taskmanager/LTaskManagerPlugin.cpp \ - $$PWD/taskmanager/LTaskButton.cpp \ - $$PWD/systemtray/LSysTray.cpp \ - $$PWD/systemtray/TrayIcon.cpp \ - $$PWD/clock/LClock.cpp \ - $$PWD/battery/LBattery.cpp \ - $$PWD/desktopswitcher/LDesktopSwitcher.cpp \ - $$PWD/systemdashboard/LSysDashboard.cpp \ - $$PWD/systemdashboard/SysMenuQuick.cpp \ - $$PWD/showdesktop/LHomeButton.cpp \ - $$PWD/appmenu/LAppMenuPlugin.cpp \ - $$PWD/applauncher/AppLaunchButton.cpp \ - $$PWD/systemstart/LStartButton.cpp \ - $$PWD/systemstart/StartMenu.cpp \ - $$PWD/systemstart/ItemWidget.cpp \ - $$PWD/audioplayer/LPAudioPlayer.cpp \ - $$PWD/audioplayer/PPlayerWidget.cpp \ - $$PWD/jsonmenu/PPJsonMenu.cpp - -HEADERS += $$PWD/RotateToolButton.h \ - $$PWD/userbutton/LUserButton.h \ - $$PWD/userbutton/UserWidget.h \ - $$PWD/userbutton/UserItemWidget.h \ - $$PWD/desktopbar/LDeskBar.h \ - $$PWD/systemtray/LSysTray.h \ - $$PWD/systemtray/TrayIcon.h \ - $$PWD/spacer/LSpacer.h \ - $$PWD/line/LLine.h \ - $$PWD/clock/LClock.h \ - $$PWD/battery/LBattery.h \ - $$PWD/desktopswitcher/LDesktopSwitcher.h \ - $$PWD/taskmanager/LTaskManagerPlugin.h \ - $$PWD/taskmanager/LTaskButton.h \ - $$PWD/systemdashboard/LSysDashboard.h \ - $$PWD/systemdashboard/SysMenuQuick.h \ - $$PWD/showdesktop/LHomeButton.h \ - $$PWD/appmenu/LAppMenuPlugin.h \ - $$PWD/applauncher/AppLaunchButton.h \ - $$PWD/systemstart/LStartButton.h \ - $$PWD/systemstart/StartMenu.h \ - $$PWD/systemstart/ItemWidget.h \ - $$PWD/audioplayer/LPAudioPlayer.h \ - $$PWD/audioplayer/PPlayerWidget.h \ - $$PWD/jsonmenu/PPJsonMenu.h -# $$PWD/quickcontainer/QuickPPlugin.h - -FORMS += $$PWD/userbutton/UserWidget.ui \ - $$PWD/systemdashboard/SysMenuQuick.ui \ - $$PWD/systemstart/StartMenu.ui \ - $$PWD/audioplayer/PPlayerWidget.ui - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/quickcontainer/QuickPPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/quickcontainer/QuickPPlugin.h deleted file mode 100644 index 6f61c4d5..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/quickcontainer/QuickPPlugin.h +++ /dev/null @@ -1,43 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is a simple container for a QtQuick plugin -//=========================================== -#ifndef _LUMINA_DESKTOP_PANEL_PLUGIN_QUICK_H -#define _LUMINA_DESKTOP_PANEL_PLUGIN_QUICK_H - -#include -#include -#include "../LPPlugin.h" - -#include -#include - -class QuickPPlugin : public LPPlugin{ - Q_OBJECT -public: - QuickPPlugin(QWidget* parent, QString ID, bool horizontal) : LPPlugin(parent, ID){ - container = new QQuickWidget(this); - container->setResizeMode(QQuickWidget::SizeRootObjectToView); - this->layout()->addWidget(container); - horizontal = true; //just to silence compiler warning - container->setSource(QUrl::fromLocalFile( LUtils::findQuickPluginFile(ID.section("---",0,0)) )); - } - - ~QuickPPlugin(){} - -private: - QQuickWidget *container; - -private slots: - void statusChange(QQuickWidget::Status status){ - if(status == QQuickWidget::Error){ - qDebug() << "Quick Widget Error:" << this->type(); - } - } - -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.cpp deleted file mode 100644 index 6c259b16..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LHomeButton.h" -#include "../../LSession.h" - -#include - -LHomeButtonPlugin::LHomeButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - - connect(button, SIGNAL(clicked()), this, SLOT(showDesktop())); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - - QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes -} - -LHomeButtonPlugin::~LHomeButtonPlugin(){ - -} - -void LHomeButtonPlugin::updateButtonVisuals(){ - button->setIcon( LXDG::findIcon("user-desktop", "") ); -} - -// ======================== -// PRIVATE FUNCTIONS -// ======================== -void LHomeButtonPlugin::showDesktop(){ - QList wins = LSession::handle()->XCB->WindowList(); - for(int i=0; iXCB->WindowState(wins[i]) ){ - LSession::handle()->XCB->MinimizeWindow(wins[i]); - } - } -} - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.h deleted file mode 100644 index 74aaf4fb..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/showdesktop/LHomeButton.h +++ /dev/null @@ -1,62 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin is a simple button to hide all windows so the desktop is visible -//=========================================== -#ifndef _LUMINA_DESKTOP_GO_HOME_PLUGIN_H -#define _LUMINA_DESKTOP_GO_HOME_PLUGIN_H - -// Qt includes -#include -#include -#include - - -// Lumina-desktop includes -#include "../LPPlugin.h" //main plugin widget - -// libLumina includes -#include "LuminaXDG.h" - -// PANEL PLUGIN BUTTON -class LHomeButtonPlugin : public LPPlugin{ - Q_OBJECT - -public: - LHomeButtonPlugin(QWidget *parent = 0, QString id = "homebutton", bool horizontal=true); - ~LHomeButtonPlugin(); - -private: - QToolButton *button; - - void updateButtonVisuals(); - -private slots: - void showDesktop(); - -public slots: - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - } - this->layout()->update(); - updateButtonVisuals(); - } - - void LocaleChange(){ - updateButtonVisuals(); - } - - void ThemeChange(){ - updateButtonVisuals(); - } -}; - -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/spacer/LSpacer.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/spacer/LSpacer.h deleted file mode 100644 index 1e60c519..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/spacer/LSpacer.h +++ /dev/null @@ -1,34 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class is a generic invisible spacer for the panel -//=========================================== -#ifndef _LUMINA_DESKTOP_PANEL_PLUGIN_SPACER_H -#define _LUMINA_DESKTOP_PANEL_PLUGIN_SPACER_H - -#include "../LPPlugin.h" - -class LSpacerPlugin : public LPPlugin{ - Q_OBJECT -public: - LSpacerPlugin(QWidget *parent=0, QString id="spacer", bool horizontal=true) : LPPlugin(parent, id, horizontal){ - if(horizontal){ this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); } - else{ this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); } - } - ~LSpacerPlugin(){} - -public slots: - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ //horizontal - this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - }else{ //vertical - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); - } - } -}; - - -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.cpp deleted file mode 100644 index b9d70e97..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.cpp +++ /dev/null @@ -1,91 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LSysDashboard.h" - -LSysDashboard::LSysDashboard(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - upTimer = new QTimer(this); - upTimer->setInterval(10000); //10 second update ping - connect(upTimer, SIGNAL(timeout()), this, SLOT(updateIcon())); - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonIconOnly); - button->setPopupMode(QToolButton::DelayedPopup); //make sure it runs the update routine first - connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - menu = new QMenu(this); - connect(menu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - sysmenu = new LSysMenuQuick(this); - connect(sysmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); - mact = new QWidgetAction(this); - mact->setDefaultWidget(sysmenu); - menu->addAction(mact); - - button->setMenu(menu); - QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes -} - -LSysDashboard::~LSysDashboard(){ - -} - -// ======================== -// PRIVATE FUNCTIONS -// ======================== -void LSysDashboard::updateIcon(bool force){ - //For the visual, show battery state only if important - static bool batcharging = false; - QPixmap pix; - button->setToolTip(tr("System Dashboard")); - if(LOS::hasBattery()){ - int bat = LOS::batteryCharge(); - bool charging = LOS::batteryIsCharging(); - //Set the icon as necessary - if(charging && !batcharging){ - //Charging and just plugged in - if(bat < 15){ button->setIcon( LXDG::findIcon("battery-charging-low","") ); QTimer::singleShot(5000, this, SLOT(resetIcon()));} - else if(bat < 30){ button->setIcon( LXDG::findIcon("battery-charging-caution","") ); QTimer::singleShot(5000, this, SLOT(resetIcon()));} - else if(force || button->icon().isNull()){ resetIcon(); } - }else if(!charging){ - //Not charging (critical level or just unplugged) - if(bat<5){ button->setIcon( LXDG::findIcon("battery-missing","") ); } - else if(bat < 15){ button->setIcon( LXDG::findIcon("battery-low","") ); QTimer::singleShot(5000, this, SLOT(resetIcon())); } - else if(bat < 30 && batcharging){ button->setIcon( LXDG::findIcon("battery-caution","") ); QTimer::singleShot(5000, this, SLOT(resetIcon()));} - else if(bat < 50 && batcharging){ button->setIcon( LXDG::findIcon("battery-040","")); QTimer::singleShot(5000, this, SLOT(resetIcon()));} - else if(bat < 70 && batcharging){ button->setIcon( LXDG::findIcon("battery-060","")); QTimer::singleShot(5000, this, SLOT(resetIcon()));} - else if(bat < 90 && batcharging){ button->setIcon( LXDG::findIcon("battery-080","")); QTimer::singleShot(5000, this, SLOT(resetIcon()));} - else if(batcharging){ button->setIcon( LXDG::findIcon("battery-100","")); QTimer::singleShot(5000, this, SLOT(resetIcon()));} - else if(force || button->icon().isNull()){ resetIcon(); } - }else if(force || button->icon().isNull()){ - //Otherwise just use the default icon - resetIcon(); - } - //Save the values for comparison later - batcharging = charging; - if( !upTimer->isActive() ){ upTimer->start(); } //only use the timer if a battery is present - - // No battery - just use/set the normal icon - }else if(force || button->icon().isNull()){ - resetIcon(); - if(upTimer->isActive() ){ upTimer->stop(); } //no battery available - no refresh timer needed - } - -} - -void LSysDashboard::resetIcon(){ - button->setIcon( LXDG::findIcon("arrow-down-drop-circle","")); -} - -void LSysDashboard::openMenu(){ - sysmenu->UpdateMenu(); - button->showMenu(); -} - -void LSysDashboard::closeMenu(){ - menu->hide(); -} - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.h deleted file mode 100644 index 782fc4e6..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/LSysDashboard.h +++ /dev/null @@ -1,76 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin allows the user to control different system settings -// For example: screen brightness, audio volume, workspace, and battery -//=========================================== -#ifndef _LUMINA_DESKTOP_SYSTEM_DASHBOARD_H -#define _LUMINA_DESKTOP_SYSTEM_DASHBOARD_H - -//Qt includes - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//libLumina includes -#include -#include - -//Local includes -#include "../LPPlugin.h" -#include "SysMenuQuick.h" - -class LSysDashboard : public LPPlugin{ - Q_OBJECT -public: - LSysDashboard(QWidget *parent = 0, QString id="systemdashboard", bool horizontal=true); - ~LSysDashboard(); - -private: - QMenu *menu; - QWidgetAction *mact; - LSysMenuQuick *sysmenu; - QToolButton *button; - QTimer *upTimer; - -private slots: - void updateIcon(bool force = false); - void resetIcon(); - void openMenu(); - void closeMenu(); - -public slots: - void LocaleChange(){ - updateIcon(true); - sysmenu->UpdateMenu(); - } - - void ThemeChange(){ - updateIcon(true); - sysmenu->UpdateMenu(); - } - - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - } - updateIcon(true); //force icon refresh - this->layout()->update(); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.cpp deleted file mode 100644 index 1d699ea9..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.cpp +++ /dev/null @@ -1,211 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "SysMenuQuick.h" -#include "ui_SysMenuQuick.h" - -#include "../../LSession.h" -#include - -LSysMenuQuick::LSysMenuQuick(QWidget *parent) : QWidget(parent), ui(new Ui::LSysMenuQuick){ - ui->setupUi(this); - brighttimer = new QTimer(this); - brighttimer->setSingleShot(true); - brighttimer->setInterval(50); //50ms delay in setting the new value - //Now reset the initial saved settings (this is handles by the LOS/session now - 4/22/15) - firstrun = true; - UpdateMenu(); //do this once before all the signals/slots are connected below - firstrun = false; - //Now setup the connections - connect(ui->slider_volume, SIGNAL(valueChanged(int)), this, SLOT(volSliderChanged()) ); - connect(ui->slider_brightness, SIGNAL(valueChanged(int)), this, SLOT(brightSliderChanged()) ); - connect(ui->tool_wk_prev, SIGNAL(clicked()), this, SLOT(prevWorkspace()) ); - connect(ui->tool_wk_next, SIGNAL(clicked()), this, SLOT(nextWorkspace()) ); - connect(ui->tool_logout, SIGNAL(clicked()), this, SLOT(startLogout()) ); - connect(ui->tool_vol_mixer, SIGNAL(clicked()), this, SLOT(startMixer()) ); - connect(brighttimer, SIGNAL(timeout()), this, SLOT(setCurrentBrightness()) ); - connect(ui->combo_locale, SIGNAL(currentIndexChanged(int)), this, SLOT(changeLocale()) ); - //And setup the default icons - ui->label_bright_icon->setPixmap( LXDG::findIcon("preferences-system-power-management","").pixmap(ui->label_bright_icon->maximumSize()) ); - ui->tool_wk_prev->setIcon( LXDG::findIcon("go-previous-view","")); - ui->tool_wk_next->setIcon( LXDG::findIcon("go-next-view","") ); - ui->tool_logout->setIcon( LXDG::findIcon("system-log-out","") ); -} - -LSysMenuQuick::~LSysMenuQuick(){ - -} - -void LSysMenuQuick::UpdateMenu(){ - ui->retranslateUi(this); - //Audio Volume - int val = LOS::audioVolume(); - QIcon ico; - if(val > 66){ ico= LXDG::findIcon("audio-volume-high",""); } - else if(val > 33){ ico= LXDG::findIcon("audio-volume-medium",""); } - else if(val > 0){ ico= LXDG::findIcon("audio-volume-low",""); } - else{ ico= LXDG::findIcon("audio-volume-muted",""); } - bool hasMixer = LOS::hasMixerUtility(); - ui->label_vol_icon->setVisible(!hasMixer); - ui->tool_vol_mixer->setVisible(hasMixer); - if(!hasMixer){ ui->label_vol_icon->setPixmap( ico.pixmap(ui->label_vol_icon->maximumSize()) ); } - else{ ui->tool_vol_mixer->setIcon(ico); } - QString txt = QString::number(val)+"%"; - if(val<100){ txt.prepend(" "); } //make sure no widget resizing - ui->label_vol_text->setText(txt); - if(ui->slider_volume->value()!= val){ ui->slider_volume->setValue(val); } - //Screen Brightness - val = LOS::ScreenBrightness(); - if(val < 0){ - //No brightness control - hide it - ui->group_brightness->setVisible(false); - }else{ - ui->group_brightness->setVisible(true); - txt = QString::number(val)+"%"; - if(val<100){ txt.prepend(" "); } //make sure no widget resizing - ui->label_bright_text->setText(txt); - if(ui->slider_brightness->value()!=val){ ui->slider_brightness->setValue(val); } - } - - //Do any one-time checks - if(firstrun){ - hasBat = LOS::hasBattery(); //No need to check this more than once - will not change in the middle of a session - //Current Locale - QStringList locales = LUtils::knownLocales(); - ui->combo_locale->clear(); - QLocale curr; - for(int i=0; icombo_locale->addItem(loc.nativeLanguageName()+" ("+locales[i]+")", locales[i]); //Make the display text prettier later - if(locales[i] == curr.name() || locales[i] == curr.name().section("_",0,0) ){ - //Current Locale - ui->combo_locale->setCurrentIndex(ui->combo_locale->count()-1); //the last item in the list right now - } - } - ui->group_locale->setVisible(locales.length() > 1); - } - - //Battery Status - if(hasBat){ - ui->group_battery->setVisible(true); - val = LOS::batteryCharge(); - if(LOS::batteryIsCharging()){ - if(val < 15){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-charging-low","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 30){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-charging-caution","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 50){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-charging-040","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 70){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-charging-060","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 90){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-charging-080","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else{ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-charging","").pixmap(ui->label_bat_icon->maximumSize()) ); } - ui->label_bat_text->setText( QString("%1%\n(%2)").arg(QString::number(val), tr("connected")) ); - }else{ - if(val < 1){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-missing","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 15){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-low","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 30){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-caution","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 50){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-040","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 70){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-060","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else if(val < 90){ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-080","").pixmap(ui->label_bat_icon->maximumSize()) ); } - else{ ui->label_bat_icon->setPixmap( LXDG::findIcon("battery-100","").pixmap(ui->label_bat_icon->maximumSize()) ); } - ui->label_bat_text->setText( QString("%1%\n(%2)").arg(QString::number(val), getRemainingTime()) ); - } - }else{ - ui->group_battery->setVisible(false); - } - //Workspace - val = LSession::handle()->XCB->CurrentWorkspace(); - int tot = LSession::handle()->XCB->NumberOfWorkspaces(); - ui->group_workspace->setVisible(val>=0 && tot>1); - ui->label_wk_text->setText( QString(tr("%1 of %2")).arg(QString::number(val+1), QString::number(tot)) ); -} - -void LSysMenuQuick::volSliderChanged(){ - int val = ui->slider_volume->value(); - LOS::setAudioVolume(val); - QString txt = QString::number(val)+"%"; - if(val<100){ txt.prepend(" "); } //make sure no widget resizing - ui->label_vol_text->setText( txt ); - if(val > 66){ ui->label_vol_icon->setPixmap( LXDG::findIcon("audio-volume-high","").pixmap(ui->label_vol_icon->maximumSize()) ); } - else if(val > 33){ ui->label_vol_icon->setPixmap( LXDG::findIcon("audio-volume-medium","").pixmap(ui->label_vol_icon->maximumSize()) ); } - else if(val > 0){ ui->label_vol_icon->setPixmap( LXDG::findIcon("audio-volume-low","").pixmap(ui->label_vol_icon->maximumSize()) ); } - else{ ui->label_vol_icon->setPixmap( LXDG::findIcon("audio-volume-muted","").pixmap(ui->label_vol_icon->maximumSize()) ); } -} - -void LSysMenuQuick::startMixer(){ - emit CloseMenu(); - LOS::startMixerUtility(); -} - -void LSysMenuQuick::brightSliderChanged(){ - //Brightness controls cannot operate extremely quickly - combine calls as necessary - if(brighttimer->isActive()){ brighttimer->stop(); } - brighttimer->start(); - //*DO* update the label right away - int val = ui->slider_brightness->value(); - QString txt = QString::number(val)+"%"; - if(val<100){ txt.prepend(" "); } //make sure no widget resizing - ui->label_bright_text->setText( txt ); -} - -void LSysMenuQuick::setCurrentBrightness(){ - int val = ui->slider_brightness->value(); - LOS::setScreenBrightness(val); - QString txt = QString::number(val)+"%"; - if(val<100){ txt.prepend(" "); } //make sure no widget resizing - ui->label_bright_text->setText( txt ); -} - -void LSysMenuQuick::nextWorkspace(){ - int cur = LSession::handle()->XCB->CurrentWorkspace(); - int tot = LSession::handle()->XCB->NumberOfWorkspaces(); - //qDebug()<< "Next Workspace:" << cur << tot; - cur++; - if(cur>=tot){ cur = 0; } //back to beginning - //qDebug() << " - New Current:" << cur; - LSession::handle()->XCB->SetCurrentWorkspace(cur); -ui->label_wk_text->setText( QString(tr("%1 of %2")).arg(QString::number(cur+1), QString::number(tot)) ); -} - -void LSysMenuQuick::prevWorkspace(){ - int cur = LSession::handle()->XCB->CurrentWorkspace(); - int tot = LSession::handle()->XCB->NumberOfWorkspaces(); - cur--; - if(cur<0){ cur = tot-1; } //back to last - LSession::handle()->XCB->SetCurrentWorkspace(cur); - ui->label_wk_text->setText( QString(tr("%1 of %2")).arg(QString::number(cur+1), QString::number(tot)) ); -} - -QString LSysMenuQuick::getRemainingTime(){ - int secs = LOS::batterySecondsLeft(); - if(secs < 0){ return "??"; } - QString rem; //remaining - if(secs > 3600){ - int hours = secs/3600; - rem.append( QString::number(hours)+"h "); - secs = secs - (hours*3600); - } - if(secs > 60){ - int min = secs/60; - rem.append( QString::number(min)+"m "); - secs = secs - (min*60); - } - if(secs > 0){ - rem.append( QString::number(secs)+"s"); - }else{ - rem.append( "0s" ); - } - return rem; -} - -void LSysMenuQuick::startLogout(){ - emit CloseMenu(); - LSession::handle()->systemWindow(); -} - -void LSysMenuQuick::changeLocale(){ - //Get the currently selected Locale - QString locale = ui->combo_locale->currentData().toString(); - emit CloseMenu(); - LSession::handle()->switchLocale(locale); -} \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.h deleted file mode 100644 index a300b5b1..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.h +++ /dev/null @@ -1,54 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin allows the user to control different system settings -// For example: screen brightness, audio volume, workspace, and battery -//=========================================== -#ifndef _LUMINA_PANEL_QUICK_SYSTEM_MENU_H -#define _LUMINA_PANEL_QUICK_SYSTEM_MENU_H - -#include -#include -#include - -#include -#include - -namespace Ui{ - class LSysMenuQuick; -}; - -class LSysMenuQuick : public QWidget{ - Q_OBJECT -public: - LSysMenuQuick(QWidget *parent=0); - ~LSysMenuQuick(); - - void UpdateMenu(); - -private: - Ui::LSysMenuQuick *ui; - QTimer *brighttimer; - bool firstrun, hasBat; - QString getRemainingTime(); //battery time left - -private slots: - void volSliderChanged(); - void brightSliderChanged(); //start the delay/collection timer - void setCurrentBrightness(); //perform the change - void startMixer(); - void nextWorkspace(); - void prevWorkspace(); - void startLogout(); - void changeLocale(); - - -signals: - void CloseMenu(); - -}; - -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.ui b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.ui deleted file mode 100644 index 26c32c74..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemdashboard/SysMenuQuick.ui +++ /dev/null @@ -1,400 +0,0 @@ - - - LSysMenuQuick - - - - 0 - 0 - 171 - 317 - - - - Form - - - /*QGroupBox{ -border-radius: 5px; -border: 1px solid grey; -margin-top: 1ex; -} -QGroupBox::title{ -subcontrol-origin: margin; -subcontrol-position: top center; -padding: 0 3px; -background-color: rgba(255,255,255,255); -border-radius: 5px; -font: bold; -}*/ - - - - 2 - - - 1 - - - 1 - - - 1 - - - 1 - - - - - System Volume - - - false - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - - 0 - 0 - - - - - 32 - 32 - - - - - 32 - 32 - - - - - - - - - - - - 30 - 30 - - - - - 32 - 32 - - - - Launch Audio Mixer - - - - - - - 30 - 30 - - - - true - - - - - - - 100 - - - 100 - - - Qt::Horizontal - - - - - - - 100% - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Screen Brightness - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - - 0 - 0 - - - - - 32 - 32 - - - - - 32 - 32 - - - - - - - - - - - 10 - - - 100 - - - 100 - - - Qt::Horizontal - - - - - - - 100% - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Battery Status - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - - 0 - 0 - - - - - 32 - 32 - - - - - 32 - 32 - - - - - - - - - - - - 0 - 0 - - - - 100% (Plugged in) - - - Qt::AlignCenter - - - - - - - - - - Workspace - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - prev - - - - - - - 1 of 2 - - - Qt::AlignCenter - - - - - - - next - - - - - - - - - - Locale - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - - - - - - - - - - 9 - - - - Log Out - - - - 22 - 22 - - - - Qt::ToolButtonTextBesideIcon - - - false - - - - - - - - - - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.cpp deleted file mode 100644 index ea074a59..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.cpp +++ /dev/null @@ -1,279 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "ItemWidget.h" -#include -#include -#include "../../LSession.h" - - -ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool goback) : QFrame(parent){ - createWidget(); - //Now fill it appropriately - bool inHome = type.endsWith("-home"); //internal code - if(inHome){ type = type.remove("-home"); } - if(itemPath.endsWith(".desktop") || type=="app"){ - XDGDesktop item(itemPath, this); - gooditem = item.isValid(); - //qDebug() << "Good Item:" << gooditem << itemPath; - if(gooditem){ - icon->setPixmap( LXDG::findIcon(item.icon, "preferences-system-windows-actions").pixmap(32,32) ); - iconPath = item.icon; - text = item.name; - if(!item.genericName.isEmpty() && item.name!=item.genericName){ text.append("
-- "+item.genericName+""); } - name->setText(text); - name->setToolTip(item.comment); - setupActions(&item); - }else{ - return; - } - }else if(type=="dir"){ - actButton->setVisible(false); - if(itemPath.endsWith("/")){ itemPath.chop(1); } - if(goback){ - icon->setPixmap( LXDG::findIcon("go-previous","").pixmap(64,64) ); - iconPath = "go-previous"; - text = tr("Go Back"); - name->setText( text ); - }else{ - icon->setPixmap( LXDG::findIcon("folder","").pixmap(64,64) ); - iconPath = "folder"; - name->setText( itemPath.section("/",-1)); - text = itemPath.section("/",-1); - } - }else if(type.startsWith("chcat::::")){ - //Category given - actButton->setVisible(false); - iconPath = LXDG::DesktopCatToIcon(type.section("::::",1,50)); - if(goback){ iconPath = "go-previous"; type = "chcat::::"; itemPath = "("+itemPath+")"; } - icon->setPixmap( LXDG::findIcon(iconPath,"applications-other").pixmap(64,64) ); - name->setText(itemPath); - text = itemPath; - icon->setWhatsThis(type); - linkPath = type; - }else{ - actButton->setVisible(false); - if(itemPath.endsWith("/")){ itemPath.chop(1); } - if(QFileInfo(itemPath).isDir()){ - type = "dir"; - icon->setPixmap( LXDG::findIcon("folder","").pixmap(64,64) ); - iconPath = "folder"; - }else if(LUtils::imageExtensions().contains(itemPath.section("/",-1).section(".",-1).toLower()) ){ - icon->setPixmap( QIcon(itemPath).pixmap(64,64) ); - }else{ - if( LUtils::isValidBinary(itemPath) ){ icon->setPixmap( LXDG::findIcon(type, "application-x-executable").pixmap(64,64) ); } - else{ icon->setPixmap( LXDG::findMimeIcon(itemPath.section("/",-1)).pixmap(64,64) ); } - } - name->setText( itemPath.section("/",-1) ); //this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) ); - text = itemPath.section("/",-1) ; - } - icon->setWhatsThis(itemPath); - if(!goback){ this->setWhatsThis(name->text()); } - isDirectory = (type=="dir"); //save this for later - if(LDesktopUtils::isFavorite(itemPath)){ - linkPath = itemPath; - isShortcut=true; - }else if( inHome ){//|| itemPath.section("/",0,-2)==QDir::homePath()+"/Desktop" ){ - isShortcut = true; - }else{ - isShortcut = false; - } - if(isShortcut && name->toolTip().isEmpty()){ - name->setToolTip(icon->whatsThis()); //also allow the user to see the full shortcut path - } - //Now setup the button appropriately - setupContextMenu(); -} - -// - Application constructor -ItemWidget::ItemWidget(QWidget *parent, XDGDesktop *item) : QFrame(parent){ - createWidget(); - if(item==0){ gooditem = false; return; } - isDirectory = false; - if(LDesktopUtils::isFavorite(item->filePath)){ - linkPath = item->filePath; - isShortcut=true; - }else if( item->filePath.section("/",0,-2)==QDir::homePath()+"/Desktop" ){ - isShortcut = true; - }else{ - isShortcut = false; - } - if(isShortcut){ - name->setToolTip(icon->whatsThis()); //also allow the user to see the full shortcut path - } - //Now fill it appropriately - icon->setPixmap( LXDG::findIcon(item->icon,"preferences-system-windows-actions").pixmap(64,64) ); - text = item->name; - if(!item->genericName.isEmpty() && item->name!=item->genericName){ text.append("
-- "+item->genericName+""); } - name->setText(text); - name->setToolTip(item->comment); - this->setWhatsThis(item->name); - icon->setWhatsThis(item->filePath); - iconPath = item->icon; - //Now setup the buttons appropriately - setupContextMenu(); - setupActions(item); -} - -ItemWidget::~ItemWidget(){ - icon->setPixmap(QPixmap()); //make sure the pixmap is cleared from memory too - actButton->deleteLater(); - contextMenu->clear(); - contextMenu->deleteLater(); - if(actButton->menu()!=0){ - for(int i=0; imenu()->actions().length(); i++){ - actButton->menu()->actions().at(i)->deleteLater(); - } - actButton->menu()->deleteLater(); - } - actButton->deleteLater(); - icon->deleteLater(); - name->deleteLater(); - menureset->deleteLater(); - linkPath.clear(); iconPath.clear(); text.clear(); -} - -void ItemWidget::triggerItem(){ - ItemClicked(); -} - -void ItemWidget::createWidget(){ - //Initialize the widgets - gooditem = true; - menuopen = false; - menureset = new QTimer(this); - menureset->setSingleShot(true); - menureset->setInterval(1000); //1 second - this->setContentsMargins(0,0,0,0); - contextMenu = new QMenu(this); - connect(contextMenu, SIGNAL(aboutToShow()), this, SLOT(actionMenuOpen()) ); - connect(contextMenu, SIGNAL(aboutToHide()), this, SLOT(actionMenuClosed()) ); - actButton = new QToolButton(this); - actButton->setPopupMode(QToolButton::InstantPopup); - actButton->setArrowType(Qt::DownArrow); - icon = new QLabel(this); - name = new QLabel(this); - name->setWordWrap(true); - name->setTextFormat(Qt::RichText); - name->setTextInteractionFlags(Qt::NoTextInteraction); - //Add them to the layout - this->setLayout(new QHBoxLayout(this)); - this->layout()->setContentsMargins(1,1,1,1); - this->layout()->addWidget(icon); - this->layout()->addWidget(actButton); - this->layout()->addWidget(name); - //Set a custom object name so this can be tied into the Lumina Theme stylesheets - this->setObjectName("LuminaItemWidget"); -} - -void ItemWidget::setupContextMenu(){ - //Now refresh the context menu - contextMenu->clear(); - if(!QFile::exists(QDir::homePath()+"/Desktop/"+icon->whatsThis().section("/",-1)) ){ - //Does not have a desktop link - contextMenu->addAction( LXDG::findIcon("preferences-desktop-icons",""), tr("Pin to Desktop"), this, SLOT(PinToDesktop()) ); - } - //Favorite Item - if( LDesktopUtils::isFavorite(icon->whatsThis()) ){ //Favorite Item - can always remove this - contextMenu->addAction( LXDG::findIcon("edit-delete",""), tr("Remove from Favorites"), this, SLOT(RemoveFavorite()) ); - }else{ - //This file does not have a shortcut yet -- allow the user to add it - contextMenu->addAction( LXDG::findIcon("bookmark-toolbar",""), tr("Add to Favorites"), this, SLOT(AddFavorite()) ); - } - //QuickLaunch Item - if(LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList().contains(icon->whatsThis()) ){ //Favorite Item - can always remove this - contextMenu->addAction( LXDG::findIcon("edit-delete",""), tr("Remove from Quicklaunch"), this, SLOT(RemoveQL()) ); - }else{ - //This file does not have a shortcut yet -- allow the user to add it - contextMenu->addAction( LXDG::findIcon("quickopen",""), tr("Add to Quicklaunch"), this, SLOT(AddQL()) ); - } -} - -void ItemWidget::setupActions(XDGDesktop *app){ - if(app==0 || app->actions.isEmpty()){ actButton->setVisible(false); return; } - //Actions Available - go ahead and list them all - actButton->setMenu( new QMenu(this) ); - for(int i=0; iactions.length(); i++){ - QAction *act = new QAction(LXDG::findIcon(app->actions[i].icon, app->icon), app->actions[i].name, this); - act->setToolTip(app->actions[i].ID); - act->setWhatsThis(app->actions[i].ID); - actButton->menu()->addAction(act); - } - connect(actButton->menu(), SIGNAL(triggered(QAction*)), this, SLOT(actionClicked(QAction*)) ); - connect(actButton->menu(), SIGNAL(aboutToShow()), this, SLOT(actionMenuOpen()) ); - connect(actButton->menu(), SIGNAL(aboutToHide()), this, SLOT(actionMenuClosed()) ); - connect(menureset, SIGNAL(timeout()), this, SLOT(resetmenuflag()) ); -} - -void ItemWidget::updateItems(){ - //update the text/icon to match sizes - int H = 2.3*name->fontMetrics().height(); //make sure the height is large enough for two lines - icon->setFixedSize(QSize(H-4, H-4)); - actButton->setFixedSize( QSize( (H-4)/2, H-4) ); - QStringList newname = text.split("
"); - for(int i=0; ifontMetrics().elidedText(newname[i], Qt::ElideRight, name->width()); } - name->setText( newname.join("
") ); - //Now reload the icon if necessary - if(icon->pixmap()!=0){ - if(icon->pixmap()->size().height() < (H-4) ){ - if(iconPath.isEmpty()){ - //Use item path (thumbnail or mimetype) - if(LUtils::imageExtensions().contains(icon->whatsThis().section("/",-1).section(".",-1).toLower()) ){ - icon->setPixmap( QIcon(icon->whatsThis()).pixmap(H-4,H-4).scaledToHeight(H-4,Qt::SmoothTransformation) ); - }else{ - icon->setPixmap( LXDG::findMimeIcon(icon->whatsThis().section("/",-1)).pixmap(H-4,H-4).scaledToHeight(H-4,Qt::SmoothTransformation) ); - } - }else{ - icon->setPixmap( LXDG::findIcon(iconPath,"preferences-system-windows-actions").pixmap(H-4,H-4).scaledToHeight(H-4,Qt::SmoothTransformation) ); - } - }else if(icon->pixmap()->size().height() > (H-4) ){ - icon->setPixmap( icon->pixmap()->scaled(H-4, H-4, Qt::IgnoreAspectRatio, Qt::SmoothTransformation) ); - } - } -} - -void ItemWidget::PinToDesktop(){ - qDebug() << "Create Link on Desktop:" << icon->whatsThis(); - bool ok = QFile::link(icon->whatsThis(), QDir::homePath()+"/Desktop/"+icon->whatsThis().section("/",-1)); - qDebug() << " - " << (ok ? "Success": "Failure"); -} - -void ItemWidget::RemoveFavorite(){ - LDesktopUtils::removeFavorite(icon->whatsThis()); - linkPath.clear(); - emit RemovedShortcut(); -} - -void ItemWidget::AddFavorite(){ - if( LDesktopUtils::addFavorite(icon->whatsThis()) ){ - linkPath = icon->whatsThis(); - emit NewShortcut(); - } - -} -void ItemWidget::RemoveQL(){ - qDebug() << "Remove QuickLaunch Button:" << icon->whatsThis(); - emit toggleQuickLaunch(icon->whatsThis(), false); -} - -void ItemWidget::AddQL(){ - qDebug() << "Add QuickLaunch Button:" << icon->whatsThis(); - emit toggleQuickLaunch(icon->whatsThis(), true); -} - - -void ItemWidget::ItemClicked(){ - if(!linkPath.isEmpty()){ emit RunItem(linkPath); } - else{ emit RunItem(icon->whatsThis()); } -} - -void ItemWidget::actionClicked(QAction *act){ - actButton->menu()->hide(); - QString cmd = "lumina-open -action \""+act->whatsThis()+"\" \"%1\""; - if(!linkPath.isEmpty()){ cmd = cmd.arg(linkPath); } - else{ cmd = cmd.arg(icon->whatsThis()); } - emit RunItem(cmd); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.h deleted file mode 100644 index 11394dd6..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/ItemWidget.h +++ /dev/null @@ -1,98 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This item widget manages a single file/directory -//=========================================== -#ifndef _LUMINA_PANEL_SYSTEM_START_ITEM_WIDGET_H -#define _LUMINA_PANEL_SYSTEM_START_ITEM_WIDGET_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -class ItemWidget : public QFrame{ - Q_OBJECT -public: - //Overloaded Constructors for various uses - // - Favorites (path/type) - ItemWidget(QWidget *parent=0, QString itemPath="", QString type="unknown", bool goback=false); - // - Generic Apps - ItemWidget(QWidget *parent=0, XDGDesktop *item= 0); - - ~ItemWidget(); - - bool gooditem; - - void triggerItem(); //trigger this item - just as if it was clicked on - -private: - QToolButton *actButton; - QMenu *contextMenu; - QLabel *icon, *name; - bool isDirectory, isShortcut, menuopen; - QString linkPath, iconPath, text; - QTimer *menureset; - - void createWidget(); - - void setupContextMenu(); - void setupActions(XDGDesktop*); - - void updateItems(); //update the text/icon to match sizes - -private slots: - void PinToDesktop(); - void RemoveFavorite(); - void AddFavorite(); - void RemoveQL(); - void AddQL(); - void ItemClicked(); - void actionClicked(QAction*); - //Functions to fix the submenu open/close issues - void actionMenuOpen(){ - if(menureset->isActive()){ menureset->stop(); } - menuopen = true; - } - void resetmenuflag(){ menuopen = false; } //tied to the "menureset" timer - void actionMenuClosed(){ menureset->start(); } - - -protected: - void mouseReleaseEvent(QMouseEvent *event){ - if(menuopen){ resetmenuflag(); } //skip this event if a submenu was open - else if(event->button() == Qt::RightButton && !icon->whatsThis().startsWith("chcat::::") ){ - menuopen = true; - setupContextMenu(); - contextMenu->popup(event->globalPos()); - }else if(event->button() != Qt::NoButton){ ItemClicked(); } - } - - void resizeEvent(QResizeEvent *ev){ - updateItems(); //update the sizing of everything - QFrame::resizeEvent(ev); // do the normal procedures - } - -signals: - void NewShortcut(); - void RemovedShortcut(); - void RunItem(QString cmd); - void toggleQuickLaunch(QString path, bool ok); - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.cpp deleted file mode 100644 index f44add77..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.cpp +++ /dev/null @@ -1,137 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LStartButton.h" -#include "../../LSession.h" - -#include -#include //This contains the "ResizeMenu" class - -LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonIconOnly); - button->setPopupMode(QToolButton::DelayedPopup); //make sure it runs the update routine first - connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - menu = new ResizeMenu(this); - menu->setContentsMargins(1,1,1,1); - connect(menu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - connect(menu, SIGNAL(MenuResized(QSize)), this, SLOT(SaveMenuSize(QSize)) ); - startmenu = new StartMenu(this); - connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); - connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); - menu->setContents(startmenu); - QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0,0)).toSize(); - if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value - - button->setMenu(menu); - connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); - QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes - QTimer::singleShot(0, startmenu, SLOT(ReLoadQuickLaunch()) ); - //Setup the global shortcut handling for opening the start menu - connect(QApplication::instance(), SIGNAL(StartButtonActivated()), this, SLOT(shortcutActivated()) ); - LSession::handle()->registerStartButton(this->type()); -} - -LStartButtonPlugin::~LStartButtonPlugin(){ - LSession::handle()->unregisterStartButton(this->type()); -} - -void LStartButtonPlugin::updateButtonVisuals(){ - button->setToolTip(tr("")); - button->setText( SYSTEM::user() ); - button->setIcon( LXDG::findIcon("start-here-lumina","Lumina-DE") ); //force icon refresh -} - -void LStartButtonPlugin::updateQuickLaunch(QStringList apps){ - //First clear any obsolete apps - QStringList old; - //qDebug() << "Update QuickLaunch Buttons"; - for(int i=0; iwhatsThis()) ){ - //App was removed - QUICKL.takeAt(i)->deleteLater(); - i--; - }else{ - //App still listed - update the button - old << QUICKL[i]->whatsThis(); //add the list of current buttons - LFileInfo info(QUICKL[i]->whatsThis()); - QUICKL[i]->setIcon( LXDG::findIcon(info.iconfile(),"unknown") ); - if(info.isDesktopFile()){ QUICKL[i]->setToolTip( info.XDG()->name ); } - else{ QUICKL[i]->setToolTip( info.fileName() ); } - } - } - //Now go through and create any new buttons - for(int i=0; isetIcon( LXDG::findIcon( info.iconfile() ) ); - if(info.isDesktopFile()){ tmp->setToolTip( info.XDG()->name ); } - else{ tmp->setToolTip( info.fileName() ); } - //Now add the button to the layout and connect the signal/slots - this->layout()->insertWidget(i+1,tmp); //"button" is always in slot 0 - connect(tmp, SIGNAL(Launch(QString)), this, SLOT(LaunchQuick(QString)) ); - connect(tmp, SIGNAL(Remove(QString)), this, SLOT(RemoveQuick(QString)) ); - } - } - //qDebug() << " - Done updateing QuickLaunch Buttons"; - QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes -} - -void LStartButtonPlugin::LaunchQuick(QString file){ - //Need to get which button was clicked - //qDebug() << "Quick Launch triggered:" << file; - if(!file.isEmpty()){ - LSession::LaunchApplication("lumina-open \""+file+"\""); - emit MenuClosed(); - } -} - -void LStartButtonPlugin::RemoveQuick(QString file){ - //qDebug() << "Remove Quicklaunch Button:" << file; - if(!file.isEmpty()){ - startmenu->UpdateQuickLaunch(file, false); //always a removal - emit MenuClosed(); - } -} - -void LStartButtonPlugin::SaveMenuSize(QSize sz){ - //Save this size for the menu - LSession::handle()->DesktopPluginSettings()->setValue("panelPlugs/"+this->type()+"/MenuSize", sz); -} - -// ======================== -// PRIVATE FUNCTIONS -// ======================== -void LStartButtonPlugin::openMenu(){ - if(menu->isVisible()){ return; } //don't re-show it - already open - //TESTING CODE TO SEE IF THIS MAKES IT RECOVER MEMORY - /*StartMenu *old = startmenu; - startmenu = new StartMenu(this); - connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); - connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); - menu->setContents(startmenu); - if(old!=0){ old->deleteLater(); }*/ -//-------- - startmenu->UpdateMenu(); - button->showMenu(); -} - -void LStartButtonPlugin::closeMenu(){ - menu->hide(); -} - -void LStartButtonPlugin::shortcutActivated(){ - if(LSession::handle()->registerStartButton(this->type())){ - if(menu->isVisible()){ closeMenu(); } - else{ this->activateWindow(); openMenu(); } - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.h deleted file mode 100644 index d46bb1be..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/LStartButton.h +++ /dev/null @@ -1,113 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin is the main button that allow the user to run -// applications or logout of the desktop -//=========================================== -#ifndef _LUMINA_DESKTOP_START_MENU_PLUGIN_H -#define _LUMINA_DESKTOP_START_MENU_PLUGIN_H - -// Qt includes -#include -#include -#include -#include -#include -#include - -// Lumina-desktop includes -//#include "../../Globals.h" -#include "../LPPlugin.h" //main plugin widget - -// libLumina includes -#include -#include -#include - -#include "StartMenu.h" - -//Simple Tool Button For QuickLaunch Items -class LQuickLaunchButton : public QToolButton{ - Q_OBJECT -signals: - void Launch(QString); - void Remove(QString); - -private slots: - void rmentry(){ - emit Remove(this->whatsThis()); - } - void launchentry(){ - emit Launch(this->whatsThis()); - } - -public: - LQuickLaunchButton(QString path, QWidget* parent = 0) : QToolButton(parent){ - this->setWhatsThis(path); - this->setMenu(new QMenu(this)); - this->setContextMenuPolicy(Qt::CustomContextMenu); - this->menu()->addAction( LXDG::findIcon("edit-delete",""), tr("Remove from Quicklaunch"), this, SLOT(rmentry()) ); - connect(this, SIGNAL(clicked()), this, SLOT(launchentry()) ); - connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showMenu()) ); - } - ~LQuickLaunchButton(){} - -}; - -// PANEL PLUGIN BUTTON -class LStartButtonPlugin : public LPPlugin{ - Q_OBJECT - -public: - LStartButtonPlugin(QWidget *parent = 0, QString id = "systemstart", bool horizontal=true); - ~LStartButtonPlugin(); - -private: - ResizeMenu *menu; - //QWidgetAction *mact; - StartMenu *startmenu; - QToolButton *button; - QList QUICKL; - -private slots: - void openMenu(); - void closeMenu(); - void shortcutActivated(); - - void updateButtonVisuals(); - - void updateQuickLaunch(QStringList); - void LaunchQuick(QString); - void RemoveQuick(QString); - void SaveMenuSize(QSize); - -public slots: - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - for(int i=0; isetIconSize(QSize(this->height(), this->height())); } - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - for(int i=0; isetIconSize(QSize(this->width(), this->width())); } - } - this->layout()->update(); - updateButtonVisuals(); - } - - void LocaleChange(){ - updateButtonVisuals(); - if(startmenu!=0){ startmenu->UpdateAll(); } - } - - void ThemeChange(){ - updateButtonVisuals(); - if(startmenu!=0){ startmenu->UpdateAll(); } - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.cpp deleted file mode 100644 index d05ba22f..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.cpp +++ /dev/null @@ -1,720 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "StartMenu.h" -#include "ui_StartMenu.h" -//#include - -#include -#include "../../LSession.h" -#include -#include - -#include "ItemWidget.h" -//#define SSAVER QString("xscreensaver-demo") - -StartMenu::StartMenu(QWidget *parent) : QWidget(parent), ui(new Ui::StartMenu){ - ui->setupUi(this); //load the designer file - this->setMouseTracking(true); - searchTimer = new QTimer(this); - searchTimer->setInterval(300); //~1/3 second - searchTimer->setSingleShot(true); - connect(searchTimer, SIGNAL(timeout()), this, SLOT(startSearch()) ); - connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SLOT(UpdateApps()) ); - connect(LSession::handle(), SIGNAL(FavoritesChanged()), this, SLOT(UpdateFavs()) ); - //Need to load the last used setting of the application list - QString state = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/systemstart/showcategories", "partial").toString(); - if(state=="partial"){ui->check_apps_showcats->setCheckState(Qt::PartiallyChecked); } - else if(state=="true"){ ui->check_apps_showcats->setCheckState(Qt::Checked); } - else{ ui->check_apps_showcats->setCheckState(Qt::Unchecked); } - connect(ui->check_apps_showcats, SIGNAL(stateChanged(int)), this, SLOT(catViewChanged()) ); - UpdateAll(); - QTimer::singleShot(10, this,SLOT(UpdateApps())); - QTimer::singleShot(10, this, SLOT(UpdateFavs())); -} - -StartMenu::~StartMenu(){ - -} - -void StartMenu::UpdateAll(){ - //Update all the icons/text on all the pages - - // Update Text - ui->retranslateUi(this); - - //Update Icons - ui->tool_goto_apps->setIcon(LXDG::findIcon("system-run","")); - ui->tool_goto_settings->setIcon(LXDG::findIcon("preferences-system","")); - ui->tool_launch_fm->setIcon(LXDG::findIcon("user-home","")); - ui->tool_launch_desksettings->setIcon(LXDG::findIcon("preferences-desktop","")); - ui->tool_lock->setIcon(LXDG::findIcon("system-lock-screen","")); - ui->tool_goto_logout->setIcon(LXDG::findIcon("system-log-out","")); - ui->tool_back->setIcon(LXDG::findIcon("go-previous","")); - ui->tool_launch_deskinfo->setIcon(LXDG::findIcon("system-help","")); - - ui->tool_launch_mixer->setIcon( LXDG::findIcon("preferences-desktop-sound","") ); - ui->label_bright_icon->setPixmap( LXDG::findIcon("preferences-system-power-management","").pixmap(ui->tool_goto_apps->iconSize()) ); - ui->label_locale_icon->setPixmap( LXDG::findIcon("preferences-desktop-locale","").pixmap(ui->tool_goto_apps->iconSize()) ); - ui->tool_set_nextwkspace->setIcon(LXDG::findIcon("go-next-view","")); - ui->tool_set_prevwkspace->setIcon(LXDG::findIcon("go-previous-view","")); - ui->tool_logout->setIcon(LXDG::findIcon("system-log-out","")); - ui->tool_restart->setIcon(LXDG::findIcon("system-reboot","")); - ui->tool_shutdown->setIcon(LXDG::findIcon("system-shutdown","")); - ui->tool_suspend->setIcon(LXDG::findIcon("system-suspend","")); - - //Update Visibility of system/session/OS options - // -- Control Panel - QString tmp = LOS::ControlPanelShortcut(); - if(QFile::exists(tmp)){ - ui->tool_launch_controlpanel->setWhatsThis(tmp); - //Now read the file to see which icon to use - XDGDesktop desk(tmp); - if(desk.isValid()){ - ui->tool_launch_controlpanel->setIcon(LXDG::findIcon(desk.icon,"preferences-other")); - }else{ ui->tool_launch_controlpanel->setVisible(false); } - }else{ ui->tool_launch_controlpanel->setVisible(false); } - // -- App Store - tmp = LOS::AppStoreShortcut(); - if(QFile::exists(tmp)){ - ui->tool_launch_store->setWhatsThis(tmp); - //Now read the file to see which icon to use - XDGDesktop desk(tmp); - if(desk.isValid()){ - ui->tool_launch_store->setIcon(LXDG::findIcon(desk.icon,"utilities-file-archiver")); - }else{ ui->tool_launch_store->setVisible(false); } - }else{ ui->tool_launch_store->setVisible(false); } - //Audio Controls - ui->frame_audio->setVisible( LOS::audioVolume() >=0 ); - //Brightness controls - ui->frame_bright->setVisible( LOS::ScreenBrightness() >=0 ); - //Shutdown/restart - bool ok = LOS::userHasShutdownAccess(); - ui->frame_leave_system->setWhatsThis(ok ? "allowed": ""); - ui->frame_leave_system->setVisible(ok); - //Battery Availability - ok = LOS::hasBattery(); - ui->label_status_battery->setWhatsThis(ok ? "allowed": ""); - ui->label_status_battery->setVisible(ok); - //Locale availability - QStringList locales = LUtils::knownLocales(); - ui->stackedWidget->setCurrentWidget(ui->page_main); //need to ensure the settings page is not active - ui->combo_locale->clear(); - QString curr = LUtils::currentLocale(); - //qDebug() << "Update Locales:" << locales; - //qDebug() << "Current Locale:" << curr; - for(int i=0; icombo_locale->addItem(loc.nativeLanguageName() +" ("+locales[i]+")", locales[i]); //Make the display text prettier later - if(locales[i] == curr || locales[i] == curr.section("_",0,0) ){ - //Current Locale - ui->combo_locale->setCurrentIndex(ui->combo_locale->count()-1); //the last item in the list right now - } - } - ui->frame_locale->setVisible(locales.length() > 1); - //User Name in status bar - ui->label_status->setText( QString::fromLocal8Bit(getlogin()) ); - //Lumina Utilities - ui->tool_launch_desksettings->setVisible(LUtils::isValidBinary("lumina-config")); - ui->tool_launch_deskinfo->setVisible(LUtils::isValidBinary("lumina-info")); - -} - -void StartMenu::UpdateMenu(bool forceall){ - //qDebug() << "Update Menu" << forceall; - ui->line_search->clear(); - if(forceall){ UpdateAll(); } - //Quick update routine before the menu is made visible - //qDebug() << "update favs"; - //UpdateFavs(); - //qDebug() << "check page"; - if(ui->stackedWidget->currentWidget() != ui->page_main){ - ui->stackedWidget->setCurrentWidget(ui->page_main); //just show the main page - }else{ - on_stackedWidget_currentChanged(0); //refresh/update the main page every time - } - //qDebug() << "done"; -} - -void StartMenu::ReLoadQuickLaunch(){ - emit UpdateQuickLaunch( LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList() ); -} - -void StartMenu::UpdateQuickLaunch(QString path, bool keep){ - QStringList QL = LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList(); - if(keep){QL << path; } - else{ QL.removeAll(path); } - QL.removeDuplicates(); - LSession::handle()->sessionSettings()->setValue("QuicklaunchApps",QL); - //LSession::handle()->sessionSettings()->sync(); - emit UpdateQuickLaunch(QL); -} - -// ========================== -// PRIVATE FUNCTIONS -// ========================== -/*void StartMenu::deleteChildren(QWidget *obj){ - if(obj->layout()==0){ - for(int i=0; ichildren().count(); i++){ - obj->children().at(i)->deleteLater(); - } - }else{ - - } -}*/ - -void StartMenu::ClearScrollArea(QScrollArea *area){ - //QWidget *old = area->takeWidget(); - //qDebug() << "Clear Scroll Area:"; - //if(old->layout()!=0){ qDebug() << " - Number of items in layout:" << old->layout()->count(); } - //qDebug() << " - Number of Children:" << old->children().count(); - //deleteChildren(old); //make sure we *fully* delete these items to save memory - //old->deleteLater(); - if(area == ui->scroll_favs){ - area->takeWidget()->deleteLater(); - } - if(area->widget()==0){ - area->setWidget( new QWidget(area) ); //create a new widget in the scroll area - } - if(area->widget()->layout()==0){ - QVBoxLayout *layout = new QVBoxLayout(area->widget()); - layout->setSpacing(2); - layout->setContentsMargins(3,1,3,1); - layout->setDirection(QBoxLayout::TopToBottom); - layout->setAlignment(Qt::AlignTop); - area->widget()->setContentsMargins(0,0,0,0); - area->widget()->setLayout(layout); - } - //Now clear the items in the layout - while( area->widget()->layout()->count() >0 ){ - QLayoutItem *it = area->widget()->layout()->takeAt(0); - //Need to delete both the widget and the layout item - if(it->widget()!=0){ it->widget()->deleteLater(); } - delete it; - } -} - -void StartMenu::SortScrollArea(QScrollArea *area){ - //qDebug() << "Sorting Scroll Area:"; - //Sort all the items in the scroll area alphabetically - QLayout *lay = area->widget()->layout(); - QStringList items; - for(int i=0; icount(); i++){ - items << lay->itemAt(i)->widget()->whatsThis(); - } - - items.sort(); - //qDebug() << " - Sorted Items:" << items; - for(int i=0; icount(); j++){ - //Find this item - if(lay->itemAt(j)->widget()->whatsThis()==items[i]){ - //Found it - now move it if necessary - //qDebug() << "Found Item:" << items[i] << i << j; - lay->addItem( lay->takeAt(j) ); - break; - } - } - } -} - -void StartMenu::do_search(QString search, bool force){ - search = search.simplified(); //remove unneccesary whitespace - if(search == CSearch && !force){ - //nothing new - just ensure the page is visible - if(ui->stackedWidget->currentWidget()!=ui->page_search ){ ui->stackedWidget->setCurrentWidget(ui->page_search); } - return; - }else if(search.isEmpty()){ - CSearch.clear(); - if(ui->stackedWidget->currentWidget()==ui->page_search ){ on_tool_back_clicked(); } - return; - } - //Got a search term - check it - CSearch = search; //save this for comparison later - qDebug() << "Search for term:" << search; - ClearScrollArea(ui->scroll_search); - topsearch.clear(); - //Now find any items which match the search - QStringList found; //syntax: [::::::::] - QString tmp = search; - if(LUtils::isValidBinary(tmp)){ found << "0::::application/x-executable::::"+tmp; } - QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); - for(int i=0; iname.toLower()==search.toLower()){ priority = 10; } - else if(apps[i]->name.startsWith(search, Qt::CaseInsensitive)){ priority = 15; } - else if(apps[i]->name.contains(search, Qt::CaseInsensitive)){ priority = 19; } - else if(apps[i]->genericName.contains(search, Qt::CaseInsensitive)){ priority = 20; } - else if(apps[i]->comment.contains(search, Qt::CaseInsensitive)){ priority = 30; } - //Can add other filters here later - - if(priority>0){ - found << QString::number(priority)+"::::app::::"+apps[i]->filePath; - } - } - found.sort(Qt::CaseInsensitive); //sort by priority/type (lower numbers are higher on list) - //qDebug() << "Sorted Items:" << found; - //Now add the items to the menu in order - for(int i=0; iscroll_favs->widget(), &item); } - }else{ - it = new ItemWidget(ui->scroll_favs->widget(), found[i].section("::::",2,-1), found[i].section("::::",1,1) ); - } - if(it==0){ continue; } - if(!it->gooditem){ it->deleteLater(); continue; } //invalid for some reason - ui->scroll_search->widget()->layout()->addWidget(it); - connect(it, SIGNAL(NewShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); - if(i%3==0){ - QApplication::processEvents(); - if(searchTimer->isActive()){ return; } //search changed - go ahead and stop here - } - } - ui->stackedWidget->setCurrentWidget(ui->page_search); -} - -bool StartMenu::promptAboutUpdates(bool &skip){ - QString pending = LOS::systemPendingUpdates(); - if(pending.isEmpty()){ skip = false; } //continue without skip - else{ - QMessageBox dlg(QMessageBox::Question, tr("Apply Updates?"), tr("You have system updates waiting to be applied! Do you wish to install them now?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, this); - dlg.setDetailedText(pending); - dlg.setDefaultButton(QMessageBox::Yes); - dlg.show(); - int ret = dlg.exec(); - if(ret == QMessageBox::Cancel){ return false; } //do not continue - else{ skip = (ret==QMessageBox::No); } - } - return true; -} - -// ======================== -// PRIVATE SLOTS -// ======================== -void StartMenu::LaunchItem(QString path, bool fix){ - if(path.startsWith("chcat::::")){ - ChangeCategory(path.section("::::",1,50)); - return; - } - qDebug() << "Launching Item:" << path << fix; - if(!path.isEmpty()){ - qDebug() << "Launch Application:" << path; - if( fix && !path.startsWith("lumina-open") ){ LSession::LaunchApplication("lumina-open \""+path+"\""); } - else{ LSession::LaunchApplication(path); } - emit CloseMenu(); //so the menu container will close - } -} - -void StartMenu::ChangeCategory(QString cat){ - //This only happens on user interaction - make sure to run the update routine in a separate thread - CCat = cat; - UpdateApps(); - //QtConcurrent::run(this, &StartMenu::UpdateApps); -} - -//Listing Update routines -void StartMenu::UpdateApps(){ - ClearScrollArea(ui->scroll_apps); - //Now assemble the apps list - //qDebug() << "Update Apps:";// << CCat << ui->check_apps_showcats->checkState(); - if(ui->check_apps_showcats->checkState() == Qt::PartiallyChecked){ - //qDebug() << " - Partially Checked"; - //Show a single page of apps, but still divided up by categories - CCat.clear(); - QStringList cats = LSession::handle()->applicationMenu()->currentAppHash()->keys(); - cats.sort(); - cats.removeAll("All"); - for(int c=0; c apps = LSession::handle()->applicationMenu()->currentAppHash()->value(cats[c]); - if(apps.isEmpty()){ continue; } - //Add the category label to the scroll - QLabel *catlabel = new QLabel(""+cats[c]+"",ui->scroll_apps->widget()); - catlabel->setAlignment(Qt::AlignCenter); - ui->scroll_apps->widget()->layout()->addWidget(catlabel); - //Now add all the apps for this category - for(int i=0; iscroll_apps->widget(), apps[i] ); - if(!it->gooditem){ qDebug() << "Invalid Item:"; it->deleteLater(); continue; } //invalid for some reason - ui->scroll_apps->widget()->layout()->addWidget(it); - connect(it, SIGNAL(NewShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); - } - } - - }else if(ui->check_apps_showcats->checkState() == Qt::Checked){ - //qDebug() << " - Checked"; - //Only show categories to start with - and have the user click-into a cat to see apps - if(CCat.isEmpty()){ - //No cat selected yet - show cats only - QStringList cats = LSession::handle()->applicationMenu()->currentAppHash()->keys(); - cats.sort(); - cats.removeAll("All"); //This is not a "real" category - for(int c=0; cscroll_apps->widget(), cats[c], "chcat::::"+cats[c] ); - if(!it->gooditem){ qDebug() << "Invalid Item:";it->deleteLater(); continue; } //invalid for some reason - ui->scroll_apps->widget()->layout()->addWidget(it); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - } - }else{ - //qDebug() << "Show Apps For category:" << CCat; - //Show the "go back" button - ItemWidget *it = new ItemWidget(ui->scroll_apps->widget(), CCat, "chcat::::"+CCat, true); - //if(!it->gooditem){ continue; } //invalid for some reason - ui->scroll_apps->widget()->layout()->addWidget(it); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - //Show apps for this cat - QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value(CCat); - for(int i=0; iscroll_apps->widget(), apps[i] ); - if(!it->gooditem){ qDebug() << "Invalid Item:"; it->deleteLater(); continue; } //invalid for some reason - ui->scroll_apps->widget()->layout()->addWidget(it); - connect(it, SIGNAL(NewShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); - } - } - - }else{ - //qDebug() << " - Not Checked"; - //No categories at all - just alphabetize all the apps - QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); - CCat.clear(); - //Now add all the apps for this category - for(int i=0; iscroll_apps->widget(), apps[i] ); - if(!it->gooditem){ it->deleteLater(); continue; } //invalid for some reason - ui->scroll_apps->widget()->layout()->addWidget(it); - connect(it, SIGNAL(NewShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); - } - } - - -} - -void StartMenu::UpdateFavs(){ - //SYNTAX NOTE: (per-line) "::::[dir/app/]::::" - QStringList newfavs = LDesktopUtils::listFavorites(); - if(favs == newfavs){ return; } //nothing to do - same as before - favs = newfavs; - ClearScrollArea(ui->scroll_favs); - favs.sort(); - //Iterate over types of favorites - QStringList rest = favs; - QStringList tmp; - for(int type = 0; type<3; type++){ - if(type==0){ tmp = favs.filter("::::app::::"); } //apps first - else if(type==1){ tmp = favs.filter("::::dir::::"); } //dirs next - else{ tmp = rest; } //everything left over - if(type==1){ - SortScrollArea(ui->scroll_favs); - //Need to run a special routine for sorting the apps (already in the widget) - //qDebug() << "Sort App Widgets..."; - // Since each app actually might have a different name listed within the file - /*QLayout *lay = ui->scroll_favs->widget()->layout(); - QStringList items; - for(int i=0; icount(); i++){ - items << lay->itemAt(i)->widget()->whatsThis().toLower(); - } - - items.sort(); - // qDebug() << " - Sorted Items:" << items; - for(int i=0; icount(); j++){ - //Find this item - if(lay->itemAt(j)->widget()->whatsThis().toLower()==items[i]){ - //Found it - now move it if necessary - //qDebug() << "Found Item:" << items[i] << i << j; - lay->addItem( lay->takeAt(j) ); - break; - } - } - }*/ - - }//end of special app sorting routine - tmp.sort(); //Sort alphabetically by name (dirs/files) - for(int i=0; iscroll_favs->widget(), &item); } - }else{ - it = new ItemWidget(ui->scroll_favs->widget(), tmp[i].section("::::",2,-1), tmp[i].section("::::",1,1) ); - } - if(it==0){ continue; } - if(!it->gooditem){ it->deleteLater(); continue; } //invalid for some reason - ui->scroll_favs->widget()->layout()->addWidget(it); - connect(it, SIGNAL(NewShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) ); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); - } - //QApplication::processEvents(); - } //end loop over types - ui->scroll_favs->update(); - //qDebug() << "End updateFavs"; -} - -// Page update routines -void StartMenu::on_stackedWidget_currentChanged(int val){ - QWidget *page = ui->stackedWidget->widget(val); - ui->tool_back->setVisible(page != ui->page_main); - ui->line_search->setFocus(); - - //Now the page specific updates - if(page == ui->page_main){ - if(!ui->label_status_battery->whatsThis().isEmpty()){ - //Battery available - update the status button - int charge = LOS::batteryCharge(); - QString TT, ICON; - if(charge<=5){ ICON="-caution"; } - else if(charge<=20){ ICON="-040"; } - else if(charge<=70){ ICON="-060"; } - else if(charge<=90){ ICON="-080"; } - else{ ICON="-100"; } - if(LOS::batteryIsCharging()){ - if(charge>=80){ ICON.clear(); } //for charging, there is no suffix to the icon name over 80% - ICON.prepend("battery-charging"); - TT = QString(tr("%1% (Plugged In)")).arg(QString::number(charge)); - }else{ - ICON.prepend("battery"); - int secs = LOS::batterySecondsLeft(); - if(secs>1){ TT = QString(tr("%1% (%2 Estimated)")).arg(QString::number(charge), LUtils::SecondsToDisplay(secs)); } - else{ TT = QString(tr("%1% Remaining")).arg(QString::number(charge)); } - } - //qDebug() << " Battery Icon:" << ICON << val << TT - ui->label_status_battery->setPixmap( LXDG::findIcon(ICON,"").pixmap(ui->tool_goto_apps->iconSize()/2) ); - ui->label_status_battery->setToolTip(TT); - } - //Network Status - ui->label_status_network->clear(); //not implemented yet - }else if(page == ui->page_apps){ - //Nothing needed for this page explicitly - }else if( page == ui->page_settings){ - // -- Workspaces - int tot = LSession::handle()->XCB->NumberOfWorkspaces(); - if(tot>1){ - ui->frame_wkspace->setVisible(true); - int cur = LSession::handle()->XCB->CurrentWorkspace(); - ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); - }else{ - ui->frame_wkspace->setVisible(false); - } - // -- Brightness Controls - int tmp = LOS::ScreenBrightness(); - ui->frame_bright->setVisible(tmp >= 0); - if(tmp >= 0){ ui->slider_bright->setValue(tmp); } - // -- Audio Controls - tmp = LOS::audioVolume(); - ui->frame_audio->setVisible(tmp >= 0); - if(tmp >= 0){ ui->slider_volume->setValue(tmp); } - }else if(page == ui->page_leave){ - if( !ui->frame_leave_system->whatsThis().isEmpty() ){ - //This frame is allowed/visible - need to adjust the shutdown detection - bool updating = LOS::systemPerformingUpdates(); - ui->tool_restart->setEnabled(!updating); - ui->tool_shutdown->setEnabled(!updating); - ui->label_updating->setVisible(updating); //to let the user know *why* they can't shutdown/restart right now - } - ui->frame_leave_suspend->setVisible( LOS::systemCanSuspend() ); - } - -} - -void StartMenu::catViewChanged(){ - QString state; - switch(ui->check_apps_showcats->checkState()){ - case Qt::Checked: - state = "true"; - break; - case Qt::PartiallyChecked: - state = "partial"; - break; - default: - state = "false"; - } - LSession::handle()->DesktopPluginSettings()->setValue("panelPlugs/systemstart/showcategories", state); - //Now kick off the reload of the apps list - UpdateApps(); - //QtConcurrent::run(this, &StartMenu::UpdateApps); //this was a direct user change - keep it thread safe -} -//Page Change Buttons -void StartMenu::on_tool_goto_apps_clicked(){ - ui->stackedWidget->setCurrentWidget(ui->page_apps); -} - -void StartMenu::on_tool_goto_settings_clicked(){ - ui->stackedWidget->setCurrentWidget(ui->page_settings); -} - -void StartMenu::on_tool_goto_logout_clicked(){ - ui->stackedWidget->setCurrentWidget(ui->page_leave); -} - -void StartMenu::on_tool_back_clicked(){ - ui->stackedWidget->setCurrentWidget(ui->page_main); -} - - -//Launch Buttons -void StartMenu::on_tool_launch_controlpanel_clicked(){ - LaunchItem(ui->tool_launch_controlpanel->whatsThis()); -} - -void StartMenu::on_tool_launch_fm_clicked(){ - LaunchItem(QDir::homePath()); -} - -void StartMenu::on_tool_launch_store_clicked(){ - LaunchItem(ui->tool_launch_store->whatsThis()); -} - -void StartMenu::on_tool_launch_desksettings_clicked(){ - LaunchItem("lumina-config", false); -} - -void StartMenu::on_tool_launch_deskinfo_clicked(){ - LaunchItem("lumina-info",false); -} - -//Logout Buttons -void StartMenu::on_tool_lock_clicked(){ - //QProcess::startDetached("xscreensaver-command -lock"); - LaunchItem("xscreensaver-command -lock",false); -} - -void StartMenu::on_tool_logout_clicked(){ - emit CloseMenu(); - LSession::handle()->StartLogout(); -} - -void StartMenu::on_tool_restart_clicked(){ - emit CloseMenu(); - QCoreApplication::processEvents(); - bool skipupdates = false; - if( !promptAboutUpdates(skipupdates) ){ return; } - LSession::handle()->StartReboot(skipupdates); -} - -void StartMenu::on_tool_shutdown_clicked(){ - emit CloseMenu(); - QCoreApplication::processEvents(); - bool skipupdates = false; - if( !promptAboutUpdates(skipupdates) ){ return; } - LSession::handle()->StartShutdown(skipupdates); -} - -void StartMenu::on_tool_suspend_clicked(){ - //Make sure to lock the system first (otherwise anybody can access it again) - emit CloseMenu(); - LUtils::runCmd("xscreensaver-command -lock"); - LOS::systemSuspend(); -} - - -//Audio Volume -void StartMenu::on_slider_volume_valueChanged(int val){ - ui->label_vol->setText(QString::number(val)+"%"); - LOS::setAudioVolume(val); - //Also adjust the icon for the volume - if(val<1){ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-muted","")); } - else if(val<33){ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-low","")); } - else if(val<66){ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-medium","")); } - else{ ui->tool_mute_audio->setIcon(LXDG::findIcon("audio-volume-high","")); } -} - -void StartMenu::on_tool_launch_mixer_clicked(){ - if(LOS::hasMixerUtility()){ - emit CloseMenu(); - LOS::startMixerUtility(); - } -} - -void StartMenu::on_tool_mute_audio_clicked(){ - static int lastvol = 50; - if(ui->slider_volume->value()==0){ ui->slider_volume->setValue(lastvol); } - else{ - lastvol = ui->slider_volume->value(); - ui->slider_volume->setValue(0); - } -} - -//Screen Brightness -void StartMenu::on_slider_bright_valueChanged(int val){ - ui->label_bright->setText(QString::number(val)+"%"); - LOS::setScreenBrightness(val); -} - - -//Workspace -void StartMenu::on_tool_set_nextwkspace_clicked(){ - int cur = LSession::handle()->XCB->CurrentWorkspace(); - int tot = LSession::handle()->XCB->NumberOfWorkspaces(); - //qDebug()<< "Next Workspace:" << cur << tot; - cur++; - if(cur>=tot){ cur = 0; } //back to beginning - //qDebug() << " - New Current:" << cur; - LSession::handle()->XCB->SetCurrentWorkspace(cur); - ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); -} - -void StartMenu::on_tool_set_prevwkspace_clicked(){ - int cur = LSession::handle()->XCB->CurrentWorkspace(); - int tot = LSession::handle()->XCB->NumberOfWorkspaces(); - //qDebug()<< "Next Workspace:" << cur << tot; - cur--; - if(cur<0){ cur = tot-1; } //back to end - //qDebug() << " - New Current:" << cur; - LSession::handle()->XCB->SetCurrentWorkspace(cur); - ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); -} - - -//Locale -void StartMenu::on_combo_locale_currentIndexChanged(int){ - //Get the currently selected Locale - if(ui->stackedWidget->currentWidget()!=ui->page_settings){ return; } - QString locale = ui->combo_locale->currentData().toString(); - emit CloseMenu(); - LSession::processEvents(); - LSession::handle()->switchLocale(locale); -} - - -//Search -void StartMenu::on_line_search_textEdited(QString){ - if(searchTimer->isActive()){ searchTimer->stop(); } - searchTimer->start(); -} - -void StartMenu::startSearch(){ - if(!this->isVisible()){ return; } //menu closed while timer was active - do_search(ui->line_search->text(),false); //auto-launched -} - -void StartMenu::on_line_search_returnPressed(){ - if(topsearch.isEmpty()){ return; } - LaunchItem(topsearch); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.h deleted file mode 100644 index 8ab04d94..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.h +++ /dev/null @@ -1,105 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_SYSTEM_START_PANEL_PLUGIN_H -#define _LUMINA_DESKTOP_SYSTEM_START_PANEL_PLUGIN_H - -#include -#include -#include - -#include - -namespace Ui{ - class StartMenu; -}; - -class StartMenu : public QWidget{ - Q_OBJECT -public: - StartMenu(QWidget *parent = 0); - ~StartMenu(); - -public slots: - void UpdateAll(); //for re-translation/icon changes - void UpdateMenu(bool forceall = false); //for item changes - - void ReLoadQuickLaunch(); - void UpdateQuickLaunch(QString, bool); - -private: - Ui::StartMenu *ui; - QStringList favs; - QString CCat, CSearch, topsearch; //current category/search - QTimer *searchTimer; - - //Simple utility functions - //void deleteChildren(QWidget *obj); //recursive function - void ClearScrollArea(QScrollArea *area); - void SortScrollArea(QScrollArea *area); - void do_search(QString search, bool force); - - bool promptAboutUpdates(bool &skip); - -private slots: - void LaunchItem(QString path, bool fix = true); - - //Application/Favorite Listings - void ChangeCategory(QString cat); - void UpdateApps(); - void UpdateFavs(); - - // Page update routines - void on_stackedWidget_currentChanged(int); //page changed - void catViewChanged(); //application categorization view mode changed - - //Page Change Buttons - void on_tool_goto_apps_clicked(); - void on_tool_goto_settings_clicked(); - void on_tool_goto_logout_clicked(); - void on_tool_back_clicked(); - - //Launch Buttons - void on_tool_launch_controlpanel_clicked(); - void on_tool_launch_fm_clicked(); - void on_tool_launch_store_clicked(); - void on_tool_launch_desksettings_clicked(); - void on_tool_launch_deskinfo_clicked(); - - //Logout Buttons - void on_tool_lock_clicked(); - void on_tool_logout_clicked(); - void on_tool_restart_clicked(); - void on_tool_shutdown_clicked(); - void on_tool_suspend_clicked(); - - //Audio Volume - void on_slider_volume_valueChanged(int); - void on_tool_launch_mixer_clicked(); - void on_tool_mute_audio_clicked(); - - //Screen Brightness - void on_slider_bright_valueChanged(int); - - //Workspace - void on_tool_set_nextwkspace_clicked(); - void on_tool_set_prevwkspace_clicked(); - - //Locale - void on_combo_locale_currentIndexChanged(int); - - //Search - void on_line_search_textEdited(QString); - void startSearch(); - void on_line_search_returnPressed(); - -signals: - void CloseMenu(); - void UpdateQuickLaunch(QStringList); - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.ui b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.ui deleted file mode 100644 index 74f61d7f..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemstart/StartMenu.ui +++ /dev/null @@ -1,1148 +0,0 @@ - - - StartMenu - - - - 0 - 0 - 181 - 405 - - - - Form - - - QScrollArea{background: transparent; border: none; } - - - - 2 - - - 1 - - - 1 - - - 1 - - - 1 - - - - - Type to search - - - - - - - 4 - - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - 0 - 0 - - - - bat% - - - - - - - netstat - - - - - - - - 0 - 0 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Horizontal - - - - - - - Qt::CustomContextMenu - - - - - - QFrame::NoFrame - - - QFrame::Plain - - - Qt::ScrollBarAsNeeded - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustToContents - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - 0 - 0 - 179 - 177 - - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Browse Files - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Browse Applications - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Control Panel - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Preferences - - - - 32 - 32 - - - - QToolButton::InstantPopup - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - Qt::Horizontal - - - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - QToolButton::menu-arrow{ image: rightarrow-icon; } - - - Leave - - - - 32 - 32 - - - - QToolButton::DelayedPopup - - - Qt::ToolButtonTextBesideIcon - - - true - - - Qt::NoArrow - - - - - - - Qt::NoFocus - - - lock - - - - 32 - 32 - - - - true - - - - - - - - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Manage Applications - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - Qt::Horizontal - - - - - - - Qt::NoFocus - - - Show Categories - - - true - - - true - - - - - - - Qt::Horizontal - - - - - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustToContents - - - true - - - - - 0 - 0 - 179 - 284 - - - - - - - - - Qt::Horizontal - - - - - - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Configure Desktop - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - Qt::NoFocus - - - info - - - - 32 - 32 - - - - true - - - - - - - - - Qt::Horizontal - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Qt::NoFocus - - - - - - - 32 - 32 - - - - true - - - - - - - - - Qt::NoFocus - - - 100 - - - Qt::Horizontal - - - - - - - vol% - - - Qt::AlignCenter - - - - - - - - - Qt::NoFocus - - - - - - - 32 - 32 - - - - false - - - - - - - - - Qt::Horizontal - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - 0 - 0 - - - - - 32 - 32 - - - - - - - Qt::AlignCenter - - - - - - - Qt::NoFocus - - - 10 - - - 100 - - - Qt::Horizontal - - - - - - - br% - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - Qt::Horizontal - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - Qt::NoFocus - - - prev - - - - 32 - 32 - - - - - - - - workspace # - - - Qt::AlignCenter - - - - - - - Qt::NoFocus - - - next - - - - 32 - 32 - - - - - - - - - - Qt::Horizontal - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Locale: - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - - - - - - - - Qt::Vertical - - - - 20 - 161 - - - - - - - - Qt::Horizontal - - - - - - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Vertical - - - - 20 - 185 - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Suspend System - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - Qt::Horizontal - - - - - - - - - - QFrame#frame_leave_system{border: none; background: transparent; } - - - QFrame::NoFrame - - - QFrame::Raised - - - - 2 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Restart System - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Power Off System - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - (System Performing Updates) - - - Qt::AlignCenter - - - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Sign Out User - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - Qt::Horizontal - - - - - - - - - - - true - - - - - 0 - 0 - 161 - 332 - - - - - - - - - - - - - - 0 - 0 - - - - Qt::NoFocus - - - Back - - - - 32 - 32 - - - - Qt::ToolButtonTextBesideIcon - - - true - - - Qt::NoArrow - - - - - - - - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.cpp deleted file mode 100644 index a71fd57e..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.cpp +++ /dev/null @@ -1,167 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LSysTray.h" -#include "../../LSession.h" - -LSysTray::LSysTray(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - frame = new QFrame(this); - frame->setContentsMargins(0,0,0,0); - //frame->setStyleSheet("QFrame{ background: transparent; border: 1px solid transparent; border-radius: 3px; }"); - LI = new QBoxLayout( this->layout()->direction()); - frame->setLayout(LI); - LI->setAlignment(Qt::AlignCenter); - LI->setSpacing(0); - LI->setContentsMargins(0,0,0,0); - this->layout()->addWidget(frame); - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - //TrayID=0; - upTimer = new QTimer(this); - upTimer->setInterval(300000); //maximum time between refreshes is 5 minutes - connect(upTimer, SIGNAL(timeout()), this, SLOT(checkAll()) ); - isRunning = false; stopping = false; checking = false; pending = false; - QTimer::singleShot(100, this, SLOT(start()) ); - //Also do one extra check a minute or so after startup (just in case something got missed in the initial flood of registrations) - QTimer::singleShot(90000,this, SLOT(checkAll()) ); - connect(LSession::handle(), SIGNAL(TrayListChanged()), this, SLOT(checkAll()) ); - connect(LSession::handle(), SIGNAL(TrayIconChanged(WId)), this, SLOT(UpdateTrayWindow(WId)) ); - connect(LSession::handle(), SIGNAL(VisualTrayAvailable()), this, SLOT(start()) ); -} - -LSysTray::~LSysTray(){ - if(isRunning){ - this->stop(); - } -} - -void LSysTray::start(){ - if(isRunning || stopping){ return; } //already running - isRunning = LSession::handle()->registerVisualTray(this->winId()); - qDebug() << "Visual Tray Started:" << this->type() << isRunning; - if(isRunning){ - //upTimer->start(); - QTimer::singleShot(0,this, SLOT(checkAll()) ); - } -} - -void LSysTray::stop(){ - if(!isRunning){ return; } - stopping = true; - upTimer->stop(); - //Now close down the system tray registry - qDebug() << "Stop visual system tray:" << this->type(); - //LX11::closeSystemTray(TrayID); - //TrayID = 0; - disconnect(this); //remove any signals/slots - isRunning = false; - //Release all the tray applications and delete the containers - if( !LSession::handle()->currentTrayApps(this->winId()).isEmpty() ){ - qDebug() << " - Remove tray applications"; - //This overall system tray is not closed down - go ahead and release them here - for(int i=(trayIcons.length()-1); i>=0; i--){ - trayIcons[i]->detachApp(); - TrayIcon *cont = trayIcons.takeAt(i); - LI->removeWidget(cont); - cont->deleteLater(); - } - } - //Now let some other visual tray take over - LSession::handle()->unregisterVisualTray(this->winId()); - qDebug() << "Done stopping visual tray"; -} - -// ======================== -// PRIVATE FUNCTIONS -// ======================== -void LSysTray::checkAll(){ - if(!isRunning || stopping || checking){ pending = true; return; } //Don't check if not running at the moment - checking = true; - pending = false; - //Make sure this tray should handle the windows (was not disabled in the backend) - bool TrayRunning = LSession::handle()->registerVisualTray(this->winId()); - //qDebug() << "System Tray: Check tray apps"; - QList wins = LSession::handle()->currentTrayApps(this->winId()); - for(int i=0; iappID()); - if(index < 0){ - //Tray Icon no longer exists: remove it - qDebug() << " - Visual System Tray: Remove Icon:" << trayIcons[i]->appID(); - TrayIcon *cont = trayIcons.takeAt(i); - cont->cleanup(); - LI->removeWidget(cont); - cont->deleteLater(); - i--; //List size changed - //Re-adjust the maximum widget size to account for what is left - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setMaximumSize( trayIcons.length()*this->height(), 10000); - }else{ - this->setMaximumSize(10000, trayIcons.length()*this->width()); - } - }else{ - //Tray Icon already exists - //qDebug() << " - SysTray: Update Icon"; - trayIcons[i]->update(); - wins.removeAt(index); //Already found - remove from the list - } - } - //Now go through any remaining windows and add them - for(int i=0; iaddWidget(cont); - //qDebug() << " - Update tray layout"; - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - int sz = this->height()-2-2*frame->frameWidth(); - if(sz>64){ sz = 64; } - cont->setSizeSquare(sz); //horizontal tray - this->setMaximumSize( trayIcons.length()*this->height(), 10000); - }else{ - int sz = this->width()-2-2*frame->frameWidth(); - if(sz>64){ sz = 64; } - cont->setSizeSquare(sz); //vertical tray - this->setMaximumSize(10000, trayIcons.length()*this->width()); - } - //LSession::processEvents(); - //qDebug() << " - Attach tray app"; - cont->attachApp(wins[i]); - if(cont->appID()==0){ - //could not attach window - remove the widget - qDebug() << " - Invalid Tray App: Could Not Embed:"; - trayIcons.takeAt(trayIcons.length()-1); //Always at the end - LI->removeWidget(cont); - cont->deleteLater(); - continue; - } - LI->update(); //make sure there is no blank space in the layout - } - /*if(listChanged){ - //Icons got moved around: be sure to re-draw all of them to fix visuals - for(int i=0; iupdate(); - } - }*/ - //qDebug() << " - System Tray: check done"; - checking = false; - if(pending){ QTimer::singleShot(0,this, SLOT(checkAll()) ); } -} - -void LSysTray::UpdateTrayWindow(WId win){ - if(!isRunning || stopping || checking){ return; } - for(int i=0; iappID()==win){ - //qDebug() << "System Tray: Update Window " << win; - trayIcons[i]->repaint(); //don't use update() because we need an instant repaint (not a cached version) - return; //finished now - } - } - //Could not find tray in the list, run the checkall routine to make sure we are not missing any - //qDebug() << "System Tray: Missing Window - check all"; - QTimer::singleShot(0,this, SLOT(checkAll()) ); -} - diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.h deleted file mode 100644 index 7db307c6..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/LSysTray.h +++ /dev/null @@ -1,74 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_SYSTRAY_H -#define _LUMINA_DESKTOP_SYSTRAY_H - -//Qt includes -#include -#include -#include -#include -#include - -//Local includes -#include "../LPPlugin.h" -#include "TrayIcon.h" - -//SYSTEM TRAY STANDARD DEFINITIONS -#define SYSTEM_TRAY_REQUEST_DOCK 0 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2 - -class LSysTray : public LPPlugin{ - Q_OBJECT -public: - LSysTray(QWidget *parent = 0, QString id="systemtray", bool horizontal=true); - ~LSysTray(); - - virtual void AboutToClose(){ - this->stop(); - } - -private: - bool isRunning, stopping, checking, pending; - QList trayIcons; - QFrame *frame; - QBoxLayout *LI; //layout items - QTimer *upTimer; //manual timer to force refresh of all items - -private slots: - void checkAll(); - void UpdateTrayWindow(WId win); - - //void removeTrayIcon(WId win); - -public slots: - void start(); - void stop(); - - virtual void OrientationChange(){ - //make sure the internal layout has the same orientation as the main widget - LI->setDirection( this->layout()->direction() ); - //Re-adjust the maximum widget size - int sz; - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setMaximumSize( trayIcons.length()*this->height(), 10000); - sz = this->height()-2*frame->frameWidth(); - }else{ - this->setMaximumSize(10000, trayIcons.length()*this->width()); - sz = this->width()-2*frame->frameWidth(); - } - if(sz>64){ sz = 64; } //many tray icons can't go larger than this anyway - for(int i=0; isetSizeSquare(sz); - trayIcons[i]->repaint(); - } - } - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.cpp deleted file mode 100644 index 9fdbce50..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.cpp +++ /dev/null @@ -1,128 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "TrayIcon.h" - -#include -#include -#include - -TrayIcon::TrayIcon(QWidget *parent) : QWidget(parent){ - AID = 0; //nothing yet - IID = 0; - dmgID = 0; - badpaints = 0; - //this->setLayout(new QHBoxLayout); - //this->layout()->setContentsMargins(0,0,0,0); -} - -TrayIcon::~TrayIcon(){ -} - -void TrayIcon::cleanup(){ - AID = IID = 0; -} - -WId TrayIcon::appID(){ - return AID; -} - -void TrayIcon::attachApp(WId id){ - if(id==0){ return; } //nothing to attach - else if(AID!=0){ qWarning() << "Tray Icon is already attached to a window!"; return; } - AID = id; - //WIN = QWindow::fromWinId(AID); - //connect(WIN, SIGNAL( - //this->layout()->addWidget( QWidget::createWindowContainer(WIN, this) ); - IID = this->winId(); //embed directly into this widget - dmgID = LSession::handle()->XCB->EmbedWindow(AID, IID); - if( dmgID != 0 ){ - LSession::handle()->XCB->RestoreWindow(AID); //make it visible - //qDebug() << "New System Tray App:" << AID; - QTimer::singleShot(1000, this, SLOT(updateIcon()) ); - }else{ - //qWarning() << "Could not Embed Tray Application:" << AID; - IID = 0; - AID = 0; - } -} - -void TrayIcon::setSizeSquare(int side){ - //qDebug() << " Set Fixed Systray size:" << side; - this->setFixedSize( QSize(side, side) ); -} - -// ============== -// PUBLIC SLOTS -// ============== -void TrayIcon::detachApp(){ - if(AID==0){ return; } //already detached - //qDebug() << "Detach App:" << AID; - //Temporarily move the AID, so that internal slots do not auto-run - WId tmp = AID; - AID = 0; - //Now detach the application window and clean up - //qDebug() << " - Unembed"; - //WIN->setParent(0); //Reset parentage back to the main stack - LSession::handle()->XCB->UnembedWindow(tmp); - //qDebug() << " - finished app:" << tmp; - IID = 0; -} - -// ============== -// PRIVATE SLOTS -// ============== -void TrayIcon::updateIcon(){ - if(AID==0){ return; } - //Make sure the icon is square - QSize icosize = this->size(); - LSession::handle()->XCB->ResizeWindow(AID, icosize.width(), icosize.height()); - QTimer::singleShot(500, this, SLOT(update()) ); //make sure to re-draw the window in a moment -} - -// ============= -// PROTECTED -// ============= -void TrayIcon::paintEvent(QPaintEvent *event){ - QWidget::paintEvent(event); //make sure the background is already painted - if(AID!=0){ - //Update the background on the tray app - //qDebug() << "Paint Tray Background"; - //LSession::handle()->XCB->SetWindowBackground(this, this->geometry(), AID); - //qDebug() << "Paint Tray:" << AID; - QPainter painter(this); - //Now paint the tray app on top of the background - //qDebug() << " - Draw tray:" << AID << IID << this->winId(); - //qDebug() << " - - " << event->rect().x() << event->rect().y() << event->rect().width() << event->rect().height(); - //qDebug() << " - Get image:" << AID; - QPixmap pix = LSession::handle()->XCB->TrayImage(AID); //= WIN->icon().pixmap(this->size()); - - //qDebug() << " - Pix size:" << pix.size().width() << pix.size().height(); - //qDebug() << " - Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height(); - if(!pix.isNull()){ - if(this->size() != pix.size()){ QTimer::singleShot(10, this, SLOT(updateIcon())); } - painter.drawPixmap(0,0,this->width(), this->height(), pix.scaled(this->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation) ); - badpaints = 0; //good paint - }else{ - badpaints++; - if(badpaints>5){ - qWarning() << " - - No Tray Icon/Image found!" << "ID:" << AID; - AID = 0; //reset back to nothing - IID = 0; - emit BadIcon(); //removed/destroyed in some non-valid way? - } - } - //qDebug() << " - Done"; - } -} - -void TrayIcon::resizeEvent(QResizeEvent *event){ - //qDebug() << "Resize Event:" << event->size().width() << event->size().height(); - if(AID!=0){ - LSession::handle()->XCB->ResizeWindow(AID, event->size()); - QTimer::singleShot(500, this, SLOT(update()) ); //make sure to re-draw the window in a moment - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.h deleted file mode 100644 index 5d072cc1..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/systemtray/TrayIcon.h +++ /dev/null @@ -1,55 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// Note: The basic idea behind this class that that it puts the app window -// in the same spot as the tray icon (to directly pass mouse events and such), -// while keeping the tray icon visual in sync with the app window -//=========================================== -#ifndef _LUMINA_PANEL_PLUGIN_SYSTEM_TRAY_ICON_H -#define _LUMINA_PANEL_PLUGIN_SYSTEM_TRAY_ICON_H - -//Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -//#include -// libLumina includes -//#include - -class TrayIcon : public QWidget{ - Q_OBJECT -public: - TrayIcon(QWidget* parent = 0); - ~TrayIcon(); - - void cleanup(); //about to be removed after window was detroyed - - WId appID(); //the ID for the attached application - void attachApp(WId id); - void setSizeSquare(int side); - -public slots: - void detachApp(); - void updateIcon(); - -private: - WId IID, AID; //icon ID and app ID - int badpaints; - uint dmgID; - -protected: - void paintEvent(QPaintEvent *event); - void resizeEvent(QResizeEvent *event); - -signals: - void BadIcon(); -}; -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.cpp deleted file mode 100644 index 0dd68bb0..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.cpp +++ /dev/null @@ -1,271 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LTaskButton.h" -#include "LSession.h" - -#ifndef DEBUG -#define DEBUG 0 -#endif - -LTaskButton::LTaskButton(QWidget *parent, bool smallDisplay) : LTBWidget(parent){ - actMenu = new QMenu(this); - winMenu = new QMenu(this); - UpdateMenus(); - showText = !smallDisplay; - this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - this->setAutoRaise(false); //make sure these always look like buttons - this->setContextMenuPolicy(Qt::CustomContextMenu); - this->setFocusPolicy(Qt::NoFocus); - this->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); - winMenu->setContextMenuPolicy(Qt::CustomContextMenu); - connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(openActionMenu()) ); - connect(this, SIGNAL(clicked()), this, SLOT(buttonClicked()) ); - connect(winMenu, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(openActionMenu()) ); - connect(winMenu, SIGNAL(triggered(QAction*)), this, SLOT(winClicked(QAction*)) ); - connect(winMenu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - connect(actMenu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); -} - -LTaskButton::~LTaskButton(){ - -} - -//=========== -// PUBLIC -//=========== -QList LTaskButton::windows(){ - QList list; - for(int i=0; iisVisible()){ return; } //skip this if the window menu is currently visible for now - bool statusOnly = (WINLIST.length() == LWINLIST.length()); - LWINLIST = WINLIST; - - winMenu->clear(); - LXCB::WINDOWVISIBILITY showstate = LXCB::IGNORE; - for(int i=0; isetIcon(WINLIST[i].icon(noicon)); - cname = WINLIST[i].Class(); - if(cname.isEmpty()){ - //Special case (chrome/chromium does not register *any* information with X except window title) - cname = WINLIST[i].text(); - if(cname.contains(" - ")){ cname = cname.section(" - ",-1); } - } - this->setToolTip(cname); - } - bool junk; - QAction *tmp = winMenu->addAction( WINLIST[i].icon(junk), WINLIST[i].text() ); - tmp->setData(i); //save which number in the WINLIST this entry is for - LXCB::WINDOWVISIBILITY stat = WINLIST[i].status(true); //update the saved state for the window - if(statactiveWindow()){ stat = LXCB::ACTIVE; } - if(stat > showstate){ showstate = stat; } //higher priority - } - //Now setup the button appropriately - // - visibility - if(showstate == LXCB::IGNORE || WINLIST.length() < 1){ this->setVisible(false); } - else{ this->setVisible(true); } - // - functionality - if(WINLIST.length() == 1){ - //single window - this->setPopupMode(QToolButton::DelayedPopup); - this->setMenu(actMenu); - if(showText){ - QString txt = WINLIST[0].text(); - if(txt.length()>30){ txt.truncate(27); txt.append("..."); } - else if(txt.length()<30){ txt = txt.leftJustified(30, ' '); } - this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText(txt); - }else if(noicon){ this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); this->setText( cname ); } - else{ this->setToolButtonStyle(Qt::ToolButtonIconOnly); this->setText(""); } - this->setToolTip(WINLIST[0].text()); - }else if(WINLIST.length() > 1){ - //multiple windows - this->setPopupMode(QToolButton::InstantPopup); - this->setMenu(winMenu); - this->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - if(noicon || showText){ "("+QString::number(WINLIST.length())+") "+cname; } - else{ this->setText("("+QString::number(WINLIST.length())+")"); } - } - this->setState(showstate); //Make sure this is after the button setup so that it properly sets the margins/etc - cstate = showstate; //save this for later -} - -void LTaskButton::UpdateMenus(){ - //Action menu should be auto-created for the state of the current window (cWin/cstate) - actMenu->clear(); - if(cstate!=LXCB::ACTIVE){ - actMenu->addAction( LXDG::findIcon("edit-select",""), tr("Activate Window"), this, SLOT(triggerWindow()) ); - } - if(cstate!=LXCB::INVISIBLE){ - actMenu->addAction( LXDG::findIcon("view-close",""), tr("Minimize Window"), this, SLOT(minimizeWindow()) ); - if(LSession::handle()->XCB->WindowIsMaximized(cWin.windowID()) ){ - actMenu->addAction( LXDG::findIcon("view-restore",""), tr("Restore Window"), this, SLOT(maximizeWindow()) ); - }else{ - actMenu->addAction( LXDG::findIcon("view-fullscreen",""), tr("Maximize Window"), this, SLOT(maximizeWindow()) ); - } - } - actMenu->addAction( LXDG::findIcon("window-close",""), tr("Close Window"), this, SLOT(closeWindow()) ); - if(WINLIST.length()>1 && !winMenu->isVisible()){ - actMenu->addSeparator(); - actMenu->addAction( LXDG::findIcon("layer-visible-on",""), tr("Show All Windows"), this, SLOT(showAllWindows()) ); - actMenu->addAction( LXDG::findIcon("layer-visible-off",""), tr("Minimize All Windows"), this, SLOT(hideAllWindows()) ); - actMenu->addAction( LXDG::findIcon("window-close",""), tr("Close All Windows"), this, SLOT(closeAllWindows()) ); - } -} - -//============= -// PRIVATE SLOTS -//============= -void LTaskButton::buttonClicked(){ - if(WINLIST.length() > 1){ - winMenu->popup(QCursor::pos()); - }else{ - triggerWindow(); - } -} - -void LTaskButton::closeWindow(){ - if(DEBUG){ qDebug() << "Close Window:" << this->text(); } - if(winMenu->isVisible()){ winMenu->hide(); } - LWinInfo win = currentWindow(); - LSession::handle()->XCB->CloseWindow(win.windowID()); - cWin = LWinInfo(); //clear the current -} - -void LTaskButton::maximizeWindow(){ - if(DEBUG){ qDebug() << "Maximize Window:" << this->text(); } - if(winMenu->isVisible()){ winMenu->hide(); } - LWinInfo win = currentWindow(); - LSession::handle()->XCB->MaximizeWindow(win.windowID()); - //LSession::handle()->adjustWindowGeom(win.windowID(), true); //run this for now until the WM works properly - cWin = LWinInfo(); //clear the current -} - -void LTaskButton::minimizeWindow(){ - if(DEBUG){ qDebug() << "Minimize Window:" << this->text(); } - if(winMenu->isVisible()){ winMenu->hide(); } - LWinInfo win = currentWindow(); - LSession::handle()->XCB->MinimizeWindow(win.windowID()); - cWin = LWinInfo(); //clear the current - QTimer::singleShot(100, this, SLOT(UpdateButton()) ); //make sure to update this button if losing active status -} - -void LTaskButton::showAllWindows(){ - for(int i=WINLIST.length()-1; i>=0; i--){ - if(WINLIST[i].status()==LXCB::INVISIBLE){ - LSession::handle()->XCB->RestoreWindow(WINLIST[i].windowID()); - } - } -} - -void LTaskButton::hideAllWindows(){ - for(int i=WINLIST.length()-1; i>=0; i--){ - LXCB::WINDOWVISIBILITY state = WINLIST[i].status(); - if(state==LXCB::VISIBLE || state==LXCB::ACTIVE){ - LSession::handle()->XCB->MinimizeWindow(WINLIST[i].windowID()); - } - } -} - -void LTaskButton::closeAllWindows(){ - for(int i=WINLIST.length()-1; i>=0; i--){ - LSession::handle()->XCB->CloseWindow(WINLIST[i].windowID()); - } -} - -void LTaskButton::triggerWindow(){ - LWinInfo win = currentWindow(); - //Check which state the window is currently in and flip it to the other - //LXCB::WINDOWSTATE state = cstate; - //if(DEBUG){ qDebug() << "Window State: " << state; } - if(cstate == LXCB::ACTIVE){ - if(DEBUG){ qDebug() << "Minimize Window:" << this->text(); } - LSession::handle()->XCB->MinimizeWindow(win.windowID()); - QTimer::singleShot(100, this, SLOT(UpdateButton()) ); //make sure to update this button if losing active status - }else{ - if(DEBUG){ qDebug() << "Activate Window:" << this->text(); } - LSession::handle()->XCB->ActivateWindow(win.windowID()); - } - cWin = LWinInfo(); //clear the current -} - -void LTaskButton::winClicked(QAction* act){ - //Get the window from the action - if(act->data().toInt() < WINLIST.length()){ - cWin = WINLIST[act->data().toInt()]; - cstate = cWin.status(); - }else{ cWin = LWinInfo(); } //clear it - //Now trigger the window - triggerWindow(); -} - -void LTaskButton::openActionMenu(){ - //Get the Window the mouse is currently over - QPoint curpos = QCursor::pos(); - QAction *act = winMenu->actionAt(winMenu->mapFromGlobal(curpos)); - //qDebug() << "Button Context Menu:" << curpos.x() << curpos.y() << winMenu->geometry().x() << winMenu->geometry().y() << winMenu->geometry().width() << winMenu->geometry().height(); - cWin = WINLIST[0]; //default to the first window - if( act != 0 && winMenu->isVisible() ){ - //Get the window from the action - //qDebug() << "Found Action:" << act->data().toInt(); - if(act->data().toInt() < WINLIST.length()){ - cWin = WINLIST[act->data().toInt()]; - } - } - cstate = cWin.status(); - //Now show the action menu - UpdateMenus(); - actMenu->popup(QCursor::pos()); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.h deleted file mode 100644 index 6b171c6a..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskButton.h +++ /dev/null @@ -1,73 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_TASK_BUTTON_H -#define _LUMINA_DESKTOP_TASK_BUTTON_H - -// Qt includes -#include -#include -#include -#include -#include -#include -#include - -// libLumina includes -#include -#include - -// Local includes -#include "../../LWinInfo.h" -#include "../LTBWidget.h" - -class LTaskButton : public LTBWidget{ - Q_OBJECT -public: - LTaskButton(QWidget *parent=0, bool smallDisplay = true); - ~LTaskButton(); - - //Window Information - QList windows(); - QString classname(); - bool isActive(); - - //Window Management - void addWindow(WId win); //Add a window to this button - void rmWindow(WId win); //Remove a window from this button - -private: - QList WINLIST; - QList LWINLIST; - QMenu *actMenu; // action menu (custom context menu) - QMenu *winMenu; // window menu (if more than 1) - LWinInfo cWin; - QString cname; //class name for the entire button - bool noicon, showText; - - LWinInfo currentWindow(); //For getting the currently-active window - LXCB::WINDOWVISIBILITY cstate; //current state of the button - -public slots: - void UpdateButton(); //re-sync the current window infomation - void UpdateMenus(); //re-create the menus (text + icons) - -private slots: - void buttonClicked(); - void closeWindow(); //send the signal to close a window - void maximizeWindow(); //send the signal to maximize/restore a window - void minimizeWindow(); //send the signal to minimize a window (iconify) - void showAllWindows(); - void hideAllWindows(); - void closeAllWindows(); - void triggerWindow(); //change b/w visible and invisible - void winClicked(QAction*); - void openActionMenu(); - -signals: - void MenuClosed(); -}; -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.cpp deleted file mode 100644 index 79c5dd36..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.cpp +++ /dev/null @@ -1,141 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LTaskManagerPlugin.h" -#include "../../LSession.h" - -LTaskManagerPlugin::LTaskManagerPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - timer = new QTimer(this); - timer->setSingleShot(true); - timer->setInterval(10); // 1/100 second - connect(timer, SIGNAL(timeout()), this, SLOT(UpdateButtons()) ); - usegroups = true; //backwards-compatible default value - if(id.contains("-nogroups")){ usegroups = false; } - connect(LSession::handle(), SIGNAL(WindowListEvent()), this, SLOT(checkWindows()) ); - connect(LSession::handle(), SIGNAL(WindowListEvent(WId)), this, SLOT(UpdateButton(WId)) ); - this->layout()->setContentsMargins(0,0,0,0); - QTimer::singleShot(0,this, SLOT(UpdateButtons()) ); //perform an initial sync - //QTimer::singleShot(100,this, SLOT(OrientationChange()) ); //perform an initial sync -} - -LTaskManagerPlugin::~LTaskManagerPlugin(){ - -} - -//============== -// PRIVATE SLOTS -//============== -void LTaskManagerPlugin::UpdateButtons(){ - updating = QDateTime::currentDateTime(); //global time stamp - QDateTime ctime = updating; //current thread time stamp - - //Get the current window list - QList winlist = LSession::handle()->XCB->WindowList(); - // Ignore the windows which don't want to be listed - for (int i = 0; i < winlist.length(); i++) { - QList states = LSession::handle()->XCB->WM_Get_Window_States(winlist[i]); - for (int j = 0; j < states.length(); j++) { - if (states[j] == LXCB::S_SKIP_TASKBAR) { - // Skip taskbar window - winlist.removeAt(i); - i--; - break; - } - } - } - //Do not change the status of the previously active window if it just changed to a non-visible window - //WId activeWin = LSession::handle()->XCB->ActiveWindow(); - //bool skipActive = !winlist.contains(activeWin); - //qDebug() << "Update Buttons:" << winlist; - if(updating > ctime){ return; } //another thread kicked off already - stop this one - //Now go through all the current buttons first - for(int i=0; i WI = BUTTONS[i]->windows(); - bool updated=false; - if(updating > ctime){ return; } //another thread kicked off already - stop this one - //Loop over all the windows for this button - for(int w=0; w ctime){ return; } //another thread kicked off already - stop this one - if( winlist.contains( WI[w] ) ){ - //Still current window - update it later - winlist.removeAll(WI[w] ); //remove this window from the list since it is done - }else{ - //Window was closed - remove it - if(WI.length()==1){ - //Remove the entire button - //qDebug() << "Window Closed: Remove Button" ; - this->layout()->takeAt(i); //remove from the layout - BUTTONS.takeAt(i)->deleteLater(); - i--; - updated = true; //prevent updating a removed button - break; //break out of the button->window loop - }else{ - //qDebug() << "Window Closed: Remove from button:" << WI[w].windowID() << "Button:" << w; - BUTTONS[i]->rmWindow(WI[w]); // one of the multiple windows for the button - WI.removeAt(w); //remove this window from the list - w--; - } - updated=true; //button already changed - } - if(updating > ctime){ return; } //another thread kicked off already - stop this one - } - if(!updated){ - //qDebug() << "Update Button:" << i; - if(updating > ctime){ return; } //another thread kicked off already - stop this one - //if(!skipActive || !BUTTONS[i]->isActive()){ - QTimer::singleShot(1,BUTTONS[i], SLOT(UpdateButton()) ); //keep moving on - //} - } - } - //Now go through the remaining windows - for(int i=0; i ctime){ return; } //another thread kicked off already - stop this one - //Check for a button that this can just be added to - QString ctxt = LSession::handle()->XCB->WindowClass(winlist[i]); - bool found = false; - for(int b=0; b ctime){ return; } //another thread kicked off already - stop this one - if(BUTTONS[b]->classname()== ctxt && usegroups){ - //This adds a window to an existing group - found = true; - //qDebug() << "Add Window to Button:" << b; - BUTTONS[b]->addWindow(winlist[i]); - break; - } - } - if(!found){ - if(updating > ctime){ return; } //another thread kicked off already - stop this one - //No group, create a new button - //qDebug() << "New Button"; - LTaskButton *but = new LTaskButton(this, usegroups); - but->addWindow( winlist[i] ); - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - but->setIconSize(QSize(this->height(), this->height())); - }else{ - but->setIconSize(QSize(this->width(), this->width())); - } - this->layout()->addWidget(but); - connect(but, SIGNAL(MenuClosed()), this, SIGNAL(MenuClosed())); - BUTTONS << but; - } - } -} - -void LTaskManagerPlugin::UpdateButton(WId win){ - for(int i=0; iwindows().contains(win)){ - qDebug() << "Update Task Manager Button (single window ping)"; - QTimer::singleShot(0,BUTTONS[i], SLOT(UpdateButton()) ); - break; - } - } -} - -void LTaskManagerPlugin::checkWindows(){ - timer->start(); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.h deleted file mode 100644 index e6371f34..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/taskmanager/LTaskManagerPlugin.h +++ /dev/null @@ -1,71 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#ifndef _LUMINA_DESKTOP_TASK_MANAGER_PLUGIN_H -#define _LUMINA_DESKTOP_TASK_MANAGER_PLUGIN_H - -// Qt includes -#include -#include -#include -#include -#include -#include -#include - -// libLumina includes -#include - -// Local includes -#include "LTaskButton.h" -#include "LWinInfo.h" -#include "../LPPlugin.h" - -class LTaskManagerPlugin : public LPPlugin{ - Q_OBJECT -public: - LTaskManagerPlugin(QWidget *parent=0, QString id="taskmanager", bool horizontal=true); - ~LTaskManagerPlugin(); - -private: - QList BUTTONS; //to keep track of the current buttons - QTimer *timer; - QDateTime updating; //quick flag for if it is currently working - bool usegroups; - -private slots: - void UpdateButtons(); - void UpdateButton(WId win); - void checkWindows(); - -public slots: - void LocaleChange(){ - UpdateButtons(); - } - void ThemeChange(){ - UpdateButtons(); - } - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ //horizontal - this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - this->layout()->setAlignment(Qt::AlignLeft); - QSize sz(this->height(), this->height()); - for(int i=0; isetToolButtonStyle(Qt::ToolButtonTextBesideIcon); - BUTTONS[i]->setIconSize(sz); - } - }else{ //vertical - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); - this->layout()->setAlignment(Qt::AlignTop); - QSize sz(this->width(), this->width()); - for(int i=0; isetToolButtonStyle(Qt::ToolButtonTextUnderIcon); - BUTTONS[i]->setIconSize(sz); - } - } - } -}; -#endif \ No newline at end of file diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.cpp deleted file mode 100644 index acb27135..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "LUserButton.h" -#include "../../LSession.h" - -LUserButtonPlugin::LUserButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ - button = new QToolButton(this); - button->setAutoRaise(true); - button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - button->setPopupMode(QToolButton::DelayedPopup); //make sure it runs the update routine first - connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); - this->layout()->setContentsMargins(0,0,0,0); - this->layout()->addWidget(button); - menu = new QMenu(this); - menu->setContentsMargins(1,1,1,1); - connect(menu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); - usermenu = new UserWidget(this); - connect(usermenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); - mact = new QWidgetAction(this); - mact->setDefaultWidget(usermenu); - menu->addAction(mact); - - button->setMenu(menu); - connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); - //Setup the global shortcut handling for opening the start menu - connect(QApplication::instance(), SIGNAL(StartButtonActivated()), this, SLOT(shortcutActivated()) ); - LSession::handle()->registerStartButton(this->type()); - - QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes -} - -LUserButtonPlugin::~LUserButtonPlugin(){ - -} - -void LUserButtonPlugin::updateButtonVisuals(){ - button->setToolTip(tr("Quickly launch applications or open files")); - button->setText( SYSTEM::user() ); - if( QFile::exists(QDir::homePath()+"/.loginIcon.png") ){ - button->setIcon( QIcon(QDir::homePath()+"/.loginIcon.png") ); - }else{ - button->setIcon( LXDG::findIcon("user-identity", ":/images/default-user.png") ); //force icon refresh - } -} - -// ======================== -// PRIVATE FUNCTIONS -// ======================== -void LUserButtonPlugin::openMenu(){ - usermenu->UpdateMenu(); - button->showMenu(); -} - -void LUserButtonPlugin::closeMenu(){ - menu->hide(); -} - -void LUserButtonPlugin::shortcutActivated(){ - if(LSession::handle()->registerStartButton(this->type())){ - if(menu->isVisible()){ closeMenu(); } - else{ openMenu(); } - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.h deleted file mode 100644 index 8d5e5040..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/LUserButton.h +++ /dev/null @@ -1,75 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin is the main button that allow the user to run -// applications or logout of the desktop -//=========================================== -#ifndef _LUMINA_DESKTOP_USER_MENU_PLUGIN_H -#define _LUMINA_DESKTOP_USER_MENU_PLUGIN_H - -// Qt includes -#include -#include -#include -#include -#include - - -// Lumina-desktop includes -//#include "../../Globals.h" -#include "../LPPlugin.h" //main plugin widget - -// libLumina includes -#include "LuminaXDG.h" - -#include "UserWidget.h" - -// PANEL PLUGIN BUTTON -class LUserButtonPlugin : public LPPlugin{ - Q_OBJECT - -public: - LUserButtonPlugin(QWidget *parent = 0, QString id = "userbutton", bool horizontal=true); - ~LUserButtonPlugin(); - -private: - QMenu *menu; - QWidgetAction *mact; - UserWidget *usermenu; - QToolButton *button; - -private slots: - void openMenu(); - void closeMenu(); - void shortcutActivated(); - - void updateButtonVisuals(); - -public slots: - void OrientationChange(){ - if(this->layout()->direction()==QBoxLayout::LeftToRight){ - this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - button->setIconSize( QSize(this->height(), this->height()) ); - }else{ - this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - button->setIconSize( QSize(this->width(), this->width()) ); - } - this->layout()->update(); - updateButtonVisuals(); - } - - void LocaleChange(){ - updateButtonVisuals(); - usermenu->UpdateAll(); - } - - void ThemeChange(){ - updateButtonVisuals(); - usermenu->UpdateAll(); - } -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.cpp deleted file mode 100644 index 8d7dab7a..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.cpp +++ /dev/null @@ -1,205 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "UserItemWidget.h" -#include -#include -#include - -#define TEXTCUTOFF 165 -UserItemWidget::UserItemWidget(QWidget *parent, QString itemPath, QString type, bool goback) : QFrame(parent){ - createWidget(); - //Now fill it appropriately - bool inHome = type.endsWith("-home"); //internal code - if(inHome){ type = type.remove("-home"); } - if(itemPath.endsWith(".desktop") || type=="app"){ - XDGDesktop item(itemPath); - if( item.isValid() ){ - icon->setPixmap( LXDG::findIcon(item.icon, "preferences-system-windows-actions").pixmap(32,32) ); - name->setText( this->fontMetrics().elidedText(item.name, Qt::ElideRight, TEXTCUTOFF) ); - setupActions(&item); - }else{ - gooditem = false; - return; - } - }else if(type=="dir"){ - actButton->setVisible(false); - if(itemPath.endsWith("/")){ itemPath.chop(1); } - if(goback){ - icon->setPixmap( LXDG::findIcon("go-previous","").pixmap(32,32) ); - name->setText( tr("Go Back") ); - }else{ - icon->setPixmap( LXDG::findIcon("folder","").pixmap(32,32) ); - name->setText( this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) ); - } - }else{ - actButton->setVisible(false); - if(itemPath.endsWith("/")){ itemPath.chop(1); } - if(QFileInfo(itemPath).isDir()){ - type = "dir"; - icon->setPixmap( LXDG::findIcon("folder","").pixmap(32,32) ); - }else if(LUtils::imageExtensions().contains(itemPath.section("/",-1).section(".",-1).toLower()) ){ - icon->setPixmap( QIcon(itemPath).pixmap(32,32) ); - }else{ - icon->setPixmap( LXDG::findMimeIcon(itemPath.section("/",-1)).pixmap(32,32) ); - } - name->setText( this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) ); - } - icon->setWhatsThis(itemPath); - if(!goback){ this->setWhatsThis(name->text()); } - isDirectory = (type=="dir"); //save this for later - if(LDesktopUtils::isFavorite(itemPath)){ - linkPath = itemPath; - isShortcut=true; - }else if( inHome ){//|| itemPath.section("/",0,-2)==QDir::homePath()+"/Desktop" ){ - isShortcut = true; - }else{ - isShortcut = false; - } - //Now setup the button appropriately - setupButton(goback); -} - -UserItemWidget::UserItemWidget(QWidget *parent, XDGDesktop *item) : QFrame(parent){ - if(item==0){ return; } - createWidget(); - isDirectory = false; - if(LDesktopUtils::isFavorite(item->filePath)){ - linkPath = item->filePath; - isShortcut=true; - }else if( item->filePath.section("/",0,-2)==QDir::homePath()+"/Desktop" ){ - isShortcut = true; - }else{ - isShortcut = false; - } - //Now fill it appropriately - icon->setPixmap( LXDG::findIcon(item->icon,"preferences-system-windows-actions").pixmap(32,32) ); - name->setText( this->fontMetrics().elidedText(item->name, Qt::ElideRight, TEXTCUTOFF) ); - this->setWhatsThis(name->text()); - icon->setWhatsThis(item->filePath); - //Now setup the buttons appropriately - setupButton(); - setupActions(item); -} - -UserItemWidget::~UserItemWidget(){ - delete button; - delete icon; - delete name; -} - - -void UserItemWidget::createWidget(){ - //Initialize the widgets - gooditem = true; - menuopen = false; - menureset = new QTimer(this); - menureset->setSingleShot(true); - menureset->setInterval(1000); //1 second - this->setContentsMargins(0,0,0,0); - button = new QToolButton(this); - button->setIconSize( QSize(14,14) ); - button->setAutoRaise(true); - actButton = new QToolButton(this); - actButton->setPopupMode(QToolButton::InstantPopup); - actButton->setFixedSize( QSize(17,34) ); - actButton->setArrowType(Qt::DownArrow); - icon = new QLabel(this); - icon->setFixedSize( QSize(34,34) ); - name = new QLabel(this); - //Add them to the layout - this->setLayout(new QHBoxLayout()); - this->layout()->setContentsMargins(1,1,1,1); - this->layout()->addWidget(icon); - this->layout()->addWidget(actButton); - this->layout()->addWidget(name); - this->layout()->addWidget(button); - //Set a custom object name so this can be tied into the Lumina Theme stylesheets - this->setObjectName("LuminaUserItemWidget"); - //Install the stylesheet - //this->setStyleSheet("UserItemWidget{ background: transparent; border-radius: 5px;} UserItemWidget::hover{ background: rgba(255,255,255,200); border-radius: 5px; }"); -} - -void UserItemWidget::setupButton(bool disable){ - //if(isDirectory){ qDebug() << "Directory Entry:" << isShortcut << linkPath << icon->whatsThis(); } - - if(disable){ - button->setVisible(false); - }else if(isShortcut && !linkPath.isEmpty()){ //Favorite Item - can always remove this - button->setWhatsThis("remove"); - button->setIcon( LXDG::findIcon("list-remove","") ); - button->setToolTip(tr("Remove Shortcut")); - connect(button, SIGNAL(clicked()), this, SLOT(buttonClicked()) ); - }else if(isShortcut){ //Physical File/Dir - can remove - button->setWhatsThis("remove"); - button->setIcon( LXDG::findIcon("user-trash","") ); - button->setToolTip(tr("Delete File")); - connect(button, SIGNAL(clicked()), this, SLOT(buttonClicked()) ); - }else if(!isShortcut){// if( !QFile::exists( QDir::homePath()+"/Desktop/"+icon->whatsThis().section("/",-1) ) && !LUtils::isFavorite(icon->whatsThis() ) ){ - //This file does not have a shortcut yet -- allow the user to add it - button->setWhatsThis("add"); - button->setIcon( LXDG::findIcon("bookmark-toolbar","") ); - button->setToolTip(tr("Create Shortcut")); - connect(button, SIGNAL(clicked()), this, SLOT(buttonClicked()) ); - }else{ - //This already has a desktop shortcut -- no special actions - button->setVisible(false); - } - if(isShortcut){ - name->setToolTip(icon->whatsThis()); //also allow the user to see the full shortcut path - } -} - -void UserItemWidget::setupActions(XDGDesktop *app){ - if(app==0 || app->actions.isEmpty()){ actButton->setVisible(false); return; } - //Actions Available - go ahead and list them all - actButton->setMenu( new QMenu(this) ); - for(int i=0; iactions.length(); i++){ - QAction *act = new QAction(LXDG::findIcon(app->actions[i].icon, app->icon), app->actions[i].name, this); - act->setToolTip(app->actions[i].ID); - act->setWhatsThis(app->actions[i].ID); - actButton->menu()->addAction(act); - } - connect(actButton->menu(), SIGNAL(triggered(QAction*)), this, SLOT(actionClicked(QAction*)) ); - connect(actButton->menu(), SIGNAL(aboutToShow()), this, SLOT(actionMenuOpen()) ); - connect(actButton->menu(), SIGNAL(aboutToHide()), this, SLOT(actionMenuClosed()) ); - connect(menureset, SIGNAL(timeout()), this, SLOT(resetmenuflag()) ); -} - -void UserItemWidget::buttonClicked(){ - button->setVisible(false); - if(button->whatsThis()=="add"){ - LDesktopUtils::addFavorite(icon->whatsThis()); - //QFile::link(icon->whatsThis(), QDir::homePath()+"/.lumina/favorites/"+icon->whatsThis().section("/",-1) ); - emit NewShortcut(); - }else if(button->whatsThis()=="remove"){ - if(linkPath.isEmpty()){ - //This is a desktop file - if(isDirectory){ - QProcess::startDetached("rm -r \""+icon->whatsThis()+"\""); - }else{ - QFile::remove(icon->whatsThis()); - } - //Don't emit the RemovedShortcut signal here - the automatic ~/Desktop watcher will see the change when finished - }else{ - LDesktopUtils::removeFavorite(icon->whatsThis()); //This is a favorite - emit RemovedShortcut(); - } - } -} - -void UserItemWidget::ItemClicked(){ - if(!linkPath.isEmpty()){ emit RunItem(linkPath); } - else{ emit RunItem(icon->whatsThis()); } -} - -void UserItemWidget::actionClicked(QAction *act){ - actButton->menu()->hide(); - QString cmd = "lumina-open -action \""+act->whatsThis()+"\" \"%1\""; - if(!linkPath.isEmpty()){ cmd = cmd.arg(linkPath); } - else{ cmd = cmd.arg(icon->whatsThis()); } - emit RunItem(cmd); -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.h deleted file mode 100644 index 0b212f10..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserItemWidget.h +++ /dev/null @@ -1,72 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This item widget manages a single file/directory -//=========================================== -#ifndef _LUMINA_PANEL_USER_ITEM_WIDGET_H -#define _LUMINA_PANEL_USER_ITEM_WIDGET_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -class UserItemWidget : public QFrame{ - Q_OBJECT -public: - UserItemWidget(QWidget *parent=0, QString itemPath="", QString type="unknown", bool goback=false); - UserItemWidget(QWidget *parent=0, XDGDesktop *item= 0); - ~UserItemWidget(); - - bool gooditem; -private: - QToolButton *button, *actButton; - QLabel *icon, *name; - bool isDirectory, isShortcut, menuopen; - QString linkPath; - QTimer *menureset; - - void createWidget(); - void setupButton(bool disable = false); - void setupActions(XDGDesktop*); - -private slots: - void buttonClicked(); - void ItemClicked(); - void actionClicked(QAction*); - //Functions to fix the submenu open/close issues - void actionMenuOpen(){ - if(menureset->isActive()){ menureset->stop(); } - menuopen = true; - } - void resetmenuflag(){ menuopen = false; } //tied to the "menureset" timer - void actionMenuClosed(){ menureset->start(); } - - -protected: - void mouseReleaseEvent(QMouseEvent *event){ - if(menuopen){ resetmenuflag(); } //skip this event if a submenu was open - else if(event->button() != Qt::NoButton){ ItemClicked(); } - } - -signals: - void NewShortcut(); - void RemovedShortcut(); - void RunItem(QString cmd); - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.cpp deleted file mode 100644 index a0ba8996..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.cpp +++ /dev/null @@ -1,393 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014-2015, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "UserWidget.h" -#include "ui_UserWidget.h" -#include "../../LSession.h" -#include "../../AppMenu.h" - -UserWidget::UserWidget(QWidget* parent) : QTabWidget(parent), ui(new Ui::UserWidget){ - ui->setupUi(this); - updatingfavs = false; - if(parent!=0){ parent->setMouseTracking(true); } - this->setMouseTracking(true); - sysapps = LSession::handle()->applicationMenu()->currentAppHash(); //get the raw info - - //Connect the signals/slots - connect(ui->tool_desktopsettings, SIGNAL(clicked()), this, SLOT(openDeskSettings()) ); - connect(ui->tool_config_screensaver, SIGNAL(clicked()), this, SLOT(openScreenSaverConfig()) ); - connect(ui->tool_config_screensettings, SIGNAL(clicked()), this, SLOT(openScreenConfig()) ); - connect(ui->tool_fav_apps, SIGNAL(clicked()), this, SLOT(FavChanged()) ); - connect(ui->tool_fav_files, SIGNAL(clicked()), this, SLOT(FavChanged()) ); - connect(ui->tool_fav_dirs, SIGNAL(clicked()), this, SLOT(FavChanged()) ); - connect(ui->combo_app_cats, SIGNAL(currentIndexChanged(int)), this, SLOT(updateApps()) ); - connect(ui->tool_home_gohome, SIGNAL(clicked()), this, SLOT(slotGoHome()) ); - connect(ui->tool_home_browse, SIGNAL(clicked()), this, SLOT(slotOpenDir()) ); - connect(ui->tool_home_search, SIGNAL(clicked()), this, SLOT(slotOpenSearch()) ); - connect(ui->tool_config_about, SIGNAL(clicked()), this, SLOT(openLuminaInfo()) ); - - //Setup the special buttons - connect(ui->tool_app_store, SIGNAL(clicked()), this, SLOT(openStore()) ); - connect(ui->tool_controlpanel, SIGNAL(clicked()), this, SLOT(openControlPanel()) ); - //connect(ui->tool_qtconfig, SIGNAL(clicked()), this, SLOT(openQtConfig()) ); - - lastUpdate = QDateTime(); //make sure it refreshes - - connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SLOT(UpdateMenu()) ); - connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(updateFavItems()) ); - QTimer::singleShot(10,this, SLOT(UpdateAll())); //make sure to load this once after initialization -} - -UserWidget::~UserWidget(){ -} - -//=========== -// PRIVATE -//=========== -void UserWidget::ClearScrollArea(QScrollArea *area){ - QWidget *wgt = area->takeWidget(); - wgt->deleteLater(); //delete the widget and all children - area->setWidget( new QWidget() ); //create a new widget in the scroll area - area->widget()->setContentsMargins(0,0,0,0); - QVBoxLayout *layout = new QVBoxLayout; - layout->setSpacing(2); - layout->setContentsMargins(3,1,3,1); - layout->setDirection(QBoxLayout::TopToBottom); - layout->setAlignment(Qt::AlignTop); - area->widget()->setLayout(layout); -} - -void UserWidget::SortScrollArea(QScrollArea *area){ - //qDebug() << "Sorting Scroll Area:"; - //Sort all the items in the scroll area alphabetically - QLayout *lay = area->widget()->layout(); - QStringList items; - for(int i=0; icount(); i++){ - items << lay->itemAt(i)->widget()->whatsThis().toLower(); - } - - items.sort(); - //qDebug() << " - Sorted Items:" << items; - for(int i=0; icount(); j++){ - //Find this item - if(lay->itemAt(j)->widget()->whatsThis().toLower()==items[i]){ - //Found it - now move it if necessary - //qDebug() << "Found Item:" << items[i] << i << j; - lay->addItem( lay->takeAt(j) ); - break; - } - } - } - -} - -QIcon UserWidget::rotateIcon(QIcon ico){ - //Rotate the given icon to appear vertical in the tab widget - QPixmap pix = ico.pixmap(32,32); - QTransform tran; - tran.rotate(+90); //For tabs on the left/West - pix = pix.transformed(tran); - ico = QIcon(pix); - return ico; -} - -//============ -// PRIVATE SLOTS -//============ -void UserWidget::UpdateAll(){ - ui->retranslateUi(this); - //Setup the Icons - // - favorites tab - this->setTabIcon(0, rotateIcon(LXDG::findIcon("folder-favorites","")) ); - this->setTabText(0,""); - // - apps tab - this->setTabIcon(1, rotateIcon(LXDG::findIcon("system-run","")) ); - this->setTabText(1,""); - // - home tab - this->setTabIcon(2, rotateIcon(LXDG::findIcon("user-home","")) ); - this->setTabText(2,""); - // - config tab - this->setTabIcon(3, rotateIcon(LXDG::findIcon("preferences-system","")) ); - this->setTabText(3,""); - ui->tool_fav_apps->setIcon( LXDG::findIcon("system-run","") ); - ui->tool_fav_dirs->setIcon( LXDG::findIcon("folder","") ); - ui->tool_fav_files->setIcon( LXDG::findIcon("document-multiple","") ); - ui->tool_desktopsettings->setIcon( LXDG::findIcon("preferences-desktop","") ); - ui->tool_config_screensaver->setIcon( LXDG::findIcon("preferences-desktop-screensaver","") ); - ui->tool_config_screensettings->setIcon( LXDG::findIcon("preferences-other","") ); - ui->tool_home_gohome->setIcon( LXDG::findIcon("go-home","") ); - ui->tool_home_browse->setIcon( LXDG::findIcon("document-open","") ); - ui->tool_home_search->setIcon( LXDG::findIcon("system-search","") ); - ui->tool_config_about->setIcon( LXDG::findIcon("lumina","") ); - - //Setup the special buttons - QString APPSTORE = LOS::AppStoreShortcut(); - if(QFile::exists(APPSTORE) && !APPSTORE.isEmpty()){ - //Now load the info - XDGDesktop store(APPSTORE); - bool ok = store.isValid(); - if(ok){ - ui->tool_app_store->setIcon( LXDG::findIcon(store.icon, "") ); - ui->tool_app_store->setText( store.name ); - } - ui->tool_app_store->setVisible(ok); //availability - }else{ - ui->tool_app_store->setVisible(false); //not available - } - QString CONTROLPANEL = LOS::ControlPanelShortcut(); - if(QFile::exists(CONTROLPANEL) && !CONTROLPANEL.isEmpty()){ - //Now load the info - XDGDesktop cpan(CONTROLPANEL); - bool ok = cpan.isValid(); - if(ok){ - ui->tool_controlpanel->setIcon( LXDG::findIcon(cpan.icon, "") ); - } - ui->tool_controlpanel->setVisible(ok); //availability - }else{ - ui->tool_controlpanel->setVisible(false); //not available - } - /*QString QTCONFIG = LOS::QtConfigShortcut(); - if(QFile::exists(QTCONFIG) && !QTCONFIG.isEmpty()){ - ui->tool_qtconfig->setVisible(true); - ui->tool_qtconfig->setIcon( LXDG::findIcon("preferences-desktop-theme","") ); - }else{ - ui->tool_qtconfig->setVisible(false); - }*/ - //Now update the menus - UpdateMenu(); -} - -void UserWidget::UpdateMenu(bool forceall){ - this->setCurrentWidget(ui->tab_fav); - ui->tool_fav_apps->setChecked(true); - ui->tool_fav_dirs->setChecked(false); - ui->tool_fav_files->setChecked(false); - cfav = 0; //favorite apps - FavChanged(); - QString cdir = ui->label_home_dir->whatsThis(); - if(cdir.isEmpty() || !QFile::exists(cdir)){ - //Directory deleted or nothing loaded yet - ui->label_home_dir->setWhatsThis(QDir::homePath()); - QTimer::singleShot(0,this, SLOT(updateHome()) ); - }else if( lastUpdate < QFileInfo(cdir).lastModified() || forceall){ - //Directory contents changed - reload it - QTimer::singleShot(0,this, SLOT(updateHome()) ); - } - if(lastUpdate < LSession::handle()->applicationMenu()->lastHashUpdate || lastUpdate.isNull() || forceall){ - updateAppCategories(); - QTimer::singleShot(0,this, SLOT(updateApps()) ); - } - lastUpdate = QDateTime::currentDateTime(); -} - -void UserWidget::LaunchItem(QString path, bool fix){ - if(!path.isEmpty()){ - qDebug() << "Launch Application:" << path; - if( fix && !path.startsWith("lumina-open") ){ LSession::LaunchApplication("lumina-open \""+path+"\""); } - else{ LSession::LaunchApplication(path); } - emit CloseMenu(); //so the menu container will close - } -} - -void UserWidget::FavChanged(){ - //uncheck the current item for a moment - int oldfav = cfav; - if(cfav==0){ ui->tool_fav_apps->setChecked(false); } - else if(cfav==1){ ui->tool_fav_dirs->setChecked(false); } - if(cfav==2){ ui->tool_fav_files->setChecked(false); } - //Now check what other item is now the only one checked - if(ui->tool_fav_apps->isChecked() && !ui->tool_fav_dirs->isChecked() && !ui->tool_fav_files->isChecked() ){ - cfav = 0; - }else if(!ui->tool_fav_apps->isChecked() && ui->tool_fav_dirs->isChecked() && !ui->tool_fav_files->isChecked() ){ - cfav = 1; - }else if(!ui->tool_fav_apps->isChecked() && !ui->tool_fav_dirs->isChecked() && ui->tool_fav_files->isChecked() ){ - cfav = 2; - }else{ - //Re-check the old item (something invalid) - ui->tool_fav_apps->setChecked(cfav==0); - ui->tool_fav_dirs->setChecked(cfav==1); - ui->tool_fav_files->setChecked(cfav==2); - } - updateFavItems(oldfav!=cfav); -} - -void UserWidget::updateFavItems(bool newfilter){ - if(updatingfavs){ return; } - updatingfavs = true; - //qDebug() << "Updating User Favorite Items"; - QStringList newfavs = LDesktopUtils::listFavorites(); - //qDebug() << "Favorites:" << newfavs; - if(lastHomeUpdate.isNull() || (QFileInfo(QDir::homePath()+"/Desktop").lastModified() > lastHomeUpdate) || newfavs!=favs ){ - favs = newfavs; - - homefiles = LSession::handle()->DesktopFiles(); - lastHomeUpdate = QDateTime::currentDateTime(); - }else if(!newfilter){ updatingfavs = false; return; } //nothing new to change - stop now - //qDebug() << " - Passed Smoke Test..."; - QStringList favitems; - //Remember for format for favorites: ::::[app/dir/]:::: - if(ui->tool_fav_apps->isChecked()){ - favitems = favs.filter("::::app::::"); - for(int i=0; itool_fav_dirs->isChecked()){ - favitems = favs.filter("::::dir::::"); - for(int i=0; iscroll_fav); - //qDebug() << " - Sorting Items"; - favitems.sort(); //sort them alphabetically - //qDebug() << " - Creating Items:" << favitems; - for(int i=0; iscroll_fav->widget(), favitems[i].section("::::",2,50), favitems[i].section("::::",1,1) ); - if(!it->gooditem){ it->deleteLater(); continue; } - ui->scroll_fav->widget()->layout()->addWidget(it); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - connect(it, SIGNAL(NewShortcut()), this, SLOT(updateFavItems()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(updateFavItems()) ); - QApplication::processEvents(); //keep the UI snappy - might be a number of these - } - SortScrollArea(ui->scroll_fav); - updatingfavs = false; - //qDebug() << " - Done"; -} - -//Apps Tab -void UserWidget::updateAppCategories(){ - ui->combo_app_cats->clear(); - QStringList cats = sysapps->keys(); - cats.sort(); - for(int i=0; icombo_app_cats->addItem( LXDG::findIcon(icon,""), name, cats[i] ); - } -} - -void UserWidget::updateApps(){ - if(ui->combo_app_cats->currentIndex() < 0){ return; } //no cat - QString cat = ui->combo_app_cats->itemData( ui->combo_app_cats->currentIndex() ).toString(); - QList items = sysapps->value(cat); - ClearScrollArea(ui->scroll_apps); - for(int i=0; iscroll_apps->widget(), items[i]); - ui->scroll_apps->widget()->layout()->addWidget(it); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); - connect(it, SIGNAL(NewShortcut()), this, SLOT(updateFavItems()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(updateFavItems()) ); - QApplication::processEvents(); //keep the UI snappy - might be a number of these - } -} - -//Home Tab -void UserWidget::updateHome(){ - qDebug() << "Update Home"; - ClearScrollArea(ui->scroll_home); - qDebug() << " - dir:" << ui->label_home_dir->whatsThis(); - QDir homedir(ui->label_home_dir->whatsThis()); - QStringList items; - if(QDir::homePath() == homedir.absolutePath()){ - ui->label_home_dir->setText(tr("Home")); - ui->tool_home_gohome->setVisible(false); - }else{ - qDebug() << " - Show the back button"; - ui->tool_home_gohome->setVisible(true); - ui->label_home_dir->setText( this->fontMetrics().elidedText(homedir.dirName(), Qt::ElideRight, ui->label_home_dir->width())); - //Now make sure to put a "go back" button at the top of the list - QString dir = ui->label_home_dir->whatsThis(); - if(dir.endsWith("/")){ dir.chop(1); } - dir.chop( dir.section("/",-1).length() ); - items << dir; - } - qDebug() << " - Load items"; - ui->label_home_dir->setToolTip(ui->label_home_dir->whatsThis()); - items << homedir.entryList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::Name | QDir::DirsFirst); - QString type = ""; - if(homedir.absolutePath() == QDir::homePath()+"/Desktop"){ type.append("-home"); }//internal code - for(int i=0; iscroll_home->widget(), items[i], "dir", true); } //go-back button - else{ it = new UserItemWidget(ui->scroll_home->widget(), homedir.absoluteFilePath(items[i]), type, false); } - qDebug() << " - Add to layout"; - ui->scroll_home->widget()->layout()->addWidget(it); - connect(it, SIGNAL(RunItem(QString)), this, SLOT(slotGoToDir(QString)) ); - connect(it, SIGNAL(NewShortcut()), this, SLOT(updateFavItems()) ); - connect(it, SIGNAL(RemovedShortcut()), this, SLOT(updateFavItems()) ); - qDebug() << " - process events"; - QApplication::processEvents(); //keep the UI snappy - may be a lot of these to load - } - qDebug() << " - Done"; -} - -void UserWidget::slotGoToDir(QString dir){ - if(!QFileInfo(dir).isDir()){ - LaunchItem(dir); - }else{ - ui->label_home_dir->setWhatsThis(dir); - updateHome(); - } -} - -void UserWidget::slotGoHome(){ - slotGoToDir(QDir::homePath()); -} - -void UserWidget::slotOpenDir(){ - LaunchItem(ui->label_home_dir->whatsThis()); -} - -void UserWidget::slotOpenSearch(){ - LaunchItem("lumina-search -dir \""+ui->label_home_dir->whatsThis()+"\"", false); //use command as-is -} - -void UserWidget::mouseMoveEvent( QMouseEvent *event){ - QTabBar *wid = tabBar(); - if(wid==0){ return; } //invalid widget found - QPoint relpos = wid->mapFromGlobal( this->mapToGlobal(event->pos()) ); - //qDebug() << "Mouse Move Event: " << event->pos().x() << event->pos().y() << relpos.x() << relpos.y() << wid->width() << wid->height(); - if(wid && wid->tabAt(relpos) != -1){ - qDebug() << " - Mouse over tab"; - this->setCurrentIndex( wid->tabAt(relpos) ); - } -} diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.h b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.h deleted file mode 100644 index 8b03c489..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.h +++ /dev/null @@ -1,101 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2014, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This panel plugin allows the user to quickly access user favorites and applications -//=========================================== -#ifndef _LUMINA_PANEL_USER_BUTTON_WIDGET_H -#define _LUMINA_PANEL_USER_BUTTON_WIDGET_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "UserItemWidget.h" - -#define SSAVER QString("xscreensaver-demo") - -namespace Ui{ - class UserWidget; -}; - -class UserWidget : public QTabWidget{ - Q_OBJECT -public: - UserWidget(QWidget *parent=0); - ~UserWidget(); - -public slots: - void UpdateAll(); //for re-translation/icon changes - void UpdateMenu(bool forceall = false); //for item changes - -private: - Ui::UserWidget *ui; - QHash > *sysapps; - QDateTime lastUpdate, lastHomeUpdate; - QStringList favs; - QFileInfoList homefiles; - int cfav; //current favorite category - void ClearScrollArea(QScrollArea *area); - void SortScrollArea(QScrollArea *area); - QIcon rotateIcon(QIcon); - bool updatingfavs; - -private slots: - void LaunchItem(QString path, bool fix = true); - - //Favorites Tab - void FavChanged(); //for ensuring radio-button-like behaviour - void updateFavItems(bool newfilter = true); //if false, will only update if filesystem changes - - //Apps Tab - void updateAppCategories(); - void updateApps(); - - //Home Tab - void updateHome(); - void slotGoToDir(QString dir); - void slotGoHome(); - void slotOpenDir(); - void slotOpenSearch(); - - //Slots for the special buttons - void openStore(){ - LaunchItem(LOS::AppStoreShortcut()); - } - void openControlPanel(){ - LaunchItem(LOS::ControlPanelShortcut()); - } - void openDeskSettings(){ - LaunchItem("lumina-config", false); - } - void openScreenSaverConfig(){ - LaunchItem(SSAVER, false); - } - void openScreenConfig(){ - LaunchItem("lumina-xconfig",false); - } - void openLuminaInfo(){ - LaunchItem("lumina-info",false); - } - -protected: - void mouseMoveEvent( QMouseEvent *event); - -signals: - void CloseMenu(); - -}; - -#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.ui b/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.ui deleted file mode 100644 index 9ef5af7e..00000000 --- a/src-qt5/core/lumina-desktop-unified/src-DE/panel-plugins/userbutton/UserWidget.ui +++ /dev/null @@ -1,593 +0,0 @@ - - - UserWidget - - - - 0 - 0 - 294 - 289 - - - - UserWidget - - - QTabWidget::West - - - 0 - - - - Favorites - - - Favorites - - - - 2 - - - 1 - - - 1 - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - - 30 - 30 - - - - ArrowCursor - - - Favorite Applications - - - Applications - - - - 20 - 20 - - - - true - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - - 30 - 30 - - - - Favorite Directories - - - Places - - - - 20 - 20 - - - - true - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - 0 - 0 - - - - - 30 - 30 - - - - Favorite FIles - - - Files - - - - 20 - 20 - - - - true - - - Qt::ToolButtonTextBesideIcon - - - true - - - - - - - - - true - - - - - 0 - 0 - 259 - 247 - - - - - - - - - - Apps - - - Applications - - - - 2 - - - 1 - - - 1 - - - 1 - - - 1 - - - - - - - - 0 - 0 - - - - - 0 - 30 - - - - 12 - - - - 20 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 30 - 30 - - - - - - - - 20 - 20 - - - - Qt::ToolButtonTextBesideIcon - - - - - - - - - true - - - - - 0 - 0 - 98 - 28 - - - - - - - - - - Home - - - Home Directory - - - - 2 - - - 1 - - - 1 - - - 1 - - - 1 - - - - - 4 - - - 1 - - - - - Search this Directory - - - - - - - 20 - 20 - - - - - - - - - 0 - 0 - - - - - 30 - 30 - - - - Open Directory - - - Browse - - - - 20 - 20 - - - - Qt::ToolButtonIconOnly - - - - - - - - 30 - 30 - - - - Go back to home directory - - - home - - - - 20 - 20 - - - - true - - - - - - - - 0 - 0 - - - - - 0 - 30 - - - - - 10 - 75 - true - - - - QFrame::NoFrame - - - <current dir> - - - Qt::AlignCenter - - - true - - - 0 - - - 0 - - - Qt::NoTextInteraction - - - - - - - - - true - - - - - 0 - 0 - 98 - 28 - - - - - - - - - - Config - - - Desktop Preferences - - - - - - - 0 - 0 - - - - Control Panel - - - - 20 - 20 - - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 0 - 0 - - - - Desktop Appearance/Plugins - - - - 20 - 20 - - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 0 - 0 - - - - Screen Configuration - - - - 20 - 20 - - - - Qt::ToolButtonTextBesideIcon - - - - - - - - 0 - 0 - - - - Screensaver Settings - - - - 20 - 20 - - - - Qt::ToolButtonTextBesideIcon - - - - - - - Qt::Vertical - - - - 243 - 162 - - - - - - - - Qt::Horizontal - - - - - - - - 0 - 0 - - - - About the Lumina Desktop - - - Qt::ToolButtonTextBesideIcon - - - - - - - - - -- cgit From 63d9e7138811314d5301fbc7a7b92305d19c0d49 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 28 Aug 2017 15:51:44 -0400 Subject: Come more work on compositing. Seems like there is a significant difference between my nvidia-based desktop and the Intel laptop. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 24 +++++++++++++++++------- src-qt5/core/libLumina/RootWindow.cpp | 4 ++-- src-qt5/core/lumina-desktop-unified/LSession.cpp | 3 ++- src-qt5/core/lumina-desktop-unified/main.cpp | 2 +- 4 files changed, 22 insertions(+), 11 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 41a036a2..3472c61e 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -43,7 +43,8 @@ void NativeEmbedWidget::syncWinSize(QSize sz){ else if(!sz.isValid()){ sz = this->size(); } //use the current widget size //qDebug() << "Sync Window Size:" << sz; //if(sz == winSize){ return; } //no change - QPoint pt= this->mapToGlobal(QPoint(0,0)); + QPoint pt(0,0); + if(!DISABLE_COMPOSITING){ pt = this->mapToGlobal(QPoint(0,0)); } const uint32_t valList[4] = {(uint32_t) pt.x(), (uint32_t) pt.y(), (uint32_t) sz.width(), (uint32_t) sz.height()}; const uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; xcb_configure_window(QX11Info::connection(), WIN->id(), mask, valList); @@ -68,14 +69,22 @@ void NativeEmbedWidget::showWindow(){ QImage NativeEmbedWidget::windowImage(QRect geom){ //Pull the XCB pixmap out of the compositing layer xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); - xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); - if(pix==0){ qDebug() << "Got blank pixmap!"; return QImage(); } + /*xcb_composite_get_overlay_window_reply_t *wreply = xcb_composite_get_overlay_window_reply( QX11Info::connection(), + xcb_composite_get_overlay_window_unchecked(QX11Info::connection(), WIN->id()), NULL); + if(wreply!=0){ + xcb_composite_name_window_pixmap(QX11Info::connection(), wreply->overlay_win, pix); + free(wreply); + }else{*/ + xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); + //} + if(pix==0){ qDebug() << "Got blank pixmap!"; return QImage(); } //Convert this pixmap into a QImage - xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, geom.x(), geom.y(), geom.width(), geom.height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); + xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, 0, 0, this->width(), this->height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); + //xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, geom.x(), geom.y(), geom.width(), geom.height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); if(ximg == 0){ qDebug() << "Got blank image!"; return QImage(); } QImage img(ximg->data, ximg->width, ximg->height, ximg->stride, QImage::Format_ARGB32_Premultiplied); - img = img.copy(); //detach this image from the XCB data structures + img = img.copy(); //detach this image from the XCB data structures before we clean them up xcb_image_destroy(ximg); //Cleanup the XCB data structures @@ -97,7 +106,6 @@ NativeEmbedWidget::NativeEmbedWidget(QWidget *parent) : QWidget(parent){ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ WIN = window; - //xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); //Now send the embed event to the app //qDebug() << " - send _XEMBED event"; @@ -117,7 +125,7 @@ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ //Now setup any redirects and return if(!DISABLE_COMPOSITING){ xcb_composite_redirect_window(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_MANUAL); //XCB_COMPOSITE_REDIRECT_[MANUAL/AUTOMATIC]); - xcb_composite_redirect_subwindows(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_MANUAL); //XCB_COMPOSITE_REDIRECT_[MANUAL/AUTOMATIC]); + xcb_composite_redirect_subwindows(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_MANUAL); //AUTOMATIC); //XCB_COMPOSITE_REDIRECT_[MANUAL/AUTOMATIC]); //Now create/register the damage handler // -- XCB (Note: The XCB damage registration is completely broken at the moment - 9/15/15, Ken Moore) @@ -128,6 +136,8 @@ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ Damage dmgID = XDamageCreate(QX11Info::display(), WIN->id(), XDamageReportRawRectangles); WIN->addDamageID( (uint) dmgID); //save this for later + }else{ + xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); } WIN->addFrameWinID(this->winId()); connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index b0d07600..996b8e01 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -220,11 +220,11 @@ void RootWindow::CloseWindow(WId win){ // === PROTECTED === void RootWindow::paintEvent(QPaintEvent *ev){ //qDebug() << "RootWindow: PaintEvent:" << ev->rect(); //<< QDateTime::currentDateTime()->toString(QDateTime::ShortDate); - QWidget::paintEvent(ev); + //QWidget::paintEvent(ev); bool found = false; QPainter painter(this); QRect geom = ev->rect(); - geom.adjust(-10,-10,10,10); //give it a few more pixels in each direction to repaint (noticing some issues in Qt 5.7.1) + geom.adjust(-100,-100,100,100); //give it a few more pixels in each direction to repaint (noticing some issues in Qt 5.7.1) for(int i=0; i("Qt::Key"); qRegisterMetaType< NativeWindow::Property >("NativeWindow::Property"); qRegisterMetaType< QList< NativeWindow::Property > >("QList"); + qRegisterMetaType< NativeWindowSystem::MouseButton >("NativeWindowSystem::MouseButton"); mediaObj = 0; //private object used for playing login/logout chimes if(this->isPrimaryProcess()){ @@ -289,7 +290,7 @@ void LSession::playAudioFile(QString filepath){ if( !QFile::exists(filepath) ){ return; } //Setup the audio output systems for the desktop if(DEBUG){ qDebug() << "Play Audio File"; } - if(mediaObj==0){ qDebug() << " - Initialize media player"; mediaObj = new QMediaPlayer(); } + if(mediaObj==0){ qDebug() << " - Initialize media player"; mediaObj = new QMediaPlayer(0,QMediaPlayer::LowLatency); } if(mediaObj !=0 ){ if(DEBUG){ qDebug() << " - starting playback:" << filepath; } mediaObj->setVolume(100); diff --git a/src-qt5/core/lumina-desktop-unified/main.cpp b/src-qt5/core/lumina-desktop-unified/main.cpp index ef15cfcd..ed2b9b4c 100644 --- a/src-qt5/core/lumina-desktop-unified/main.cpp +++ b/src-qt5/core/lumina-desktop-unified/main.cpp @@ -29,7 +29,7 @@ int main(int argc, char ** argv) setenv("DESKTOP_SESSION","Lumina",1); setenv("XDG_CURRENT_DESKTOP","Lumina",1); setenv("QT_NO_GLIB", "1", 1); //Disable the glib event loop within Qt at runtime (performance hit + bugs) - //unsetenv("QT_QPA_PLATFORMTHEME"); //causes issues with Lumina themes - not many people have this by default... + setenv("QT_QPA_PLATFORMTHEME", "lthemeengine",1); //causes issues with Lumina themes - not many people have this by default... unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); //need exact-pixel measurements (no fake scaling) //Startup the session -- cgit From dc193f9adcfbdfef928aa58bad14056a088243e5 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 29 Aug 2017 08:26:17 -0400 Subject: Fix up the location/detection of icon/cursor themes. They just changes it upstream to dump all of them in the same directory, so need to be careful about detecting them now. --- src-qt5/core/libLumina/LuminaThemes.cpp | 39 +++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 14 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaThemes.cpp b/src-qt5/core/libLumina/LuminaThemes.cpp index 85d43925..2d4aab53 100644 --- a/src-qt5/core/libLumina/LuminaThemes.cpp +++ b/src-qt5/core/libLumina/LuminaThemes.cpp @@ -72,7 +72,7 @@ QStringList LTHEME::availableSystemIcons(){ //returns: [name] for each item xdd << QString(getenv("XDG_DATA_DIRS")).split(":"); for(int i=0; i Date: Tue, 29 Aug 2017 09:51:16 -0400 Subject: Syncronize the icon theme option in lumina-config with lthemeengine. --- src-qt5/core/libLumina/LuminaThemes.cpp | 36 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaThemes.cpp b/src-qt5/core/libLumina/LuminaThemes.cpp index 2d4aab53..ddbc7b37 100644 --- a/src-qt5/core/libLumina/LuminaThemes.cpp +++ b/src-qt5/core/libLumina/LuminaThemes.cpp @@ -23,7 +23,7 @@ //#include "qxcbcursor.h" //needed to prod Qt to refresh the mouse cursor theme //#include -QStringList LTHEME::availableSystemThemes(){ +QStringList LTHEME::availableSystemThemes(){ //returns: [name::::path] for each item QDir dir(LOS::LuminaShare()+"themes"); QStringList list = dir.entryList(QStringList() <<"*.qss.template", QDir::Files, QDir::Name); @@ -31,7 +31,7 @@ QStringList LTHEME::availableSystemThemes(){ //Format the output entry [::::] list[i] = list[i].section(".qss.",0,0)+"::::"+dir.absoluteFilePath(list[i]); } - return list; + return list; } QStringList LTHEME::availableLocalThemes(){ //returns: [name::::path] for each item @@ -52,7 +52,7 @@ QStringList LTHEME::availableSystemColors(){ //returns: [name::::path] for each //Format the output entry [::::] list[i] = list[i].section(".qss.",0,0)+"::::"+dir.absoluteFilePath(list[i]); } - return list; + return list; } QStringList LTHEME::availableLocalColors(){ //returns: [name::::path] for each item @@ -62,7 +62,7 @@ QStringList LTHEME::availableLocalColors(){ //returns: [name::::path] for each //Format the output entry [::::] list[i] = list[i].section(".qss.",0,0)+"::::"+dir.absoluteFilePath(list[i]); } - return list; + return list; } QStringList LTHEME::availableSystemIcons(){ //returns: [name] for each item @@ -130,7 +130,7 @@ bool LTHEME::saveLocalTheme(QString name, QStringList contents){ bool LTHEME::saveLocalColors(QString name, QStringList contents){ QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/colors/"; if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); } - return LUtils::writeFile(localdir+name+".qss.colors", contents, true); + return LUtils::writeFile(localdir+name+".qss.colors", contents, true); } //Return the currently selected Theme/Colors/Icons @@ -140,21 +140,23 @@ QStringList LTHEME::currentSettings(){ //returns [theme path, colorspath, iconsn for(int i=0; i tmp; - if(runmode == DesktopSettings::UserFull){ tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session << DesktopSettings::Desktop << DesktopSettings::Keys << DesktopSettings::Theme; } - else if(runmode == DesktopSettings::SystemInterface){ tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session << DesktopSettings::Desktop << DesktopSettings::Keys << DesktopSettings::Theme; } - for(int i=0; iaddPath(path); + if(runmode!=DesktopSettings::SystemFull){ + //Load the user-level files + tmp= filesForRunMode(runmode); + for(int i=0; iaddPath(path); + } } //Now load all the system-level files - tmp.clear(); - tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session << DesktopSettings::Desktop << DesktopSettings::Keys << DesktopSettings::Theme; + tmp = filesForRunMode(DesktopSettings::SystemFull); for(int i=0; i DesktopSettings::filesForRunMode(RunMode mode){ + // Note that the "System" file is always ignored here - that is specially loaded + QList< DesktopSettings::File > tmp; + if(mode == DesktopSettings::UserFull || mode == DesktopSettings::SystemFull){ + tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session << DesktopSettings::Desktop << DesktopSettings::Panels << DesktopSettings::Plugins << DesktopSettings::Keys << DesktopSettings::ContextMenu << DesktopSettings::Animation << DesktopSettings::ScreenSaver; + }else if(runmode == DesktopSettings::SystemInterface){ + tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session; + } + return tmp; +} + QString DesktopSettings::rel_path(DesktopSettings::File file){ QString name; switch(file){ @@ -236,10 +254,15 @@ QString DesktopSettings::rel_path(DesktopSettings::File file){ name="contextmenu"; break; case DesktopSettings::Keys: name="keys"; break; - case DesktopSettings::Theme: - name="theme"; break; case DesktopSettings::Animation: name="animations"; break; + case DesktopSettings::Panels: + name="panels"; break; + case DesktopSettings::Plugins: + name="plugins"; break; + case DesktopSettings::ScreenSaver: + name="screensaver"; break; + } return FILEPREFIX+name+".conf"; } diff --git a/src-qt5/core/libLumina/DesktopSettings.h b/src-qt5/core/libLumina/DesktopSettings.h index dcb10bb6..9bff6bc9 100644 --- a/src-qt5/core/libLumina/DesktopSettings.h +++ b/src-qt5/core/libLumina/DesktopSettings.h @@ -25,7 +25,8 @@ class DesktopSettings : public QObject{ Q_OBJECT public: - enum File{ System, Favorites, Environment, Session, Desktop, ContextMenu, Keys, Theme, Animation }; + enum File{ System, Favorites, Environment, Session, Desktop, Panels, Plugins, ContextMenu, Keys, Animation, ScreenSaver}; + //Changes to this enum need to be added to the "filesForRunMode()" and "rel_path()" functions as well DesktopSettings(QObject *parent = 0); ~DesktopSettings(); @@ -37,6 +38,7 @@ public: void stop(); //Main Read/Write functions + QList< DesktopSettings::File > writableFiles(); //return the list of all writable files QVariant value(DesktopSettings::File, QString variable, QVariant defaultvalue); bool setValue(DesktopSettings::File, QString variable, QVariant value); QStringList keys(DesktopSettings::File); //return a list of all variables which are available in this file @@ -51,9 +53,13 @@ private: QHash< DesktopSettings::File, QStringList > files; //location hash for where files are actually located on disk QHash< QString, QSettings*> settings; //location hash for the settings files themselves + //Functions void parseSystemSettings(); //run at start - determine the RunMode for this user/session void locateFiles(); //run at start - finds the locations of the various files (based on RunMode) void touchFile(QString path); //used to create an empty file so it can be watched for changes later + + //The two functions which define the public "File" enumeration (both need updates when the enum changes) + QList< DesktopSettings::File > filesForRunMode(RunMode mode); QString rel_path(DesktopSettings::File); //return the relative file path (starting with "/") private slots: -- cgit From fca13b7dd02f5445e0523cb7736abcd91c7b2864 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 29 Aug 2017 13:08:26 -0400 Subject: Start getting the Root context menu all moved over from Lumina 1 to 2. Not quite finished yet. --- src-qt5/core/libLumina/LuminaXDG.cpp | 159 ++++++++++++++++----- src-qt5/core/libLumina/LuminaXDG.h | 11 +- src-qt5/core/lumina-desktop-unified/LSession.cpp | 2 +- .../src-desktop/ContextMenu.cpp | 53 +++++-- .../src-desktop/ContextMenu.h | 7 +- 5 files changed, 177 insertions(+), 55 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 01b3305e..dea1938b 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -44,7 +44,7 @@ void XDGDesktop::sync(){ //Get the current localization code type = XDGDesktop::APP; //assume this initially if we read the file properly QString lang = QLocale::system().name(); //lang code - QString slang = lang.section("_",0,0); //short lang code + QString slang = lang.section("_",0,0); //short lang code //Now start looping over the information XDGDesktopAction CDA; //current desktop action bool insection=false; @@ -53,14 +53,14 @@ void XDGDesktop::sync(){ QString line = file[i]; //if(filePath.contains("pcbsd")){ qDebug() << " - Check Line:" << line << inaction << insection; } //Check if this is the end of a section - if(line.startsWith("[") && inaction){ + if(line.startsWith("[") && inaction){ insection=false; inaction=false; //Add the current Action structure to the main desktop structure if appropriate if(!CDA.ID.isEmpty()){ actions << CDA; CDA = XDGDesktopAction(); } }else if(line.startsWith("[")){ insection=false; inaction = false; } //Now check if this is the beginning of a section if(line=="[Desktop Entry]"){ insection=true; continue; } - else if(line.startsWith("[Desktop Action ")){ + else if(line.startsWith("[Desktop Action ")){ //Grab the ID of the action out of the label CDA.ID = line.section("]",0,0).section("Desktop Action",1,1).simplified(); inaction = true; @@ -73,7 +73,7 @@ void XDGDesktop::sync(){ var = var.section("[",0,0).simplified(); //remove the localization QString val = line.section("=",1,50).simplified(); //------------------- - if(var=="Name"){ + if(var=="Name"){ if(insection){ if(name.isEmpty() && loc.isEmpty()){ name = val; } else if(name.isEmpty() && loc==slang){ name = val; } //short locale code @@ -81,18 +81,18 @@ void XDGDesktop::sync(){ }else if(inaction){ if(CDA.name.isEmpty() && loc.isEmpty()){ CDA.name = val; } else if(CDA.name.isEmpty() && loc==slang){ CDA.name = val; } //short locale code - else if(loc == lang){ CDA.name = val; } + else if(loc == lang){ CDA.name = val; } } //hasName = true; - }else if(var=="GenericName" && insection){ + }else if(var=="GenericName" && insection){ if(genericName.isEmpty() && loc.isEmpty()){ genericName = val; } else if(genericName.isEmpty() && loc==slang){ genericName = val; } //short locale code else if(loc == lang){ genericName = val; } - }else if(var=="Comment" && insection){ + }else if(var=="Comment" && insection){ if(comment.isEmpty() && loc.isEmpty()){ comment = val; } else if(comment.isEmpty() && loc==slang){ comment = val; } //short locale code else if(loc == lang){ comment = val; } - }else if(var=="Icon"){ + }else if(var=="Icon"){ if(insection){ if(icon.isEmpty() && loc.isEmpty()){ icon = val; } else if(icon.isEmpty() && loc==slang){ icon = val; } //short locale code @@ -107,7 +107,7 @@ void XDGDesktop::sync(){ else if(var=="Exec"){ if(insection && exec.isEmpty() ){ exec = val; } else if(inaction && CDA.exec.isEmpty() ){ CDA.exec = val; } - } + } else if( (var=="Path") && (path.isEmpty() ) && insection){ path = val; } else if(var=="NoDisplay" && !isHidden && insection){ isHidden = (val.toLower()=="true"); } else if(var=="Hidden" && !isHidden && insection){ isHidden = (val.toLower()=="true"); } @@ -117,7 +117,7 @@ void XDGDesktop::sync(){ else if(var=="Terminal" && insection){ useTerminal= (val.toLower()=="true"); } else if(var=="Actions" && insection){ actionList = val.split(";",QString::SkipEmptyParts); } else if(var=="MimeType" && insection){ mimeList = val.split(";",QString::SkipEmptyParts); } - else if(var=="Keywords" && insection){ + else if(var=="Keywords" && insection){ if(keyList.isEmpty() && loc.isEmpty()){ keyList = val.split(";",QString::SkipEmptyParts); } else if(loc == lang){ keyList = val.split(";",QString::SkipEmptyParts); } } @@ -136,7 +136,7 @@ void XDGDesktop::sync(){ file.clear(); //done with contents of file //If there are OnlyShowIn desktops listed, add them to the name if( !showInList.isEmpty() && !showInList.contains("Lumina", Qt::CaseInsensitive) ){ - name.append(" ("+showInList.join(", ")+")"); + name.append(" ("+showInList.join(", ")+")"); } //Quick fix for showing "wine" applications (which quite often don't list a category, or have other differences) if(catList.isEmpty() && filePath.contains("/wine/")){ @@ -164,7 +164,7 @@ bool XDGDesktop::isValid(bool showAll){ //if(DEBUG){ qDebug() << "[LXDG] Check File validity:" << dFile.name << dFile.filePath; } switch (type){ case XDGDesktop::BAD: - ok=false; + ok=false; //if(DEBUG){ qDebug() << " - Bad file type"; } break; case XDGDesktop::APP: @@ -182,7 +182,7 @@ bool XDGDesktop::isValid(bool showAll){ break; default: ok=false; - //if(DEBUG){ qDebug() << " - Unknown file type"; } + //if(DEBUG){ qDebug() << " - Unknown file type"; } } if(!showAll){ QString cdesk = getenv("XDG_CURRENT_DESKTOP"); @@ -206,7 +206,7 @@ QString XDGDesktop::getDesktopExec(QString ActionID){ } } } - + if(out.isEmpty()){ return ""; } else if(useTerminal){ //Get the currently default terminal @@ -222,7 +222,7 @@ QString XDGDesktop::getDesktopExec(QString ActionID){ } //Now perform any of the XDG flag substitutions as appropriate (9/2014 standards) if(out.contains("%i") && !icon.isEmpty() ){ out.replace("%i", "--icon \""+icon+"\""); } - if(out.contains("%c")){ + if(out.contains("%c")){ if(!name.isEmpty()){ out.replace("%c", "\""+name+"\""); } else if(!genericName.isEmpty()){ out.replace("%c", "\""+genericName+"\""); } else{ out.replace("%c", "\""+filePath.section("/",-1).section(".desktop",0,0)+"\""); } @@ -250,17 +250,17 @@ QString XDGDesktop::generateExec(QStringList inputfiles, QString ActionID){ } } //Now to the exec replacements as needed - if(exec.contains("%f")){ + if(exec.contains("%f")){ if(inputfiles.isEmpty()){ exec.replace("%f",""); } else{ exec.replace("%f", "\""+inputfiles.first()+"\""); } //Note: can only take one input - }else if(exec.contains("%F")){ + }else if(exec.contains("%F")){ if(inputfiles.isEmpty()){ exec.replace("%F",""); } else{ exec.replace("%F", "\""+inputfiles.join("\" \"")+"\""); } } - if(exec.contains("%u")){ + if(exec.contains("%u")){ if(inputfiles.isEmpty()){ exec.replace("%u",""); } else{ exec.replace("%u", "\""+inputfiles.first()+"\""); } //Note: can only take one input - }else if(exec.contains("%U")){ + }else if(exec.contains("%U")){ if(inputfiles.isEmpty()){ exec.replace("%U",""); } else{ exec.replace("%U", "\""+inputfiles.join("\" \"")+"\""); } } @@ -281,7 +281,7 @@ bool XDGDesktop::saveDesktopFile(bool merge){ info = LUtils::readFile(filePath); //set a couple flags based on the contents before we start iterating through // - determine if a translated field was changed (need to remove all the now-invalid translations) - bool clearName, clearComment, clearGName; + bool clearName, clearComment, clearGName; QString tmp = ""; if(!info.filter("Name=").isEmpty()){ tmp = info.filter("Name=").first().section("=",1,50); } clearName=(tmp!=name); @@ -294,13 +294,13 @@ bool XDGDesktop::saveDesktopFile(bool merge){ //Now start iterating through the file and changing fields as necessary bool insection = false; for(int i=0; iname, topmenu); + act->setIcon(LXDG::findIcon(this->icon, "")); + act->setToolTip(this->comment); + act->setWhatsThis(this->filePath); + topmenu->addAction(act); + }else{ + //This app has additional actions - make this a sub menu + // - first the main menu/action + QMenu *submenu = new QMenu(this->name, topmenu); + submenu->setIcon( LXDG::findIcon(this->icon,"") ); + //This is the normal behavior - not a special sub-action (although it needs to be at the top of the new menu) + QAction *act = new QAction(this->name, submenu); + act->setIcon(LXDG::findIcon(this->icon, "")); + act->setToolTip(this->comment); + act->setWhatsThis(this->filePath); + submenu->addAction(act); + //Now add entries for every sub-action listed + for(int sa=0; saactions.length(); sa++){ + QAction *sact = new QAction( this->actions[sa].name, this); + sact->setIcon(LXDG::findIcon( this->actions[sa].icon, this->icon)); + sact->setToolTip(this->comment); + sact->setWhatsThis("-action \""+this->actions[sa].ID+"\" \""+this->filePath+"\""); + submenu->addAction(sact); + } + topmenu->addMenu(submenu); + } +} + + //====XDGDesktopList Functions ==== XDGDesktopList::XDGDesktopList(QObject *parent, bool watchdirs) : QObject(parent){ synctimer = new QTimer(this); //interval set automatically based on changes/interactions @@ -462,6 +494,14 @@ XDGDesktopList::~XDGDesktopList(){ //nothing special to do here } +XDGDesktopList* XDGDesktopList::instance(){ + static XDGDesktopList *APPLIST = 0; + if(APPLIST==0){ + APPLIST = new XDGDesktopList(0, true); + } + return APPLIST; +} + void XDGDesktopList::watcherChanged(){ if(synctimer->isActive()){ synctimer->stop(); } synctimer->setInterval(1000); //1 second delay before check kicks off @@ -484,7 +524,7 @@ void XDGDesktopList::updateList(){ apps = dir.entryList(QStringList() << "*.desktop",QDir::Files, QDir::Name); for(int a=0; alastRead>QFileInfo(path).lastModified()) ){ + if(files.contains(path) && (files.value(path)->lastRead>QFileInfo(path).lastModified()) ){ //Re-use previous data for this file (nothing changed) found << files[path]->name; //keep track of which files were already found }else{ @@ -503,7 +543,7 @@ void XDGDesktopList::updateList(){ } //end loop over apps } //end loop over appDirs //Save the extra info to the internal lists - if(!firstrun){ + if(!firstrun){ removedApps = oldkeys;//files which were removed newApps = newfiles; //files which were added } @@ -539,6 +579,51 @@ QList XDGDesktopList::apps(bool showAll, bool showHidden){ return out; } +XDGDesktop* XDGDesktopList::findAppFile(QString filename){ + QStringList keys = files.keys().filter(filename); + QString chk = filename.section("/",-1); + for(int i=0; iclear(); + if(byCategory){ + QHash > APPS = LXDG::sortDesktopCats( this->apps(false,false) ); + QStringList cats = APPS.keys(); + cats.sort(); //make sure they are alphabetical + for(int i=0; isetIcon(LXDG::findIcon(icon,"")); + QList appL = APPS.value(cats[i]); + for( int a=0; aaddToMenu(menu); } + } //end loop over cats + }else{ + QList APPS = this->apps(false, false); + for(int i=0; iaddToMenu(topmenu); } + } +} + //==== LFileInfo Functions ==== //Need some extra information not usually available by a QFileInfo void LFileInfo::loadExtraInfo(){ diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index cc250c7e..d0f3426f 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -28,7 +28,8 @@ #include #include #include - +#include +#include // ====================== // FreeDesktop Desktop Actions Framework (data structure) @@ -82,6 +83,9 @@ public: bool saveDesktopFile(bool merge = true); //This will use the "filePath" variable for where to save the file bool setAutoStarted(bool autostart = true); + + //Create a menu entry for this application + void addToMenu(QMenu*); }; // ======================== @@ -93,8 +97,13 @@ public: //Functions XDGDesktopList(QObject *parent = 0, bool watchdirs = false); ~XDGDesktopList(); + + static XDGDesktopList* instance(); + //Main Interface functions QList apps(bool showAll, bool showHidden); //showAll: include invalid files, showHidden: include NoShow/Hidden files + XDGDesktop* findAppFile(QString filename); + void populateMenu(QMenu *, bool byCategory = true); //Administration variables (not typically used directly) QDateTime lastCheck; diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index ef1e2828..b7ea2fe1 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -54,7 +54,7 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu Lumina::NWS->moveToThread(Lumina::EVThread); Lumina::EVThread->start(); Lumina::ROOTWIN = new RootWindow(); - Lumina::APPLIST = new XDGDesktopList(0, true); //keep this list up to date + Lumina::APPLIST = XDGDesktopList::instance(); Lumina::SHORTCUTS = new LShortcutEvents(); //this can be moved to it's own thread eventually as well setupGlobalConnections(); diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp index c3e9a1db..ec470d48 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp @@ -8,36 +8,39 @@ #include void DesktopContextMenu::SettingsChanged(DesktopSettings::File file){ - if(file == DesktopSettings::ContextMenu){ UpdateMenu(); } + if(file == DesktopSettings::ContextMenu){ UpdateMenu(false); } } -void DesktopContextMenu::UpdateMenu(){ +void DesktopContextMenu::UpdateMenu(bool fast){ //Put a label at the top unsigned int num = Lumina::NWS->currentWorkspace(); workspaceLabel->setText( ""+QString(tr("Workspace %1")).arg(QString::number(num+1))+""); + if(fast && usewinmenu){ updateWinMenu(); } + if(fast){ return; } //already done this->clear(); //clear it for refresh this->addAction(wkspaceact); this->addSeparator(); //Now load the user's menu setup and fill the menu - QStringList items = DesktopSettings::instance()->value(DesktopSettings::ContextMenu, "itemlist", QStringList()<< "terminal" << "filemanager" << "line" << "settings" <<"lockdesktop").toStringList(); - //usewinmenu=false; + QStringList items = DesktopSettings::instance()->value(DesktopSettings::ContextMenu, "itemlist", QStringList()<< "terminal" << "filemanager" << "line" << "applications" << "windowlist" << "settings" << "lockdesktop").toStringList(); + usewinmenu=false; for(int i=0; iaddAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"))->setWhatsThis("lumina-open -terminal"); } else if(items[i]=="lockdesktop"){ this->addAction(LXDG::findIcon("system-lock-screen",""), tr("Lock Session"), this, SIGNAL(LockSession()) ); } else if(items[i]=="filemanager"){ this->addAction( LXDG::findIcon("user-home",""), tr("Browse Files"))->setWhatsThis("lumina-open \""+QDir::homePath()+"\""); } - //else if(items[i]=="applications"){ this->addMenu( LSession::handle()->applicationMenu() ); } + else if(items[i]=="applications"){ this->addMenu( appMenu ); } else if(items[i]=="line"){ this->addSeparator(); } //else if(items[i]=="settings"){ this->addMenu( LSession::handle()->settingsMenu() ); } - //else if(items[i]=="windowlist"){ this->addMenu( winMenu); usewinmenu=true;} + else if(items[i]=="windowlist"){ updateWinMenu(); this->addMenu( winMenu); usewinmenu=true; } else if(items[i].startsWith("app::::") && items[i].endsWith(".desktop")){ //Custom *.desktop application QString file = items[i].section("::::",1,1).simplified(); - XDGDesktop xdgf(file);// = LXDG::loadDesktopFile(file, ok); - if(xdgf.type!=XDGDesktop::BAD){ - this->addAction( LXDG::findIcon(xdgf.icon,""), xdgf.name)->setWhatsThis("lumina-open \""+file+"\""); - }else{ - qDebug() << "Could not load application file:" << file; - } + //Try to use the pre-loaded app entry for this + XDGDesktop *xdg = XDGDesktopList::instance()->findAppFile(file); + if(xdg!=0){ xdg->addToMenu(this); } + else{ + XDGDesktop xdgf(file);// = LXDG::loadDesktopFile(file, ok); + if(xdgf.type!=XDGDesktop::BAD){ xdgf.addToMenu(this); } + } }/*else if(items[i].startsWith("jsonmenu::::")){ //Custom JSON menu system (populated on demand via external scripts/tools QStringList info = items[i].split("::::"); //FORMAT:[ "jsonmenu",exec,name, icon(optional)] @@ -62,11 +65,15 @@ DesktopContextMenu::DesktopContextMenu(QWidget *parent) : QMenu(parent){ parent->setContextMenuPolicy(Qt::CustomContextMenu); connect(parent, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(showMenu(const QPoint&)) ); } + appMenu = 0; + winMenu = 0; workspaceLabel = new QLabel(0); wkspaceact = new QWidgetAction(0); wkspaceact->setDefaultWidget(workspaceLabel); connect(this, SIGNAL(triggered(QAction*)), this, SLOT(LaunchAction(QAction*)) ); - + //Connect to a couple global objects + connect(XDGDesktopList::instance(), SIGNAL(appsUpdated()), this, SLOT(updateAppMenu()) ); + connect(this, SIGNAL(aboutToShow()), this, SLOT(UpdateMenu()) ); //this will do a "fast" update } DesktopContextMenu::~DesktopContextMenu(){ @@ -78,9 +85,8 @@ DesktopContextMenu::~DesktopContextMenu(){ void DesktopContextMenu::start(){ connect(DesktopSettings::instance(), SIGNAL(FileModified(DesktopSettings::File)), this, SLOT(SettingsChanged(DesktopSettings::File)) ); connect(this, SIGNAL(LockSession()), Lumina::SS, SLOT(LockScreenNow()) ); - + UpdateMenu(false); //Still need to connect to some "workspaceChanged(int)" signal - QTimer::singleShot(0, this, SLOT(UpdateMenu()) ); //initial update } // === PRIVATE SLOTS === @@ -95,3 +101,20 @@ void DesktopContextMenu::LaunchAction(QAction *act){ void DesktopContextMenu::showMenu(const QPoint &pt){ this->popup(pt); } + +void DesktopContextMenu::updateAppMenu(){ + if(appMenu==0){ + appMenu = new QMenu(this); + appMenu->setTitle( tr("Applications")); + appMenu->setIcon( LXDG::findIcon("system-run","") ); + } + XDGDesktopList::instance()->populateMenu(appMenu); +} + +void DesktopContextMenu::updateWinMenu(){ + if(winMenu==0){ + winMenu = new QMenu(this); + winMenu->setTitle( tr("Task Manager") ); + } +} + diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h index 7fd21967..31daa0a8 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h @@ -13,11 +13,13 @@ class DesktopContextMenu : public QMenu{ Q_OBJECT public slots: void SettingsChanged(DesktopSettings::File); - void UpdateMenu(); //re-create the menu + void UpdateMenu(bool fast = true); //re-create the menu private: QLabel *workspaceLabel; QWidgetAction *wkspaceact; + QMenu *appMenu, *winMenu; + bool usewinmenu; public: DesktopContextMenu(QWidget *parent = 0); @@ -29,6 +31,9 @@ private slots: void LaunchAction(QAction *act); void showMenu(const QPoint&); + void updateAppMenu(); + void updateWinMenu(); + signals: void LockSession(); void showLeaveDialog(); -- cgit From 8a96d2ba60a30a6cb0bebace3134dd65d0268b04 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 29 Aug 2017 15:54:30 -0400 Subject: Get a lot of the root context menu up and running. Now the application list is available and functional, plus the beginnings of the task manager plugin for the menu. --- src-qt5/core/libLumina/LuminaXDG.cpp | 2 + src-qt5/core/libLumina/RootWindow.cpp | 2 +- src-qt5/core/libLumina/XDGMime.cpp | 3 ++ src-qt5/core/lumina-desktop-unified/LSession.cpp | 44 +++++++++++-------- src-qt5/core/lumina-desktop-unified/LSession.h | 4 ++ .../core/lumina-desktop-unified/global-objects.h | 1 + .../src-desktop/ContextMenu.cpp | 50 ++++++++++++++++++---- .../src-desktop/ContextMenu.h | 2 + 8 files changed, 81 insertions(+), 27 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index dea1938b..c1e7e199 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -445,6 +445,7 @@ bool XDGDesktop::setAutoStarted(bool autostart){ } void XDGDesktop::addToMenu(QMenu *topmenu){ + if(!this->isValid()){ return; } if(actions.isEmpty()){ //Just a single entry point - no extra actions QAction *act = new QAction(this->name, topmenu); @@ -617,6 +618,7 @@ void XDGDesktopList::populateMenu(QMenu *topmenu, bool byCategory){ menu->setIcon(LXDG::findIcon(icon,"")); QList appL = APPS.value(cats[i]); for( int a=0; aaddToMenu(menu); } + topmenu->addMenu(menu); } //end loop over cats }else{ QList APPS = this->apps(false, false); diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index 996b8e01..952e246b 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -10,7 +10,7 @@ #include #include -#define DEBUG 1 +#define DEBUG 0 // === PUBLIC === RootWindow::RootWindow() : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint | Qt::WindowStaysOnBottomHint){ diff --git a/src-qt5/core/libLumina/XDGMime.cpp b/src-qt5/core/libLumina/XDGMime.cpp index 3983f6b5..cbbeff75 100644 --- a/src-qt5/core/libLumina/XDGMime.cpp +++ b/src-qt5/core/libLumina/XDGMime.cpp @@ -12,6 +12,9 @@ static QStringList mimeglobs; static qint64 mimechecktime; QString XDGMime::fromFileName(QString filename){ + if(QFile::exists(filename) && QFileInfo(filename).isDir()){ + return "inode/directory"; + } //Convert a filename into a mimetype return findAppMimeForFile(filename.section("/",-1),false); } diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index b7ea2fe1..e820e97b 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -11,7 +11,7 @@ #include "BootSplash.h" #ifndef DEBUG -#define DEBUG 0 +#define DEBUG 1 #endif //Initialize all the global objects to null pointers @@ -53,8 +53,8 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu Lumina::EVThread = new QThread(); Lumina::NWS->moveToThread(Lumina::EVThread); Lumina::EVThread->start(); - Lumina::ROOTWIN = new RootWindow(); Lumina::APPLIST = XDGDesktopList::instance(); + Lumina::ROOTWIN = new RootWindow(); Lumina::SHORTCUTS = new LShortcutEvents(); //this can be moved to it's own thread eventually as well setupGlobalConnections(); @@ -134,7 +134,7 @@ void LSession::setupSession(){ Lumina::ROOTWIN->start(); Lumina::NWS->setRoot_numberOfWorkspaces(QStringList() << "one" << "two"); Lumina::NWS->setRoot_currentWorkspace(0); - + if(DEBUG){ qDebug() << " - Create Desktop Context Menu"; } DesktopContextMenu *cmenu = new DesktopContextMenu(Lumina::ROOTWIN); connect(cmenu, SIGNAL(showLeaveDialog()), this, SLOT(StartLogout()) ); cmenu->start(); @@ -384,10 +384,28 @@ void LSession::StartReboot(bool skipupdates){ } void LSession::LaunchApplication(QString exec){ + qDebug() << "Launch Application:" << exec; ExternalProcess::launch(exec); } +void LSession::LaunchDesktopApplication(QString app, QString action){ + qDebug() << "Launch Desktop Application:" << app << action; + XDGDesktop *xdg = Lumina::APPLIST->findAppFile(app); + bool cleanup = false; + if(xdg==0){ + xdg = new XDGDesktop(app); + cleanup = true; + } + if(xdg->isValid()){ + QString exec = xdg->generateExec(QStringList(), action); + ExternalProcess::launch(exec, QStringList(), xdg->startupNotify); + } + + if(cleanup && xdg!=0){ xdg->deleteLater(); } +} + void LSession::LaunchStandardApplication(QString app, QStringList args){ + qDebug() << "Launch Standard Application:" << app << args; //Find/replace standardized apps with thier mimetypes if(app.startsWith("--")){ app = "application/"+app.section("--",-1).simplified(); } //First see if this is a mimetype with a default application @@ -395,24 +413,18 @@ void LSession::LaunchStandardApplication(QString app, QStringList args){ QString mimeapp = XDGMime::findDefaultAppForMime(app); if(!mimeapp.isEmpty()){ app = mimeapp; } } - if(app.endsWith(".desktop")){ + if(!app.endsWith(".desktop")){ + //actual command/binary - just launch it + ExternalProcess::launch(app, args, false); // do not use startup notify cursor + }else{ //Get the XDGDesktop structure XDGDesktop *desk = 0; bool cleanup = false; if(app.startsWith("/") && QFile::exists(app)){ desk = new XDGDesktop(app); cleanup = true; } - if(!desk->isValid()){ + if(desk==0 || !desk->isValid()){ //Need to find the app within the current list - QHashapplist = Lumina::APPLIST->files; if(cleanup){ desk->deleteLater(); desk = 0; cleanup = false; } app = app.section("/",-1); //make sure this is a relative path - QStringList list = applist.keys().filter("/"+app); - if(!list.filter(QDir::homePath()).isEmpty()){ desk = applist[list.filter(QDir::homePath()).first()]; } //prefer user-override files - if(desk==0 || !desk->isValid()){ - desk = 0; - for(int i=0; iisValid()){ desk = tmp; } - } - } + desk = Lumina::APPLIST->findAppFile(app); } if(desk!=0 && desk->isValid()){ //Got the application - go ahead and assemble the startup command @@ -420,8 +432,6 @@ void LSession::LaunchStandardApplication(QString app, QStringList args){ ExternalProcess::launch(exec, QStringList(), desk->startupNotify); } if(cleanup){ desk->deleteLater(); } - }else{ - ExternalProcess::launch(app, args, false); // do not use startup notify cursor } } diff --git a/src-qt5/core/lumina-desktop-unified/LSession.h b/src-qt5/core/lumina-desktop-unified/LSession.h index 85cc050c..61da559b 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.h +++ b/src-qt5/core/lumina-desktop-unified/LSession.h @@ -15,6 +15,9 @@ public: LSession(int &argc, char **argv); ~LSession(); + static LSession* instance(){ + return ( static_cast(QApplication::instance()) ); + } private: void CleanupSession(); void setupGlobalConnections(); @@ -33,6 +36,7 @@ public slots: void StartShutdown(bool skipupdates = false); void StartReboot(bool skipupdates = false); void LaunchApplication(QString exec); + void LaunchDesktopApplication(QString app, QString action = ""); void LaunchStandardApplication(QString app, QStringList args = QStringList()); void reloadIconTheme(); //will emit the IconThemeChanged signal when ready diff --git a/src-qt5/core/lumina-desktop-unified/global-objects.h b/src-qt5/core/lumina-desktop-unified/global-objects.h index 474412eb..0c990dc6 100644 --- a/src-qt5/core/lumina-desktop-unified/global-objects.h +++ b/src-qt5/core/lumina-desktop-unified/global-objects.h @@ -25,6 +25,7 @@ #include "src-screensaver/LScreenSaver.h" //#include "src-WM/LWindowManager.h" +#include "LSession.h" //Any special defines for settings/testing #define ANIMTIME 80 //animation time in milliseconds diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp index ec470d48..9206506d 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp @@ -24,14 +24,19 @@ void DesktopContextMenu::UpdateMenu(bool fast){ QStringList items = DesktopSettings::instance()->value(DesktopSettings::ContextMenu, "itemlist", QStringList()<< "terminal" << "filemanager" << "line" << "applications" << "windowlist" << "settings" << "lockdesktop").toStringList(); usewinmenu=false; for(int i=0; iaddAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"))->setWhatsThis("lumina-open -terminal"); } + if(items[i]=="terminal"){ this->addAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"))->setWhatsThis("--terminal"); } else if(items[i]=="lockdesktop"){ this->addAction(LXDG::findIcon("system-lock-screen",""), tr("Lock Session"), this, SIGNAL(LockSession()) ); } - else if(items[i]=="filemanager"){ this->addAction( LXDG::findIcon("user-home",""), tr("Browse Files"))->setWhatsThis("lumina-open \""+QDir::homePath()+"\""); } - else if(items[i]=="applications"){ this->addMenu( appMenu ); } - else if(items[i]=="line"){ this->addSeparator(); } + else if(items[i]=="filemanager"){ this->addAction( LXDG::findIcon("user-home",""), tr("Browse Files"))->setWhatsThis(QDir::homePath()); } + else if(items[i]=="applications"){ + if(appMenu==0){ updateAppMenu(); } + this->addMenu( appMenu ); + }else if(items[i]=="line"){ this->addSeparator(); } //else if(items[i]=="settings"){ this->addMenu( LSession::handle()->settingsMenu() ); } - else if(items[i]=="windowlist"){ updateWinMenu(); this->addMenu( winMenu); usewinmenu=true; } - else if(items[i].startsWith("app::::") && items[i].endsWith(".desktop")){ + else if(items[i]=="windowlist"){ + if(winMenu==0){ updateWinMenu(); } + this->addMenu( winMenu); + usewinmenu=true; + }else if(items[i].startsWith("app::::") && items[i].endsWith(".desktop")){ //Custom *.desktop application QString file = items[i].section("::::",1,1).simplified(); //Try to use the pre-loaded app entry for this @@ -67,13 +72,14 @@ DesktopContextMenu::DesktopContextMenu(QWidget *parent) : QMenu(parent){ } appMenu = 0; winMenu = 0; + usewinmenu = false; workspaceLabel = new QLabel(0); wkspaceact = new QWidgetAction(0); wkspaceact->setDefaultWidget(workspaceLabel); connect(this, SIGNAL(triggered(QAction*)), this, SLOT(LaunchAction(QAction*)) ); //Connect to a couple global objects - connect(XDGDesktopList::instance(), SIGNAL(appsUpdated()), this, SLOT(updateAppMenu()) ); connect(this, SIGNAL(aboutToShow()), this, SLOT(UpdateMenu()) ); //this will do a "fast" update + qDebug() << "Done Creating Context Menu"; } DesktopContextMenu::~DesktopContextMenu(){ @@ -85,6 +91,7 @@ DesktopContextMenu::~DesktopContextMenu(){ void DesktopContextMenu::start(){ connect(DesktopSettings::instance(), SIGNAL(FileModified(DesktopSettings::File)), this, SLOT(SettingsChanged(DesktopSettings::File)) ); connect(this, SIGNAL(LockSession()), Lumina::SS, SLOT(LockScreenNow()) ); + connect(XDGDesktopList::instance(), SIGNAL(appsUpdated()), this, SLOT(updateAppMenu()) ); UpdateMenu(false); //Still need to connect to some "workspaceChanged(int)" signal } @@ -95,7 +102,29 @@ void DesktopContextMenu::LaunchAction(QAction *act){ if(act->whatsThis().isEmpty() || act->parent()!=this ){ return; } qDebug() << "Launch Menu Action:" << act->whatsThis(); QString cmd = act->whatsThis(); - ExternalProcess::launch(cmd); + if(cmd.startsWith("-action ")){ + LaunchApp(act); //forward this to the XDGDesktop parser + }else if(cmd.startsWith("--") || cmd.endsWith(".desktop")){ + LSession::instance()->LaunchStandardApplication(cmd); + }else if(QFile::exists(cmd)){ + QString mime = XDGMime::fromFileName(cmd); + LSession::instance()->LaunchStandardApplication(mime, QStringList() << cmd); + } +} + +void DesktopContextMenu::LaunchApp(QAction *act){ + + // The "whatsThis() field is set by the XDGDesktop object/format + if(act->whatsThis().isEmpty()){ return; } + QString action, file; + QString wt = act->whatsThis(); + if(wt.startsWith("-action")){ + action = wt.section(" ",1,1); action=action.remove("\""); + file = wt.section(" ",2,-1); file=file.remove("\""); + } + else{ file = wt; } + LSession::instance()->LaunchDesktopApplication(file, action); + } void DesktopContextMenu::showMenu(const QPoint &pt){ @@ -103,18 +132,21 @@ void DesktopContextMenu::showMenu(const QPoint &pt){ } void DesktopContextMenu::updateAppMenu(){ + //qDebug() << "Update App Menu"; if(appMenu==0){ appMenu = new QMenu(this); appMenu->setTitle( tr("Applications")); appMenu->setIcon( LXDG::findIcon("system-run","") ); + connect(appMenu, SIGNAL(triggered(QAction*)), this, SLOT(LaunchApp(QAction*)) ); } + //qDebug() << "Populate App Menu"; XDGDesktopList::instance()->populateMenu(appMenu); } void DesktopContextMenu::updateWinMenu(){ + //qDebug() << "Update Win Menu"; if(winMenu==0){ winMenu = new QMenu(this); winMenu->setTitle( tr("Task Manager") ); } } - diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h index 31daa0a8..ee6fdcc9 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h @@ -29,6 +29,8 @@ public: private slots: void LaunchAction(QAction *act); + void LaunchApp(QAction *act); + void showMenu(const QPoint&); void updateAppMenu(); -- cgit From 27713d3ea490ac1b6919f929ef248ab148229873 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 29 Aug 2017 18:50:59 -0400 Subject: Make sure the context menu label is center-aligned --- .../lumina-desktop-unified/defaults/compton.conf | 89 ---------------------- .../defaults/desktop/keys.conf | 2 - .../src-desktop/ContextMenu.cpp | 1 + 3 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 src-qt5/core/lumina-desktop-unified/defaults/compton.conf (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/defaults/compton.conf b/src-qt5/core/lumina-desktop-unified/defaults/compton.conf deleted file mode 100644 index a14fee29..00000000 --- a/src-qt5/core/lumina-desktop-unified/defaults/compton.conf +++ /dev/null @@ -1,89 +0,0 @@ -# Shadow -shadow = true; -no-dnd-shadow = true; -no-dock-shadow = true; -clear-shadow = true; -shadow-radius = 5; -shadow-offset-x = -5; -shadow-offset-y = -5; -# shadow-opacity = 0.7; -# shadow-red = 0.0; -# shadow-green = 0.0; -# shadow-blue = 0.0; -shadow-exclude = [ - "name = 'Notification'", - "class_g = 'Conky'", - "class_g ?= 'Notify-osd'", - "class_g = 'Cairo-clock'", - "_GTK_FRAME_EXTENTS@:c" -]; -# shadow-exclude = "n:e:Notification"; -# shadow-exclude-reg = "x10+0+0"; -# xinerama-shadow-crop = true; - -# Opacity -menu-opacity = 0.9; -inactive-opacity = 0.9; -# active-opacity = 0.8; -frame-opacity = 1.0; -inactive-opacity-override = false; -alpha-step = 0.06; -# inactive-dim = 0.2; -# inactive-dim-fixed = true; -# blur-background = true; -# blur-background-frame = true; -blur-kern = "3x3box" -# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" -# blur-background-fixed = true; -blur-background-exclude = [ - "window_type = 'dock'", - "window_type = 'desktop'", - "_GTK_FRAME_EXTENTS@:c" -]; -# opacity-rule = [ "80:class_g = 'URxvt'" ]; - -# Fading -fading = true; -# fade-delta = 30; -fade-in-step = 0.2; -fade-out-step = 0.2; -# no-fading-openclose = true; -# no-fading-destroyed-argb = true; -fade-exclude = [ ]; - -# Other -backend = "xrender" -mark-wmwin-focused = true; -mark-ovredir-focused = true; -# use-ewmh-active-win = true; -detect-rounded-corners = true; -detect-client-opacity = true; -refresh-rate = 0; -vsync = "none"; -dbe = false; -paint-on-overlay = true; -# sw-opti = true; -# unredir-if-possible = true; -# unredir-if-possible-delay = 5000; -# unredir-if-possible-exclude = [ ]; -focus-exclude = [ "class_g = 'Cairo-clock'" ]; -detect-transient = true; -detect-client-leader = true; -invert-color-include = [ ]; -# resize-damage = 1; - -# GLX backend -# glx-no-stencil = true; -glx-copy-from-front = false; -# glx-use-copysubbuffermesa = true; -# glx-no-rebind-pixmap = true; -glx-swap-method = "undefined"; -# glx-use-gpushader4 = true; -# xrender-sync = true; -# xrender-sync-fence = true; - -# Window type settings -wintypes: -{ - tooltip = { fade = true; shadow = true; opacity = 0.85; focus = true; }; -}; diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf index 59959194..1a993ca3 100644 --- a/src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/keys.conf @@ -2,7 +2,5 @@ Ctrl+Alt+Backspace=Logout Pause=Lockscreen Alt+L=Lockscreen - -[desktop] Alt+F1=Launch: --terminal Print=Launch: --screenshot diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp index 9206506d..1b5512ff 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp @@ -74,6 +74,7 @@ DesktopContextMenu::DesktopContextMenu(QWidget *parent) : QMenu(parent){ winMenu = 0; usewinmenu = false; workspaceLabel = new QLabel(0); + workspaceLabel->setAlignment(Qt::AlignCenter); wkspaceact = new QWidgetAction(0); wkspaceact->setDefaultWidget(workspaceLabel); connect(this, SIGNAL(triggered(QAction*)), this, SLOT(LaunchAction(QAction*)) ); -- cgit From 50384966b759498167365867d49a5df120b1fe26 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 30 Aug 2017 05:22:30 -0400 Subject: Clean up the use of the settings files within the entire screensaver system. Also fix some minor whitespace/alignment in code, and add fallback routines to a couple screensavers which need external files (so they don't crash if nothing was setup or a directory is empty) --- .../src-screensaver/LScreenSaver.cpp | 18 +++-- .../src-screensaver/LScreenSaver.h | 1 - .../src-screensaver/SSBaseWidget.cpp | 9 ++- .../src-screensaver/SSBaseWidget.h | 3 +- .../src-screensaver/animations/BaseAnimGroup.cpp | 26 ++++--- .../src-screensaver/animations/BaseAnimGroup.h | 10 +-- .../src-screensaver/animations/Fireflies.h | 6 +- .../src-screensaver/animations/Grav.h | 10 +-- .../src-screensaver/animations/ImageSlideshow.h | 81 +++++++++++----------- .../src-screensaver/animations/SampleAnimation.h | 2 +- .../src-screensaver/animations/Text.h | 12 ++-- .../src-screensaver/animations/VideoSlideshow.h | 44 ++++++------ 12 files changed, 119 insertions(+), 103 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp index 39a7b596..ff63e3a3 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp @@ -8,7 +8,7 @@ #include #include -#define DEBUG 1 +#define DEBUG 0 LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::WindowStaysOnTopHint){ starttimer = new QTimer(this); @@ -20,7 +20,6 @@ LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::Windo LOCKER = new LLockScreen(this); LOCKER->hide(); - settings = new QSettings("lumina-desktop","lumina-screensaver",this); SSRunning = SSLocked = updating = false; this->setObjectName("LSCREENSAVERBASE"); this->setStyleSheet("LScreenSaver#LSCREENSAVERBASE{ background: grey; }"); @@ -60,10 +59,9 @@ void LScreenSaver::start(){ } void LScreenSaver::reloadSettings(){ - settings->sync(); - starttimer->setInterval( settings->value("timedelaymin",10).toInt() * 60000 ); - locktimer->setInterval( settings->value("lockdelaymin",1).toInt() * 60000 ); - hidetimer->setInterval( settings->value("hidesecs",15).toInt() * 1000 ); + starttimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "timedelaymin",10).toInt() * 60000 ); + locktimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "lockdelaymin",1).toInt() * 60000 ); + hidetimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "hidesecs",15).toInt() * 1000 ); } void LScreenSaver::newInputEvent(){ @@ -107,12 +105,12 @@ void LScreenSaver::ShowScreenSaver(){ for(int i=0; igeometry()); if(DEBUG){ qDebug() << " - New SS Base:" << i; } - BASES << new SSBaseWidget(this, settings); + BASES << new SSBaseWidget(this); connect(BASES[i], SIGNAL(InputDetected()), this, SLOT(newInputEvent()) ); - + //Setup the geometry of the base to match the screen BASES[i]->setGeometry(SCREENS[i]->geometry()); //match this screen geometry - BASES[i]->setPlugin(settings->value("screenplugin"+QString::number(i+1), settings->value("defaultscreenplugin","random").toString() ).toString() ); + BASES[i]->setPlugin(DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "screenplugin_"+SCREENS[i]->name(), DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "defaultscreenplugin","random").toString() ).toString() ); } //Now set the overall parent widget geometry and show everything this->setGeometry(bounds); //overall background widget @@ -151,7 +149,7 @@ void LScreenSaver::HideScreenSaver(){ emit ClosingScreenSaver(); emit LockStatusChanged(false); } - qDebug() << "Stop ScreenSavers"; + if(DEBUG){ qDebug() << "Stop ScreenSavers"; } for(int i=0; istopPainting(); BASES[i]->hide(); diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.h index 18f12fab..2276fb6d 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.h @@ -22,7 +22,6 @@ public: private: QTimer *starttimer, *locktimer, *hidetimer; - QSettings *settings; QList BASES; LLockScreen *LOCKER; int cBright; diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp index 7854b597..8e7eb7f6 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp @@ -7,15 +7,14 @@ #include "SSBaseWidget.h" -#define DEBUG 1 +#define DEBUG 0 static QStringList validPlugs; // ======== // PUBLIC // ======== -SSBaseWidget::SSBaseWidget(QWidget *parent, QSettings *set) : QWidget(parent){ +SSBaseWidget::SSBaseWidget(QWidget *parent) : QWidget(parent){ if(validPlugs.isEmpty()){ validPlugs << "none"; } //add more later - settings = set; //needed to pass along for plugins to read any special options/settings this->setObjectName("LuminaBaseSSWidget"); ANIM = 0; this->setMouseTracking(true); @@ -60,7 +59,7 @@ void SSBaseWidget::startPainting(){ this->repaint(); //If not a stylesheet-based plugin - set it here if(cplug!="none"){ - ANIM = BaseAnimGroup::NewAnimation(cplug, this, settings); + ANIM = BaseAnimGroup::NewAnimation(cplug, this); connect(ANIM, SIGNAL(finished()), this, SLOT(startPainting()) ); //repeat the plugin as needed ANIM->LoadAnimations(); } @@ -75,7 +74,7 @@ void SSBaseWidget::startPainting(){ void SSBaseWidget::stopPainting(){ if(ANIM!=0){ - qDebug() << "Stopping Animation!!"; + if(DEBUG){ qDebug() << "Stopping Animation!!"; } ANIM->stop(); //ANIM->clear(); ANIM->deleteLater(); diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h index 9d987178..c4c7388a 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h @@ -15,7 +15,7 @@ class SSBaseWidget : public QWidget{ Q_OBJECT public: - SSBaseWidget(QWidget *parent, QSettings *set); + SSBaseWidget(QWidget *parent); ~SSBaseWidget(); void setPlugin(QString); @@ -27,7 +27,6 @@ public slots: private: QString plugType, cplug; //type of custom painting to do BaseAnimGroup *ANIM; - QSettings *settings; private slots: diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp index c8a248c0..477724e3 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp @@ -15,27 +15,37 @@ #include "ImageSlideshow.h" #include "VideoSlideshow.h" + +QVariant BaseAnimGroup::readSetting(QString variable, QVariant defaultvalue){ + return DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, + "Animations/"+animPlugin+"/"+variable, defaultvalue); +} + //============================== // PLUGIN LOADING/LISTING //============================== -BaseAnimGroup* BaseAnimGroup::NewAnimation(QString type, QWidget *parent, QSettings *set){ +BaseAnimGroup* BaseAnimGroup::NewAnimation(QString type, QWidget *parent){ //This is where we place all the known plugin ID's, and load the associated subclass + BaseAnimGroup *anim = 0; if(type=="fireflies"){ - return (new FirefliesAnimation(parent,set)); + anim = new FirefliesAnimation(parent); }else if(type == "grav") { - return (new GravAnimation(parent, set)); + anim = new GravAnimation(parent); }else if(type == "text") { - return (new TextAnimation(parent, set)); + anim = new TextAnimation(parent); }else if(type == "imageSlideshow") { - return (new ImageAnimation(parent, set)); + anim = new ImageAnimation(parent); }else if(type == "videoSlideshow") { - return (new VideoAnimation(parent, set)); + anim = new VideoAnimation(parent); }else { //Unknown screensaver, return a blank animation group - return (new BaseAnimGroup(parent, set)); + anim = new BaseAnimGroup(parent); } + //tag the animation with the type it is and return it + if(anim!=0){ anim->animPlugin = type; } + return anim; } QStringList BaseAnimGroup::KnownAnimations(){ - return (QStringList() << "imageSlideshow" /*<< "grav" << "text" << "imageSlideshow" << "fireflies"*/); + return (QStringList() << "grav" << "text" << "imageSlideshow" << "videoSlideshow" << "fireflies"); } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h index b1324e78..92e038ed 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.h @@ -16,21 +16,23 @@ class BaseAnimGroup : public QParallelAnimationGroup{ Q_OBJECT public: QWidget *canvas; - QSettings *settings; + QString animPlugin; virtual void LoadAnimations(){} //This is the main function which needs to be subclassed - BaseAnimGroup(QWidget *parent, QSettings *set){ + BaseAnimGroup(QWidget *parent){ canvas = parent; - settings = set; canvas->setCursor( QCursor(Qt::BlankCursor) ); } ~BaseAnimGroup(){} + QVariant readSetting(QString variable, QVariant defaultvalue = QVariant()); + + //============================== // PLUGIN LOADING/LISTING (Change in the .cpp file) //============================== - static BaseAnimGroup* NewAnimation(QString type, QWidget *parent, QSettings *set); + static BaseAnimGroup* NewAnimation(QString type, QWidget *parent); static QStringList KnownAnimations(); }; diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h index 75dfb1ae..d0e7a653 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h @@ -78,7 +78,7 @@ private: QList fireflies; public: - FirefliesAnimation(QWidget *parent, QSettings *set) : BaseAnimGroup(parent, set){} + FirefliesAnimation(QWidget *parent) : BaseAnimGroup(parent){} ~FirefliesAnimation(){ this->stop(); //while(fireflies.length()>0){ fireflies.takeAt(0)->deleteLater(); } @@ -87,14 +87,14 @@ public: void LoadAnimations(){ while(fireflies.length()>0){ fireflies.takeAt(0)->deleteLater(); } canvas->setStyleSheet("background: black;"); - int number = settings->value("fireflies/number",100).toInt(); + int number = readSetting("number",qrand()%30 + 50).toInt(); for(int i=0; inumber){ continue; } Firefly *tmp = new Firefly(canvas); this->addAnimation(tmp); fireflies << tmp; } - while( fireflies.length()>number){ fireflies.takeAt(number)->deleteLater(); } + } }; diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h index 50d733e9..099e6645 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h @@ -36,7 +36,7 @@ private: double xrand = 0.4; //(qrand()%10+4)/10.0; double yrand = 0.4; //(qrand()%10+4)/10.0; - double theta = 1.5707963; + double theta = 1.5707963; //double theta = aTan((start.x() - ref->x())/(start.y() - ref->y())); QMatrix rotation = QMatrix(qCos(theta), qSin(theta), -qSin(theta), qCos(theta), -ref->x(), -ref->y()); qDebug() << rotation; @@ -46,9 +46,9 @@ private: //qDebug() << "Center" << *ref; QPoint firstP = (QPoint(ref->x() + xrand*start.x()*(qCos(0/step) -qSin(0/step)), ref->y() + yrand*start.y()*(qCos(0/step) -qSin(0/step)))); - QPoint rotFP = rotation.map(firstP); + QPoint rotFP = rotation.map(firstP); qDebug() << "First Point" << firstP; - qDebug() << "Rotation by Matrix" << rotFP; + qDebug() << "Rotation by Matrix" << rotFP; QPoint lastP = (QPoint(ref->x() + xrand*start.x()*(qCos(PI/step) -qSin(PI/step)), ref->y() + yrand*start.y()*(qCos(PI/step) -qSin(PI/step)))); orbit->setKeyValueAt(0, firstP); orbit->setKeyValueAt(1, lastP); @@ -145,7 +145,7 @@ private slots: } public: - GravAnimation(QWidget *parent, QSettings *set) : BaseAnimGroup(parent, set){} + GravAnimation(QWidget *parent) : BaseAnimGroup(parent){} ~GravAnimation(){ sun->deleteLater(); while(planets.length()>0){ planets.takeAt(0)->deleteLater(); } @@ -179,7 +179,7 @@ public: canvas->setStyleSheet("background: black;"); //Pulls number of planets from settings, with 10 as default - int number = settings->value("planets/number",10).toInt(); + int number = readSetting("planets/number",qrand()%5+3).toInt(); //Loops through all planets and sets up the animations, then adds them to the base group and vector, which qDebug() << "Starting planets"; diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h index a64144ac..c040c7ac 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h @@ -40,30 +40,27 @@ private: } void chooseImage() { - QString randomFile = imagePath+imageFiles[qrand() % imageFiles.size()]; - - //Choose a new file if the chosen one is not an image - while(QImageReader::imageFormat(randomFile).isEmpty()) - randomFile = imagePath+imageFiles[qrand() % imageFiles.size()]; - if(scriptLoad){ - QProcess process; - process.start("/home/zwelch/test.sh"); - process.waitForFinished(1000); - QByteArray output = process.readAllStandardOutput(); - qDebug() << output; - pixmap.load(imagePath+imageFiles[qrand() % imageFiles.size()]); - }else{ - pixmap.load(imagePath+imageFiles[qrand() % imageFiles.size()]); - } + QString randomFile = imagePath+imageFiles[qrand() % imageFiles.size()]; + if(scriptLoad){ + QProcess process; + process.start("/home/zwelch/test.sh"); + process.waitForFinished(1000); + QByteArray output = process.readAllStandardOutput(); + //qDebug() << output; + pixmap.load(randomFile); + }else{ + pixmap.load(randomFile); + } //If the image is larger than the screen, then shrink the image down to 3/4 it's size (so there's still some bounce) //Scale the pixmap to keep the aspect ratio instead of resizing the label itself - if(pixmap.width() > screenSize.width() or pixmap.height() > screenSize.height()) - pixmap = pixmap.scaled(screenSize*(3.0/4.0), Qt::KeepAspectRatio); + if(pixmap.width() > screenSize.width() or pixmap.height() > screenSize.height()){ + pixmap = pixmap.scaled(screenSize*(3.0/4.0), Qt::KeepAspectRatio); + } - //Set pixmap to the image label - image->setPixmap(pixmap); - image->resize(pixmap.size()); + //Set pixmap to the image label + image->setPixmap(pixmap); + image->resize(pixmap.size()); } private slots: @@ -80,20 +77,25 @@ public: image = new QLabel(parent); screenSize = parent->size(); this->animate = animate; - this->scriptLoad = scriptLoad; - this->scriptPath = scriptPath; - + this->scriptLoad = scriptLoad; + this->scriptPath = scriptPath; + //Generate the list of files in the directory imageFiles = QDir(imagePath).entryList(QDir::Files); - if(imageFiles.empty()) - qDebug() << "Current image file path has no files."; - - //Change some default settings for the image. If scaledContents is false, the image will be cut off if resized - image->setScaledContents(true); - image->setAlignment(Qt::AlignHCenter); - - //Load a random initial image - chooseImage(); + //Ensure all the files are actually images + for(int i=0; isetText("No image files found:\n"+imagePath); + }else{ + //Change some default settings for the image. If scaledContents is false, the image will be cut off if resized + image->setScaledContents(true); + image->setAlignment(Qt::AlignHCenter); + //Load a random initial image + chooseImage(); + } //Create the animation that moves the image across the screen bounce = new QPropertyAnimation(image, "pos", parent); @@ -132,7 +134,7 @@ public: class ImageAnimation: public BaseAnimGroup{ Q_OBJECT public: - ImageAnimation(QWidget *parent, QSettings *set) : BaseAnimGroup(parent, set){} + ImageAnimation(QWidget *parent) : BaseAnimGroup(parent){} ~ImageAnimation(){ this->stop(); } @@ -140,13 +142,14 @@ public: void LoadAnimations(){ canvas->setStyleSheet("background: black;"); //Load the path of the images from the configuration file (default /usr/local/backgrounds/) - QString imagePath = settings->value("imageSlideshow/path","/usr/local/backgrounds/").toString(); + QString imagePath = readSetting("path", LOS::LuminaShare()+"../wallpapers/").toString(); //Load whether to animate the image (default true) - bool animate = settings->value("imageSlideshow/animate", true).toBool(); - bool scriptLoad = settings->value("imageSlideshow/scriptLoad", true).toBool(); - QString scriptPath; - if(scriptLoad) - scriptPath = settings->value("imageSlideshow/scriptPath", "/usr/local/backgrounds/script.sh").toString(); + bool animate = readSetting("animate", true).toBool(); + bool scriptLoad = readSetting("scriptLoad", true).toBool(); + QString scriptPath; + if(scriptLoad){ + scriptPath = readSetting("scriptPath", "/usr/local/backgrounds/script.sh").toString(); + } ImageSlideshow *tmp = new ImageSlideshow(canvas, imagePath, animate, scriptLoad, scriptPath); this->addAnimation(tmp); } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/SampleAnimation.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/SampleAnimation.h index c2bb0c96..c7a8b237 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/SampleAnimation.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/SampleAnimation.h @@ -18,7 +18,7 @@ private: QWidget *ball; public: - SampleAnimation(QWidget *parent, QSettings *set) : BaseAnimGroup(parent, set){} + SampleAnimation(QWidget *parent) : BaseAnimGroup(parent){} ~SampleAnimation(){ this->stop(); delete ball; } void LoadAnimations(){ diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h index 3ec0af82..88c0873b 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h @@ -38,7 +38,7 @@ private slots: void stopped(){ qDebug() << "Text Stopped"; text->hide();} public: - Text(QWidget *parent) : QParallelAnimationGroup(parent){ + Text(QWidget *parent, QString display) : QParallelAnimationGroup(parent){ text = new QLabel(parent); range = parent->size(); QPoint center = parent->geometry().center(); @@ -46,7 +46,7 @@ public: QString color = "rgba(" + QString::number(qrand() % 206 + 50) + ", " + QString::number(qrand() % 206 + 50) + ", " + QString::number(qrand() % 206 + 50); text->setStyleSheet("QLabel {background-color: rgba(255, 255, 255, 10); color: " + color + "); }"); text->setFont(QFont("Courier", 24, QFont::Bold)); - text->setText("test"); + text->setText(display); QFontMetrics metrics(text->font()); text->setMinimumSize(QSize( metrics.width(text->text())+10, metrics.height()*text->text().count("\n") +10)); @@ -75,14 +75,18 @@ public: class TextAnimation : public BaseAnimGroup{ Q_OBJECT public: - TextAnimation(QWidget *parent, QSettings *set) : BaseAnimGroup(parent, set){} + TextAnimation(QWidget *parent) : BaseAnimGroup(parent){} ~TextAnimation(){ this->stop(); } void LoadAnimations(){ canvas->setStyleSheet("background: black;"); - Text *tmp = new Text(canvas); + //Read off the text that needs to be displayed + QString textToShow = readSetting("text", "").toString(); + if(textToShow.isEmpty()){ textToShow = "You forgot the text!!"; } + // Now create the animation + Text *tmp = new Text(canvas, textToShow); this->addAnimation(tmp); } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h index 9c52c447..1f9c4cbc 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h @@ -4,7 +4,7 @@ // Available under the 3-clause BSD license // See the LICENSE file for full details //=========================================== -#ifndef _LUMINA_DESKTOP_SCREEN_SAVER_VIDEOSLIDESHOW_ANIMATION_H +#ifndef _LUMINA_DESKTOP_SCREEN_SAVER_VIDEOSLIDESHOW_ANIMATION_H #define _LUMINA_DESKTOP_SCREEN_SAVER_VIDEOSLIDESHOW_ANIMATION_H #include "global-includes.h" @@ -22,7 +22,7 @@ private: private slots: public: - VideoAnimation(QWidget *parent, QSettings *set) : BaseAnimGroup(parent, set){} + VideoAnimation(QWidget *parent) : BaseAnimGroup(parent){} ~VideoAnimation(){ this->stop(); @@ -32,7 +32,7 @@ public: canvas->setStyleSheet("background: black;"); //Load the path of the videos from the configuration file (default /usr/local/videos/) - videoPath = settings->value("videoSlideshow/path","/usr/local/videos").toString(); + videoPath = readSetting("path","/usr/local/videos").toString(); if(!videoPath.endsWith("/")){ videoPath.append("/"); } //Set whether to copy videos on two monitors or play different videos @@ -43,28 +43,30 @@ public: videoWidget = new QVideoWidget(canvas); video->setVideoOutput(videoWidget); videoWidget->setGeometry(QRect(QPoint(0,0), canvas->size())); - + //Generate the list of files in the directory videoFiles = QDir(videoPath).entryList(QDir::Files); - if(videoFiles.empty()) - qDebug() << "Current video file path has no files."; + if(videoFiles.empty()){ + qDebug() << "Current video file path has no files:" << videoPath; + return; + } - //Loading a random file from a directory - QDesktopWidget *dw = new QDesktopWidget(); - QMediaPlaylist *playlist = new QMediaPlaylist(); - for(int i = 0; i < videoFiles.size(); i++) - playlist->addMedia(QUrl::fromLocalFile(videoPath+videoFiles[i])); - qsrand(QTime::currentTime().msec()); - playlist->setCurrentIndex(qrand() % videoFiles.size()); - playlist->setPlaybackMode(QMediaPlaylist::Random); + //Loading a random file from a directory + QDesktopWidget *dw = new QDesktopWidget(); + QMediaPlaylist *playlist = new QMediaPlaylist(); + for(int i = 0; i < videoFiles.size(); i++){ + playlist->addMedia(QUrl::fromLocalFile(videoPath+videoFiles[i])); + } + playlist->setCurrentIndex(qrand() % videoFiles.size()); + playlist->setPlaybackMode(QMediaPlaylist::Random); videoWidget->show(); - video->setPlaylist(playlist); - //Only play sound for one monitor to prevent messed up audio - if(dw->screenNumber(canvas) == 0) - video->setVolume(100); - else - video->setVolume(0); - video->play(); + video->setPlaylist(playlist); + //Only play sound for one monitor to prevent messed up audio + if(dw->screenNumber(canvas) == 0) + video->setVolume(100); + else + video->setVolume(0); + video->play(); } }; -- cgit From eff681c9e56f6044852779b61fbe701e623f2f3a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 30 Aug 2017 07:04:44 -0400 Subject: Finish up all the mouse focus handling for embedded windows. Works beautifully now. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 37 ++++++++++++++++++++---- src-qt5/core/libLumina/NativeEmbedWidget.h | 7 ++++- src-qt5/core/libLumina/RootSubWindow.cpp | 15 ++++++---- src-qt5/core/libLumina/RootSubWindow.h | 7 +++-- src-qt5/core/libLumina/RootWindow.cpp | 32 +++++++++++++++++++- src-qt5/core/libLumina/RootWindow.h | 4 ++- src-qt5/core/lumina-desktop-unified/LSession.cpp | 1 + 7 files changed, 87 insertions(+), 16 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 3472c61e..fbf06aaa 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -163,6 +163,11 @@ void NativeEmbedWidget::raiseWindow(){ xcb_configure_window(QX11Info::connection(), WIN->id(), XCB_CONFIG_WINDOW_STACK_MODE, &val); } +void NativeEmbedWidget::lowerWindow(){ + uint32_t val = XCB_STACK_MODE_BELOW; + xcb_configure_window(QX11Info::connection(), WIN->id(), XCB_CONFIG_WINDOW_STACK_MODE, &val); +} + // ============== // PUBLIC SLOTS // ============== @@ -280,16 +285,36 @@ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ void NativeEmbedWidget::enterEvent(QEvent *ev){ QWidget::enterEvent(ev); - //this->grabMouse(); //xcb_grab_pointer_unchecked(QX11Info::connection(), ); + //qDebug() << "Enter Embed Widget"; + //raiseWindow(); //this->grabMouse(); } void NativeEmbedWidget::leaveEvent(QEvent *ev){ QWidget::leaveEvent(ev); - //this->releaseMouse(); //xcb_ungrab_pointer(QX11Info::connection(), XCB_CURRENT_TIME); + /*qDebug() << "Leave Embed Widget"; + QPoint pt = QCursor::pos(); + QPoint relpt = this->parentWidget()->mapFromGlobal(pt); + qDebug() << " - Geom:" << this->geometry() << "Global pt:" << pt << "Relative pt:" << relpt; + if(!this->geometry().contains(relpt) ){ lowerWindow(); }*/ } -bool NativeEmbedWidget::nativeEvent(const QByteArray &eventType, void *message, long *result){ - /*if(eventType=="xcb_generic_event_t" && WIN!=0){ +void NativeEmbedWidget::mouseMoveEvent(QMouseEvent *ev){ + QWidget::mouseMoveEvent(ev); + //Forward this event on to the window +} + +void NativeEmbedWidget::mousePressEvent(QMouseEvent *ev){ + QWidget::mousePressEvent(ev); + //Forward this event on to the window +} + +void NativeEmbedWidget::mouseReleaseEvent(QMouseEvent *ev){ + QWidget::mouseReleaseEvent(ev); + //Forward this event on to the window +} + +/*bool NativeEmbedWidget::nativeEvent(const QByteArray &eventType, void *message, long *result){ + if(eventType=="xcb_generic_event_t" && WIN!=0){ //Convert to known event type (for X11 systems) xcb_generic_event_t *ev = static_cast(message); //qDebug() << "Got Embed Window Event:" << xcb_event_get_label(ev->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) << xcb_event_get_request_label(ev->response_type); @@ -326,6 +351,6 @@ bool NativeEmbedWidget::nativeEvent(const QByteArray &eventType, void *message, xcb_send_event(QX11Info::connection(), true, WIN->id(),mask, (char*) ev); return true; } - }*/ + } return false; -} +}*/ diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 7e129fa3..532db9b9 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -18,6 +18,7 @@ #include #include #include +#include class NativeEmbedWidget : public QWidget{ Q_OBJECT @@ -45,6 +46,7 @@ public: public slots: void raiseWindow(); + void lowerWindow(); //Pause/resume void pause(); @@ -61,7 +63,10 @@ protected: void paintEvent(QPaintEvent *ev); void enterEvent(QEvent *ev); void leaveEvent(QEvent *ev); - bool nativeEvent(const QByteArray &eventType, void *message, long *result); + void mouseMoveEvent(QMouseEvent *ev); + void mousePressEvent(QMouseEvent *ev); + void mouseReleaseEvent(QMouseEvent *ev); + //bool nativeEvent(const QByteArray &eventType, void *message, long *result); }; #endif diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index fba02e96..29c615c5 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -295,7 +295,7 @@ void RootSubWindow::toggleSticky(){ } void RootSubWindow::activate(){ - WinWidget->raiseWindow(); + //WinWidget->raiseWindow(); WIN->requestProperty(NativeWindow::Active, true, true); } @@ -373,7 +373,7 @@ void RootSubWindow::propertiesChanged(QList props, QList WinWidget->setMaximumSize(vals[i].toSize()); break; case NativeWindow::Active: - if(vals[i].toBool()){ WinWidget->raiseWindow(); } + //if(vals[i].toBool()){ WinWidget->raiseWindow(); } break; /*case NativeWindow::FrameExtents: qDebug() << " - FRAME CHANGE"; @@ -397,7 +397,7 @@ void RootSubWindow::propertiesChanged(QList props, QList void RootSubWindow::mousePressEvent(QMouseEvent *ev){ activate(); this->raise(); - WinWidget->raiseWindow(); + //WinWidget->raiseWindow(); //qDebug() << "Frame Mouse Press Event"; offset.setX(0); offset.setY(0); if(activeState != Normal){ return; } // do nothing - already in a state of grabbed mouse @@ -518,12 +518,17 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ QTimer::singleShot(0, WinWidget, SLOT(raiseWindow()) ); } -void RootSubWindow::leaveEvent(QEvent *ev){ +/*void RootSubWindow::enterEvent(QEvent *ev){ + QFrame::enterEvent(ev); + WinWidget->raiseWindow(); +}*/ +/*void RootSubWindow::leaveEvent(QEvent *ev){ QFrame::leaveEvent(ev); if(activeState == Normal){ setMouseCursor(Normal); } -} + if(!QRect(QPoint(0,0),this->size()).contains( this->mapFromGlobal(QCursor::pos())) ){ WinWidget->lowerWindow(); } +}*/ void RootSubWindow::moveEvent(QMoveEvent *ev){ //qDebug() << "Got Move Event:" << ev->pos() << WinWidget->geometry(); diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h index 0af77009..d8b8fd33 100644 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ b/src-qt5/core/libLumina/RootSubWindow.h @@ -65,6 +65,9 @@ private: static QStringList validAnimations(NativeWindow::Property); public slots: + void giveMouseFocus(){ WinWidget->raiseWindow(); } + void removeMouseFocus(){ WinWidget->lowerWindow(); } + void clientClosed(); void LoadAllProperties(); @@ -91,8 +94,8 @@ protected: void mousePressEvent(QMouseEvent*); void mouseMoveEvent(QMouseEvent*); void mouseReleaseEvent(QMouseEvent*); - void leaveEvent(QEvent *ev); - + //void leaveEvent(QEvent *ev); + //void enterEvent(QEvent *ev); void moveEvent(QMoveEvent *ev); diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index 952e246b..ccda47e8 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -16,6 +16,8 @@ RootWindow::RootWindow() : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint | Qt::WindowStaysOnBottomHint){ qRegisterMetaType("WId"); autoResizeTimer = 0; + lastActiveMouse = 0; + mouseFocusTimer = 0; this->setMouseTracking(true); } @@ -33,6 +35,12 @@ void RootWindow::start(){ connect(QApplication::desktop(), SIGNAL(resized(int)), autoResizeTimer, SLOT(start()) ); connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), autoResizeTimer, SLOT(start()) ); } + if(mouseFocusTimer==0){ + mouseFocusTimer = new QTimer(this); + mouseFocusTimer->setInterval(100); + connect(mouseFocusTimer, SIGNAL(timeout()), this, SLOT(checkMouseFocus()) ); + + } this->show(); ResizeRoot(); emit RegisterVirtualRoot(this->winId()); @@ -192,6 +200,21 @@ void RootWindow::ChangeWallpaper(QString id, RootWindow::ScaleType scale, QStrin } +void RootWindow::checkMouseFocus(){ + QWidget *child = this->childAt(QCursor::pos()); + while(child!=0 && child->whatsThis()!="RootSubWindow"){ + child = child->parentWidget(); + if(child==this){ child = 0;} //end of the line + } + if(child==lastActiveMouse){ return; } //nothing new to do + //Make sure the child is actually a RootSubWindow + if(lastActiveMouse!=0){ lastActiveMouse->removeMouseFocus(); lastActiveMouse = 0; } + if(child!=0){ + lastActiveMouse = static_cast(child); + lastActiveMouse->giveMouseFocus(); + } +} + void RootWindow::NewWindow(NativeWindow *win){ RootSubWindow *subwin = 0; //qDebug() << "Got New Window:" << win->property(NativeWindow::Title); @@ -200,6 +223,7 @@ void RootWindow::NewWindow(NativeWindow *win){ } if(subwin==0){ subwin = new RootSubWindow(this, win); + subwin->setWhatsThis("RootSubWindow"); connect(win, SIGNAL(WindowClosed(WId)), this, SLOT(CloseWindow(WId)) ); WINDOWS << subwin; } @@ -207,12 +231,18 @@ void RootWindow::NewWindow(NativeWindow *win){ //win->setProperty(NativeWindow::Visible, true); //win->requestProperty( NativeWindow::Active, true); win->requestProperties(QList() << NativeWindow::Visible << NativeWindow::Active, QList() << true << true); + if(!mouseFocusTimer->isActive()){ mouseFocusTimer->start(); } } void RootWindow::CloseWindow(WId win){ for(int i=0; iid() == win){ WINDOWS.takeAt(i)->clientClosed(); break; } + if(WINDOWS[i]->id() == win){ + if(lastActiveMouse==WINDOWS[i]){ lastActiveMouse = 0; } //no longer valid + WINDOWS.takeAt(i)->clientClosed(); + break; + } } + if(WINDOWS.isEmpty()){ mouseFocusTimer->stop(); } //no windows to look for } // === PRIVATE SLOTS === diff --git a/src-qt5/core/libLumina/RootWindow.h b/src-qt5/core/libLumina/RootWindow.h index 5f11fd6d..725a0430 100644 --- a/src-qt5/core/libLumina/RootWindow.h +++ b/src-qt5/core/libLumina/RootWindow.h @@ -45,7 +45,8 @@ private: ScaleType scale; QPixmap wallpaper; //Note: This pixmap will always be the same size as "area" }; - QTimer *autoResizeTimer; + QTimer *autoResizeTimer, *mouseFocusTimer; + RootSubWindow *lastActiveMouse; QList WALLPAPERS; void updateScreenPixmap(screeninfo *info); //used for recalculating the wallpaper pixmap based on file/area/scale as needed @@ -62,6 +63,7 @@ public slots: void ResizeRoot(); void ChangeWallpaper(QString id, RootWindow::ScaleType scale, QString file); //Note: for "SingleColor" scaling the "file" variable should be "rgb(R,G,B)" or "#hexcode" + void checkMouseFocus(); void NewWindow(NativeWindow*); void CloseWindow(WId); //automatically connected for any new native window diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index e820e97b..e1a941f0 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -166,6 +166,7 @@ void LSession::setupSession(){ if(DEBUG){ qDebug() << " - Init Finished:" << timer->elapsed(); delete timer;} Lumina::SHORTCUTS->start(); //Startup the shortcut handler now + //for(int i=0; i<4; i++){ LSession::processEvents(); } //Again, just a few event loops here so thing can settle before we close the splash screen //launchStartupApps(); QTimer::singleShot(500, this, SLOT(launchStartupApps()) ); -- cgit From 338aa1cab0b748192edb529963b2f88d0e8e2e33 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 30 Aug 2017 12:29:59 -0400 Subject: A bit more work on compositing and such (mostly commented out) - still not working with GPU-backed xorg drivers --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 57 ++++++++++++++++++++-------- src-qt5/core/libLumina/NativeEmbedWidget.h | 2 +- src-qt5/core/libLumina/NativeWindow.pri | 2 +- src-qt5/core/lumina-desktop/AppMenu.cpp | 2 +- 4 files changed, 44 insertions(+), 19 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index fbf06aaa..84b0473e 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -14,11 +14,39 @@ #include #include #include +//#include +//#include #include #include #define DISABLE_COMPOSITING false +/*inline xcb_render_pictformat_t get_pictformat(){ + static xcb_render_pictformat_t format = 0; + if(format==0){ + xcb_render_query_pict_formats_reply_t *reply = xcb_render_query_pict_formats_reply( QX11Info::connection(), xcb_render_query_pict_formats(QX11Info::connection()), NULL); + format = xcb_render_util_find_standard_format(reply, XCB_PICT_STANDARD_ARGB_32)->id; + free(reply); + } + return format; +} + + +inline void renderWindowToWidget(WId id, QWidget *widget, bool hastransparency = true){ + //window and widget are assumed to be the same size + //Pull the XCB pixmap out of the compositing layer + xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); + xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); + if(pix==0){ qDebug() << "Got blank pixmap!"; return; } + + xcb_render_picture_t pic_id = xcb_generate_id(QX11Info::connection()); + xcb_render_create_picture_aux(QX11Info::connection(), pic_id, pix, get_pictformat() , 0, NULL); + // + xcb_render_composite(QX11Info::connection(), hastransparency ? XCB_RENDER_PICT_OP_OVER : XCB_RENDER_PICT_OP_SRC, pic_id, XCB_RENDER_PICTURE_NONE, widget->x11RenderHandle(), + 0, 0, 0, 0, 0, 0, (uint16_t) widget->width(), (uint16_t) widget->height() ); +}*/ + + inline void registerClientEvents(WId id){ uint32_t value_list[1] = { (XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_BUTTON_PRESS @@ -27,7 +55,7 @@ inline void registerClientEvents(WId id){ | XCB_EVENT_MASK_BUTTON_MOTION | XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY - | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT +// | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_ENTER_WINDOW) }; @@ -69,22 +97,15 @@ void NativeEmbedWidget::showWindow(){ QImage NativeEmbedWidget::windowImage(QRect geom){ //Pull the XCB pixmap out of the compositing layer xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); - - /*xcb_composite_get_overlay_window_reply_t *wreply = xcb_composite_get_overlay_window_reply( QX11Info::connection(), - xcb_composite_get_overlay_window_unchecked(QX11Info::connection(), WIN->id()), NULL); - if(wreply!=0){ - xcb_composite_name_window_pixmap(QX11Info::connection(), wreply->overlay_win, pix); - free(wreply); - }else{*/ xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); - //} if(pix==0){ qDebug() << "Got blank pixmap!"; return QImage(); } + //Convert this pixmap into a QImage - xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, 0, 0, this->width(), this->height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); - //xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, geom.x(), geom.y(), geom.width(), geom.height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); + //xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, 0, 0, this->width(), this->height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); + xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, geom.x(), geom.y(), geom.width(), geom.height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); if(ximg == 0){ qDebug() << "Got blank image!"; return QImage(); } QImage img(ximg->data, ximg->width, ximg->height, ximg->stride, QImage::Format_ARGB32_Premultiplied); - img = img.copy(); //detach this image from the XCB data structures before we clean them up + img = img.copy(); //detach this image from the XCB data structures before we clean them up, otherwise the QImage will try to clean it up a second time on window close and crash xcb_image_destroy(ximg); //Cleanup the XCB data structures @@ -136,12 +157,11 @@ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ Damage dmgID = XDamageCreate(QX11Info::display(), WIN->id(), XDamageReportRawRectangles); WIN->addDamageID( (uint) dmgID); //save this for later + connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change }else{ xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); } WIN->addFrameWinID(this->winId()); - connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change - registerClientEvents(WIN->id()); //registerClientEvents(this->winId()); //qDebug() << "Events Registered:" << WIN->id() << this->winId(); @@ -159,11 +179,13 @@ bool NativeEmbedWidget::isEmbedded(){ } void NativeEmbedWidget::raiseWindow(){ + if(DISABLE_COMPOSITING){ return; } uint32_t val = XCB_STACK_MODE_ABOVE; xcb_configure_window(QX11Info::connection(), WIN->id(), XCB_CONFIG_WINDOW_STACK_MODE, &val); } void NativeEmbedWidget::lowerWindow(){ + if(DISABLE_COMPOSITING){ return; } uint32_t val = XCB_STACK_MODE_BELOW; xcb_configure_window(QX11Info::connection(), WIN->id(), XCB_CONFIG_WINDOW_STACK_MODE, &val); } @@ -216,7 +238,8 @@ void NativeEmbedWidget::resyncWindow(){ //Make sure the window size is syncronized and visual up to date syncWinSize(); - QTimer::singleShot(10, this, SLOT(repaintWindow()) ); + if(DISABLE_COMPOSITING){ showWindow(); } + else{ QTimer::singleShot(10, this, SLOT(repaintWindow()) ); } } void NativeEmbedWidget::repaintWindow(){ @@ -256,8 +279,10 @@ void NativeEmbedWidget::hideEvent(QHideEvent *ev){ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ if(WIN==0 || DISABLE_COMPOSITING){ QWidget::paintEvent(ev); return; } - else if( winImage.isNull() ){ /*QTimer::singleShot(0, this, SLOT(repaintWindow()) );*/ return; } + //else if( winImage.isNull() ){return; } else if(paused){ return; } + //renderWindowToWidget(WIN->id(), this); + //return; //else if(this->size()!=winSize){ QTimer::singleShot(0,this, SLOT(syncWinSize())); return; } //do not paint here - waiting to re-sync the sizes //else if(this->size() != winImage.size()){ QTimer::singleShot(0, this, SLOT(repaintWindow()) ); return; } //Need to paint the image from the window onto the widget as an overlay diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 532db9b9..89d95a6f 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -26,7 +26,7 @@ private: NativeWindow *WIN; QSize winSize; QImage winImage; - bool paused; + bool paused, hasAlphaChannel; private slots: //Simplification functions diff --git a/src-qt5/core/libLumina/NativeWindow.pri b/src-qt5/core/libLumina/NativeWindow.pri index c2ac0137..e651ab50 100644 --- a/src-qt5/core/libLumina/NativeWindow.pri +++ b/src-qt5/core/libLumina/NativeWindow.pri @@ -1,7 +1,7 @@ # Files QT *= x11extras -LIBS *= -lc -lxcb -lxcb-ewmh -lxcb-icccm -lxcb-image -lxcb-composite -lxcb-damage -lxcb-util -lxcb-keysyms -lXdamage +LIBS *= -lc -lxcb -lxcb-ewmh -lxcb-icccm -lxcb-image -lxcb-composite -lxcb-damage -lxcb-util -lxcb-keysyms -lXdamage -lxcb-render -lxcb-render-util SOURCES *= $${PWD}/NativeWindow.cpp \ $${PWD}/NativeWindowSystem.cpp \ diff --git a/src-qt5/core/lumina-desktop/AppMenu.cpp b/src-qt5/core/lumina-desktop/AppMenu.cpp index c3c52375..9ad51c93 100644 --- a/src-qt5/core/lumina-desktop/AppMenu.cpp +++ b/src-qt5/core/lumina-desktop/AppMenu.cpp @@ -142,7 +142,7 @@ void AppMenu::updateAppList(){ else{ ICONS->loadIcon(sact, appL[a]->icon); } sact->setToolTip(appL[a]->comment); sact->setWhatsThis("-action \""+appL[a]->actions[sa].ID+"\" \""+appL[a]->filePath+"\""); - submenu->addAction(sact); + submenu->addAction(sact); } menu->addMenu(submenu); } -- cgit From c6ac1a490e8f7889d594b2641a4d4e8e8b8f5c60 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 30 Aug 2017 15:24:15 -0400 Subject: A bit more for Lumina2: 1) Get a simple "DISABLE_COMPOSITING" flag working in the NativeEmbedWidget class, and disable the compositing right now (still too many issues with using GPU-accellerated drivers) 2) Get a WM settings file created and add options for "focusFollowsMouse" (true by default) and "raiseOnFocus" (false by default). 3) Add a way for the root window to announce mouse cursor movements to the screensaver, bypassing the XCB event system (can't seem to get it to report those events anyway right now). Probably a better method anyway since moving the mouse won't cause billions of events in a short time then. With this, it seems like all the mouse cursor management systems are up and running. I have not tested using shortcuts combined with mouse buttons yet though.... --- src-qt5/core/libLumina/DesktopSettings.cpp | 5 ++- src-qt5/core/libLumina/DesktopSettings.h | 2 +- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 66 ++++++++++++++-------------- src-qt5/core/libLumina/NativeWindow.pri | 3 +- src-qt5/core/libLumina/RootSubWindow.cpp | 5 ++- src-qt5/core/libLumina/RootSubWindow.h | 1 + src-qt5/core/libLumina/RootWindow.cpp | 19 ++++++-- src-qt5/core/libLumina/RootWindow.h | 3 ++ 8 files changed, 62 insertions(+), 42 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/DesktopSettings.cpp b/src-qt5/core/libLumina/DesktopSettings.cpp index b051a4e8..d1a898b2 100644 --- a/src-qt5/core/libLumina/DesktopSettings.cpp +++ b/src-qt5/core/libLumina/DesktopSettings.cpp @@ -230,7 +230,7 @@ QList< DesktopSettings::File > DesktopSettings::filesForRunMode(RunMode mode){ // Note that the "System" file is always ignored here - that is specially loaded QList< DesktopSettings::File > tmp; if(mode == DesktopSettings::UserFull || mode == DesktopSettings::SystemFull){ - tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session << DesktopSettings::Desktop << DesktopSettings::Panels << DesktopSettings::Plugins << DesktopSettings::Keys << DesktopSettings::ContextMenu << DesktopSettings::Animation << DesktopSettings::ScreenSaver; + tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session << DesktopSettings::Desktop << DesktopSettings::Panels << DesktopSettings::Plugins << DesktopSettings::Keys << DesktopSettings::ContextMenu << DesktopSettings::Animation << DesktopSettings::ScreenSaver << DesktopSettings::WM; }else if(runmode == DesktopSettings::SystemInterface){ tmp << DesktopSettings::Favorites << DesktopSettings::Environment << DesktopSettings::Session; } @@ -262,7 +262,8 @@ QString DesktopSettings::rel_path(DesktopSettings::File file){ name="plugins"; break; case DesktopSettings::ScreenSaver: name="screensaver"; break; - + case DesktopSettings::WM: + name="windows"; break; } return FILEPREFIX+name+".conf"; } diff --git a/src-qt5/core/libLumina/DesktopSettings.h b/src-qt5/core/libLumina/DesktopSettings.h index 9bff6bc9..efb3776e 100644 --- a/src-qt5/core/libLumina/DesktopSettings.h +++ b/src-qt5/core/libLumina/DesktopSettings.h @@ -25,7 +25,7 @@ class DesktopSettings : public QObject{ Q_OBJECT public: - enum File{ System, Favorites, Environment, Session, Desktop, Panels, Plugins, ContextMenu, Keys, Animation, ScreenSaver}; + enum File{ System, Favorites, Environment, Session, Desktop, Panels, Plugins, ContextMenu, Keys, Animation, ScreenSaver, WM}; //Changes to this enum need to be added to the "filesForRunMode()" and "rel_path()" functions as well DesktopSettings(QObject *parent = 0); diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 84b0473e..6a420d25 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -19,7 +19,7 @@ #include #include -#define DISABLE_COMPOSITING false +#define DISABLE_COMPOSITING true /*inline xcb_render_pictformat_t get_pictformat(){ static xcb_render_pictformat_t format = 0; @@ -85,10 +85,12 @@ void NativeEmbedWidget::syncWidgetSize(QSize sz){ } void NativeEmbedWidget::hideWindow(){ + qDebug() << "Hide Embed Window"; xcb_unmap_window(QX11Info::connection(), WIN->id()); } void NativeEmbedWidget::showWindow(){ + qDebug() << "Show Embed Window"; xcb_map_window(QX11Info::connection(), WIN->id()); reregisterEvents(); QTimer::singleShot(0,this, SLOT(repaintWindow())); @@ -209,37 +211,31 @@ void NativeEmbedWidget::resume(){ void NativeEmbedWidget::resyncWindow(){ if(WIN==0){ return; } - // Attempt 1 : spec says to send an artificial configure event to the window - /*QRect geom = WIN->geometry(); - //Send an artificial configureNotify event to the window with the global position/size included - xcb_configure_notify_event_t event; - event.x = geom.x() + this->pos().x(); - event.y = geom.y() + this->pos().y(); - event.width = this->width(); - event.height = this->height(); - event.border_width = 0; - event.above_sibling = XCB_NONE; - event.override_redirect = false; - event.window = WIN->id(); - event.event = WIN->id(); - event.response_type = XCB_CONFIGURE_NOTIFY; - xcb_send_event(QX11Info::connection(), false, WIN->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, (const char *) &event); - */ - - // Attempt 2 : Just jitter the window size by 1 pixel really quick so the window knows to update it's geometry - /*QSize sz = this->size(); - uint32_t valList[2] = {(uint32_t) sz.width()-1, (uint32_t) sz.height()}; - uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; - xcb_configure_window(QX11Info::connection(), WIN->id(), mask, valList); + if(DISABLE_COMPOSITING){ + // Specs say to send an artificial configure event to the window if the window was reparented into the frame + QPoint loc = this->mapToGlobal( QPoint(0,0)); + //Send an artificial configureNotify event to the window with the global position/size included + xcb_configure_notify_event_t *event = (xcb_configure_notify_event_t*) calloc(32,1); //always 32-byes long, even if we don't need all of it + event->x = loc.x(); + event->y = loc.y(); + event->width = this->width(); + event->height = this->height(); + event->border_width = 0; + event->above_sibling = XCB_NONE; + event->override_redirect = false; + event->window = WIN->id(); + event->event = WIN->id(); + event->response_type = XCB_CONFIGURE_NOTIFY; + xcb_send_event(QX11Info::connection(), false, WIN->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, (char *) event); xcb_flush(QX11Info::connection()); - valList[0] = (uint32_t) sz.width(); - xcb_configure_window(QX11Info::connection(), WIN->id(), mask, valList); - xcb_flush(QX11Info::connection());*/ + free(event); + }else{ + //Window is floating invisibly - make sure it is in the right place + //Make sure the window size is syncronized and visual up to date + syncWinSize(); + QTimer::singleShot(10, this, SLOT(repaintWindow()) ); + } - //Make sure the window size is syncronized and visual up to date - syncWinSize(); - if(DISABLE_COMPOSITING){ showWindow(); } - else{ QTimer::singleShot(10, this, SLOT(repaintWindow()) ); } } void NativeEmbedWidget::repaintWindow(){ @@ -278,9 +274,15 @@ void NativeEmbedWidget::hideEvent(QHideEvent *ev){ } void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ - if(WIN==0 || DISABLE_COMPOSITING){ QWidget::paintEvent(ev); return; } + if(WIN==0 || paused){ return; } //else if( winImage.isNull() ){return; } - else if(paused){ return; } + else if(DISABLE_COMPOSITING){ + // Just make it solid black (underneath the embedded window) + // - only visible when looking through the edge of another window) + QPainter P(this); + P.fillRect(ev->rect(), Qt::black); + return; + } //renderWindowToWidget(WIN->id(), this); //return; //else if(this->size()!=winSize){ QTimer::singleShot(0,this, SLOT(syncWinSize())); return; } //do not paint here - waiting to re-sync the sizes diff --git a/src-qt5/core/libLumina/NativeWindow.pri b/src-qt5/core/libLumina/NativeWindow.pri index e651ab50..c906d6fd 100644 --- a/src-qt5/core/libLumina/NativeWindow.pri +++ b/src-qt5/core/libLumina/NativeWindow.pri @@ -1,7 +1,8 @@ # Files QT *= x11extras -LIBS *= -lc -lxcb -lxcb-ewmh -lxcb-icccm -lxcb-image -lxcb-composite -lxcb-damage -lxcb-util -lxcb-keysyms -lXdamage -lxcb-render -lxcb-render-util +LIBS *= -lc -lxcb -lxcb-ewmh -lxcb-icccm -lxcb-image -lxcb-composite -lxcb-damage -lxcb-util -lxcb-keysyms -lXdamage +#QT *= -lxcb-render -lxcb-render-util SOURCES *= $${PWD}/NativeWindow.cpp \ $${PWD}/NativeWindowSystem.cpp \ diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 29c615c5..cc1a1d2a 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -327,7 +327,7 @@ void RootSubWindow::propertiesChanged(QList props, QList //qDebug() << "RootSubWindow: Property Changed:" << props[i] << vals[i]; switch(props[i]){ case NativeWindow::Visible: - //qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); + qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); if(vals[i].toBool()){ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/appear", "random").toString(), NativeWindow::Visible, vals[i]); } else{ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/disappear", "random").toString(), NativeWindow::Visible, vals[i]); } break; @@ -373,7 +373,7 @@ void RootSubWindow::propertiesChanged(QList props, QList WinWidget->setMaximumSize(vals[i].toSize()); break; case NativeWindow::Active: - //if(vals[i].toBool()){ WinWidget->raiseWindow(); } + if(vals[i].toBool()){ activate(); } //WinWidget->raiseWindow(); } break; /*case NativeWindow::FrameExtents: qDebug() << " - FRAME CHANGE"; @@ -385,6 +385,7 @@ void RootSubWindow::propertiesChanged(QList props, QList mainLayout->setContentsMargins( vals[i].value< QList >().at(0),vals[i].value< QList >().at(2) - titleLabel->height(),vals[i].value< QList >().at(1),vals[i].value< QList >().at(3)); break;*/ case NativeWindow::WinTypes: + qDebug() << "Got Window Types:" << vals[i].value< QList >(); enableFrame(vals[i].value< QList >().contains(NativeWindow::T_NORMAL) ); break; default: diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h index d8b8fd33..f87d7733 100644 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ b/src-qt5/core/libLumina/RootSubWindow.h @@ -67,6 +67,7 @@ private: public slots: void giveMouseFocus(){ WinWidget->raiseWindow(); } void removeMouseFocus(){ WinWidget->lowerWindow(); } + void giveKeyboardFocus(){ WIN->requestProperty(NativeWindow::Active, true); } void clientClosed(); void LoadAllProperties(); diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index ccda47e8..51e7b1f0 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -201,17 +201,28 @@ void RootWindow::ChangeWallpaper(QString id, RootWindow::ScaleType scale, QStrin } void RootWindow::checkMouseFocus(){ + QPoint cpos = QCursor::pos(); + if(lastCursorPos != cpos){ emit MouseMoved(); } + lastCursorPos = cpos; QWidget *child = this->childAt(QCursor::pos()); while(child!=0 && child->whatsThis()!="RootSubWindow"){ child = child->parentWidget(); if(child==this){ child = 0;} //end of the line } + if(child==lastActiveMouse){ return; } //nothing new to do //Make sure the child is actually a RootSubWindow if(lastActiveMouse!=0){ lastActiveMouse->removeMouseFocus(); lastActiveMouse = 0; } if(child!=0){ lastActiveMouse = static_cast(child); - lastActiveMouse->giveMouseFocus(); + + if(DesktopSettings::instance()->value(DesktopSettings::WM, "focusFollowsMouse", true).toBool()){ + lastActiveMouse->giveKeyboardFocus(); + if(DesktopSettings::instance()->value(DesktopSettings::WM, "raiseOnFocus", true).toBool()){ + lastActiveMouse->raise(); + } + } + lastActiveMouse->giveMouseFocus(); //always give mouse focus on mouseover } } @@ -228,9 +239,9 @@ void RootWindow::NewWindow(NativeWindow *win){ WINDOWS << subwin; } CheckWindowPosition(win->id(), true); //first-time run - //win->setProperty(NativeWindow::Visible, true); - //win->requestProperty( NativeWindow::Active, true); - win->requestProperties(QList() << NativeWindow::Visible << NativeWindow::Active, QList() << true << true); + win->setProperty(NativeWindow::Visible, true); + win->requestProperty( NativeWindow::Active, true); + //win->requestProperties(QList() << NativeWindow::Visible << NativeWindow::Active, QList() << true << true, true); if(!mouseFocusTimer->isActive()){ mouseFocusTimer->start(); } } diff --git a/src-qt5/core/libLumina/RootWindow.h b/src-qt5/core/libLumina/RootWindow.h index 725a0430..c5cd44a0 100644 --- a/src-qt5/core/libLumina/RootWindow.h +++ b/src-qt5/core/libLumina/RootWindow.h @@ -47,6 +47,7 @@ private: }; QTimer *autoResizeTimer, *mouseFocusTimer; RootSubWindow *lastActiveMouse; + QPoint lastCursorPos; QList WALLPAPERS; void updateScreenPixmap(screeninfo *info); //used for recalculating the wallpaper pixmap based on file/area/scale as needed @@ -83,6 +84,8 @@ signals: void RootResized(QRect); void NewScreens(QStringList); // [screen_id_1, screen_id_2, etc..] void RemovedScreens(QStringList); // [screen_id_1, screen_id_2, etc..] + void WorkspaceChanged(int); + void MouseMoved(); }; -- cgit From a997d4422f42e371b24fef652c2f80469b3fb74c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 30 Aug 2017 15:39:33 -0400 Subject: A couple more minor tweaks. --- src-qt5/core/libLumina/RootWindow.cpp | 2 +- src-qt5/core/lumina-desktop-unified/LSession.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index 51e7b1f0..2ec33097 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -218,7 +218,7 @@ void RootWindow::checkMouseFocus(){ if(DesktopSettings::instance()->value(DesktopSettings::WM, "focusFollowsMouse", true).toBool()){ lastActiveMouse->giveKeyboardFocus(); - if(DesktopSettings::instance()->value(DesktopSettings::WM, "raiseOnFocus", true).toBool()){ + if(DesktopSettings::instance()->value(DesktopSettings::WM, "raiseOnFocus", false).toBool()){ lastActiveMouse->raise(); } } diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index e1a941f0..05575b27 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -228,6 +228,7 @@ void LSession::setupGlobalConnections(){ //Root window connections connect(Lumina::ROOTWIN, SIGNAL(RegisterVirtualRoot(WId)), Lumina::NWS, SLOT(RegisterVirtualRoot(WId)) ); connect(Lumina::ROOTWIN, SIGNAL(RootResized(QRect)), Lumina::NWS, SLOT(setRoot_desktopGeometry(QRect)) ); + connect(Lumina::ROOTWIN, SIGNAL(MouseMoved()), Lumina::SS, SLOT(newInputEvent()) ); //Native Window Class connections connect(Lumina::NEF, SIGNAL(WindowCreated(WId)), Lumina::NWS, SLOT(NewWindowDetected(WId))); -- cgit From 0bce08ce5c6fa073b0c9e299ab619d35ecdceef6 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Aug 2017 08:47:21 -0400 Subject: A but more work on Lumina2: 1. Get the menu-based task manager up and running. 2. Get the minimize button setup with normal functionality now (since we can restore it) 3. Get the maximize button logic setup - still testing this 4. Get the window movement animation system setup - still testing this for the maximize functionality 5. Cleanup a bit more of the backend "pause" for windows during animations. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 27 +++++++---- src-qt5/core/libLumina/NativeEmbedWidget.h | 1 + src-qt5/core/libLumina/NativeWindow.cpp | 4 ++ src-qt5/core/libLumina/NativeWindow.h | 1 + src-qt5/core/libLumina/NativeWindowSystem.cpp | 4 +- .../core/libLumina/RootSubWindow-animations.cpp | 21 ++++++++- src-qt5/core/libLumina/RootSubWindow.cpp | 53 +++++++++++++++++++--- src-qt5/core/libLumina/RootSubWindow.h | 2 +- .../src-desktop/ContextMenu.cpp | 22 +++++++++ .../src-desktop/ContextMenu.h | 2 + 10 files changed, 116 insertions(+), 21 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 6a420d25..21b4494f 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -55,7 +55,7 @@ inline void registerClientEvents(WId id){ | XCB_EVENT_MASK_BUTTON_MOTION | XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY -// | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT + | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_ENTER_WINDOW) }; @@ -85,15 +85,17 @@ void NativeEmbedWidget::syncWidgetSize(QSize sz){ } void NativeEmbedWidget::hideWindow(){ - qDebug() << "Hide Embed Window"; + //qDebug() << "Hide Embed Window"; xcb_unmap_window(QX11Info::connection(), WIN->id()); } void NativeEmbedWidget::showWindow(){ - qDebug() << "Show Embed Window"; + //qDebug() << "Show Embed Window"; xcb_map_window(QX11Info::connection(), WIN->id()); reregisterEvents(); - QTimer::singleShot(0,this, SLOT(repaintWindow())); + if(!DISABLE_COMPOSITING){ + QTimer::singleShot(0,this, SLOT(repaintWindow())); + } } QImage NativeEmbedWidget::windowImage(QRect geom){ @@ -162,17 +164,17 @@ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change }else{ xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); + registerClientEvents(this->winId()); //child events get forwarded through the frame - watch this for changes too } WIN->addFrameWinID(this->winId()); registerClientEvents(WIN->id()); - //registerClientEvents(this->winId()); //qDebug() << "Events Registered:" << WIN->id() << this->winId(); return true; } bool NativeEmbedWidget::detachWindow(){ xcb_reparent_window(QX11Info::connection(), WIN->id(), QX11Info::appRootWindow(), -1, -1); - WIN = 0; + //WIN = 0; return true; } @@ -197,15 +199,22 @@ void NativeEmbedWidget::lowerWindow(){ // ============== //Pause/resume void NativeEmbedWidget::pause(){ - if(winImage.isNull()){ repaintWindow(); } //make sure we have one image already cached first + if(DISABLE_COMPOSITING){ + this->setVisible(false); + }else{ + if(winImage.isNull()){ repaintWindow(); } //make sure we have one image already cached first + } paused = true; } void NativeEmbedWidget::resume(){ paused = false; syncWinSize(); - //showWindow(); - repaintWindow(); //update the cached image right away + if(DISABLE_COMPOSITING){ + this->setVisible(true); + }else{ + repaintWindow(); //update the cached image right away + } } void NativeEmbedWidget::resyncWindow(){ diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 89d95a6f..5025f692 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -43,6 +43,7 @@ public: bool embedWindow(NativeWindow *window); bool detachWindow(); bool isEmbedded(); //status of the embed + bool isPaused(){ return paused; } public slots: void raiseWindow(); diff --git a/src-qt5/core/libLumina/NativeWindow.cpp b/src-qt5/core/libLumina/NativeWindow.cpp index 3c76ed00..02cc001e 100644 --- a/src-qt5/core/libLumina/NativeWindow.cpp +++ b/src-qt5/core/libLumina/NativeWindow.cpp @@ -106,6 +106,10 @@ QRect NativeWindow::geometry(){ return geom; } // ==== PUBLIC SLOTS === +void NativeWindow::toggleVisibility(){ + setProperty(NativeWindow::Visible, !property(NativeWindow::Visible).toBool() ); +} + void NativeWindow::requestClose(){ emit RequestClose(winid); } diff --git a/src-qt5/core/libLumina/NativeWindow.h b/src-qt5/core/libLumina/NativeWindow.h index d04815ce..67436259 100644 --- a/src-qt5/core/libLumina/NativeWindow.h +++ b/src-qt5/core/libLumina/NativeWindow.h @@ -78,6 +78,7 @@ public: QRect geometry(); //this returns the "full" geometry of the window (window + frame) public slots: + void toggleVisibility(); void requestClose(); //ask the app to close the window (may/not depending on activity) void requestKill(); //ask the WM to kill the app associated with this window (harsh - only use if not responding) void requestPing(); //ask the app if it is still active (a WindowNotResponding signal will get sent out if there is no reply); diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index cd2459d3..9d04228d 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -479,7 +479,7 @@ void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< Native } if(props.contains(NativeWindow::Size) || props.contains(NativeWindow::GlobalPos) ){ - xcb_configure_window_value_list_t valList; + /*xcb_configure_window_value_list_t valList; //valList.x = 0; //Note that this is the relative position - should always be 0,0 relative to the embed widget //valList.y = 0; QSize sz = win->property(NativeWindow::Size).toSize(); @@ -499,7 +499,7 @@ void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< Native uint16_t mask = 0; mask = mask | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; //qDebug() << "Configure window Geometry:" << sz; - xcb_configure_window_aux(QX11Info::connection(), win->id(), mask, &valList); + xcb_configure_window_aux(QX11Info::connection(), win->id(), mask, &valList);*/ } if(props.contains(NativeWindow::Name)){ diff --git a/src-qt5/core/libLumina/RootSubWindow-animations.cpp b/src-qt5/core/libLumina/RootSubWindow-animations.cpp index ac813e3a..b1489ad6 100644 --- a/src-qt5/core/libLumina/RootSubWindow-animations.cpp +++ b/src-qt5/core/libLumina/RootSubWindow-animations.cpp @@ -11,6 +11,9 @@ QStringList RootSubWindow::validAnimations(NativeWindow::Property prop){ QStringList valid; if(prop == NativeWindow::Visible){ valid << "zoom" << "wipe-center-vertical" << "wipe-center-horizontal" << "shade-top" << "shade-right" << "shade-left" << "shade-bottom"; + }else if(prop == NativeWindow::Size){ + //Note: this is used for pretty much all geometry changes to the window where it is visible both before/after animation + valid << "direct"; } return valid; } @@ -20,7 +23,7 @@ void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVa //Special case - random animation each time if(name=="random"){ QStringList valid = validAnimations(prop); - name = valid.at(qrand()%valid.length()); + if(!valid.isEmpty()){ name = valid.at(qrand()%valid.length()); } } //Now setup the animation if(prop == NativeWindow::Visible){ @@ -68,6 +71,20 @@ void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVa anim->start(); this->show(); } //end of Visibility animation + else if(prop == NativeWindow::Size){ + //This is pretty much all geometry animations where the window is visible->visible + animResetProp = QVariant(); //reset this - not needed here + anim->setPropertyName("geometry"); + anim->setStartValue(this->geometry()); + anim->setEndValue(nval.toRect()); + /*if(name==""){ + // TO-DO modify the path from beginning->end somehow + }*/ + // Now start the animation + WinWidget->pause(); + anim->start(); + this->show(); + } } void RootSubWindow::animFinished(){ @@ -92,6 +109,6 @@ void RootSubWindow::animFinished(){ } } animResetProp = QVariant(); //clear the variable - WinWidget->resume(); + QTimer::singleShot(10, WinWidget, SLOT(resume()) ); } diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index cc1a1d2a..36da43c2 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #define WIN_BORDER 5 @@ -278,12 +279,44 @@ void RootSubWindow::LoadAllProperties(){ //Button Actions - public so they can be tied to key shortcuts and stuff as well void RootSubWindow::toggleMinimize(){ - WIN->setProperty(NativeWindow::Visible, false); - QTimer::singleShot(2000, this, SLOT(toggleMaximize()) ); + WIN->toggleVisibility(); } void RootSubWindow::toggleMaximize(){ - WIN->setProperty(NativeWindow::Visible, true); + //Get the current screen that this window is on + QList screens = QApplication::screens(); + QRect rect; + int primaryscreen = 0; //fallback value + for(int i=0; igeometry().intersected(this->geometry()); + if( (intersect.width()-rect.width() + intersect.height()-rect.height()) > 0){ + rect = intersect; + primaryscreen = i; + } + } + //Now that we have the screen dimensions, lets check/change the window + rect = screens[primaryscreen]->availableGeometry(); + QList< NativeWindow::State > states = WIN->property(NativeWindow::States).value< QList< NativeWindow::State> >(); + if(rect == this->geometry() || states.contains(NativeWindow::S_MAX_VERT) || states.contains(NativeWindow::S_MAX_HORZ)){ + //Already maximized - try to restore it to the previous size/location + if(!lastMaxGeom.isNull()){ + rect = lastMaxGeom; + }else{ + // no last geometry - started out maximized? + // make it half the screen size and centered on the screen + QPoint center = rect.center(); + rect.setWidth( rect.width()/2 ); + rect.setHeight( rect.height()/2 ); + rect.moveTopLeft( center - QPoint(rect.width()/2, rect.height()/2) ); + } + lastMaxGeom = QRect(); //clear this saved geom + }else{ + //Not maximized yet - go ahead and make it so + lastMaxGeom = this->geometry(); //save this for later; + } + qDebug() << "Toggle Maximize:" << this->geometry() << rect; + QString anim_type = DesktopSettings::instance()->value(DesktopSettings::Animation, "window/move", "random").toString(); + loadAnimation(anim_type, NativeWindow::Size, rect); } void RootSubWindow::triggerClose(){ @@ -291,7 +324,13 @@ void RootSubWindow::triggerClose(){ } void RootSubWindow::toggleSticky(){ - + QList< NativeWindow::State> states = WIN->property(NativeWindow::States).value< QList< NativeWindow::State > >(); + if(states.contains(NativeWindow::S_STICKY)){ + states.removeAll(NativeWindow::S_STICKY); + }else{ + states << NativeWindow::S_STICKY; + } + WIN->requestProperty(NativeWindow::States, QVariant::fromValue >(states) ); } void RootSubWindow::activate(){ @@ -327,7 +366,7 @@ void RootSubWindow::propertiesChanged(QList props, QList //qDebug() << "RootSubWindow: Property Changed:" << props[i] << vals[i]; switch(props[i]){ case NativeWindow::Visible: - qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); + //qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); if(vals[i].toBool()){ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/appear", "random").toString(), NativeWindow::Visible, vals[i]); } else{ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/disappear", "random").toString(), NativeWindow::Visible, vals[i]); } break; @@ -347,9 +386,9 @@ void RootSubWindow::propertiesChanged(QList props, QList props << props.takeAt(i); vals << vals.takeAt(i); i--; - }else if(anim->state() != QPropertyAnimation::Running ){ + }else if(anim->state() != QPropertyAnimation::Running && !WinWidget->isPaused()){ if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size() && activeState==Normal ){ - qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); + //qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); this->setGeometry(WIN->geometry()); } } diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h index f87d7733..c4dd2e0b 100644 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ b/src-qt5/core/libLumina/RootSubWindow.h @@ -55,7 +55,7 @@ private: QPropertyAnimation *anim; QVariant animResetProp; QTimer *moveTimer; - QRect lastGeom; //frame coordinates + QRect lastGeom, lastMaxGeom; //frame coordinates void initWindowFrame(); void enableFrame(bool); diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp index 1b5512ff..143a3667 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp @@ -64,6 +64,17 @@ void DesktopContextMenu::UpdateMenu(bool fast){ this->addAction(LXDG::findIcon("system-log-out",""), tr("Leave"), this, SIGNAL(showLeaveDialog()) ); } +// === PRIVATE === +void DesktopContextMenu::AddWindowToMenu(NativeWindow *win){ + QString label = win->property(NativeWindow::ShortTitle).toString(); + if(label.isEmpty()){ label = win->property(NativeWindow::Title).toString(); } + if(label.isEmpty()){ label = win->property(NativeWindow::Name).toString(); } + QAction *tmp = winMenu->addAction( win->property(NativeWindow::Icon).value(), label, win, SLOT(toggleVisibility()) ); + //Need to change the visual somehow to indicate whether it is visible or not + //bool visible = win->property(NativeWindow::Visible).toBool(); + // TODO +} + // === PUBLIC === DesktopContextMenu::DesktopContextMenu(QWidget *parent) : QMenu(parent){ if(parent!=0){ @@ -150,4 +161,15 @@ void DesktopContextMenu::updateWinMenu(){ winMenu = new QMenu(this); winMenu->setTitle( tr("Task Manager") ); } + winMenu->clear(); + QList wins = Lumina::NWS->currentWindows(); + unsigned int wkspace = Lumina::NWS->currentWorkspace(); + for(int i=0; iproperty(NativeWindow::Workspace).toUInt() != wkspace + && wins.at(i)->property(NativeWindow::States).value< QList >().contains(NativeWindow::S_STICKY) ){ + continue; + } + AddWindowToMenu(wins.at(i)); + } } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h index ee6fdcc9..78756e8c 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.h @@ -21,6 +21,8 @@ private: QMenu *appMenu, *winMenu; bool usewinmenu; + void AddWindowToMenu(NativeWindow*); + public: DesktopContextMenu(QWidget *parent = 0); ~DesktopContextMenu(); -- cgit From 2ed1ee7459868dca7228d61202a38c7c9c3e23f8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Aug 2017 11:42:33 -0400 Subject: Get all the single-window interactions finished up. Now the multiple types of animations will not conflict/overwrite each other, and the window itself will be properly "paused" for animations. Also fix up some window resize calculation errors, so the offset to the mouse position is properly handled now --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 19 +++-- src-qt5/core/libLumina/NativeEmbedWidget.h | 1 + .../core/libLumina/RootSubWindow-animations.cpp | 8 +- src-qt5/core/libLumina/RootSubWindow.cpp | 93 ++++++++++++---------- 4 files changed, 68 insertions(+), 53 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 21b4494f..96393e98 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -67,7 +67,7 @@ inline void registerClientEvents(WId id){ // ============ //Simplification functions for the XCB/XLib interactions void NativeEmbedWidget::syncWinSize(QSize sz){ - if(WIN==0 || paused){ return; } + if(WIN==0){ return; } else if(!sz.isValid()){ sz = this->size(); } //use the current widget size //qDebug() << "Sync Window Size:" << sz; //if(sz == winSize){ return; } //no change @@ -117,8 +117,14 @@ QImage NativeEmbedWidget::windowImage(QRect geom){ return img; -} +} +void NativeEmbedWidget::setWinUnpaused(){ + paused = false; + if(!DISABLE_COMPOSITING){ + repaintWindow(); //update the cached image right away + } +} // ============ // PUBLIC // ============ @@ -215,6 +221,7 @@ void NativeEmbedWidget::resume(){ }else{ repaintWindow(); //update the cached image right away } + QTimer::singleShot(10, this, SLOT(setWinUnpaused()) ); } void NativeEmbedWidget::resyncWindow(){ @@ -267,7 +274,7 @@ void NativeEmbedWidget::reregisterEvents(){ // ============== void NativeEmbedWidget::resizeEvent(QResizeEvent *ev){ QWidget::resizeEvent(ev); - if(WIN!=0){ + if(WIN!=0 && !paused){ syncWinSize(ev->size()); } //syncronize the window with the new widget size } @@ -283,13 +290,13 @@ void NativeEmbedWidget::hideEvent(QHideEvent *ev){ } void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ - if(WIN==0 || paused){ return; } + if(WIN==0){ return; } //else if( winImage.isNull() ){return; } else if(DISABLE_COMPOSITING){ // Just make it solid black (underneath the embedded window) // - only visible when looking through the edge of another window) - QPainter P(this); - P.fillRect(ev->rect(), Qt::black); + //QPainter P(this); + //P.fillRect(ev->rect(), Qt::black); return; } //renderWindowToWidget(WIN->id(), this); diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 5025f692..16bb46dc 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -36,6 +36,7 @@ private slots: void showWindow(); QImage windowImage(QRect geom); + void setWinUnpaused(); public: NativeEmbedWidget(QWidget *parent); diff --git a/src-qt5/core/libLumina/RootSubWindow-animations.cpp b/src-qt5/core/libLumina/RootSubWindow-animations.cpp index b1489ad6..54524838 100644 --- a/src-qt5/core/libLumina/RootSubWindow-animations.cpp +++ b/src-qt5/core/libLumina/RootSubWindow-animations.cpp @@ -19,6 +19,7 @@ QStringList RootSubWindow::validAnimations(NativeWindow::Property prop){ } void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVariant nval){ + if(anim->state()==QAbstractAnimation::Running){ return; } //already running animResetProp.clear(); //Special case - random animation each time if(name=="random"){ @@ -73,7 +74,6 @@ void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVa } //end of Visibility animation else if(prop == NativeWindow::Size){ //This is pretty much all geometry animations where the window is visible->visible - animResetProp = QVariant(); //reset this - not needed here anim->setPropertyName("geometry"); anim->setStartValue(this->geometry()); anim->setEndValue(nval.toRect()); @@ -104,11 +104,11 @@ void RootSubWindow::animFinished(){ //qDebug() << "Sub Window geometry:" << clientg; WIN->setProperties(QList< NativeWindow::Property>() << NativeWindow::Size << NativeWindow::GlobalPos, QList() << clientg.size() << clientg.topLeft() ); - WinWidget->resyncWindow(); //also let the window know about the current geometry } } + WinWidget->resyncWindow(); //also let the window know about the current geometry } animResetProp = QVariant(); //clear the variable - QTimer::singleShot(10, WinWidget, SLOT(resume()) ); - + //QTimer::singleShot(10, WinWidget, SLOT(resume()) ); + WinWidget->resume(); } diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 36da43c2..9eb62ff5 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -57,7 +57,7 @@ RootSubWindow::ModState RootSubWindow::getStateAtPoint(QPoint pt, bool setoffset if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()); } //difference from top-left corner return ResizeTopLeft; }else if(pt.x() > (this->width()*4.0/5.0)){ - if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(pt.y()); } //difference from top-right corner + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()); } //difference from top-right corner return ResizeTopRight; }else{ if(setoffset){ offset.setX(0); offset.setY(pt.y()); } //difference from top edge (X does not matter) @@ -66,13 +66,13 @@ RootSubWindow::ModState RootSubWindow::getStateAtPoint(QPoint pt, bool setoffset }else if(pt.y() > (this->height()-WIN_BORDER) ){ //One of the bottom options if(pt.x() < this->width()/5){ - if(setoffset){ offset.setX(pt.x()); offset.setY(this->height()-pt.y()); } //difference from bottom-left corner + if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()-this->height()); } //difference from bottom-left corner return ResizeBottomLeft; }else if(pt.x() > (this->width()*4.0/5.0)){ - if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(this->height()-pt.y()); } //difference from bottom-right corner + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()-this->height()); } //difference from bottom-right corner return ResizeBottomRight; }else{ - if(setoffset){ offset.setX(0); offset.setY(this->height() - pt.y()); } //difference from bottom edge (X does not matter) + if(setoffset){ offset.setX(0); offset.setY(pt.y()-this->height()); } //difference from bottom edge (X does not matter) return ResizeBottom; } }else if(pt.x() < WIN_BORDER){ @@ -81,7 +81,7 @@ RootSubWindow::ModState RootSubWindow::getStateAtPoint(QPoint pt, bool setoffset if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()); } //difference from top-left corner return ResizeTopLeft; }else if(pt.y() > (this->height()*4.0/5.0)){ - if(setoffset){ offset.setX(pt.x()); offset.setY(this->height()-pt.y()); } //difference from bottom-left corner + if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()-this->height()); } //difference from bottom-left corner return ResizeBottomLeft; }else{ if(setoffset){ offset.setX(pt.x()); offset.setY(0); } //difference from left edge (Y does not matter) @@ -90,13 +90,13 @@ RootSubWindow::ModState RootSubWindow::getStateAtPoint(QPoint pt, bool setoffset }else if(pt.x() > (this->width()-WIN_BORDER) ){ //Right side options if(pt.y() < this->height()/5){ - if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(pt.y()); } //difference from top-right corner + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()); } //difference from top-right corner return ResizeTopRight; }else if(pt.y() > (this->height()*4.0/5.0)){ - if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(this->height()-pt.y()); } //difference from bottom-right corner + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()-this->height()); } //difference from bottom-right corner return ResizeBottomRight; }else{ - if(setoffset){ offset.setX(this->width()-pt.x()); offset.setY(0); } //difference from right edge (Y does not matter) + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(0); } //difference from right edge (Y does not matter) return ResizeRight; } }else{ @@ -187,11 +187,12 @@ void RootSubWindow::initWindowFrame(){ titleBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); mainLayout->addWidget(titleBar); mainLayout->addWidget(WinWidget); + mainLayout->setAlignment(titleBar, Qt::AlignTop); //Setup the cursors for the buttons closeB->setCursor(Qt::ArrowCursor); minB->setCursor(Qt::ArrowCursor); maxB->setCursor(Qt::ArrowCursor); - otherM->setCursor(Qt::ArrowCursor); + otherB->setCursor(Qt::ArrowCursor); titleLabel->setCursor(Qt::ArrowCursor); WinWidget->setCursor(Qt::ArrowCursor); //Now all the stylesheet options @@ -351,12 +352,14 @@ void RootSubWindow::startMoving(){ offset = this->mapFromGlobal(curpt); setMouseCursor(activeState, true); //this one is an override cursor //WinWidget->pause(); - //Also need to capture the mouse this->grabMouse(); } void RootSubWindow::startResizing(){ - + activeState = getStateAtPoint( this->mapFromGlobal(QCursor::pos()), true); //also have it set the offset variable + setMouseCursor(activeState, true); //this one is an override cursor + //WinWidget->pause(); + this->grabMouse(); } // === PRIVATE SLOTS === @@ -366,9 +369,11 @@ void RootSubWindow::propertiesChanged(QList props, QList //qDebug() << "RootSubWindow: Property Changed:" << props[i] << vals[i]; switch(props[i]){ case NativeWindow::Visible: - //qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); - if(vals[i].toBool()){ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/appear", "random").toString(), NativeWindow::Visible, vals[i]); } - else{ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/disappear", "random").toString(), NativeWindow::Visible, vals[i]); } + if(!WinWidget->isPaused() && (this->isVisible()!=vals[i].toBool()) && activeState==Normal ){ + qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); + if(vals[i].toBool()){ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/appear", "random").toString(), NativeWindow::Visible, vals[i]); } + else{ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/disappear", "random").toString(), NativeWindow::Visible, vals[i]); } + } break; case NativeWindow::Title: titleLabel->setText(vals[i].toString()); @@ -386,9 +391,9 @@ void RootSubWindow::propertiesChanged(QList props, QList props << props.takeAt(i); vals << vals.takeAt(i); i--; - }else if(anim->state() != QPropertyAnimation::Running && !WinWidget->isPaused()){ - if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size() && activeState==Normal ){ - //qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); + }else if(!WinWidget->isPaused() && !this->isVisible() && activeState==Normal){ + if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size()){ + qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); this->setGeometry(WIN->geometry()); } } @@ -437,28 +442,24 @@ void RootSubWindow::propertiesChanged(QList props, QList void RootSubWindow::mousePressEvent(QMouseEvent *ev){ activate(); this->raise(); - //WinWidget->raiseWindow(); + QFrame::mousePressEvent(ev); //qDebug() << "Frame Mouse Press Event"; - offset.setX(0); offset.setY(0); if(activeState != Normal){ return; } // do nothing - already in a state of grabbed mouse - //this->activate(); - if(this->childAt(ev->pos())!=0){ - //Check for any non-left-click event and skip it - if(ev->button()!=Qt::LeftButton){ return; } - activeState = Move; - offset.setX(ev->pos().x()); offset.setY(ev->pos().y()); - }else{ - //Clicked on the frame somewhere - activeState = getStateAtPoint(ev->pos(), true); //also have it set the offset variable + offset.setX(0); offset.setY(0); + if(ev->button()==Qt::LeftButton){ + if(this->childAt(ev->pos())!=0){ + //Clicked on the titlebar + startMoving(); + }else{ + //Clicked on the frame somewhere + startResizing(); + } } - setMouseCursor(activeState, true); //this one is an override cursor - //if(activeState!=Normal){WinWidget->pause(); } - if(activeState!=Normal && activeState!=Move){WinWidget->pause(); } - QFrame::mousePressEvent(ev); + } void RootSubWindow::mouseMoveEvent(QMouseEvent *ev){ - //activate(); //make sure this window is "Active" on mouse over + QFrame::mouseMoveEvent(ev); if(activeState == Normal){ setMouseCursor( getStateAtPoint(ev->pos()) ); //just update the mouse cursor }else{ @@ -533,10 +534,15 @@ void RootSubWindow::mouseMoveEvent(QMouseEvent *ev){ break; } //if( (geom.width()%2==0 && geom.height()%2==0) || activeState==Move){ - this->setGeometry(geom); + //qDebug() << " Change Window:" << this->geometry() << geom; + if(activeState==Move){ this->setGeometry(geom); } + else{ + //qDebug() << " Change Window Dimensions:" << this->geometry() << geom; + //qDebug() << " - Mouse Pos:" << ev->globalPos() << ev->pos() << "Offset" << offset; + this->setGeometry(geom); + } //} } - QFrame::mouseMoveEvent(ev); } void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ @@ -544,18 +550,19 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ //qDebug() << "Frame Mouse Release Event"; QFrame::mouseReleaseEvent(ev); if( (activeState==Normal) && (titleBar->geometry().contains(ev->pos())) && (ev->button()==Qt::RightButton) ){ - WinWidget->raiseWindow();//need to ensure the native window is always on top of this frame but under the menu + //WinWidget->raiseWindow();//need to ensure the native window is always on top of this frame but under the menu otherM->popup(ev->globalPos()); return; } - if(activeState!=Normal){ WinWidget->resume(); } - if(activeState!=Normal && activeState!=Move){WinWidget->resume(); } - activeState = Normal; - QApplication::restoreOverrideCursor(); - setMouseCursor( getStateAtPoint(ev->pos()) ); + if(activeState!=Normal){ + if(WinWidget->isPaused()){ WinWidget->resume(); } + activeState = Normal; + QApplication::restoreOverrideCursor(); + setMouseCursor( getStateAtPoint(ev->pos()) ); + } if(QFrame::mouseGrabber() == this){ this->releaseMouse(); } activate(); - QTimer::singleShot(0, WinWidget, SLOT(raiseWindow()) ); + //QTimer::singleShot(0, WinWidget, SLOT(raiseWindow()) ); } /*void RootSubWindow::enterEvent(QEvent *ev){ @@ -573,7 +580,7 @@ void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ void RootSubWindow::moveEvent(QMoveEvent *ev){ //qDebug() << "Got Move Event:" << ev->pos() << WinWidget->geometry(); QFrame::moveEvent(ev); - if(!closing && anim->state()!=QAbstractAnimation::Running){ + if(!closing && !WinWidget->isPaused()){ moveTimer->start(); } } -- cgit From a85dfaaaa460886d74d7a052a970ee75eb16f202 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Aug 2017 14:12:53 -0400 Subject: A large amount of cleanup: 1) Fix the screen-alignment in a number of screensavers 2) Fix the restart-interval for screensavers (60 seconds by default) 3) Fix the cleanup of old screensaver objects between rotations 4) Add a default settings file for screensavers 5) Fix the prioritization of the settings files within DesktopSettings. 6) Turn off some event filter debugging --- src-qt5/core/libLumina/DesktopSettings.cpp | 9 +++-- src-qt5/core/libLumina/NativeEventFilter.cpp | 2 +- .../defaults/desktop/screensaver.conf | 3 ++ .../src-screensaver/LScreenSaver.cpp | 4 ++- .../src-screensaver/SSBaseWidget.cpp | 19 +++++++---- .../src-screensaver/SSBaseWidget.h | 1 + .../src-screensaver/animations/BaseAnimGroup.cpp | 2 +- .../src-screensaver/animations/Grav.h | 16 ++++----- .../src-screensaver/animations/ImageSlideshow.h | 38 +++++++++++++--------- .../src-screensaver/animations/Text.h | 14 +++++--- 10 files changed, 68 insertions(+), 40 deletions(-) create mode 100644 src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/DesktopSettings.cpp b/src-qt5/core/libLumina/DesktopSettings.cpp index d1a898b2..bce634f1 100644 --- a/src-qt5/core/libLumina/DesktopSettings.cpp +++ b/src-qt5/core/libLumina/DesktopSettings.cpp @@ -65,8 +65,10 @@ QList< DesktopSettings::File > DesktopSettings::writableFiles(){ QVariant DesktopSettings::value(DesktopSettings::File file, QString variable, QVariant defaultvalue){ if(!files.contains(file)){ return defaultvalue; } for(int i=0; icontains(variable)){ //if this file does not have the variable - go to the next one + qDebug() << " - Found Setting in File:" << files[file][i]; return settings[files[file][i]]->value(variable, defaultvalue); } } @@ -124,7 +126,7 @@ void DesktopSettings::parseSystemSettings(){ QString defMode = settings[path]->value("default_mode","fulluser").toString().toLower(); if(defMode=="fullsystem"){ runmode= DesktopSettings::SystemFull; } else if(defMode=="staticinterface"){ runmode = DesktopSettings::SystemInterface; } - + else{ runmode = DesktopSettings::UserFull; } //Now determine the runmode for this user struct passwd *pw = getpwuid(getuid()); if(pw!=0){ @@ -203,7 +205,10 @@ void DesktopSettings::locateFiles(){ for(int j=0; jaddPath(path); } diff --git a/src-qt5/core/libLumina/NativeEventFilter.cpp b/src-qt5/core/libLumina/NativeEventFilter.cpp index a2016402..c13c1fc8 100644 --- a/src-qt5/core/libLumina/NativeEventFilter.cpp +++ b/src-qt5/core/libLumina/NativeEventFilter.cpp @@ -77,7 +77,7 @@ inline void ParsePropertyEvent(xcb_property_notify_event_t *ev, NativeEventFilte //Send out the signal if necessary if(prop!=NativeWindow::None){ //if(DEBUG){ - qDebug() << "Detected Property Change:" << ev->window << prop; + //qDebug() << "Detected Property Change:" << ev->window << prop; //} obj->emit WindowPropertyChanged(ev->window, prop); }else{ diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf new file mode 100644 index 00000000..b4bfec59 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf @@ -0,0 +1,3 @@ +[General] +default_plugin="random" +plugin_VGA-0="random" diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp index ff63e3a3..a0edde9f 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LScreenSaver.cpp @@ -110,7 +110,9 @@ void LScreenSaver::ShowScreenSaver(){ //Setup the geometry of the base to match the screen BASES[i]->setGeometry(SCREENS[i]->geometry()); //match this screen geometry - BASES[i]->setPlugin(DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "screenplugin_"+SCREENS[i]->name(), DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "defaultscreenplugin","random").toString() ).toString() ); + QString plug = DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "plugin_"+SCREENS[i]->name(), "").toString(); + if(plug.isEmpty()){ plug = DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "default_plugin","random").toString(); } + BASES[i]->setPlugin(plug); } //Now set the overall parent widget geometry and show everything this->setGeometry(bounds); //overall background widget diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp index 8e7eb7f6..a6d5be60 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp @@ -7,18 +7,20 @@ #include "SSBaseWidget.h" -#define DEBUG 0 +#define DEBUG 1 -static QStringList validPlugs; // ======== // PUBLIC // ======== SSBaseWidget::SSBaseWidget(QWidget *parent) : QWidget(parent){ - if(validPlugs.isEmpty()){ validPlugs << "none"; } //add more later this->setObjectName("LuminaBaseSSWidget"); ANIM = 0; this->setMouseTracking(true); plugType="none"; + restartTimer = new QTimer(this); + restartTimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "globals/plugin_time_seconds", 60).toInt() * 1000); + restartTimer->setSingleShot(true); + connect(restartTimer, SIGNAL(timeout()), this, SLOT(startPainting()) ); } SSBaseWidget::~SSBaseWidget(){ @@ -26,9 +28,7 @@ SSBaseWidget::~SSBaseWidget(){ } void SSBaseWidget::setPlugin(QString plug){ - plug = plug.toLower(); - if(validPlugs.contains(plug) || plug=="random"){ plugType = plug; } - else{ plugType = "none"; } + plugType = plug.toLower(); } // ============= @@ -47,7 +47,7 @@ void SSBaseWidget::startPainting(){ if(valid.isEmpty()){ cplug = "none"; } //no known plugins else{ cplug = valid[ qrand()%valid.length() ]; } //grab a random plugin } - if(DEBUG){ qDebug() << " - Screen Saver:" << cplug; } + if(DEBUG){ qDebug() << " - Screen Saver:" << plugType << cplug; } //Now list all the various plugins and start them appropriately QString style; if(cplug=="none"){ @@ -70,6 +70,7 @@ void SSBaseWidget::startPainting(){ ANIM->start(); } } + restartTimer->start(); } void SSBaseWidget::stopPainting(){ @@ -79,5 +80,9 @@ void SSBaseWidget::stopPainting(){ //ANIM->clear(); ANIM->deleteLater(); ANIM = 0; + //Delete any child widgets of the canvas + QList widgets = this->findChildren("",Qt::FindDirectChildrenOnly); + for(int i=0; ideleteLater(); } } + if(restartTimer->isActive()){ restartTimer->stop(); } } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h index c4c7388a..af809127 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h @@ -27,6 +27,7 @@ public slots: private: QString plugType, cplug; //type of custom painting to do BaseAnimGroup *ANIM; + QTimer *restartTimer; private slots: diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp index 477724e3..9b095fe4 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/BaseAnimGroup.cpp @@ -47,5 +47,5 @@ BaseAnimGroup* BaseAnimGroup::NewAnimation(QString type, QWidget *parent){ } QStringList BaseAnimGroup::KnownAnimations(){ - return (QStringList() << "grav" << "text" << "imageSlideshow" << "videoSlideshow" << "fireflies"); + return (QStringList() << "none" << "grav" << "text" << "imageSlideshow" << "videoSlideshow" << "fireflies"); } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h index 099e6645..df75ad67 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Grav.h @@ -77,13 +77,13 @@ private slots: orbit->setDuration(10); } }*/ - void stopped(){ qDebug() << "Planet stopped"; planet->hide();} + void stopped(){ planet->hide();} public: Grav(QWidget *parent) : QParallelAnimationGroup(parent){ planet = new QWidget(parent); range = parent->size(); - QPoint center = parent->geometry().center(); + QPoint center = QRect(QPoint(0,0), parent->size()).center();; //Creates a random planet size. Between 12 and 45 pixels int planet_radius = qRound(1.75* ((qrand()%20)+7) ); @@ -114,7 +114,7 @@ public: planet->show(); //Ensures the screensaver will not stop until the user wishes to login or it times out - this->setLoopCount(1); //number of orbits + this->setLoopCount(3); //number of orbits orbit->setDuration( qrand() %1000 + 19000); //20 second orbits //orbit->setEndValue(path.at(0)); //LoopChanged(0); //load initial values @@ -154,7 +154,7 @@ public: void LoadAnimations(){ //Creates the sun, which is a thin shell with a gradient from green to yellow sun = new QWidget(canvas); - QPoint center = canvas->geometry().center(); + QPoint center = QRect(QPoint(0,0), canvas->size()).center(); QString sunstyle = QStringLiteral("background-color:qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, ") + QStringLiteral("stop:0 rgba(0, 0, 0, 0), stop:0.38 rgba(0, 0, 0, 0), stop:0.4 rgba(82, 121, 76, 33), stop:0.5 rgba(159, 235, 148, 64), ") + QStringLiteral("stop:0.6 rgba(255, 238, 150, 129), stop:0.7 rgba(0, 0, 0, 0));"); @@ -164,11 +164,11 @@ public: wobble = new QPropertyAnimation(sun); wobble->setPropertyName("geometry"); wobble->setTargetObject(sun); - QRect initgeom = QRect(center-QPoint(12,12), QSize(60, 60)); + QRect initgeom = QRect(center-QPoint(30,30), QSize(60, 60)); wobble->setStartValue(initgeom); wobble->setKeyValueAt(0, initgeom ); //starting point wobble->setKeyValueAt(1, initgeom ); //starting point - wobble->setKeyValueAt(0.5, QRect(center-QPoint(18,18), QSize(90, 90))); //starting point + wobble->setKeyValueAt(0.5, QRect(center-QPoint(45,45), QSize(90, 90))); //starting point wobble->setDuration(2000); wobble->setLoopCount(-1); this->addAnimation(wobble); @@ -176,13 +176,13 @@ public: sun->setGeometry(initgeom); //Gives the screensaver a black background - canvas->setStyleSheet("background: black;"); + //canvas->setStyleSheet("background: black;"); //Pulls number of planets from settings, with 10 as default int number = readSetting("planets/number",qrand()%5+3).toInt(); //Loops through all planets and sets up the animations, then adds them to the base group and vector, which - qDebug() << "Starting planets"; + //qDebug() << "Starting planets"; for(int i=0; iaddAnimation(tmp); diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h index c040c7ac..fd98acb6 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h @@ -17,7 +17,7 @@ private: QPropertyAnimation *bounce, *fading; QPixmap pixmap; QStringList imageFiles; - QString imagePath, scriptPath; + QString imagePath, scriptPath, curpixmap; QSize screenSize; bool animate, scriptLoad; @@ -40,27 +40,33 @@ private: } void chooseImage() { - QString randomFile = imagePath+imageFiles[qrand() % imageFiles.size()]; - if(scriptLoad){ + /*if(scriptLoad){ QProcess process; process.start("/home/zwelch/test.sh"); process.waitForFinished(1000); QByteArray output = process.readAllStandardOutput(); //qDebug() << output; - pixmap.load(randomFile); - }else{ - pixmap.load(randomFile); - } - - //If the image is larger than the screen, then shrink the image down to 3/4 it's size (so there's still some bounce) + //pixmap.load(randomFile); + }else{*/ + //File Load + QString randomFile = curpixmap; + if(imageFiles.size()>1 || curpixmap.isEmpty()){ + while(curpixmap==randomFile){ randomFile = imagePath+imageFiles[qrand() % imageFiles.size()]; } + } + if(curpixmap!=randomFile){ + //no need to load the new file or change the label + pixmap.load(randomFile); + //If the image is larger than the screen, then shrink the image down to 3/4 it's size (so there's still some bounce) //Scale the pixmap to keep the aspect ratio instead of resizing the label itself - if(pixmap.width() > screenSize.width() or pixmap.height() > screenSize.height()){ - pixmap = pixmap.scaled(screenSize*(3.0/4.0), Qt::KeepAspectRatio); - } + if(pixmap.width() >= (screenSize.width()-10) || pixmap.height() >= (screenSize.height()-10) ){ + pixmap = pixmap.scaled(screenSize*(3.0/4.0), Qt::KeepAspectRatio); + } + //Set pixmap to the image label + image->setPixmap(pixmap); + image->resize(pixmap.size()); + } + //} - //Set pixmap to the image label - image->setPixmap(pixmap); - image->resize(pixmap.size()); } private slots: @@ -69,7 +75,7 @@ private slots: chooseImage(); setupAnimation(); } - void stopped(){ qDebug() << "Image Stopped"; image->hide();} + void stopped(){ image->hide();} public: ImageSlideshow(QWidget *parent, QString path, bool animate, bool scriptLoad, QString scriptPath) : QParallelAnimationGroup(parent){ diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h index 88c0873b..6ba18b22 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Text.h @@ -12,6 +12,8 @@ #include #include +#include + class Text: public QParallelAnimationGroup{ Q_OBJECT private: @@ -41,10 +43,10 @@ public: Text(QWidget *parent, QString display) : QParallelAnimationGroup(parent){ text = new QLabel(parent); range = parent->size(); - QPoint center = parent->geometry().center(); + QPoint center = QRect( QPoint(0,0), parent->size()).center(); QString color = "rgba(" + QString::number(qrand() % 206 + 50) + ", " + QString::number(qrand() % 206 + 50) + ", " + QString::number(qrand() % 206 + 50); - text->setStyleSheet("QLabel {background-color: rgba(255, 255, 255, 10); color: " + color + "); }"); + text->setStyleSheet("QLabel {background-color: transparent; color: " + color + "); }"); text->setFont(QFont("Courier", 24, QFont::Bold)); text->setText(display); QFontMetrics metrics(text->font()); @@ -60,7 +62,7 @@ public: v.setY((qrand() % 100 + 50) * qPow(-1, qrand() % 2)); movement->setStartValue(center); //Ensures the screensaver will not stop until the user wishes to login or it times out - this->setLoopCount(2000); //number of movements + this->setLoopCount(200); //number of wall bounces movement->setDuration(200); movement->setEndValue(QPoint(qrand() % (int)range.height(), qrand() % range.width())); LoopChanged(); //load initial values @@ -84,7 +86,11 @@ public: canvas->setStyleSheet("background: black;"); //Read off the text that needs to be displayed QString textToShow = readSetting("text", "").toString(); - if(textToShow.isEmpty()){ textToShow = "You forgot the text!!"; } + if(textToShow.isEmpty()){ + char hname[300]; + gethostname(hname, 300); + textToShow = QString::fromLocal8Bit(hname); + } // Now create the animation Text *tmp = new Text(canvas, textToShow); this->addAnimation(tmp); -- cgit From 3d02eea401b5a5571eeec34fbc75cc48f87c2bcb Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Aug 2017 14:39:56 -0400 Subject: A bit more cleanup. Nothing too special. --- src-qt5/core/libLumina/DesktopSettings.cpp | 4 ++-- .../src-screensaver/animations/ImageSlideshow.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/DesktopSettings.cpp b/src-qt5/core/libLumina/DesktopSettings.cpp index bce634f1..f1c74bc5 100644 --- a/src-qt5/core/libLumina/DesktopSettings.cpp +++ b/src-qt5/core/libLumina/DesktopSettings.cpp @@ -65,10 +65,10 @@ QList< DesktopSettings::File > DesktopSettings::writableFiles(){ QVariant DesktopSettings::value(DesktopSettings::File file, QString variable, QVariant defaultvalue){ if(!files.contains(file)){ return defaultvalue; } for(int i=0; icontains(variable)){ //if this file does not have the variable - go to the next one - qDebug() << " - Found Setting in File:" << files[file][i]; + //qDebug() << " - Found Setting in File:" << files[file][i]; return settings[files[file][i]]->value(variable, defaultvalue); } } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h index fd98acb6..81bc2b35 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/ImageSlideshow.h @@ -54,6 +54,7 @@ private: while(curpixmap==randomFile){ randomFile = imagePath+imageFiles[qrand() % imageFiles.size()]; } } if(curpixmap!=randomFile){ + curpixmap = randomFile; //save this for later //no need to load the new file or change the label pixmap.load(randomFile); //If the image is larger than the screen, then shrink the image down to 3/4 it's size (so there's still some bounce) @@ -125,8 +126,8 @@ public: //If no animation, center the image in the middle of the screen image->move(QPoint((parent->width()-image->width())/2,(parent->height()-image->height())/2)); - //Loop through 30 times for a total for 4 minutes - this->setLoopCount(30); + //Loop through 15 times for a total for 2 minutes + this->setLoopCount(15); bounce->setDuration(8000); fading->setDuration(8000); -- cgit From aa64ef84cd104cc9364ebf480117174540f69a88 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Aug 2017 21:59:44 -0400 Subject: Some more cleanup on Lumina2: 1) Get the JsonMenu plugin up and running again for the context menu 2) Get the LIconCache integrated into the context menu (replacing the old LXDG::findIcon calls). 3) Get the window property events working!!! (finally) 4) Start getting some automatic window-verification put in place (for snapping windows to various places and such). --- src-qt5/core/libLumina/LIconCache.cpp | 23 +++++++ src-qt5/core/libLumina/LIconCache.h | 4 +- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 25 ++++++-- src-qt5/core/libLumina/NativeWindowSystem.cpp | 35 ++++++++++- .../core/libLumina/RootSubWindow-animations.cpp | 2 + src-qt5/core/libLumina/RootSubWindow.h | 6 +- src-qt5/core/libLumina/RootWindow.cpp | 3 +- src-qt5/core/lumina-desktop-unified/JsonMenu.h | 71 ++++++++++++++++++++++ src-qt5/core/lumina-desktop-unified/LSession.cpp | 10 +-- .../core/lumina-desktop-unified/global-includes.h | 5 ++ .../core/lumina-desktop-unified/lumina-desktop.pro | 4 +- .../src-desktop/ContextMenu.cpp | 32 +++++++--- 12 files changed, 194 insertions(+), 26 deletions(-) create mode 100644 src-qt5/core/lumina-desktop-unified/JsonMenu.h (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LIconCache.cpp b/src-qt5/core/libLumina/LIconCache.cpp index 70c360fb..84428546 100644 --- a/src-qt5/core/libLumina/LIconCache.cpp +++ b/src-qt5/core/libLumina/LIconCache.cpp @@ -184,6 +184,27 @@ void LIconCache::loadIcon(QLabel *label, QString icon, bool noThumb){ if(needload){ startReadFile(icon, idata.fullpath); } } +void LIconCache::loadIcon(QMenu *action, QString icon, bool noThumb){ + if(icon.isEmpty()){ return; } + if(isThemeIcon(icon)){ + action->setIcon( iconFromTheme(icon)); + return ; + } + //See if the icon has already been loaded into the HASH + bool needload = !HASH.contains(icon); + if(!needload){ + if(!noThumb && !HASH[icon].thumbnail.isNull()){ action->setIcon( HASH[icon].thumbnail ); return; } + else if(!HASH[icon].icon.isNull()){ action->setIcon( HASH[icon].icon ); return; } + } + //Need to load the icon + icon_data idata; + if(HASH.contains(icon)){ idata = HASH.value(icon); } + else { idata = createData(icon); } + idata.pendingMenus << QPointer(action); //save this button for later + HASH.insert(icon, idata); + if(needload){ startReadFile(icon, idata.fullpath); } +} + void LIconCache::clearIconTheme(){ //use when the icon theme changes to refresh all requested icons QStringList keys = HASH.keys(); @@ -282,6 +303,8 @@ void LIconCache::startReadFile(QString id, QString path){ idat.pendingLabels.clear(); for(int i=0; isetIcon(idat.icon); } } idat.pendingActions.clear(); + for(int i=0; isetIcon(idat.icon); } } + idat.pendingMenus.clear(); //Now update the hash and let the world know it is available now HASH.insert(id, idat); this->emit IconAvailable(id); diff --git a/src-qt5/core/libLumina/LIconCache.h b/src-qt5/core/libLumina/LIconCache.h index 428ffcab..691d328c 100644 --- a/src-qt5/core/libLumina/LIconCache.h +++ b/src-qt5/core/libLumina/LIconCache.h @@ -4,7 +4,7 @@ // Available under the 3-clause BSD license // See the LICENSE file for full details //=========================================== -// This is a simple class for loading/serving icon files +// This is a simple class for loading/serving icon files // from the icon theme or local filesystem //=========================================== #include @@ -26,6 +26,7 @@ struct icon_data{ QList > pendingLabels; QList > pendingButtons; QList > pendingActions; + QList > pendingMenus; QIcon icon; QIcon thumbnail; }; @@ -50,6 +51,7 @@ public: void loadIcon(QAbstractButton *button, QString icon, bool noThumb = false); void loadIcon(QLabel *label, QString icon, bool noThumb = false); void loadIcon(QAction *action, QString icon, bool noThumb = false); + void loadIcon(QMenu *action, QString icon, bool noThumb = false); QIcon loadIcon(QString icon, bool noThumb = false); //generic loading routine - does not background the loading of icons when not in the cache diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 96393e98..c01c16b3 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -46,9 +46,24 @@ inline void renderWindowToWidget(WId id, QWidget *widget, bool hastransparency = 0, 0, 0, 0, 0, 0, (uint16_t) widget->width(), (uint16_t) widget->height() ); }*/ - -inline void registerClientEvents(WId id){ - uint32_t value_list[1] = { (XCB_EVENT_MASK_PROPERTY_CHANGE +#define CLIENT_EVENT_MASK (XCB_EVENT_MASK_PROPERTY_CHANGE | \ + XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ + XCB_EVENT_MASK_FOCUS_CHANGE | \ + XCB_EVENT_MASK_POINTER_MOTION) + +#define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ + XCB_EVENT_MASK_BUTTON_RELEASE | \ + XCB_EVENT_MASK_POINTER_MOTION | \ + XCB_EVENT_MASK_EXPOSURE | \ + XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ + XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ + XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ + XCB_EVENT_MASK_ENTER_WINDOW) + +inline void registerClientEvents(WId id, bool client = true){ + uint32_t values[] = {XCB_NONE}; + values[0] = client ? CLIENT_EVENT_MASK : FRAME_EVENT_MASK ; + /*{ (XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION @@ -58,8 +73,8 @@ inline void registerClientEvents(WId id){ | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_ENTER_WINDOW) - }; - xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); + };*/ + xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, values); } // ============ diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index 9d04228d..f9e787ad 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -63,10 +63,41 @@ XCB_EVENT_MASK_PROPERTY_CHANGE | \ XCB_EVENT_MASK_FOCUS_CHANGE) -inline void registerClientEvents(WId id){ +#define CLIENT_EVENT_MASK (XCB_EVENT_MASK_PROPERTY_CHANGE | \ + XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ + XCB_EVENT_MASK_FOCUS_CHANGE | \ + XCB_EVENT_MASK_POINTER_MOTION) + +#define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ + XCB_EVENT_MASK_BUTTON_RELEASE | \ + XCB_EVENT_MASK_POINTER_MOTION | \ + XCB_EVENT_MASK_EXPOSURE | \ + XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ + XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ + XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ + XCB_EVENT_MASK_ENTER_WINDOW) + +inline void registerClientEvents(WId id, bool client = true){ + uint32_t values[] = {XCB_NONE}; + values[0] = client ? CLIENT_EVENT_MASK : FRAME_EVENT_MASK ; + /*{ (XCB_EVENT_MASK_PROPERTY_CHANGE + | XCB_EVENT_MASK_BUTTON_PRESS + | XCB_EVENT_MASK_BUTTON_RELEASE + | XCB_EVENT_MASK_POINTER_MOTION + | XCB_EVENT_MASK_BUTTON_MOTION + | XCB_EVENT_MASK_EXPOSURE + | XCB_EVENT_MASK_STRUCTURE_NOTIFY + | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT + | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY + | XCB_EVENT_MASK_ENTER_WINDOW) + };*/ + xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, values); +} + +/*inline void registerClientEvents(WId id){ uint32_t value_list[1] = {NORMAL_WIN_EVENT_MASK}; xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); -} +}*/ //Internal XCB private objects class class NativeWindowSystem::p_objects{ diff --git a/src-qt5/core/libLumina/RootSubWindow-animations.cpp b/src-qt5/core/libLumina/RootSubWindow-animations.cpp index 54524838..efab20fe 100644 --- a/src-qt5/core/libLumina/RootSubWindow-animations.cpp +++ b/src-qt5/core/libLumina/RootSubWindow-animations.cpp @@ -61,6 +61,7 @@ void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVa } if(nval.toBool()){ this->setGeometry( anim->startValue().toRect() ); //ensure the window is the initial geom before it becomes visible + //QTimer::singleShot( anim->duration()+5, this, SLOT(activate()) ); }else{ QVariant tmp = anim->startValue(); anim->setStartValue(anim->endValue()); @@ -111,4 +112,5 @@ void RootSubWindow::animFinished(){ animResetProp = QVariant(); //clear the variable //QTimer::singleShot(10, WinWidget, SLOT(resume()) ); WinWidget->resume(); + emit windowAnimFinished(); } diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h index c4dd2e0b..c1964724 100644 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ b/src-qt5/core/libLumina/RootSubWindow.h @@ -67,7 +67,7 @@ private: public slots: void giveMouseFocus(){ WinWidget->raiseWindow(); } void removeMouseFocus(){ WinWidget->lowerWindow(); } - void giveKeyboardFocus(){ WIN->requestProperty(NativeWindow::Active, true); } + void giveKeyboardFocus(){ WIN->requestProperty(NativeWindow::Active, true, true); } void clientClosed(); void LoadAllProperties(); @@ -99,7 +99,9 @@ protected: //void enterEvent(QEvent *ev); void moveEvent(QMoveEvent *ev); - +signals: + void windowMoved(RootSubWindow*); + void windowAnimFinished(); }; #endif diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index 2ec33097..fdbc1eb8 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -236,11 +236,12 @@ void RootWindow::NewWindow(NativeWindow *win){ subwin = new RootSubWindow(this, win); subwin->setWhatsThis("RootSubWindow"); connect(win, SIGNAL(WindowClosed(WId)), this, SLOT(CloseWindow(WId)) ); + connect(subwin, SIGNAL(windowAnimFinished()), this, SLOT(checkMouseFocus()) ); WINDOWS << subwin; } CheckWindowPosition(win->id(), true); //first-time run win->setProperty(NativeWindow::Visible, true); - win->requestProperty( NativeWindow::Active, true); + //win->requestProperty( NativeWindow::Active, true); //win->requestProperties(QList() << NativeWindow::Visible << NativeWindow::Active, QList() << true << true, true); if(!mouseFocusTimer->isActive()){ mouseFocusTimer->start(); } } diff --git a/src-qt5/core/lumina-desktop-unified/JsonMenu.h b/src-qt5/core/lumina-desktop-unified/JsonMenu.h new file mode 100644 index 00000000..2624153d --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/JsonMenu.h @@ -0,0 +1,71 @@ +//=========================================== +// Lumina Desktop source code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This menu is used to automatically generate menu contents +// based on the JSON output of an external script/utility +//=========================================== +#ifndef _LUMINA_DESKTOP_JSON_MENU_H +#define _LUMINA_DESKTOP_JSON_MENU_H + +#include + +class JsonMenu : public QMenu{ + Q_OBJECT +private: + QString exec; + +public: + JsonMenu(QString execpath, QWidget *parent = 0) : QMenu(parent){ + exec = execpath; + connect(this, SIGNAL(aboutToShow()), this, SLOT(updateMenu()) ); + connect(this, SIGNAL(triggered(QAction*)), this, SLOT(itemTriggered(QAction*)) ); + } + +private slots: + void parseObject(QString label, QJsonObject obj){ + if( label.isEmpty() || !obj.contains("type") ){ return; } + QString type = obj.value("type").toString(); + if(type.toLower()=="item"){ + QAction *act = this->addAction(label); + if(obj.contains("icon")){ LIconCache::instance()->loadIcon(act, obj.value("icon").toString()); } + if(obj.contains("action")){ act->setWhatsThis( obj.value("action").toString() ); } + else{ act->setEnabled(false); } //not interactive + }else if(type.toLower()=="menu"){ + + }else if(type.toLower()=="jsonmenu"){ + //This is a recursive JSON menu object + if(!obj.contains("exec")){ return; } + JsonMenu *menu = new JsonMenu(obj.value("exec").toString(), this); + menu->setTitle(label); + if(obj.contains("icon")){ LIconCache::instance()->loadIcon(menu, obj.value("icon").toString()); } + this->addMenu(menu); + } + } + + void updateMenu(){ + this->clear(); + QJsonDocument doc = QJsonDocument::fromJson( LUtils::getCmdOutput(exec).join(" ").toLocal8Bit() ); + if(doc.isNull() || !doc.isObject()){ + this->addAction( QString(tr("Error parsing script output: %1")).arg("\n"+exec) )->setEnabled(false); + }else{ + QStringList keys = doc.object().keys(); + for(int i=0; iparent()!=this || act->whatsThis().isEmpty() ){ return; } //only handle direct child actions - needed for recursive nature of menu + QString cmd = act->whatsThis(); + QString bin = cmd.section(" ",0,0); + if( !LUtils::isValidBinary(bin) ){ cmd.prepend("lumina-open "); } + LSession::instance()->LaunchApplication(cmd); + } +}; +#endif diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index 05575b27..d70ff973 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -39,9 +39,9 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu this->setOrganizationName("LuminaDesktopEnvironment"); this->setQuitOnLastWindowClosed(false); //since the LDesktop's are not necessarily "window"s //Enable a few of the simple effects by default - //this->setEffectEnabled( Qt::UI_AnimateMenu, true); - //this->setEffectEnabled( Qt::UI_AnimateCombo, true); - //this->setEffectEnabled( Qt::UI_AnimateTooltip, true); + this->setEffectEnabled( Qt::UI_AnimateMenu, true); + this->setEffectEnabled( Qt::UI_AnimateCombo, true); + this->setEffectEnabled( Qt::UI_AnimateTooltip, true); this->setAttribute(Qt::AA_UseDesktopOpenGL); this->setAttribute(Qt::AA_UseHighDpiPixmaps); //allow pixmaps to be scaled up as well as down @@ -51,8 +51,8 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu Lumina::SS = new LScreenSaver(); //Now put the Native Window System into it's own thread to keep things snappy Lumina::EVThread = new QThread(); - Lumina::NWS->moveToThread(Lumina::EVThread); - Lumina::EVThread->start(); + //Lumina::NWS->moveToThread(Lumina::EVThread); + //Lumina::EVThread->start(); Lumina::APPLIST = XDGDesktopList::instance(); Lumina::ROOTWIN = new RootWindow(); Lumina::SHORTCUTS = new LShortcutEvents(); //this can be moved to it's own thread eventually as well diff --git a/src-qt5/core/lumina-desktop-unified/global-includes.h b/src-qt5/core/lumina-desktop-unified/global-includes.h index 8b8cd16c..184f5b8d 100644 --- a/src-qt5/core/lumina-desktop-unified/global-includes.h +++ b/src-qt5/core/lumina-desktop-unified/global-includes.h @@ -50,6 +50,10 @@ #include #include #include +#include +#include +#include + // libLumina includes #include @@ -66,6 +70,7 @@ #include #include #include +#include // Standard C includes #include diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index 04d5b602..e8cf2f28 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -20,6 +20,7 @@ include(../libLumina/RootWindow.pri) include(../libLumina/ExternalProcess.pri) include(../libLumina/NativeWindow.pri) include(../libLumina/XDGMime.pri) +include(../libLumina/LIconCache.pri) #include all the main individual source groups include(src-screensaver/screensaver.pri) @@ -35,7 +36,8 @@ SOURCES += main.cpp \ HEADERS += global-includes.h \ global-objects.h \ LSession.h \ - BootSplash.h + BootSplash.h \ + JsonMenu.h FORMS += BootSplash.ui diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp index 143a3667..47f0e3d7 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/ContextMenu.cpp @@ -6,6 +6,7 @@ //=========================================== #include "ContextMenu.h" #include +#include void DesktopContextMenu::SettingsChanged(DesktopSettings::File file){ if(file == DesktopSettings::ContextMenu){ UpdateMenu(false); } @@ -24,13 +25,25 @@ void DesktopContextMenu::UpdateMenu(bool fast){ QStringList items = DesktopSettings::instance()->value(DesktopSettings::ContextMenu, "itemlist", QStringList()<< "terminal" << "filemanager" << "line" << "applications" << "windowlist" << "settings" << "lockdesktop").toStringList(); usewinmenu=false; for(int i=0; iaddAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"))->setWhatsThis("--terminal"); } - else if(items[i]=="lockdesktop"){ this->addAction(LXDG::findIcon("system-lock-screen",""), tr("Lock Session"), this, SIGNAL(LockSession()) ); } - else if(items[i]=="filemanager"){ this->addAction( LXDG::findIcon("user-home",""), tr("Browse Files"))->setWhatsThis(QDir::homePath()); } + if(items[i]=="terminal"){ + QAction *act = this->addAction( tr("Terminal")); + LIconCache::instance()->loadIcon(act, "utilities-terminal"); + act->setWhatsThis("--terminal"); + } + else if(items[i]=="lockdesktop"){ + QAction *act = this->addAction( tr("Lock Session"), this, SIGNAL(LockSession()) ); + LIconCache::instance()->loadIcon(act, "system-lock-screen"); + } + else if(items[i]=="filemanager"){ + QAction *act = this->addAction( tr("Browse Files")); + LIconCache::instance()->loadIcon(act, "user-home"); + act->setWhatsThis(QDir::homePath()); + } else if(items[i]=="applications"){ if(appMenu==0){ updateAppMenu(); } this->addMenu( appMenu ); - }else if(items[i]=="line"){ this->addSeparator(); } + } + else if(items[i]=="line"){ this->addSeparator(); } //else if(items[i]=="settings"){ this->addMenu( LSession::handle()->settingsMenu() ); } else if(items[i]=="windowlist"){ if(winMenu==0){ updateWinMenu(); } @@ -46,18 +59,18 @@ void DesktopContextMenu::UpdateMenu(bool fast){ XDGDesktop xdgf(file);// = LXDG::loadDesktopFile(file, ok); if(xdgf.type!=XDGDesktop::BAD){ xdgf.addToMenu(this); } } - }/*else if(items[i].startsWith("jsonmenu::::")){ + }else if(items[i].startsWith("jsonmenu::::")){ //Custom JSON menu system (populated on demand via external scripts/tools QStringList info = items[i].split("::::"); //FORMAT:[ "jsonmenu",exec,name, icon(optional)] if(info.length()>=3){ - qDebug() << "Custom JSON Menu Loaded:" << info; - JsonMenu *tmp = new JsonMenu(info[1], deskMenu); + //qDebug() << "Custom JSON Menu Loaded:" << info; + JsonMenu *tmp = new JsonMenu(info[1], this); tmp->setTitle(info[2]); connect(tmp, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) ); if(info.length()>=4){ tmp->setIcon( LXDG::findIcon(info[3],"") ); } this->addMenu(tmp); } - }*/ + } } //Now add the system quit options this->addSeparator(); @@ -148,7 +161,7 @@ void DesktopContextMenu::updateAppMenu(){ if(appMenu==0){ appMenu = new QMenu(this); appMenu->setTitle( tr("Applications")); - appMenu->setIcon( LXDG::findIcon("system-run","") ); + LIconCache::instance()->loadIcon( appMenu, "system-run"); connect(appMenu, SIGNAL(triggered(QAction*)), this, SLOT(LaunchApp(QAction*)) ); } //qDebug() << "Populate App Menu"; @@ -160,6 +173,7 @@ void DesktopContextMenu::updateWinMenu(){ if(winMenu==0){ winMenu = new QMenu(this); winMenu->setTitle( tr("Task Manager") ); + LIconCache::instance()->loadIcon( winMenu, "preferences-system-windows"); } winMenu->clear(); QList wins = Lumina::NWS->currentWindows(); -- cgit From 9575937956e19edf83fa5e181634a33552492641 Mon Sep 17 00:00:00 2001 From: q5sys Date: Mon, 4 Sep 2017 11:04:52 -0400 Subject: fix spelling typo --- src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.desktop b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.desktop index 7eb91bee..9d36fffa 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.desktop +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.desktop @@ -1,6 +1,6 @@ [Desktop Entry] X-Desktop-File-Install-Version=0.11 -Name=Lumine Theme Engine +Name=Lumina Theme Engine Comment=Lumina Theme Engine Exec=lthemeengine Icon=preferences-desktop-theme -- cgit From 8156c5b1c8ba0211f3f131da84c1030bc3922a33 Mon Sep 17 00:00:00 2001 From: q5sys Date: Wed, 6 Sep 2017 22:05:58 -0400 Subject: remove whitespacing --- src-qt5/core/libLumina/LuminaSingleApplication.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaSingleApplication.cpp b/src-qt5/core/libLumina/LuminaSingleApplication.cpp index 86248666..6811d147 100644 --- a/src-qt5/core/libLumina/LuminaSingleApplication.cpp +++ b/src-qt5/core/libLumina/LuminaSingleApplication.cpp @@ -107,17 +107,17 @@ void LSingleApplication::PerformLockChecks(){ QLocalSocket socket(this); socket.connectToServer(cfile); socket.waitForConnected(); - if(!socket.isValid() || socket.state()!=QLocalSocket::ConnectedState){ + if(!socket.isValid() || socket.state()!=QLocalSocket::ConnectedState){ //error - could not forward info for some reason qDebug() << " - Could not connect to locking process: exiting..."; - exit(1); - } - - qDebug() << " - Forwarding inputs to locking process and closing down this instance..."; + exit(1); + } + + qDebug() << " - Forwarding inputs to locking process and closing down this instance..."; socket.write( inputlist.join("::::").toLocal8Bit() ); socket.waitForDisconnected(500); //max out at 1/2 second (only hits this if no inputs) } - + } //New messages detected -- cgit From 15e6c23eb8f2115e711f8ae2dc738400d290f0e7 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Thu, 7 Sep 2017 18:29:54 -0400 Subject: Set default tooltip to be translateable in case issues arise --- .../lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp index 8e0a9d28..e6e89075 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp @@ -16,7 +16,7 @@ LDesktopSwitcher::LDesktopSwitcher(QWidget *parent, QString id, bool horizontal) label->setAutoRaise(true); label->setToolButtonStyle(Qt::ToolButtonIconOnly); label->setIcon( LXDG::findIcon("format-view-carousel", "preferences-desktop-display") ); - label->setToolTip(QString("Workspace 1")); + label->setToolTip(QString(tr("Workspace 1"))); connect(label, SIGNAL(clicked()), this, SLOT(openMenu())); menu = new QMenu(this); connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(menuActionTriggered(QAction*))); -- cgit From 4979e9c1bc1a625b8fe3b012d367e45242e4dd7b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 8 Sep 2017 16:02:29 -0400 Subject: Put a failsafe in for overwriting default apps: If the ${XDG_CONFIG_HOME}/lumina-mimeapps.list files exists, never re-write the default applications from the system configuration file rules. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 4c87ae22..fe4cfd30 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -143,6 +143,8 @@ void LDesktopUtils::upgradeFavorites(int){ //fromoldversionnumber void LDesktopUtils::LoadSystemDefaults(bool skipOS){ //Will create the Lumina configuration files based on the current system template (if any) qDebug() << "Loading System Defaults"; + bool skipmime = QFile::exists( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-mimapps.list" ); + qDebug() << " - Skipping mimetype default apps" << skipmime; QStringList sysDefaults; if(!skipOS){ sysDefaults = LUtils::readFile(LOS::AppPrefix()+"etc/luminaDesktop.conf"); } if(sysDefaults.isEmpty() && !skipOS){ sysDefaults = LUtils::readFile(LOS::AppPrefix()+"etc/luminaDesktop.conf.dist"); } @@ -193,18 +195,18 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ if(var=="session_enablenumlock"){ sset = "EnableNumlock="+ istrue; } else if(var=="session_playloginaudio"){ sset = "PlayStartupAudio="+istrue; } else if(var=="session_playlogoutaudio"){ sset = "PlayLogoutAudio="+istrue; } - else if(var=="session_default_terminal"){ + else if(var=="session_default_terminal" && !skipmime){ LXDG::setDefaultAppForMime("application/terminal", val); //sset = "default-terminal="+val; - }else if(var=="session_default_filemanager"){ + }else if(var=="session_default_filemanager" && !skipmime){ LXDG::setDefaultAppForMime("inode/directory", val); //sset = "default-filemanager="+val; //loset = "directory="+val; - }else if(var=="session_default_webbrowser"){ + }else if(var=="session_default_webbrowser" && !skipmime){ //loset = "webbrowser="+val; LXDG::setDefaultAppForMime("x-scheme-handler/http", val); LXDG::setDefaultAppForMime("x-scheme-handler/https", val); - }else if(var=="session_default_email"){ + }else if(var=="session_default_email" && !skipmime){ LXDG::setDefaultAppForMime("application/email",val); //loset = "email="+val; } @@ -225,7 +227,7 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ // -- MIMETYPE DEFAULTS -- tmp = sysDefaults.filter("mime_default_"); - for(int i=0; i Date: Fri, 8 Sep 2017 17:10:02 -0400 Subject: Turn off the mouse override cursor when launching apps. The new "ExternalProcess" class can provide a better way of doing that on a per-process basis. --- src-qt5/core/lumina-desktop/LSession.cpp | 2 +- .../panel-plugins/systemstart/StartMenu.cpp | 78 ++++++++-------------- 2 files changed, 27 insertions(+), 53 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index bbed6d79..2a1ec783 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -572,7 +572,7 @@ void LSession::SessionEnding(){ // SYSTEM ACCESS //=============== void LSession::LaunchApplication(QString cmd){ - LSession::setOverrideCursor(QCursor(Qt::BusyCursor)); + //LSession::setOverrideCursor(QCursor(Qt::BusyCursor)); ExternalProcess::launch(cmd); //QProcess::startDetached(cmd); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index 1992db0f..e8df8390 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -35,15 +35,15 @@ StartMenu::StartMenu(QWidget *parent) : QWidget(parent), ui(new Ui::StartMenu){ } StartMenu::~StartMenu(){ - + } void StartMenu::UpdateAll(){ //Update all the icons/text on all the pages - + // Update Text ui->retranslateUi(this); - + //Update Icons ui->tool_goto_apps->setIcon(LXDG::findIcon("system-run","")); ui->tool_goto_settings->setIcon(LXDG::findIcon("preferences-system","")); @@ -53,7 +53,7 @@ void StartMenu::UpdateAll(){ ui->tool_goto_logout->setIcon(LXDG::findIcon("system-log-out","")); ui->tool_back->setIcon(LXDG::findIcon("go-previous","")); ui->tool_launch_deskinfo->setIcon(LXDG::findIcon("system-help","")); - + ui->tool_launch_mixer->setIcon( LXDG::findIcon("preferences-desktop-sound","") ); ui->label_bright_icon->setPixmap( LXDG::findIcon("preferences-desktop-brightness","").pixmap(ui->tool_goto_apps->iconSize()) ); ui->label_locale_icon->setPixmap( LXDG::findIcon("preferences-desktop-locale","").pixmap(ui->tool_goto_apps->iconSize()) ); @@ -63,7 +63,7 @@ void StartMenu::UpdateAll(){ ui->tool_restart->setIcon(LXDG::findIcon("system-reboot","")); ui->tool_shutdown->setIcon(LXDG::findIcon("system-shutdown","")); ui->tool_suspend->setIcon(LXDG::findIcon("system-suspend","")); - + //Update Visibility of system/session/OS options // -- Control Panel QString tmp = LOS::ControlPanelShortcut(); @@ -156,11 +156,11 @@ void StartMenu::UpdateQuickLaunch(QString path, bool keep){ // ========================== /*void StartMenu::deleteChildren(QWidget *obj){ if(obj->layout()==0){ - for(int i=0; ichildren().count(); i++){ - obj->children().at(i)->deleteLater(); + for(int i=0; ichildren().count(); i++){ + obj->children().at(i)->deleteLater(); } }else{ - + } }*/ @@ -174,7 +174,7 @@ void StartMenu::ClearScrollArea(QScrollArea *area){ if(area == ui->scroll_favs){ area->takeWidget()->deleteLater(); } - if(area->widget()==0){ + if(area->widget()==0){ area->setWidget( new QWidget(area) ); //create a new widget in the scroll area } if(area->widget()->layout()==0){ @@ -203,7 +203,7 @@ void StartMenu::SortScrollArea(QScrollArea *area){ for(int i=0; icount(); i++){ items << lay->itemAt(i)->widget()->whatsThis(); } - + items.sort(); //qDebug() << " - Sorted Items:" << items; for(int i=0; istackedWidget->currentWidget()!=ui->page_search ){ ui->stackedWidget->setCurrentWidget(ui->page_search); } - return; + return; }else if(search.isEmpty()){ CSearch.clear(); if(ui->stackedWidget->currentWidget()==ui->page_search ){ on_tool_back_clicked(); } @@ -234,7 +234,7 @@ void StartMenu::do_search(QString search, bool force){ } //Got a search term - check it CSearch = search; //save this for comparison later - qDebug() << "Search for term:" << search; + //qDebug() << "Search for term:" << search; ClearScrollArea(ui->scroll_search); topsearch.clear(); //Now find any items which match the search @@ -275,7 +275,7 @@ void StartMenu::do_search(QString search, bool force){ connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) ); connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); - if(i%3==0){ + if(i%3==0){ QApplication::processEvents(); if(searchTimer->isActive()){ return; } //search changed - go ahead and stop here } @@ -305,13 +305,13 @@ bool StartMenu::promptAboutUpdates(bool &skip){ // PRIVATE SLOTS // ======================== void StartMenu::LaunchItem(QString path, bool fix){ - if(path.startsWith("chcat::::")){ + if(path.startsWith("chcat::::")){ ChangeCategory(path.section("::::",1,50)); return; } - qDebug() << "Launching Item:" << path << fix; + //qDebug() << "Launching Item:" << path << fix; if(!path.isEmpty()){ - qDebug() << "Launch Application:" << path; + //qDebug() << "Launch Application:" << path; if( fix && !path.startsWith("lumina-open") ){ LSession::LaunchApplication("lumina-open \""+path+"\""); } else{ LSession::LaunchApplication(path); } emit CloseMenu(); //so the menu container will close @@ -355,7 +355,7 @@ void StartMenu::UpdateApps(){ connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); } } - + }else if(ui->check_apps_showcats->checkState() == Qt::Checked){ //qDebug() << " - Checked"; //Only show categories to start with - and have the user click-into a cat to see apps @@ -378,7 +378,7 @@ void StartMenu::UpdateApps(){ ui->scroll_apps->widget()->layout()->addWidget(it); connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); //Show apps for this cat - QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value(CCat); + QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value(CCat); for(int i=0; iscroll_apps->widget(), apps[i] ); @@ -390,11 +390,11 @@ void StartMenu::UpdateApps(){ connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); } } - + }else{ //qDebug() << " - Not Checked"; //No categories at all - just alphabetize all the apps - QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); + QList apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); CCat.clear(); //Now add all the apps for this category for(int i=0; iscroll_favs); - //Need to run a special routine for sorting the apps (already in the widget) - //qDebug() << "Sort App Widgets..."; - // Since each app actually might have a different name listed within the file - /*QLayout *lay = ui->scroll_favs->widget()->layout(); - QStringList items; - for(int i=0; icount(); i++){ - items << lay->itemAt(i)->widget()->whatsThis().toLower(); - } - - items.sort(); - // qDebug() << " - Sorted Items:" << items; - for(int i=0; icount(); j++){ - //Find this item - if(lay->itemAt(j)->widget()->whatsThis().toLower()==items[i]){ - //Found it - now move it if necessary - //qDebug() << "Found Item:" << items[i] << i << j; - lay->addItem( lay->takeAt(j) ); - break; - } - } - }*/ - + }//end of special app sorting routine tmp.sort(); //Sort alphabetically by name (dirs/files) for(int i=0; iscroll_favs->update(); //qDebug() << "End updateFavs"; @@ -541,7 +515,7 @@ void StartMenu::on_stackedWidget_currentChanged(int val){ } ui->frame_leave_suspend->setVisible( LOS::systemCanSuspend() ); } - + } void StartMenu::catViewChanged(){ @@ -567,7 +541,7 @@ void StartMenu::on_tool_goto_apps_clicked(){ } void StartMenu::on_tool_goto_settings_clicked(){ - ui->stackedWidget->setCurrentWidget(ui->page_settings); + ui->stackedWidget->setCurrentWidget(ui->page_settings); } void StartMenu::on_tool_goto_logout_clicked(){ @@ -585,7 +559,7 @@ void StartMenu::on_tool_launch_controlpanel_clicked(){ } void StartMenu::on_tool_launch_fm_clicked(){ - LaunchItem(QDir::homePath()); + LaunchItem(QDir::homePath()); } void StartMenu::on_tool_launch_store_clicked(){ -- cgit From 5c8fefe1a5dde7720a43394a4702295dc786d405 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 8 Sep 2017 23:40:21 -0400 Subject: A few quick updates to the Fireflies screensaver. Nothing too critical. --- .../src-screensaver/animations/Fireflies.h | 35 +++++++++++++++++----- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h index d0e7a653..dfc12e79 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/Fireflies.h @@ -12,6 +12,7 @@ #include "global-includes.h" #include "BaseAnimGroup.h" #include +#include class Firefly : public QSequentialAnimationGroup{ Q_OBJECT @@ -34,9 +35,12 @@ private slots: movement->setEndValue(pt); movement->setDuration( qrand() %500 + 1000); //between 1000->1500 ms animations for movements //Adjust the flash duration/size a bit - flash->setDuration(qrand() %300 + 700); //700-1000 ms - int sz = qrand()%4 + 6; //6-10 pixel square + flash->setDuration(qrand() %200 + 500); //500-700 ms + int sz = qrand()%4 + 4; //6-10 pixel square + //flash->setKeyValueAt(0.5, (qrand()%50) /100.0); + //fly->resize(sz,sz); flash->setKeyValueAt(0.5, QSize(sz,sz)); //half-way point for the flash + fly->show(); } void stopped(){ fly->hide(); } @@ -46,24 +50,41 @@ public: fly = new QWidget(parent); range = parent->size(); maxX = range.width()/4; maxY = range.height()/4; - fly->setStyleSheet("background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgba(215, 215, 143, 255), stop:0.83871 rgba(221, 235, 64, 140), stop:0.99 rgba(0, 0, 0, 255), stop:1 transparent);"); + QString B = QString::number(qrand()%70); + QString RY = QString::number(qrand()%200+50); + QString style = "background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.5, stop:0 rgba(245, 245, 143, 200), stop:0.83871 rgba(%1, %1, %2, 140), stop:0.99 rgba(0, 0, 0, 255), stop:1 transparent);"; + fly->setStyleSheet(style.arg(RY, B) ); //setup the movement animation movement = new QPropertyAnimation(fly); movement->setTargetObject(fly); movement->setPropertyName("pos"); movement->setEndValue( QPoint( qrand() % range.width(), qrand()%range.height()) ); //on anim start, this will become the starting point //setup the flashing animation - flash = new QPropertyAnimation(fly); + /*QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(parent); + fly->setGraphicsEffect(eff); + flash = new QPropertyAnimation(eff, "opacity");*/ + flash = new QPropertyAnimation(this); flash->setTargetObject(fly); flash->setPropertyName("size"); - flash->setStartValue(QSize(2,2)); + flash->setStartValue(QSize(0,0)); flash->setEndValue(flash->startValue()); + //fly->setProperty("opacity",0); + //flash->setPropertyName("opacity"); + //flash->setStartValue(0); + //flash->setEndValue(0); //now setup the order of the animations this->setLoopCount(100); //do this 100 times - this->addAnimation(movement); - this->addAnimation(flash); + //Roughly half the number of fireflies with start with movement/flash + if(qrand()%2 == 1){ + this->addAnimation(movement); + this->addAnimation(flash); + }else{ + this->addAnimation(flash); + this->addAnimation(movement); + } //Start up this firefly LoopChanged(); //load initial values + fly->setGeometry( QRect(movement->startValue().toPoint(), flash->startValue().toSize()) ); connect(this, SIGNAL(currentLoopChanged(int)), this, SLOT(LoopChanged()) ); connect(this, SIGNAL(finished()), this, SLOT(stopped()) ); -- cgit From 20f4eae9ba21030e5f1758e4b4ce7b9449ad7cfd Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 11 Sep 2017 14:29:14 -0400 Subject: Add support for a "desktop_stylesheets" config knob which will activated if the application loading the theme engine is called "lumina-desktop". --- .../src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp index 453bde1d..692223c7 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp @@ -211,7 +211,9 @@ void lthemeenginePlatformTheme::readSettings(){ } //load style sheets #ifdef QT_WIDGETS_LIB - QStringList qssPaths = settings.value("stylesheets").toStringList(); + QStringList qssPaths; + if(qApp->applicationName()=="lumina-desktop"){ qssPaths << settings.value("desktop_stylesheets").toStringList(); } + qssPaths << settings.value("stylesheets").toStringList(); m_userStyleSheet = loadStyleSheets(qssPaths); #endif settings.endGroup(); -- cgit From 91b49f991eaa2c2c6ba50ec129db9f7c0405c14d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 11 Sep 2017 14:53:32 -0400 Subject: Rename the "stylesheets" tab and split it up into two tabs: "Application Theme" and "Desktop Theme". Also re-work the qsspage class a bit to understand whether it is running in "desktop" or "application" mode. --- .../src/lthemeengine/lthemeengine.cpp | 14 ++++++++++++++ .../src/lthemeengine/lthemeengine.h | 2 ++ .../src/lthemeengine/mainwindow.cpp | 3 ++- .../lumina-theme-engine/src/lthemeengine/qsspage.cpp | 18 +++++++++++++----- .../lumina-theme-engine/src/lthemeengine/qsspage.h | 3 ++- 5 files changed, 33 insertions(+), 7 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp index fdeb8966..701745c4 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp @@ -53,6 +53,20 @@ QStringList lthemeengine::sharedStyleSheetPath(){ return dirs; } +QString lthemeengine::userDesktopStyleSheetPath(){ + return configPath() + "desktop_qss/"; +} + +QStringList lthemeengine::sharedDesktopStyleSheetPath(){ + QStringList dirs; + dirs << QString(getenv("XDG_CONFIG_HOME")); + dirs << QString(getenv("XDG_CONFIG_DIRS")).split(":"); + dirs << QString(getenv("XDG_DATA_DIRS")).split(":"); + for(int i=0; itabWidget->addTab(new IconThemePage(this), tr("Icon Theme")); m_ui->tabWidget->addTab(new InterfacePage(this), tr("Interface")); #ifdef USE_WIDGETS - m_ui->tabWidget->addTab(new QSSPage(this), tr("Style Sheets")); + m_ui->tabWidget->addTab(new QSSPage(this, false), tr("Application Theme")); + m_ui->tabWidget->addTab(new QSSPage(this, true), tr("Desktop Theme")); #endif QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); restoreGeometry(settings.value("SettingsWindow/geometry").toByteArray()); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp index 2cf0f221..681de6c9 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp @@ -12,8 +12,9 @@ #define QSS_FULL_PATH_ROLE (Qt::ItemDataRole(Qt::UserRole)) #define QSS_WRITABLE_ROLE (Qt::ItemDataRole(Qt::UserRole + 1)) -QSSPage::QSSPage(QWidget *parent) : TabPage(parent), m_ui(new Ui::QSSPage){ +QSSPage::QSSPage(QWidget *parent, bool desktop) : TabPage(parent), m_ui(new Ui::QSSPage){ m_ui->setupUi(this); + desktop_qss = desktop; QDir("/").mkpath(lthemeengine::userStyleSheetPath()); m_menu = new QMenu(this); m_menu->addAction(QIcon::fromTheme("accessories-text-editor"), tr("Edit"), this, SLOT(on_editButton_clicked())); @@ -37,7 +38,8 @@ void QSSPage::writeSettings(){ for(int i = 0; i < m_ui->qssListWidget->count(); ++i){ QListWidgetItem *item = m_ui->qssListWidget->item(i); if(item->checkState() == Qt::Checked){ styleSheets << item->data(QSS_FULL_PATH_ROLE).toString(); } - settings.setValue("Interface/stylesheets", styleSheets); + if(desktop_qss){ settings.setValue("Interface/desktop_stylesheets", styleSheets); } + else{ settings.setValue("Interface/stylesheets", styleSheets); } } } @@ -58,7 +60,9 @@ void QSSPage::on_createButton_clicked(){ QString name = QInputDialog::getText(this, tr("Enter Style Sheet Name"), tr("File name:")); if(name.isEmpty()){ return; } if(!name.endsWith(".qss", Qt::CaseInsensitive)){ name.append(".qss"); } - QString filePath = lthemeengine::userStyleSheetPath() + name; + QString filePath; + if(desktop_qss){ filePath = lthemeengine::userDesktopStyleSheetPath() + name; } + else{ filePath = lthemeengine::userStyleSheetPath() + name; } if(QFile::exists(filePath)){ QMessageBox::warning(this, tr("Error"), tr("The file \"%1\" already exists").arg(filePath)); return; @@ -95,9 +99,13 @@ void QSSPage::on_removeButton_clicked(){ void QSSPage::readSettings(){ //load stylesheets m_ui->qssListWidget->clear(); - findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); + if(desktop_qss){ findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); } + else{findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); } QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); - QStringList styleSheets = settings.value("Interface/stylesheets").toStringList(); + QStringList styleSheets; + if(desktop_qss){ styleSheets = settings.value("Interface/desktop_stylesheets").toStringList(); } + else{ styleSheets = settings.value("Interface/stylesheets").toStringList(); } + for(int i = 0; i < m_ui->qssListWidget->count(); ++i){ QListWidgetItem *item = m_ui->qssListWidget->item(i); if(styleSheets.contains(item->data(QSS_FULL_PATH_ROLE).toString())){ item->setCheckState(Qt::Checked); } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h index 5e924ad9..76417ddf 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h @@ -15,7 +15,7 @@ class QSSPage : public TabPage Q_OBJECT public: - explicit QSSPage(QWidget *parent = 0); + explicit QSSPage(QWidget *parent = 0, bool desktop = false); ~QSSPage(); void writeSettings(); @@ -33,6 +33,7 @@ private: void findStyleSheets(QStringList paths); Ui::QSSPage *m_ui; QMenu *m_menu; + bool desktop_qss; }; #endif // QSSPAGE_H -- cgit From 3591a104eecb1258cd40c34fb76232e204a6d8b7 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 11 Sep 2017 18:26:55 -0400 Subject: Added video file detection and correct desktop file translation --- src-qt5/core/libLumina/LuminaXDG.cpp | 15 +++++++++++---- src-qt5/core/libLumina/LuminaXDG.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index c1e7e199..ab1000ab 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -75,9 +75,9 @@ void XDGDesktop::sync(){ //------------------- if(var=="Name"){ if(insection){ - if(name.isEmpty() && loc.isEmpty()){ name = val; } - else if(name.isEmpty() && loc==slang){ name = val; } //short locale code - else if(loc == lang){ name = val; } + if(loc==slang){ name = val;} //short locale code + else if(loc==lang){ name = val;} + else if(name.isEmpty() && loc.isEmpty()){ /*qDebug() << "Empty" << val;*/ name = val; } }else if(inaction){ if(CDA.name.isEmpty() && loc.isEmpty()){ CDA.name = val; } else if(CDA.name.isEmpty() && loc==slang){ CDA.name = val; } //short locale code @@ -704,7 +704,14 @@ XDGDesktop* LFileInfo::XDG(){ return desk; } -// -- Check if this is a readable image file (for thumbnail support) +// -- Check if this is a readable video file (for thumbnail support) +bool LFileInfo::isVideo(){ + if(!mime.startsWith("video/")){ return false; } + //Check the hardcoded list of known supported video formats to see if the thumbnail can be generated + return ( !LUtils::videoExtensions().filter(this->suffix().toLower()).isEmpty() ); +} + +// -- Check if this is a readable image file bool LFileInfo::isImage(){ if(!mime.startsWith("image/")){ return false; } //quick return for non-image files //Check the Qt subsystems to see if this image file can be read diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index d0f3426f..0f7e7c48 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -159,6 +159,7 @@ public: //Other file type identification routines bool isImage(); //Is a readable image file (for thumbnail support) + bool isVideo(); //Is a readable video file (for thumbnail support) bool isAVFile(); //Is an audio/video file }; typedef QList LFileInfoList; -- cgit From 7d576c38d7e45c38fd4b4c8b4233e44f8bb48481 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 11 Sep 2017 18:29:32 -0400 Subject: Resynced translation files --- .../core/lumina-desktop/i18n/lumina-desktop_af.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ar.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_az.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_bg.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_bn.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_bs.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ca.ts | 191 ++++++++++++++------- .../core/lumina-desktop/i18n/lumina-desktop_cs.ts | 99 +++++++++-- .../core/lumina-desktop/i18n/lumina-desktop_cy.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_da.ts | 101 +++++++++-- .../core/lumina-desktop/i18n/lumina-desktop_de.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_el.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_en_AU.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_en_GB.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_en_ZA.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_es.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_et.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_eu.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_fa.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_fi.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_fr.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_fr_CA.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_gl.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_he.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_hi.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_hr.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_hu.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_id.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_is.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_it.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ja.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ka.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ko.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_lt.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_lv.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_mk.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_mn.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ms.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_mt.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_nb.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_nl.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_pa.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_pl.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_pt.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_pt_BR.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ro.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ru.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_sk.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_sl.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_sr.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_sv.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_sw.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_ta.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_tg.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_th.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_tr.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_uk.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_uz.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_vi.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_zh_CN.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_zh_HK.ts | 89 +++++++++- .../lumina-desktop/i18n/lumina-desktop_zh_TW.ts | 89 +++++++++- .../core/lumina-desktop/i18n/lumina-desktop_zu.ts | 89 +++++++++- src-qt5/core/lumina-info/i18n/lumina-info_af.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ar.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_az.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_bg.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_bn.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_bs.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ca.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_cs.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_cy.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_da.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_de.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_el.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_es.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_et.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_eu.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_fa.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_fi.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_fr.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_gl.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_he.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_hi.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_hr.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_hu.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_id.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_is.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_it.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ja.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ka.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ko.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_lt.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_lv.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_mk.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_mn.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ms.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_mt.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_nb.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_nl.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_pa.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_pl.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_pt.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ro.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ru.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_sk.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_sl.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_sr.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_sv.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_sw.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_ta.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_tg.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_th.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_tr.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_uk.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_uz.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_vi.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts | 68 ++++++++ src-qt5/core/lumina-info/i18n/lumina-info_zu.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_af.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ar.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_az.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_bg.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_bn.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_bs.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ca.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_cs.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_cy.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_da.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_de.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_el.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_es.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_et.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_eu.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_fa.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_fi.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_fr.ts | 78 ++++++++- src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_gl.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_he.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_hi.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_hr.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_hu.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_id.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_is.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_it.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ja.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ka.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ko.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_lt.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_lv.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_mk.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_mn.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ms.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_mt.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_nb.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_nl.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_pa.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_pl.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_pt.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ro.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ru.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_sk.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_sl.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_sr.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_sv.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_sw.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_ta.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_tg.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_th.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_tr.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_uk.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_uz.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_vi.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts | 68 ++++++++ src-qt5/core/lumina-open/i18n/lumina-open_zu.ts | 68 ++++++++ 189 files changed, 13738 insertions(+), 571 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts @@ -832,6 +832,11 @@
LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@
+ + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@
+ + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts index c603fd8c..4cce6320 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Работен плот @@ -1474,24 +1479,24 @@ Отказ - + %1% (Plugged In) %1% (външно захранване) - + %1% (%2 Estimated) %1% (приблизително %2) - + %1% Remaining остават %1% - - - + + + Workspace %1/%2 Работен плот %1/%2 @@ -1759,4 +1764,72 @@ Несортирани + + XDGDesktopList + + + Multimedia + Мултимедия + + + + Development + Разработка + + + + Education + Образование + + + + Games + Игри + + + + Graphics + Изображения + + + + Network + Мрежа + + + + Office + Офис + + + + Science + Наука + + + + Settings + Настройки + + + + System + + + + + Utility + Инструменти + + + + Wine + Wine + + + + Unsorted + Несортирани + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts index 7f0aeeed..a7809769 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts @@ -21,7 +21,7 @@ Select Application - Seleccioneu l'aplicació + Seleccioneu l'aplicació @@ -55,7 +55,7 @@ View Properties - Mostra'n les propietats + Mostra'n les propietats @@ -65,7 +65,7 @@ Rename - Canvia'n el nom + Canvia'n el nom @@ -85,7 +85,7 @@ Select Application - Seleccioneu l'aplicació + Seleccioneu l'aplicació @@ -196,7 +196,7 @@ Starting the Lumina Desktop... - S'inicia l'escriptori Lumina... + S'inicia l'escriptori Lumina... @@ -211,22 +211,22 @@ Keep up with desktop news! - Mantingueu-vos al dia de les notícies de l'escriptori! + Mantingueu-vos al dia de les notícies de l'escriptori! There is a full handbook of information about the desktop available online. - Hi ha un manual ple d'informació de l'escriptori disponible en línia. + Hi ha un manual ple d'informació de l'escriptori disponible en línia. Want to change the interface? Everything is customizable in the desktop configuration! - Voleu canviar-ne la interfície? Tot és personalitzable des de la configuració de l'escriptori! + Voleu canviar-ne la interfície? Tot és personalitzable des de la configuració de l'escriptori! Lumina can easily reproduce the interface from most other desktop environments. - El Lumina pot reproduir fàcilment la interfície de la majoria d'altres entorns d'escriptori. + El Lumina pot reproduir fàcilment la interfície de la majoria d'altres entorns d'escriptori. @@ -236,7 +236,7 @@ I have never been hurt by what I have not said - Mai no m'ha fet mal el que no he dit. + Mai no m'ha fet mal el que no he dit. @@ -265,12 +265,12 @@ - Don't expect to build up the weak by pulling down the strong. + Don't expect to build up the weak by pulling down the strong. No espereu fer forts els febles enfonsant forts. - You can't know too much, but you can say too much. + You can't know too much, but you can say too much. No es pot saber massa, però es pot dir massa. @@ -281,7 +281,7 @@ Any society that would give up a little liberty to gain a little security will deserve neither and lose both. - Qualsevol societat que deixi de banda una mica de llibertat per guanyar una mica de seguretat no en mereixerà ni una ni l'altra i les perdrà totes dues. + Qualsevol societat que deixi de banda una mica de llibertat per guanyar una mica de seguretat no en mereixerà ni una ni l'altra i les perdrà totes dues. @@ -341,7 +341,7 @@ The only way to do great work is to love what you do. - L'única manera de fer una bona feina és que us agradi el que feu. + L'única manera de fer una bona feina és que us agradi el que feu. @@ -350,8 +350,8 @@ - Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Només hi ha dues coses infinites: l'univers i l'estupidesa humana, i no estic segur de la primera. + Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. + Només hi ha dues coses infinites: l'univers i l'estupidesa humana, i no estic segur de la primera. @@ -360,8 +360,8 @@ - Do, or do not. There is no 'try'. - Fes-ho o no. No hi ha un "intent". + Do, or do not. There is no 'try'. + Fes-ho o no. No hi ha un "intent". @@ -371,7 +371,7 @@ Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. - La gent bona no necessita lleis que els diguin d'actuar responsablement, mentre que la mala gent trobarà una manera d'evitar les lleis. + La gent bona no necessita lleis que els diguin d'actuar responsablement, mentre que la mala gent trobarà una manera d'evitar les lleis. @@ -380,8 +380,8 @@ - It's kind of fun to do the impossible. - És bastant divertit fer l'impossible. + It's kind of fun to do the impossible. + És bastant divertit fer l'impossible. @@ -396,7 +396,7 @@ Success usually comes to those who are too busy to be looking for it. - L'èxit normalment arriba als que estan massa enfeinats per buscar-lo. + L'èxit normalment arriba als que estan massa enfeinats per buscar-lo. @@ -421,7 +421,7 @@ Sometimes it is not enough that we do our best; we must do what is required. - Algunes vegades no n'hi ha prou amb fer-ho el millor que podem, hem de fer el que cal. + Algunes vegades no n'hi ha prou amb fer-ho el millor que podem, hem de fer el que cal. @@ -446,7 +446,7 @@ Loading User Preferences … - Carregant les preferències de l'usuari… + Carregant les preferències de l'usuari… @@ -471,7 +471,7 @@ Preparing Workspace … - Preparant l'espai de treball… + Preparant l'espai de treball… @@ -481,7 +481,7 @@ Starting App: %1 - Iniciant l'aplicació: %1 + Iniciant l'aplicació: %1 @@ -532,7 +532,7 @@ Pin to Desktop - Enganxa a l'escriptori + Enganxa a l'escriptori @@ -560,7 +560,7 @@ Error parsing script output: %1 - Error analitzant la sortida de l'script: %1 + Error analitzant la sortida de l'script: %1 @@ -684,7 +684,7 @@ Use System Time - Usa l'hora del sistema + Usa l'hora del sistema @@ -692,17 +692,17 @@ Modify Item - Modifica l'ítem + Modifica l'ítem Start Moving Item - Inicia el trasllat de l'ítem + Inicia el trasllat de l'ítem Start Resizing Item - Inicia el canvi de mida de l'ítem + Inicia el canvi de mida de l'ítem @@ -717,7 +717,7 @@ Remove Item - Elimina l'ítem + Elimina l'ítem @@ -773,7 +773,7 @@ Desktop Actions - Accions de l'escriptori + Accions de l'escriptori @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Escriptori @@ -879,7 +884,7 @@ Launch Audio Mixer - Obre el Mesclador d'àudio + Obre el Mesclador d'àudio @@ -1182,12 +1187,12 @@ View Options - Mostra'n les opcions + Mostra'n les opcions Open Website - Obre'n el lloc web + Obre'n el lloc web @@ -1219,7 +1224,7 @@ RSS URL - URL de l'RSS + URL de l'RSS @@ -1244,7 +1249,7 @@ Some RSS feeds may request custom update intervals instead of using this setting - Alguns canals RSS poden sol·licitar intervals d'actualització personalitzats en lloc d'utilitzar aquest paràmetre. + Alguns canals RSS poden sol·licitar intervals d'actualització personalitzats en lloc d'utilitzar aquest paràmetre. @@ -1290,7 +1295,7 @@ Lumina Desktop RSS - RSS de l'escriptori Lumina + RSS de l'escriptori Lumina @@ -1315,7 +1320,7 @@ Last Build Date: %1 - Data de l'última construcció: %1 + Data de l'última construcció: %1 @@ -1353,7 +1358,7 @@ All Desktop Settings - Tots els paràmetres de l'escriptori + Tots els paràmetres de l'escriptori @@ -1411,7 +1416,7 @@ Configure Desktop - Configureu l'escriptori + Configureu l'escriptori @@ -1474,24 +1479,24 @@ Cancel·la - + %1% (Plugged In) %1% (connectat) - + %1% (%2 Estimated) %1% (%2 estimat) - + %1% Remaining Resta %1% - - - + + + Workspace %1/%2 Espai de treball %1/%2 @@ -1583,7 +1588,7 @@ UserWidget - Giny de l'usuari + Giny de l'usuari @@ -1631,12 +1636,12 @@ Home - Carpeta de l'usuari + Carpeta de l'usuari Home Directory - Directori de l'usuari + Directori de l'usuari @@ -1646,7 +1651,7 @@ Go back to home directory - Torna al directori de l'usuari + Torna al directori de l'usuari @@ -1661,7 +1666,7 @@ Desktop Preferences - Preferències de l'escriptori + Preferències de l'escriptori @@ -1671,7 +1676,7 @@ Desktop Appearance/Plugins - Aparença de l'escriptori / connectors + Aparença de l'escriptori / connectors @@ -1681,12 +1686,12 @@ Screensaver Settings - Paràmetres de l'estalvi de pantalla + Paràmetres de l'estalvi de pantalla About the Lumina Desktop - Quant a l'escriptori Lumina + Quant a l'escriptori Lumina @@ -1759,4 +1764,72 @@ Sense ordenar + + XDGDesktopList + + + Multimedia + Multimèdia + + + + Development + Desenvolupament + + + + Education + Educació + + + + Games + Jocs + + + + Graphics + Gràfics + + + + Network + Xarxa + + + + Office + Oficina + + + + Science + Ciència + + + + Settings + Configuració + + + + System + Sistema + + + + Utility + Utilitat + + + + Wine + Wine + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts index c27b5bba..5d5f26cd 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts @@ -265,12 +265,12 @@ - Don't expect to build up the weak by pulling down the strong. + Don't expect to build up the weak by pulling down the strong. Neočekávejte že povzbudíte slabé tím že stáhnete dolů silné. - You can't know too much, but you can say too much. + You can't know too much, but you can say too much. Nemůžete vědět příliš mnoho, ale můžete toho říct přespříliš. @@ -350,7 +350,7 @@ - Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. + Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Jen dvě věci jsou nekonečné – vesmír a lidská hloupost. Tím prvním si vlastně nejsem tak úplně jistý. @@ -360,7 +360,7 @@ - Do, or do not. There is no 'try'. + Do, or do not. There is no 'try'. Udělejte to, nebo to nedělejte vůbec. Nejde o to to jen zkoušet. @@ -380,7 +380,7 @@ - It's kind of fun to do the impossible. + It's kind of fun to do the impossible. Dělat nemožné je zábava. @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Plocha @@ -1474,24 +1479,24 @@ Storno - + %1% (Plugged In) %1% (zapojeno) - + %1% (%2 Estimated) %1% (odhadováno %2) - + %1% Remaining %1% zbývá - - - + + + Workspace %1/%2 Pracovní plocha %1/%2 @@ -1759,4 +1764,72 @@ Nezařazené + + XDGDesktopList + + + Multimedia + Multimédia + + + + Development + Vývoj + + + + Education + Výuka + + + + Games + Hry + + + + Graphics + Grafika + + + + Network + Síť + + + + Office + Kancelář + + + + Science + Věda + + + + Settings + Nastavení + + + + System + Systém + + + + Utility + Nástroje + + + + Wine + Wine + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts index a000c313..00ff3157 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts @@ -265,12 +265,12 @@ - Don't expect to build up the weak by pulling down the strong. + Don't expect to build up the weak by pulling down the strong. Forvent ikke at opbygge det svage ved at nedrive det stærke. - You can't know too much, but you can say too much. + You can't know too much, but you can say too much. Du kan ikke vide for meget, men du kan sige for meget. @@ -350,7 +350,7 @@ - Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. + Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Kun to ting er uendelige, universet og menneskelig dumhed, og jeg er ikke sikker på det første. @@ -360,8 +360,8 @@ - Do, or do not. There is no 'try'. - Gør eller lad være. Der er ikke noget "prøv". + Do, or do not. There is no 'try'. + Gør eller lad være. Der er ikke noget "prøv". @@ -380,7 +380,7 @@ - It's kind of fun to do the impossible. + It's kind of fun to do the impossible. Det er egentligt sjovt at gøre det umulige. @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Skrivebord @@ -1474,24 +1479,24 @@ Annuller - + %1% (Plugged In) %1% (tilsluttet) - + %1% (%2 Estimated) %1% (%2 estimeret) - + %1% Remaining %1% tilbage - - - + + + Workspace %1/%2 Arbejdsområde %1/%2 @@ -1759,4 +1764,72 @@ Usorteret + + XDGDesktopList + + + Multimedia + Multimedie + + + + Development + Udvikling + + + + Education + Uddannelse + + + + Games + Spil + + + + Graphics + Grafik + + + + Network + Netværk + + + + Office + Kontor + + + + Science + Videnskab + + + + Settings + Indstillinger + + + + System + System + + + + Utility + Hjælpeværktøj + + + + Wine + Wine + + + + Unsorted + Usorteret + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts index 80b8eb9d..67d0805c 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Arbeitsfläche @@ -1474,24 +1479,24 @@ Abbrechen - + %1% (Plugged In) %1% (Eingesteckt) - + %1% (%2 Estimated) %1% (%2 Geschätzt) - + %1% Remaining %1% verbleibend - - - + + + Workspace %1/%2 Arbeitsbereich %1/%2 @@ -1759,4 +1764,72 @@ Unsortiert + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Entwicklung + + + + Education + Bildung + + + + Games + Spiele + + + + Graphics + Grafik + + + + Network + Netzwerk + + + + Office + Büro + + + + Science + Wissenschaft + + + + Settings + Einstellungen + + + + System + System + + + + Utility + Dienstprogramm + + + + Wine + Wine + + + + Unsorted + Unsortiert + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts index 118b48b1..f9d60a2c 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts index 3cf7e09c..d67d8301 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Desktop @@ -1474,24 +1479,24 @@ Cancel - + %1% (Plugged In) %1% (Plugged In) - + %1% (%2 Estimated) %1% (%2 Estimated) - + %1% Remaining %1% Remaining - - - + + + Workspace %1/%2 Workspace %1/%2 @@ -1759,4 +1764,72 @@ Unsorted + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Development + + + + Education + Education + + + + Games + Games + + + + Graphics + Graphics + + + + Network + Network + + + + Office + Office + + + + Science + Science + + + + Settings + Settings + + + + System + System + + + + Utility + Utility + + + + Wine + Wine + + + + Unsorted + Unsorted + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts index db35d013..e9bd9fde 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Desktop @@ -1474,24 +1479,24 @@ Cancel - + %1% (Plugged In) %1% (Plugged In) - + %1% (%2 Estimated) %1% (%2 Estimated) - + %1% Remaining %1% Remaining - - - + + + Workspace %1/%2 Workspace %1/%2 @@ -1759,4 +1764,72 @@ Unsorted + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Development + + + + Education + Education + + + + Games + Games + + + + Graphics + Graphics + + + + Network + Network + + + + Office + Office + + + + Science + Science + + + + Settings + Settings + + + + System + System + + + + Utility + Utility + + + + Wine + Wine + + + + Unsorted + Unsorted + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts index 319f90ab..54b2bec2 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Escritorio @@ -1474,24 +1479,24 @@ Cancelar - + %1% (Plugged In) %1% (Conectado) - + %1% (%2 Estimated) %1% (%2 Estimado) - + %1% Remaining %1% Restante - - - + + + Workspace %1/%2 Área de Trabajo %1/%2 @@ -1759,4 +1764,72 @@ Sin Ordenar + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Desarrollo + + + + Education + Educación + + + + Games + Juegos + + + + Graphics + Gráficos + + + + Network + Red + + + + Office + Oficina + + + + Science + Ciencia + + + + Settings + Configuración + + + + System + Sistema + + + + Utility + Utilerías + + + + Wine + Wine + + + + Unsorted + Sin Ordenar + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts index 4fbe1d5b..ef19e5a0 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Töölaud @@ -1474,24 +1479,24 @@ Loobu - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 Tööruum %1/%2 @@ -1759,4 +1764,72 @@ Sortimata + + XDGDesktopList + + + Multimedia + Multimeedia + + + + Development + Arendus + + + + Education + Haridus + + + + Games + Mängud + + + + Graphics + Graafika + + + + Network + Võrk + + + + Office + Kontor + + + + Science + Teadus + + + + Settings + Sätted + + + + System + Süsteem + + + + Utility + Tööriistad + + + + Wine + Wine + + + + Unsorted + Sortimata + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts index 248cc262..c8a65107 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ Utzi - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 Laneko area %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Garapena + + + + Education + Heziketa + + + + Games + Jokoak + + + + Graphics + Grafikoak + + + + Network + Sarea + + + + Office + Bulegoa + + + + Science + Zientzia + + + + Settings + Ezarpenak + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts index e45c6072..96254899 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts index ff8e867c..80a27a4f 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Työpöytä @@ -1474,24 +1479,24 @@ Peru - + %1% (Plugged In) %1 % (verkkovirta) - + %1% (%2 Estimated) %1 % (arviolta %2) - + %1% Remaining %1 % jäljellä - - - + + + Workspace %1/%2 Työtila %1/%2 @@ -1759,4 +1764,72 @@ Lajittelematta + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Kehitystyökalut + + + + Education + Kasvatus + + + + Games + Pelit + + + + Graphics + Grafiikka + + + + Network + Verkko + + + + Office + Toimisto + + + + Science + Tiede + + + + Settings + Asetukset + + + + System + Järjestelmä + + + + Utility + Työkalu + + + + Wine + Wine + + + + Unsorted + Lajittelematta + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts index f85a0380..1c3189ed 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Bureau @@ -1474,24 +1479,24 @@ Annuler - + %1% (Plugged In) %1% (Branchée) - + %1% (%2 Estimated) %1% (%2 Estimé) - + %1% Remaining %1% restant(s) - - - + + + Workspace %1/%2 Espace de Travail %1/%2 @@ -1759,4 +1764,72 @@ Non Trié + + XDGDesktopList + + + Multimedia + Multimédia + + + + Development + Développement + + + + Education + Éducation + + + + Games + Jeux + + + + Graphics + Graphiques + + + + Network + Réseau + + + + Office + + + + + Science + Sciences + + + + Settings + Paramètres + + + + System + Système + + + + Utility + + + + + Wine + Wine + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts index fabf3f31..b9ff009c 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop שולחן עבודה @@ -1474,24 +1479,24 @@ ביטול - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + לומדות + + + + Games + משחקים + + + + Graphics + גרפיקה + + + + Network + אינטרנט + + + + Office + משרד + + + + Science + מדע + + + + Settings + הגדרות + + + + System + מערכת + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts index f1cb1d5a..ee97464d 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop डेस्कटॉप @@ -1474,24 +1479,24 @@ रद्द - + %1% (Plugged In) %1%(प्लग इन) - + %1% (%2 Estimated) %1% (%2 लगभग) - + %1% Remaining %1% शेष - - - + + + Workspace %1/%2 कार्यस्थल %1/%2 @@ -1759,4 +1764,72 @@ अवर्गीकृत + + XDGDesktopList + + + Multimedia + मल्टीमीडिया + + + + Development + विकास + + + + Education + पढाई + + + + Games + खेल + + + + Graphics + चित्र + + + + Network + नेटवर्क + + + + Office + कार्यालय + + + + Science + विज्ञान + + + + Settings + + + + + System + + + + + Utility + सुविधाएँ + + + + Wine + शराब + + + + Unsorted + अवर्गीकृत + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts index 30cc030d..10c49265 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Asztal @@ -1474,24 +1479,24 @@ Mégsem - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 %1/%2 munkaterület @@ -1759,4 +1764,72 @@ Nem rendszerezett + + XDGDesktopList + + + Multimedia + Multimédia + + + + Development + Fejlesztés + + + + Education + Oktatás + + + + Games + Játékok + + + + Graphics + Grafika + + + + Network + Hálózat + + + + Office + Iroda + + + + Science + Tudomány + + + + Settings + Beállítások + + + + System + Rendszer + + + + Utility + Segédeszközök + + + + Wine + Wine + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts index 38cdee0f..efe0dc6a 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Layar Kerja Utama @@ -1474,24 +1479,24 @@ Batalkan - + %1% (Plugged In) %1% (Terpasang Dalam) - + %1% (%2 Estimated) %1% (%2 Perkiraan) - + %1% Remaining %1% Sisa - - - + + + Workspace %1/%2 Ruang kerja %1/%2 @@ -1759,4 +1764,72 @@ Tak terurut + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Pengembangan + + + + Education + Edukasi + + + + Games + Permainan + + + + Graphics + Grafis + + + + Network + Jaringan + + + + Office + Kantor + + + + Science + Sains + + + + Settings + Pengaturan + + + + System + Sistem + + + + Utility + Utilitas + + + + Wine + Wine + + + + Unsorted + Tak terurut + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts index 32aae413..ba24ba63 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Desktop @@ -1474,24 +1479,24 @@ Cancella - + %1% (Plugged In) %1% (Plugged In) - + %1% (%2 Estimated) %1% (%2 Stimato) - + %1% Remaining %1% Rimanente - - - + + + Workspace %1/%2 Spazio Lavoro %1/%2 @@ -1759,4 +1764,72 @@ Non ordinato + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Sviluppo + + + + Education + Educazione + + + + Games + Giochi + + + + Graphics + + + + + Network + Rete + + + + Office + Ufficio + + + + Science + Scienza + + + + Settings + Impostazioni + + + + System + Sistema + + + + Utility + Utilità + + + + Wine + Wine + + + + Unsorted + Non ordinato + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts index 0179804f..0fbeb00e 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts @@ -837,6 +837,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -855,8 +860,8 @@ LSession - - + + Desktop これ、ファイルパスなので、「デスクトップ」と訳したらまずい Desktop @@ -1491,24 +1496,24 @@ キャンセル - + %1% (Plugged In) %1% (電源接続中) - + %1% (%2 Estimated) %1% (推定残り時間: %2) - + %1% Remaining 残り %1% - - - + + + Workspace %1/%2 ワークスペース %1/%2 @@ -1783,4 +1788,72 @@ 未分類 + + XDGDesktopList + + + Multimedia + マルチメディア + + + + Development + 開発 + + + + Education + 教育 + + + + Games + ゲーム + + + + Graphics + グラフィックス + + + + Network + ネットワーク + + + + Office + オフィス + + + + Science + 科学 + + + + Settings + 設定 + + + + System + システム + + + + Utility + ユーティリティー + + + + Wine + Wine + + + + Unsorted + 未分類 + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts index b7a23143..05fa8608 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop 바탕 화면 @@ -1474,24 +1479,24 @@ 취소 - + %1% (Plugged In) %1% (연결됨) - + %1% (%2 Estimated) %1% (%2 예상) - + %1% Remaining %1% 남음 - - - + + + Workspace %1/%2 작업 공간 %1/%2 @@ -1759,4 +1764,72 @@ 미분류 + + XDGDesktopList + + + Multimedia + 멀티미디어 + + + + Development + 개발 + + + + Education + 교육 + + + + Games + 게임 + + + + Graphics + 그래픽 + + + + Network + 네트워크 + + + + Office + 업무 + + + + Science + 과학 + + + + Settings + 설정 + + + + System + 시스템 + + + + Utility + 유틸리티 + + + + Wine + 와인 + + + + Unsorted + 미분류 + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts index 55cc8ec1..35e14e86 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Darbalaukis @@ -1474,24 +1479,24 @@ Atsisakyti - + %1% (Plugged In) %1% (Įdėta) - + %1% (%2 Estimated) %1% (Apytikriai %2) - + %1% Remaining Liko %1% - - - + + + Workspace %1/%2 Darbo sritis %1/%2 @@ -1759,4 +1764,72 @@ Nesurūšiuota + + XDGDesktopList + + + Multimedia + Multimedija + + + + Development + Programavimas + + + + Education + Švietimas + + + + Games + Žaidimai + + + + Graphics + Grafika + + + + Network + Tinklas + + + + Office + Raštinė + + + + Science + Mokslas + + + + Settings + Nustatymai + + + + System + Sistema + + + + Utility + Paslaugų programos + + + + Wine + Wine + + + + Unsorted + Nesurūšiuota + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts index 5d7d9e0f..c8581d11 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Darbvirsma @@ -1474,24 +1479,24 @@ Atcelt - + %1% (Plugged In) %1% (pievienots) - + %1% (%2 Estimated) %1% (%2 paredzamais) - + %1% Remaining %1% atlicis - - - + + + Workspace %1/%2 Darbvieta %1/%2 @@ -1760,4 +1765,72 @@ Nesakārtots + + XDGDesktopList + + + Multimedia + Multivide + + + + Development + Izstrāde + + + + Education + Izglītība + + + + Games + Spēles + + + + Graphics + Grafika + + + + Network + Tīkls + + + + Office + Birojs + + + + Science + Zinātne + + + + Settings + Iestatījumi + + + + System + Sistēma + + + + Utility + + + + + Wine + Wine + + + + Unsorted + Nesakārtots + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts index 3e0fc664..30025269 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Bureaublad @@ -1474,24 +1479,24 @@ Annuleren - + %1% (Plugged In) %1% (Oplaadkabel is verbonden) - + %1% (%2 Estimated) %1% (%2 geschat) - + %1% Remaining %1% resterend - - - + + + Workspace %1/%2 Werkruimte %1/%2 @@ -1759,4 +1764,72 @@ Ongesorteerd + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Ontwikkeling + + + + Education + + + + + Games + Spellen + + + + Graphics + Grafisch + + + + Network + Netwerk + + + + Office + Kantoor + + + + Science + Wetenschap + + + + Settings + Instellingen + + + + System + Systeem + + + + Utility + Hulpmiddel + + + + Wine + Wine + + + + Unsorted + Ongesorteerd + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts index e3ebe0a6..b1c10e26 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Pulpit @@ -1474,24 +1479,24 @@ Zaniechaj - + %1% (Plugged In) %1% (Podłączony) - + %1% (%2 Estimated) %1% (%2 Szacowane) - + %1% Remaining %1% Pozostało - - - + + + Workspace %1/%2 Przestrzeń robocza %1/%2 @@ -1759,4 +1764,72 @@ Nieuporządkowane + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Narzędzia programistów + + + + Education + Edukacja + + + + Games + Gry + + + + Graphics + Grafika + + + + Network + Sieć + + + + Office + Biuro + + + + Science + Nauka + + + + Settings + Ustawienia + + + + System + System + + + + Utility + Narzędzia + + + + Wine + Wine + + + + Unsorted + Nieuporządkowane + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts index 0321a6b1..92b97b71 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Área de Trabalho @@ -1474,24 +1479,24 @@ Cancelar - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 Espaço de trabalho %1/%2 @@ -1759,4 +1764,72 @@ Sem ordem + + XDGDesktopList + + + Multimedia + Multimídia + + + + Development + Desenvolvimento + + + + Education + Educação + + + + Games + Jogos + + + + Graphics + Gráficos + + + + Network + Rede + + + + Office + Escritório + + + + Science + Ciência + + + + Settings + Definições + + + + System + Sistema + + + + Utility + Utilitário + + + + Wine + Vinho + + + + Unsorted + Sem ordem + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts index 0fd7d193..130213bb 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Área de trabalho @@ -1474,24 +1479,24 @@ Cancelar - + %1% (Plugged In) %1% (Plugado) - + %1% (%2 Estimated) %1% (%2 Estimado) - + %1% Remaining %1% Restantes - - - + + + Workspace %1/%2 Espaço de trabalho %1/%2 @@ -1759,4 +1764,72 @@ Não organizados + + XDGDesktopList + + + Multimedia + Multimídia + + + + Development + Desenvolvimento + + + + Education + Educação + + + + Games + Jogos + + + + Graphics + Gráficos + + + + Network + + + + + Office + Escritório + + + + Science + + + + + Settings + Configurações + + + + System + Sistema + + + + Utility + + + + + Wine + Wine + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts index 2f4b4072..45e3a5cd 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Рабочий стол @@ -1474,24 +1479,24 @@ Отмена - + %1% (Plugged In) %1% (подключенный) - + %1% (%2 Estimated) %1% (%2 расчетно) - + %1% Remaining %1% осталось - - - + + + Workspace %1/%2 Рабочая Область %1/%2 @@ -1759,4 +1764,72 @@ Несортированный + + XDGDesktopList + + + Multimedia + Мультимедиа + + + + Development + Разработка + + + + Education + Образование + + + + Games + Игры + + + + Graphics + Графика + + + + Network + Сети + + + + Office + Офис + + + + Science + Наука + + + + Settings + + + + + System + Система + + + + Utility + Инструменты + + + + Wine + Вино + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts index 907717e2..bb2b4d44 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Pracovná plocha @@ -1474,24 +1479,24 @@ Zrušiť - + %1% (Plugged In) %1% (Nabitia) - + %1% (%2 Estimated) %1% (%2 odhadovaný) - + %1% Remaining Zostáva %1% - - - + + + Workspace %1/%2 Pracovná plocha %1/%2 @@ -1759,4 +1764,72 @@ Nezoradené + + XDGDesktopList + + + Multimedia + Multimédiá + + + + Development + Vývoj + + + + Education + Vzdelávanie + + + + Games + Hry + + + + Graphics + Grafika + + + + Network + Sieť + + + + Office + Kancelária + + + + Science + Veda + + + + Settings + Nastavenie + + + + System + Systém + + + + Utility + Nástroje + + + + Wine + Wine + + + + Unsorted + Nezoradené + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts index 637f7436..4a860781 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + Večpredstavnost + + + + Development + Razvoj + + + + Education + Izobraževanje + + + + Games + Igre + + + + Graphics + + + + + Network + Omrežje + + + + Office + + + + + Science + Znanost + + + + Settings + Nastavitve + + + + System + + + + + Utility + + + + + Wine + Wine + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts index ecf6aa32..b97f822b 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Skrivbord @@ -1474,24 +1479,24 @@ Avbryt - + %1% (Plugged In) %1% (Inkopplad) - + %1% (%2 Estimated) %1% (%2 Beräknad) - + %1% Remaining %1% återstår - - - + + + Workspace %1/%2 Arbetsyta %1/%2 @@ -1759,4 +1764,72 @@ Osorterade + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Utveckling + + + + Education + Utbildning + + + + Games + Spel + + + + Graphics + Grafik + + + + Network + Nätverk + + + + Office + Kontorsprogram + + + + Science + Vetenskap + + + + Settings + Inställningar + + + + System + System + + + + Utility + Verktyg + + + + Wine + Wine + + + + Unsorted + Osorterade + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts index f3e6147d..1741c455 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Masaüstü @@ -1474,24 +1479,24 @@ İptal - + %1% (Plugged In) %1% (Prize Takılı) - + %1% (%2 Estimated) %1% (Tahmini %2) - + %1% Remaining %1% Kaldı - - - + + + Workspace %1/%2 Çalışma alanı %1/%2 @@ -1759,4 +1764,72 @@ Sınıflandırılmamış + + XDGDesktopList + + + Multimedia + Multimedya + + + + Development + Geliştirme + + + + Education + Eğitim + + + + Games + Oyunlar + + + + Graphics + Grafik + + + + Network + + + + + Office + Ofis + + + + Science + Bilim + + + + Settings + Ayarlar + + + + System + Sistem + + + + Utility + Gereç + + + + Wine + Wine + + + + Unsorted + Sınıflandırılmamış + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts index e73fe905..d88a1b33 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop Робочий стіл @@ -1474,24 +1479,24 @@ Скасувати - + %1% (Plugged In) %1% (Підключено) - + %1% (%2 Estimated) %1% (%2 розрахунково) - + %1% Remaining %1% Залишилось - - - + + + Workspace %1/%2 Робочий простір %1/%2 @@ -1759,4 +1764,72 @@ Невідсортований + + XDGDesktopList + + + Multimedia + Мультимедіа + + + + Development + Розробка + + + + Education + Освіта + + + + Games + Ігри + + + + Graphics + Графіка + + + + Network + Мережа + + + + Office + Офіс + + + + Science + Наука + + + + Settings + Налаштування + + + + System + Система + + + + Utility + Утиліти + + + + Wine + Wine + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts index cf6f658b..d1c65849 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop 桌面 @@ -1474,24 +1479,24 @@ 取消 - + %1% (Plugged In) %1% (已插电) - + %1% (%2 Estimated) %1% (估计 %2) - + %1% Remaining 剩余 %1% - - - + + + Workspace %1/%2 工作区 %1/%2 @@ -1759,4 +1764,72 @@ 未排序的 + + XDGDesktopList + + + Multimedia + 多媒体 + + + + Development + 开发 + + + + Education + 教育 + + + + Games + 游戏 + + + + Graphics + 图像 + + + + Network + 网络 + + + + Office + 办公 + + + + Science + 科学 + + + + Settings + 设置 + + + + System + 系统 + + + + Utility + 工具 + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts index 8ca71d5a..d48278b9 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts @@ -832,6 +832,11 @@ LDesktopSwitcher + + + Workspace 1 + + @@ -850,8 +855,8 @@ LSession - - + + Desktop @@ -1474,24 +1479,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1759,4 +1764,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_af.ts b/src-qt5/core/lumina-info/i18n/lumina-info_af.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_af.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_af.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_az.ts b/src-qt5/core/lumina-info/i18n/lumina-info_az.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_az.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_az.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts b/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts index 2d5316bf..454faad5 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts @@ -94,4 +94,72 @@ Затваряне + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts b/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts b/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts index 9d0042d9..03baf485 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts @@ -94,4 +94,72 @@ Tanca + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts b/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts index 071addb4..cb516383 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts @@ -94,4 +94,72 @@ Zavřít + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts b/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_da.ts b/src-qt5/core/lumina-info/i18n/lumina-info_da.ts index fe539caf..12750d57 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_da.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_da.ts @@ -94,4 +94,72 @@ Luk + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_de.ts b/src-qt5/core/lumina-info/i18n/lumina-info_de.ts index e3b7aa45..d4f3eb6c 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_de.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_de.ts @@ -94,4 +94,72 @@ Schließen + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_el.ts b/src-qt5/core/lumina-info/i18n/lumina-info_el.ts index 45d73ebd..bf7645f3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_el.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_el.ts @@ -94,4 +94,72 @@ Κλείσιμο + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts b/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts index 4f3f0706..ec2a3987 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts @@ -94,4 +94,72 @@ Close + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts b/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts index d747c640..23414b75 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts @@ -94,4 +94,72 @@ Close + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts b/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_es.ts b/src-qt5/core/lumina-info/i18n/lumina-info_es.ts index bf689483..21806d0b 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_es.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_es.ts @@ -94,4 +94,72 @@ Cerrar + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts index f31298aa..90c031e5 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts @@ -94,4 +94,72 @@ Sulge + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts b/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts index 26b1855c..44d0427e 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts @@ -94,4 +94,72 @@ Itxi + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts index ba9465df..812f378f 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts @@ -94,4 +94,72 @@ Sulje + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts index 09cd8502..47710462 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts @@ -94,4 +94,72 @@ Fermer + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_he.ts b/src-qt5/core/lumina-info/i18n/lumina-info_he.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_he.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_he.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts b/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts index 1d53b1ea..9aaa1aea 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts @@ -94,4 +94,72 @@ बंद + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts b/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts index 645c4060..a618850d 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts @@ -94,4 +94,72 @@ Bezárás + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_id.ts b/src-qt5/core/lumina-info/i18n/lumina-info_id.ts index 16440245..3da2f670 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_id.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_id.ts @@ -94,4 +94,72 @@ Tutup + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_is.ts b/src-qt5/core/lumina-info/i18n/lumina-info_is.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_is.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_is.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_it.ts b/src-qt5/core/lumina-info/i18n/lumina-info_it.ts index 3ecfd8af..befeb735 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_it.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_it.ts @@ -94,4 +94,72 @@ Chiudi + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts index 7c38fb6e..e3e2bbe6 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts @@ -95,4 +95,72 @@ 閉じる + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts index a6800f5c..1ef0a61c 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts @@ -94,4 +94,72 @@ 닫기 + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts b/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts index f962f91d..bceaa49d 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts @@ -94,4 +94,72 @@ Užverti + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts b/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts index f38f9c01..eb089eef 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts @@ -94,4 +94,72 @@ Aizvērt + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts b/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts b/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts b/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts b/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts index 2c6e3180..d3608ebe 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts @@ -94,4 +94,72 @@ Sluiten + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts index 03133ac7..a563013e 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts @@ -94,4 +94,72 @@ Zamknij + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts index 36ef1867..1fdbe6a1 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts @@ -94,4 +94,72 @@ Fechar + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts index 03e47e81..6e9f6e1c 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts @@ -94,4 +94,72 @@ Fechar + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts index f86f8764..fca1cd8e 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts @@ -94,4 +94,72 @@ Закрыть + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts index d58a7bf0..44e2f1df 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts @@ -94,4 +94,72 @@ Zatvoriť + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts index 573d7cd2..dfb3708c 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts @@ -94,4 +94,72 @@ Zapri + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts index 2469b9d3..06e91efa 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts @@ -94,4 +94,72 @@ Stäng + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts b/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_th.ts b/src-qt5/core/lumina-info/i18n/lumina-info_th.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_th.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_th.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts index 2c7831ae..b520af3d 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts @@ -94,4 +94,72 @@ Kapat + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts b/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts index a61ed654..93acfa2f 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts @@ -94,4 +94,72 @@ Закрити + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts b/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts b/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts index 289c18db..d24b2b3e 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts @@ -94,4 +94,72 @@ 关闭 + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts index 70577011..bf95d1cb 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts @@ -94,4 +94,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_af.ts b/src-qt5/core/lumina-open/i18n/lumina-open_af.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_af.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_af.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_az.ts b/src-qt5/core/lumina-open/i18n/lumina-open_az.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_az.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_az.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts b/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts index 42817c9f..6504b9bb 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts @@ -209,4 +209,72 @@ Възникна грешка в програмата и трябваше да бъде затворена: + + XDGDesktopList + + + Multimedia + Мултимедия + + + + Development + Разработка + + + + Education + Образование + + + + Games + + + + + Graphics + Изображения + + + + Network + Мрежа + + + + Office + Офис + + + + Science + Наука + + + + Settings + Настройки + + + + System + Система + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts b/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts b/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts index a5eaf608..222884ed 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts @@ -209,4 +209,72 @@ L'aplicació següent ha tingut un error i s'ha hagut de tancar: + + XDGDesktopList + + + Multimedia + Multimèdia + + + + Development + Desenvolupament + + + + Education + Educació + + + + Games + + + + + Graphics + Gràfics + + + + Network + Xarxa + + + + Office + Oficina + + + + Science + Ciència + + + + Settings + Configuració + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts b/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts index 3123825f..15cbfa0f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts @@ -209,4 +209,72 @@ V následující aplikaci došlo k chyba a bude proto ukončena: + + XDGDesktopList + + + Multimedia + Multimédia + + + + Development + Vývoj + + + + Education + Výuka + + + + Games + + + + + Graphics + Grafika + + + + Network + Síť + + + + Office + Kancelář + + + + Science + Věda + + + + Settings + Nastavení + + + + System + Systém + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts b/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_da.ts b/src-qt5/core/lumina-open/i18n/lumina-open_da.ts index 695e6f57..340bbfc5 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_da.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_da.ts @@ -209,4 +209,72 @@ Det følgende program oplevede en fejl og blev nødt til at afslutte: + + XDGDesktopList + + + Multimedia + Multimedie + + + + Development + Udvikling + + + + Education + Uddannelse + + + + Games + + + + + Graphics + Grafik + + + + Network + Netværk + + + + Office + Kontor + + + + Science + Videnskab + + + + Settings + Indstillinger + + + + System + System + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_de.ts b/src-qt5/core/lumina-open/i18n/lumina-open_de.ts index 27a43260..02b475dc 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_de.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_de.ts @@ -209,4 +209,72 @@ Bei folgender Anwendung ist ein Fehler aufgetreten und sie wurde beendet: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Entwicklung + + + + Education + Ausbildung + + + + Games + + + + + Graphics + Grafik + + + + Network + Netzwerk + + + + Office + Büro + + + + Science + Wissenschaft + + + + Settings + Einstellungen + + + + System + System + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_el.ts b/src-qt5/core/lumina-open/i18n/lumina-open_el.ts index 7ce33bc2..f7344eb9 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_el.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_el.ts @@ -209,4 +209,72 @@ Η παρακάτω εφαρμογή αντιμετώπισε ένα σφάλμα και πρέπει να τερματιστεί: + + XDGDesktopList + + + Multimedia + Πολυμέσα + + + + Development + Ανάπτυξη + + + + Education + Εκπαίδευση + + + + Games + + + + + Graphics + Γραφικά + + + + Network + Δίκτυο + + + + Office + Σουΐτα Γραφείου + + + + Science + Επιστήμη + + + + Settings + Ρυθμίσεις + + + + System + Σύστημα + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts b/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts index 535b6209..f2675e28 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts @@ -209,4 +209,72 @@ The following application experienced an error and needed to close: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Development + + + + Education + Education + + + + Games + + + + + Graphics + Graphics + + + + Network + Network + + + + Office + Office + + + + Science + Science + + + + Settings + Settings + + + + System + System + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts b/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts index 91d418fa..0d6dcf0b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts @@ -209,4 +209,72 @@ The following application experienced an error and needed to close: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Development + + + + Education + Education + + + + Games + + + + + Graphics + Graphics + + + + Network + Network + + + + Office + Office + + + + Science + Science + + + + Settings + Settings + + + + System + System + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts b/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_es.ts b/src-qt5/core/lumina-open/i18n/lumina-open_es.ts index 91f106aa..b8d7d446 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_es.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_es.ts @@ -209,4 +209,72 @@ La siguiente aplicación presentó un error y necesita cerrarse: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Desarrollo + + + + Education + Educación + + + + Games + + + + + Graphics + Gráficos + + + + Network + Red + + + + Office + Oficina + + + + Science + Ciencia + + + + Settings + Configuración + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_et.ts b/src-qt5/core/lumina-open/i18n/lumina-open_et.ts index 3c8fee7e..df9c029b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_et.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_et.ts @@ -209,4 +209,72 @@ See rakendus sulgus, kuna esines viga: + + XDGDesktopList + + + Multimedia + Multimeedia + + + + Development + Arendus + + + + Education + Haridus + + + + Games + + + + + Graphics + Graafika + + + + Network + Võrk + + + + Office + Kontor + + + + Science + Teadus + + + + Settings + Sätted + + + + System + Süsteem + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts b/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts index de44e1fb..1cdbc65f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts @@ -209,4 +209,72 @@ Hurrengo aplikazioak akats bat izan du eta itxi behar da: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Garapena + + + + Education + Hezkuntza + + + + Games + + + + + Graphics + Grafikoak + + + + Network + Sarea + + + + Office + Bulegoa + + + + Science + Zientzia + + + + Settings + Ezarpenak + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts index acfe5015..6a09c31b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts @@ -209,4 +209,72 @@ Seuraavat sovellukset kohtasivat virheen ja ne täytyy sulkea: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Ohjelmakehitys + + + + Education + Kasvatus + + + + Games + + + + + Graphics + Grafiikka + + + + Network + Verkko + + + + Office + Toimisto + + + + Science + Tiede + + + + Settings + Asetukset + + + + System + Järjestelmä + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts index 9230eab7..6c950a8f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts @@ -26,7 +26,7 @@ Binary Location - Emplacement de l'Exécutable + Emplacement de l'Exécutable @@ -156,7 +156,7 @@ Screen Brightness %1% - Luminosité de l'Écran %1% + Luminosité de l'Écran %1% @@ -176,7 +176,7 @@ URL shortcut is missing the URL: %1 - L'adresse est introuvable dans le raccourci URL : %1 + L'adresse est introuvable dans le raccourci URL : %1 @@ -195,8 +195,8 @@ - Could not find "%1". Please ensure it is installed first. - "%1" non trouvé. Vérifiez qu'il soit bien installé. + Could not find "%1". Please ensure it is installed first. + "%1" non trouvé. Vérifiez qu'il soit bien installé. @@ -209,4 +209,72 @@ Le programme suivant a provoqué une erreur et a dû être fermé : + + XDGDesktopList + + + Multimedia + Multimédia + + + + Development + Développement + + + + Education + Éducation + + + + Games + + + + + Graphics + Graphiques + + + + Network + Réseau + + + + Office + Bureau + + + + Science + Science + + + + Settings + Paramètres + + + + System + Système + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_he.ts b/src-qt5/core/lumina-open/i18n/lumina-open_he.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_he.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_he.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts b/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts index eb7caa4a..6e078c67 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts @@ -209,4 +209,72 @@ इस एप्लीकेशन में त्रुटि है और इसे बंद करने की आवश्यकता है: + + XDGDesktopList + + + Multimedia + मल्टीमीडिया + + + + Development + विकास + + + + Education + पढाई + + + + Games + + + + + Graphics + चित्र + + + + Network + नेटवर्क + + + + Office + कार्यालय + + + + Science + विज्ञान + + + + Settings + सेटिंग्स + + + + System + उपकरण + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts b/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts index 33763efe..c9fa6680 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts @@ -209,4 +209,72 @@ Az alkalmazás hibát észlelt, és bezárandó: + + XDGDesktopList + + + Multimedia + Multimédia + + + + Development + Fejlesztés + + + + Education + Oktatás + + + + Games + + + + + Graphics + Grafika + + + + Network + Hálózat + + + + Office + Iroda + + + + Science + Tudomány + + + + Settings + Beállítások + + + + System + Rendszer + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_id.ts b/src-qt5/core/lumina-open/i18n/lumina-open_id.ts index dd4cea0e..143e052d 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_id.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_id.ts @@ -209,4 +209,72 @@ Aplikasi berikut mengalami kesalahan dan diperlukan untuk menutup: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Pengembangan + + + + Education + Edukasi + + + + Games + + + + + Graphics + Grafis + + + + Network + Jaringan + + + + Office + Kantor + + + + Science + Sains + + + + Settings + Pengaturan + + + + System + Sistem + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_is.ts b/src-qt5/core/lumina-open/i18n/lumina-open_is.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_is.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_is.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_it.ts b/src-qt5/core/lumina-open/i18n/lumina-open_it.ts index 0e3ea28c..aff2fc55 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_it.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_it.ts @@ -209,4 +209,72 @@ La seguente applicazione ha avuto un errore e deve chiudere: + + XDGDesktopList + + + Multimedia + Multimediale + + + + Development + Sviluppo + + + + Education + Educazione + + + + Games + + + + + Graphics + Grafica + + + + Network + Rete + + + + Office + Ufficio + + + + Science + Scienza + + + + Settings + Impostazioni + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts index e42d4add..efe358cf 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts @@ -210,4 +210,72 @@ このアプリケーションでエラーが発生したため、閉じる必要があります: + + XDGDesktopList + + + Multimedia + マルチメディア + + + + Development + 開発 + + + + Education + 教育 + + + + Games + + + + + Graphics + グラフィックス + + + + Network + ネットワーク + + + + Office + オフィス + + + + Science + 科学 + + + + Settings + 設定 + + + + System + システム + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts index c1e7f594..519726b9 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts @@ -209,4 +209,72 @@ 다음의 프로그램에 오류가 발생하여 종료하였습니다: + + XDGDesktopList + + + Multimedia + 멀티미디어 + + + + Development + 개발 + + + + Education + 교육 + + + + Games + + + + + Graphics + 그래픽 + + + + Network + 네트워크 + + + + Office + 업무 + + + + Science + 과학 + + + + Settings + 설정 + + + + System + 시스템 + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts b/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts index 425a59d9..b5035cbf 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts @@ -209,4 +209,72 @@ Ši programa susidūrė su klaida ir turėjo būti užverta: + + XDGDesktopList + + + Multimedia + Multimedija + + + + Development + Programavimas + + + + Education + Švietimas + + + + Games + + + + + Graphics + Grafika + + + + Network + Tinklas + + + + Office + Raštinė + + + + Science + Mokslas + + + + Settings + Nustatymai + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts b/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts index 1e0e91c5..cac62f3a 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts @@ -209,4 +209,72 @@ Šai lietotnei radās kļūda un bija nepieciešams to aizvērt: + + XDGDesktopList + + + Multimedia + Multivide + + + + Development + Izstrāde + + + + Education + Izglītība + + + + Games + + + + + Graphics + Grafika + + + + Network + Tīkls + + + + Office + Birojs + + + + Science + Zinātne + + + + Settings + Iestatījumi + + + + System + Sistēma + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts b/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts b/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts b/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts b/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts index 140decc3..9e114de9 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts @@ -209,4 +209,72 @@ Er is een fout opgetreden in de volgende applicatie en moet daarom worden gesloten: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Ontwikkeling + + + + Education + Educatie + + + + Games + + + + + Graphics + Grafisch + + + + Network + Netwerk + + + + Office + Kantoor + + + + Science + Wetenschap + + + + Settings + Instellingen + + + + System + Systeem + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts index 6b74e22b..e4abdbfc 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts @@ -209,4 +209,72 @@ Aplikacja napotkała błąd i musi zostać zamknięta: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Narzędzia programistów + + + + Education + Edukacja + + + + Games + + + + + Graphics + Grafika + + + + Network + Sieć + + + + Office + Biuro + + + + Science + Nauka + + + + Settings + Ustawienia + + + + System + System + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts index b73c69e3..55dcbeda 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts @@ -209,4 +209,72 @@ O seguinte aplicativo encontrou um erro e teve que ser fechado: + + XDGDesktopList + + + Multimedia + Multimédia + + + + Development + Desenvolvimento + + + + Education + Educação + + + + Games + + + + + Graphics + Gráficos + + + + Network + Rede + + + + Office + Escritório + + + + Science + Ciência + + + + Settings + Definições + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts index 5b1f717f..f202622c 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts @@ -209,4 +209,72 @@ O seguinte aplicativo encontrou um erro e precisa ser fechado: + + XDGDesktopList + + + Multimedia + Multimídia + + + + Development + Desenvolvimento + + + + Education + Educação + + + + Games + + + + + Graphics + Gráficos + + + + Network + Redes + + + + Office + Escritório + + + + Science + Ciências + + + + Settings + Configurações + + + + System + Sistema + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts index 53107836..472a6be3 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts @@ -209,4 +209,72 @@ Следующее приложение вызвало ошибку и должно быть закрыто: + + XDGDesktopList + + + Multimedia + Мультимедиа + + + + Development + Разработка + + + + Education + Образование + + + + Games + + + + + Graphics + Графика + + + + Network + Сети + + + + Office + Офис + + + + Science + Наука + + + + Settings + Настройки + + + + System + Система + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts index 895c2890..3433ff4b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts @@ -209,4 +209,72 @@ Nasledujúca aplikácia hlási chybu a musí byť ukončená: + + XDGDesktopList + + + Multimedia + Multimédiá + + + + Development + Vývoj + + + + Education + Vzdelávanie + + + + Games + + + + + Graphics + Grafika + + + + Network + Sieť + + + + Office + Kancelária + + + + Science + Veda + + + + Settings + Nastavenie + + + + System + Systém + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts index be520af8..f8264625 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts @@ -209,4 +209,72 @@ Följande program upplevde ett fel och behövde stängas: + + XDGDesktopList + + + Multimedia + Multimedia + + + + Development + Utveckling + + + + Education + Utbildning + + + + Games + + + + + Graphics + Grafik + + + + Network + Nätverk + + + + Office + Kontorsprogram + + + + Science + Vetenskap + + + + Settings + Inställningar + + + + System + System + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts b/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_th.ts b/src-qt5/core/lumina-open/i18n/lumina-open_th.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_th.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_th.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts index ff68fb01..fa53e159 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts @@ -209,4 +209,72 @@ İzleyen uygulama bir hatayla karşılaştı ve kapatılması gerekti: + + XDGDesktopList + + + Multimedia + Multimedya + + + + Development + Geliştirme + + + + Education + Eğitim + + + + Games + + + + + Graphics + Grafik + + + + Network + + + + + Office + Ofis + + + + Science + Bilim + + + + Settings + Ayarlar + + + + System + Sistem + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts b/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts index bfd6a8a5..5fff2fcf 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts @@ -209,4 +209,72 @@ Наступна програма викликало помилку и має бути закрита: + + XDGDesktopList + + + Multimedia + Мультимедіа + + + + Development + Розробка + + + + Education + Освіта + + + + Games + + + + + Graphics + Графіка + + + + Network + Мережа + + + + Office + Офіс + + + + Science + Наука + + + + Settings + Налаштування + + + + System + Система + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts b/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts b/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts index 981affe2..312c9f6c 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts @@ -209,4 +209,72 @@ 下面的应用程序遇到错误,需要关闭: + + XDGDesktopList + + + Multimedia + 多媒体 + + + + Development + 开发 + + + + Education + 教育 + + + + Games + + + + + Graphics + 图像 + + + + Network + 网络 + + + + Office + 办公 + + + + Science + 科学 + + + + Settings + 设置 + + + + System + 系统 + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts index cfc1b766..bc022cb0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts @@ -209,4 +209,72 @@ + + XDGDesktopList + + + Multimedia + + + + + Development + + + + + Education + + + + + Games + + + + + Graphics + + + + + Network + + + + + Office + + + + + Science + + + + + Settings + + + + + System + + + + + Utility + + + + + Wine + + + + + Unsorted + + + -- cgit From b113026d69ca6c5a240981ab4e6835eb5298ffe3 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 11 Sep 2017 18:35:41 -0400 Subject: Added video extension detection support with hardcoded input --- src-qt5/core/libLumina/LUtils.cpp | 6 ++++++ src-qt5/core/libLumina/LUtils.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index e4f1c517..491778ca 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -252,6 +252,12 @@ QString LUtils::AppToAbsolute(QString path){ return path; } +QStringList LUtils::videoExtensions() { + static QStringList vidExtensions; + vidExtensions << "avi" << "mkv" << "mp4" << "mov" << "webm" << "wmv"; + return vidExtensions; +} + QStringList LUtils::imageExtensions(bool wildcards){ //Note that all the image extensions are lowercase!! static QStringList imgExtensions; diff --git a/src-qt5/core/libLumina/LUtils.h b/src-qt5/core/libLumina/LUtils.h index 4ad05ca1..bfa900b1 100644 --- a/src-qt5/core/libLumina/LUtils.h +++ b/src-qt5/core/libLumina/LUtils.h @@ -65,6 +65,7 @@ public: //Get the list of all file extensions which Qt can read (lowercase) static QStringList imageExtensions(bool wildcards = false); + static QStringList videoExtensions(); //Load a translation file for a Lumina Project static QTranslator* LoadTranslation(QApplication *app, QString appname, QString locale = "", QTranslator *cTrans = 0); -- cgit From 654bd8a4022b31a3e3c4c28c55a5703a51f43838 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 11 Sep 2017 18:38:03 -0400 Subject: Added the option of playing multiple videos or one video in a loop --- .../src-screensaver/animations/VideoSlideshow.h | 30 +++++++++++++++------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h index 1f9c4cbc..358b4bfb 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/animations/VideoSlideshow.h @@ -13,11 +13,11 @@ class VideoAnimation: public BaseAnimGroup{ Q_OBJECT private: - QString videoPath; + QString videoPath, singleVideo; QVideoWidget *videoWidget; QMediaPlayer *video; QStringList videoFiles; - //bool multimonitor; + bool multiple; private slots: @@ -33,6 +33,8 @@ public: //Load the path of the videos from the configuration file (default /usr/local/videos/) videoPath = readSetting("path","/usr/local/videos").toString(); + singleVideo = readSetting("videoLocation","").toString(); + multiple = readSetting("multiple",true).toBool(); if(!videoPath.endsWith("/")){ videoPath.append("/"); } //Set whether to copy videos on two monitors or play different videos @@ -51,21 +53,31 @@ public: return; } + if(singleVideo.isNull()) + singleVideo = videoPath+videoFiles[0]; + //Loading a random file from a directory QDesktopWidget *dw = new QDesktopWidget(); - QMediaPlaylist *playlist = new QMediaPlaylist(); - for(int i = 0; i < videoFiles.size(); i++){ - playlist->addMedia(QUrl::fromLocalFile(videoPath+videoFiles[i])); - } - playlist->setCurrentIndex(qrand() % videoFiles.size()); - playlist->setPlaybackMode(QMediaPlaylist::Random); + QMediaPlaylist *playlist = new QMediaPlaylist(); + if(multiple) { + for(int i = 0; i < videoFiles.size(); i++){ + playlist->addMedia(QUrl::fromLocalFile(videoPath+videoFiles[i])); + } + playlist->shuffle(); + }else{ + playlist->addMedia(QUrl::fromLocalFile(singleVideo)); + playlist->setPlaybackMode(QMediaPlaylist::CurrentItemInLoop); + } videoWidget->show(); - video->setPlaylist(playlist); + if(multiple) + video->setPlaylist(playlist); + //Only play sound for one monitor to prevent messed up audio if(dw->screenNumber(canvas) == 0) video->setVolume(100); else video->setVolume(0); + video->play(); } -- cgit From fd79ef074fcaceba7e5caf0d5283b96676ce6779 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 11 Sep 2017 19:15:28 -0400 Subject: Made the monitor widget label names translateable --- .../lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp index 951bcc98..7097e2a9 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp @@ -17,6 +17,9 @@ MonitorWidget::MonitorWidget(QWidget *parent) : QWidget(parent), ui(new Ui::Moni upTimer->setInterval(2000); //update every 2 seconds connect(upTimer, SIGNAL(timeout()), this, SLOT(UpdateStats()) ); LoadIcons(); + ui->label->setText( tr("CPU Temp:") ); + ui->label_2->setText( tr("CPU Usage:") ); + ui->label_3->setText( tr("Mem Usage:") ); upTimer->start(); } @@ -25,7 +28,7 @@ MonitorWidget::~MonitorWidget(){ } void MonitorWidget::LoadIcons(){ - ui->tabWidget->setTabIcon(0,LXDG::findIcon("appointment-recurring","") ); //Summary + ui->tabWidget->setTabIcon(0,LXDG::findIcon("appointment-blank","") ); //Summary ui->tabWidget->setTabIcon(1,LXDG::findIcon("drive-harddisk","") ); //Disk Usage //ui->tabWidget->setTabIcon(1,LXDG::findIcon("cpu","") ); //CPU Log //ui->tabWidget->setTabIcon(2,LXDG::findIcon("media-flash-memory-stick","") ); //Mem Log @@ -60,4 +63,4 @@ SysMonitorPlugin::SysMonitorPlugin(QWidget *parent, QString ID) : LDPlugin(paren SysMonitorPlugin::~SysMonitorPlugin(){ //qDebug() << "Remove SysMonitorPlugin"; -} \ No newline at end of file +} -- cgit From 94b2980985d668172a6760ea3e6855be36cce336 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 13 Sep 2017 13:11:52 -0400 Subject: Fix up some of the qss theme page --- src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp index 681de6c9..2e906d9e 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp @@ -4,6 +4,8 @@ #include #include #include +#include + #include "lthemeengine.h" #include "qsseditordialog.h" #include "qsspage.h" @@ -44,6 +46,7 @@ void QSSPage::writeSettings(){ } void QSSPage::on_qssListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *){ + //qDebug() << "Got Current Item Changed"; if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -67,6 +70,12 @@ void QSSPage::on_createButton_clicked(){ QMessageBox::warning(this, tr("Error"), tr("The file \"%1\" already exists").arg(filePath)); return; } + // Make sure the directory exists + QString dir = filePath.section("/",0,-2); + if(!QFile::exists(dir)){ + QDir D(dir); + D.mkpath(dir); + } //creating empty file QFile file(filePath); file.open(QIODevice::WriteOnly); @@ -99,7 +108,7 @@ void QSSPage::on_removeButton_clicked(){ void QSSPage::readSettings(){ //load stylesheets m_ui->qssListWidget->clear(); - if(desktop_qss){ findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); } + if(desktop_qss){ findStyleSheets(QStringList() << lthemeengine::userDesktopStyleSheetPath() << lthemeengine::sharedDesktopStyleSheetPath()); } else{findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); } QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); QStringList styleSheets; -- cgit From d1e63d3b0982f5de681c553b706ea0a1a6c7b3ad Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 13 Sep 2017 16:05:22 -0400 Subject: Fix up a bunch more of the lumina-theme-engine functionality - adding in all the desktop style settings and reworking the configuration UI and functionality. --- .../lumina-theme-engine/desktop_qss/DarkGlass.qss | 91 ++++++++ .../lumina-theme-engine/lumina-theme-engine.pro | 8 +- .../lthemeengineplatformtheme.cpp | 14 +- .../src/lthemeengine/appearancepage.cpp | 5 + .../src/lthemeengine/appearancepage.ui | 6 + .../src/lthemeengine/mainwindow.cpp | 31 ++- .../src/lthemeengine/mainwindow.h | 6 +- .../src/lthemeengine/mainwindow.ui | 255 +++++++++++++++++++-- 8 files changed, 380 insertions(+), 36 deletions(-) create mode 100644 src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss new file mode 100644 index 00000000..c99ee179 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss @@ -0,0 +1,91 @@ +QWidget#LuminaBootSplash{ + background: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 palette(dark), stop:1 palette(mid) ); + border-radius: 5px; +} + +LDPlugin#applauncher{ + background-color: transparent; + border: none; +} +LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{ + background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(5, 5, 5, 30), stop:1 rgba(2, 2, 2, 70)); + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(0, 0, 0, 30), stop:0.724868 rgba(0, 0, 0, 60), stop:1 rgba(0, 0, 0, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + color: white; +} + +LDPlugin#applauncher QToolButton:hover, LDPlugin#desktopview QListWidget::item:hover{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); + color: palette(highlighted-text); + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); +} +QWidget#LuminaPanelColor{ + background: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(2, 2, 2, 60), stop:1 rgba(0, 0, 0, 110)); + border-radius: 3px; +} + +/*Special taskmanager window buttons: based on window state*/ +LTBWidget, LPanel QToolButton{ + border: 1px solid transparent; + border-radius: 3px; + background: transparent; +} +LTBWidget::menu-indicator{ image: none; } /*disable the menu arrow*/ +LTBWidget#WindowVisible{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(mid), stop: 1 transparent); +} +LTBWidget#WindowInvisible{ + background: transparent; +} +LTBWidget#WindowActive{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(midlight), stop: 1 transparent); +} +LTBWidget#WindowAttention{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); +} +LTBWidget:hover, LTBWidget#WindowVisible:hover, LTBWidget#WindowInvisible:hover, LTBWidget#WindowActive:hover, LTBWidget#WindowAttention:hover, QToolButton:hover{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); + color: palette(highlighted-text); + border-width: 1px; + border-style: solid; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(0,0,0, 30), stop:0.724868 rgba(0,0,0, 60), stop:1 rgba(0,0,0, 10)); +} + +/* CALENDER WIDGET */ + /* (This is a special hack since there is no official support for stylesheets for this widget) */ + QCalendarWidget QWidget#qt_calendar_navigationbar{ + background-color: palette(alternate-base); + } +QCalendarWidget QWidget{ + background-color: palette(base); + alternate-background-color: palette(alternate-base); + color: palette(text); +} +QCalendarWidget QAbstractButton{ + background-color: transparent; +} +QCalendarWidget QAbstractButton::menu-indicator{ + image: none; +} +QCalendarWidget QAbstractItemView{ + selection-background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(3, 4, 4, 20), stop:1 rgba(0, 0, 0, 100)); + selection-color: palette(highlighted-text); +} +QCalendarWidget QWidget#qt_calendar_calendarview{ + background-color: palette(dark); + border: none; +} diff --git a/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro b/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro index d91091d3..e1023752 100644 --- a/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro +++ b/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro @@ -8,4 +8,10 @@ SUBDIRS += src/lthemeengine-qtplugin \ colors.files = colors/*.conf colors.path = $${L_SHAREDIR}/lthemeengine/colors -INSTALLS += colors +qss.files = qss/*.qss +qss.path = $${L_SHAREDIR}/lthemeengine/qss + +dqss.files = desktop_qss/*.qss +dqss.path = $${L_SHAREDIR}/lthemeengine/desktop_qss + +INSTALLS += colors qss dqss diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp index 692223c7..9cb755fb 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp @@ -131,9 +131,9 @@ void lthemeenginePlatformTheme::applySettings(){ else{ qApp->setPalette(qApp->style()->standardPalette()); } } //do not override application style - if(m_prevStyleSheet == qApp->styleSheet()){ qApp->setStyleSheet(m_userStyleSheet); } - else{ qCDebug(llthemeengine) << "custom style sheet is disabled";} - m_prevStyleSheet = m_userStyleSheet; + qApp->setStyleSheet(m_userStyleSheet); + //else{ qCDebug(llthemeengine) << "custom style sheet is disabled";} + //m_prevStyleSheet = m_userStyleSheet; } #endif QGuiApplication::setFont(m_generalFont); //apply font @@ -156,13 +156,13 @@ void lthemeenginePlatformTheme::createFSWatcher(){ watcher->addPath(lthemeengine::configPath()); QTimer *timer = new QTimer(this); timer->setSingleShot(true); - timer->setInterval(3000); + timer->setInterval(500); connect(watcher, SIGNAL(directoryChanged(QString)), timer, SLOT(start())); connect(timer, SIGNAL(timeout()), SLOT(updateSettings())); } void lthemeenginePlatformTheme::updateSettings(){ - qCDebug(llthemeengine) << "updating settings.."; + //qCDebug(llthemeengine) << "updating settings.."; readSettings(); applySettings(); } @@ -212,8 +212,9 @@ void lthemeenginePlatformTheme::readSettings(){ //load style sheets #ifdef QT_WIDGETS_LIB QStringList qssPaths; - if(qApp->applicationName()=="lumina-desktop"){ qssPaths << settings.value("desktop_stylesheets").toStringList(); } + if(qApp->applicationFilePath().section("/",-1).startsWith("lumina-desktop") ){ qssPaths << settings.value("desktop_stylesheets").toStringList(); } qssPaths << settings.value("stylesheets").toStringList(); + //qDebug() << "Loaded Stylesheets:" << qApp->applicationName() << qssPaths; m_userStyleSheet = loadStyleSheets(qssPaths); #endif settings.endGroup(); @@ -226,6 +227,7 @@ bool lthemeenginePlatformTheme::hasWidgets(){ #endif QString lthemeenginePlatformTheme::loadStyleSheets(const QStringList &paths){ + //qDebug() << "Loading Stylesheets:" << paths; QString content; foreach (QString path, paths){ if(!QFile::exists(path)){ continue; } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp index 04ca6a0b..31b44ec2 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp @@ -6,6 +6,8 @@ #include #include #include +#include + #include "lthemeengine.h" #include "appearancepage.h" #include "paletteeditdialog.h" @@ -81,6 +83,8 @@ void AppearancePage::createColorScheme(){ QString schemePath = lthemeengine::userColorSchemePath() + "/" + name; createColorScheme(schemePath, palette()); m_ui->colorSchemeComboBox->addItem(name.section('.',0,0), schemePath); + m_ui->colorSchemeComboBox->setCurrentIndex( m_ui->colorSchemeComboBox->count()-1); + QTimer::singleShot(10, this, SLOT(changeColorScheme()) ); } void AppearancePage::changeColorScheme(){ @@ -125,6 +129,7 @@ void AppearancePage::copyColorScheme(){ QString newPath = lthemeengine::userColorSchemePath() + "/" + name; QFile::copy(m_ui->colorSchemeComboBox->currentData().toString(), newPath); m_ui->colorSchemeComboBox->addItem(name.section('.',0,0), newPath); + m_ui->colorSchemeComboBox->setCurrentIndex( m_ui->colorSchemeComboBox->count()-1); } void AppearancePage::renameColorScheme(){ diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.ui index cd442930..91b65245 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.ui @@ -161,9 +161,15 @@ ... + + + QToolButton::InstantPopup + + true + Qt::NoArrow diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp index 91db14ee..d0f1560f 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp @@ -1,5 +1,8 @@ #include #include +#include +#include + #include "lthemeengine.h" #include "mainwindow.h" #include "appearancepage.h" @@ -11,14 +14,22 @@ MainWindow::MainWindow(QWidget *parent) : QWidget(parent), m_ui(new Ui::MainWindow){ m_ui->setupUi(this); - m_ui->tabWidget->addTab(new AppearancePage(this), tr("Appearance")); - m_ui->tabWidget->addTab(new FontsPage(this), tr("Fonts")); - m_ui->tabWidget->addTab(new IconThemePage(this), tr("Icon Theme")); - m_ui->tabWidget->addTab(new InterfacePage(this), tr("Interface")); -#ifdef USE_WIDGETS - m_ui->tabWidget->addTab(new QSSPage(this, false), tr("Application Theme")); - m_ui->tabWidget->addTab(new QSSPage(this, true), tr("Desktop Theme")); -#endif + bgroup = new QButtonGroup(this); + bgroup->setExclusive(true); + //Clear out any pages in the stacked widget + while(m_ui->stackedWidget->count()>0){ + m_ui->stackedWidget->removeWidget(m_ui->stackedWidget->widget(0)); + } + //Now add all the pages into the widget + bgroup->addButton(m_ui->tool_page_general, m_ui->stackedWidget->addWidget(new AppearancePage(this)) ); + bgroup->addButton(m_ui->tool_page_effects, m_ui->stackedWidget->addWidget(new InterfacePage(this))); + bgroup->addButton(m_ui->tool_page_fonts, m_ui->stackedWidget->addWidget(new FontsPage(this))); + bgroup->addButton(m_ui->tool_page_icons, m_ui->stackedWidget->addWidget(new IconThemePage(this))); + bgroup->addButton(m_ui->tool_page_styles, m_ui->stackedWidget->addWidget(new QSSPage(this, false))); + bgroup->addButton(m_ui->tool_page_deskstyles, m_ui->stackedWidget->addWidget(new QSSPage(this, true))); + connect(bgroup, SIGNAL(buttonClicked(int)), m_ui->stackedWidget, SLOT(setCurrentIndex(int)) ); + + QTimer::singleShot(10, m_ui->tool_page_general, SLOT(toggle())); QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); restoreGeometry(settings.value("SettingsWindow/geometry").toByteArray()); setWindowIcon(QIcon::fromTheme("preferences-desktop-theme")); @@ -37,8 +48,8 @@ void MainWindow::closeEvent(QCloseEvent *){ void MainWindow::on_buttonBox_clicked(QAbstractButton *button){ int id = m_ui->buttonBox->standardButton(button); if(id == QDialogButtonBox::Ok || id == QDialogButtonBox::Apply){ - for(int i = 0; i < m_ui->tabWidget->count(); ++i){ - TabPage *p = qobject_cast(m_ui->tabWidget->widget(i)); + for(int i = 0; i < m_ui->stackedWidget->count(); ++i){ + TabPage *p = qobject_cast(m_ui->stackedWidget->widget(i)); if(p) { p->writeSettings(); } } } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h index 749949a6..56ff1c98 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h @@ -2,8 +2,9 @@ #define MAINWINDOW_H #include - -class QAbstractButton; +#include +#include +//class QAbstractButton; namespace Ui { class MainWindow; @@ -24,6 +25,7 @@ private: void closeEvent(QCloseEvent *); Ui::MainWindow *m_ui; + QButtonGroup *bgroup; }; #endif // MAINWINDOW_H diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui index 5bdab6d7..f239b7b4 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui @@ -6,14 +6,14 @@ 0 0 - 438 - 374 + 657 + 500 Qt5 Configuration Tool - + 6 @@ -23,22 +23,243 @@ 6 - - - - - - - ... + + + + 4 - + + + + + + + 0 + 0 + + + + General + + + + + + + 32 + 32 + + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + Effects + + + + + + + 32 + 32 + + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + Fonts + + + + + + + 32 + 32 + + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + Icons + + + + + + + 32 + 32 + + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + General +Styles + + + + + + + 32 + 32 + + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + Desktop +Styles + + + + + + + 32 + 32 + + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + QFrame::StyledPanel + + + + + - - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - + + + + + + ... + + + + + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + -- cgit From 94c8f1e138798682b2b0c8236279318e45a7c9b4 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 13 Sep 2017 16:08:50 -0400 Subject: Also auto-open the palette modification UI when creating a copy of a color scheme. --- src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp index 31b44ec2..88bde228 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp @@ -130,6 +130,7 @@ void AppearancePage::copyColorScheme(){ QFile::copy(m_ui->colorSchemeComboBox->currentData().toString(), newPath); m_ui->colorSchemeComboBox->addItem(name.section('.',0,0), newPath); m_ui->colorSchemeComboBox->setCurrentIndex( m_ui->colorSchemeComboBox->count()-1); + QTimer::singleShot(10, this, SLOT(changeColorScheme()) ); } void AppearancePage::renameColorScheme(){ -- cgit From 5f82ff57aded0bdea93a1e825070538c4f928275 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 14 Sep 2017 10:52:20 -0400 Subject: Cleanup the QSS page quite a bit so that items can now be sorted, ordered by priority and more. --- .../lumina-theme-engine/desktop_qss/DarkGlass.qss | 2 +- .../src/lthemeengine/mainwindow.ui | 20 +- .../src/lthemeengine/qsspage.cpp | 119 +++++++-- .../lumina-theme-engine/src/lthemeengine/qsspage.h | 10 +- .../src/lthemeengine/qsspage.ui | 269 ++++++++++++++++----- 5 files changed, 337 insertions(+), 83 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss index c99ee179..70db70fc 100644 --- a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss @@ -68,7 +68,7 @@ LTBWidget:hover, LTBWidget#WindowVisible:hover, LTBWidget#WindowInvisible:hover, /* CALENDER WIDGET */ /* (This is a special hack since there is no official support for stylesheets for this widget) */ QCalendarWidget QWidget#qt_calendar_navigationbar{ - background-color: palette(alternate-base); + background-color: palette(base); } QCalendarWidget QWidget{ background-color: palette(base); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui index f239b7b4..bfaf3eaf 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui @@ -42,7 +42,8 @@ General - + + .. @@ -73,7 +74,8 @@ Effects - + + .. @@ -104,7 +106,8 @@ Fonts - + + .. @@ -135,7 +138,8 @@ Icons - + + .. @@ -167,7 +171,8 @@ Styles - + + .. @@ -199,7 +204,8 @@ Styles Styles - + + .. @@ -236,7 +242,7 @@ Styles - QFrame::StyledPanel + QFrame::Box diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp index 2e906d9e..ae5350ab 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "lthemeengine.h" #include "qsseditordialog.h" @@ -37,15 +38,37 @@ QSSPage::~QSSPage(){ void QSSPage::writeSettings(){ QStringList styleSheets; QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); - for(int i = 0; i < m_ui->qssListWidget->count(); ++i){ + for(int i = m_ui->qssListWidget->count()-1; i>=0; i--){ QListWidgetItem *item = m_ui->qssListWidget->item(i); - if(item->checkState() == Qt::Checked){ styleSheets << item->data(QSS_FULL_PATH_ROLE).toString(); } + styleSheets << item->data(QSS_FULL_PATH_ROLE).toString(); + } if(desktop_qss){ settings.setValue("Interface/desktop_stylesheets", styleSheets); } else{ settings.setValue("Interface/stylesheets", styleSheets); } - } } void QSSPage::on_qssListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *){ + if(current!=0){ + m_ui->list_disabled->clearSelection(); //clear any current selection on the other widget + m_ui->list_disabled->setCurrentRow(-1); + } + //qDebug() << "Got Current Item Changed"; + if(current){ + m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); + m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); + m_ui->renameButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); + } + else{ + m_ui->editButton->setEnabled(false); + m_ui->removeButton->setEnabled(false); + m_ui->renameButton->setEnabled(false); + } +} + +void QSSPage::on_list_disabled_currentItemChanged(QListWidgetItem *current, QListWidgetItem *){ + if(current!=0){ + m_ui->qssListWidget->clearSelection(); //clear any current selection on the other widget + m_ui->qssListWidget->setCurrentRow(-1); + } //qDebug() << "Got Current Item Changed"; if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -86,11 +109,12 @@ void QSSPage::on_createButton_clicked(){ item->setToolTip(info.filePath()); item->setData(QSS_FULL_PATH_ROLE, info.filePath()); item->setData(QSS_WRITABLE_ROLE, info.isWritable()); - item->setCheckState(Qt::Unchecked); + m_ui->qssListWidget->setCurrentRow(m_ui->qssListWidget->count()-1); + QTimer::singleShot(10, this, SLOT(on_editButton_clicked()) ); } void QSSPage::on_editButton_clicked(){ - QListWidgetItem *item = m_ui->qssListWidget->currentItem(); + QListWidgetItem *item = currentSelection(); if(item){ QSSEditorDialog dialog(item->data(QSS_FULL_PATH_ROLE).toString(), this); dialog.exec(); @@ -98,31 +122,76 @@ void QSSPage::on_editButton_clicked(){ } void QSSPage::on_removeButton_clicked(){ - QListWidgetItem *item = m_ui->qssListWidget->currentItem(); + QListWidgetItem *item = currentSelection(); if(!item){ return; } int button = QMessageBox::question(this, tr("Confirm Remove"),tr("Are you sure you want to remove style sheet \"%1\"?").arg(item->text()), QMessageBox::Yes | QMessageBox::No); if(button == QMessageBox::Yes){ QFile::remove(item->data(QSS_FULL_PATH_ROLE).toString()); } delete item; } +void QSSPage::on_tool_enable_clicked(){ + QList sel = m_ui->list_disabled->selectedItems(); + //qDebug() << "Got Selection:" << sel.count(); + for(int i=0; iqssListWidget->addItem(sel[i]->clone()); + delete sel[i]; + //QCoreApplication::processEvents(); + m_ui->qssListWidget->setCurrentRow(m_ui->qssListWidget->count()-1); + } + +} + +void QSSPage::on_tool_disable_clicked(){ + QList sel = m_ui->qssListWidget->selectedItems(); + //qDebug() << "Got Selection:" << sel.count(); + for(int i=0; ilist_disabled->addItem(sel[i]->clone()); + delete sel[i]; + //QCoreApplication::processEvents(); + m_ui->list_disabled->setCurrentRow(m_ui->list_disabled->count()-1); + } +} + +void QSSPage::on_tool_priority_up_clicked(){ + QList sel = m_ui->qssListWidget->selectedItems(); + for(int i=0; iqssListWidget->row(sel[i]); + //qDebug() << "Move Item Up:" << index; + if(index>0){ + m_ui->qssListWidget->insertItem(index-1, m_ui->qssListWidget->takeItem(index)); + m_ui->qssListWidget->setCurrentRow(index-1); + } + } +} + +void QSSPage::on_tool_priority_down_clicked(){ + QList sel = m_ui->qssListWidget->selectedItems(); + for(int i=0; iqssListWidget->row(sel[i]); + //qDebug() << "Move Item Down:" << index; + if(index<(m_ui->qssListWidget->count()-1) ){ + m_ui->qssListWidget->insertItem(index+1, m_ui->qssListWidget->takeItem(index)); + m_ui->qssListWidget->setCurrentRow(index+1); + } + } +} + void QSSPage::readSettings(){ //load stylesheets m_ui->qssListWidget->clear(); - if(desktop_qss){ findStyleSheets(QStringList() << lthemeengine::userDesktopStyleSheetPath() << lthemeengine::sharedDesktopStyleSheetPath()); } - else{findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath()); } + m_ui->list_disabled->clear(); + //Read the currently-enabled settings QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); QStringList styleSheets; if(desktop_qss){ styleSheets = settings.value("Interface/desktop_stylesheets").toStringList(); } else{ styleSheets = settings.value("Interface/stylesheets").toStringList(); } + //Now load the items into list widgets + if(desktop_qss){ findStyleSheets(QStringList() << lthemeengine::userDesktopStyleSheetPath() << lthemeengine::sharedDesktopStyleSheetPath(), styleSheets); } + else{findStyleSheets(QStringList() << lthemeengine::userStyleSheetPath() << lthemeengine::sharedStyleSheetPath(), styleSheets); } - for(int i = 0; i < m_ui->qssListWidget->count(); ++i){ - QListWidgetItem *item = m_ui->qssListWidget->item(i); - if(styleSheets.contains(item->data(QSS_FULL_PATH_ROLE).toString())){ item->setCheckState(Qt::Checked); } - else { item->setCheckState(Qt::Unchecked); } - } } -void QSSPage::findStyleSheets(QStringList paths){ +void QSSPage::findStyleSheets(QStringList paths, QStringList enabled){ paths.removeDuplicates(); for(int i=0; iqssListWidget); + QListWidgetItem *item = new QListWidgetItem(info.fileName()); item->setToolTip(info.filePath()); item->setData(QSS_FULL_PATH_ROLE, info.filePath()); item->setData(QSS_WRITABLE_ROLE, info.isWritable()); + if( enabled.contains(info.filePath()) ){ m_ui->qssListWidget->addItem(item); } + else{ m_ui->list_disabled->addItem(item); } } } + //Now ensure the priority of the items in the active list is correct + for(int i = 0; i < m_ui->qssListWidget->count(); ++i){ + QListWidgetItem *item = m_ui->qssListWidget->item(i); + int index = enabled.indexOf( item->data(QSS_FULL_PATH_ROLE).toString() ); + if(index>=0){ m_ui->qssListWidget->insertItem(index, item); }// item->move(m_ui->qssListWidget->count() - 1 - index); } + } + m_ui->list_disabled->sortItems(Qt::AscendingOrder); + } void QSSPage::on_renameButton_clicked(){ - QListWidgetItem *item = m_ui->qssListWidget->currentItem(); + QListWidgetItem *item = currentSelection(); if(!item){ return; } QString name = QInputDialog::getText(this, tr("Rename Style Sheet"), tr("Style sheet name:"), QLineEdit::Normal, item->text(), 0); if(name.isEmpty()){ return; } - if(!m_ui->qssListWidget->findItems(name, Qt::MatchExactly).isEmpty()){ + if(!m_ui->qssListWidget->findItems(name, Qt::MatchExactly).isEmpty() || !m_ui->list_disabled->findItems(name, Qt::MatchExactly).isEmpty()){ QMessageBox::warning(this, tr("Error"), tr("The style sheet \"%1\" already exists").arg(name)); return; } @@ -162,3 +241,9 @@ void QSSPage::on_qssListWidget_customContextMenuRequested(const QPoint &pos){ QListWidgetItem *item = m_ui->qssListWidget->currentItem(); if(item && item->data(QSS_WRITABLE_ROLE).toBool()){ m_menu->exec(m_ui->qssListWidget->viewport()->mapToGlobal(pos)); } } + +QListWidgetItem* QSSPage::currentSelection(){ + QListWidgetItem *item = m_ui->qssListWidget->currentItem(); + if(item==0){ item = m_ui->list_disabled->currentItem(); } + return item; +} diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h index 76417ddf..5b0025c5 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h @@ -22,18 +22,26 @@ public: private slots: void on_qssListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *); + void on_list_disabled_currentItemChanged(QListWidgetItem *current, QListWidgetItem *); void on_createButton_clicked(); void on_editButton_clicked(); void on_removeButton_clicked(); void on_renameButton_clicked(); void on_qssListWidget_customContextMenuRequested(const QPoint &pos); + void on_tool_enable_clicked(); + void on_tool_disable_clicked(); + void on_tool_priority_up_clicked(); + void on_tool_priority_down_clicked(); + private: void readSettings(); - void findStyleSheets(QStringList paths); + void findStyleSheets(QStringList paths, QStringList enabled); Ui::QSSPage *m_ui; QMenu *m_menu; bool desktop_qss; + + QListWidgetItem* currentSelection(); }; #endif // QSSPAGE_H diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui index 124b4dc6..108bbbf9 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui @@ -13,69 +13,224 @@ Style Sheet Editor - - - - - true - - - Create - - + + + + + + + + + + + Increase Priority + + + + + + + + + + + + + Decrease priority of style + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Disable Style + + + Disable + + + + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + + true + + + + Enabled + + + Qt::AlignCenter + + + + + + + Qt::CustomContextMenu + + + false + + + QListView::Fixed + + + + + + + + + Qt::Vertical + + + + + + + + + + + Enable + + + + + + Qt::ToolButtonTextBesideIcon + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + true + + + + Available + + + Qt::AlignCenter + + + + + + + + + - - - - false - - - Remove - - - - - + + Qt::Horizontal - - - 189 - 20 - - - - - - - - Qt::CustomContextMenu - - - true - - - - - false - - - Edit - - - - - - - false - - - Rename - - + + + + + + true + + + Create + + + + + + + false + + + Edit + + + + + + + false + + + Rename + + + + + + + false + + + Remove + + + + + + + Qt::Horizontal + + + + 189 + 20 + + + + + -- cgit From 49d7b64794cb5c645f0093d18a207ea1c9fe2121 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 14 Sep 2017 12:22:31 -0400 Subject: Turn off the custom theme engine for the 1.x desktop itself, and use the lthemeengine styles for everything now. Also commit a few simple fixes for the lthemeengine styles page and a couple other random tweaks. --- src-qt5/core/libLumina/RootSubWindow.cpp | 8 +++- .../defaults/desktop/screensaver.conf | 4 +- src-qt5/core/lumina-desktop/LDesktop.cpp | 10 ++--- src-qt5/core/lumina-desktop/main.cpp | 8 ++-- .../src/lthemeengine/qsspage.cpp | 10 ++++- .../src/lthemeengine/qsspage.ui | 48 ++++++++++++++++++++-- 6 files changed, 69 insertions(+), 19 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 9eb62ff5..886d7a17 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -315,7 +315,7 @@ void RootSubWindow::toggleMaximize(){ //Not maximized yet - go ahead and make it so lastMaxGeom = this->geometry(); //save this for later; } - qDebug() << "Toggle Maximize:" << this->geometry() << rect; + //qDebug() << "Toggle Maximize:" << this->geometry() << rect; QString anim_type = DesktopSettings::instance()->value(DesktopSettings::Animation, "window/move", "random").toString(); loadAnimation(anim_type, NativeWindow::Size, rect); } @@ -384,6 +384,10 @@ void RootSubWindow::propertiesChanged(QList props, QList else{ otherB->setIcon(vals[i].value()); } break; case NativeWindow::GlobalPos: + if(vals[i].toPoint()!=QPoint(0,0)){ + WinWidget->resyncWindow(); + } + break; case NativeWindow::Size: //qDebug() << " - SIZE CHANGE"; if(WIN->property(NativeWindow::FrameExtents).isNull() && (i props, QList props << props.takeAt(i); vals << vals.takeAt(i); i--; - }else if(!WinWidget->isPaused() && !this->isVisible() && activeState==Normal){ + }else if(!WinWidget->isPaused() && activeState==Normal){ if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size()){ qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); this->setGeometry(WIN->geometry()); diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf index b4bfec59..89f4e488 100644 --- a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf @@ -1,3 +1,3 @@ [General] -default_plugin="random" -plugin_VGA-0="random" +default_plugin="fireflies" +plugin_VGA-0="fireflies" diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 37bc7ffa..f9ea1534 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -88,7 +88,7 @@ QRect LDesktop::availableScreenGeom(){ return globalWorkRect; //saved from previous calculations }else{ return LSession::handle()->screenGeom( Screen() ); - } + } } void LDesktop::UpdateGeometry(){ @@ -150,7 +150,7 @@ void LDesktop::checkResolution(){ }else if(scrn.width()==oldWidth && scrn.height()==oldHeight){ //nothing to do - same as before }else{ - //Calculate the scale factor between the old/new sizes in each dimension + //Calculate the scale factor between the old/new sizes in each dimension // and forward that on to all the interface elements double xscale = scrn.width()/((double) oldWidth); double yscale = scrn.height()/((double) oldHeight); @@ -194,7 +194,7 @@ void LDesktop::checkResolution(){ } } DP->sync(); //make sure it gets saved to disk right away - + } issyncing = false; } @@ -238,7 +238,7 @@ void LDesktop::InitDesktop(){ bgWindow->setWindowOpacity(0.0); connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) );*/ if(DEBUG){ qDebug() << "Create bgDesktop"; } - bgDesktop = new LDesktopPluginSpace(); + bgDesktop = new LDesktopPluginSpace(); int grid = settings->value(DPREFIX+"GridSize",-1).toInt(); if(grid<0 && LSession::desktop()->screenGeometry(Screen()).height() > 2000){ grid = 200; } else if(grid<0){ grid = 100; } @@ -266,7 +266,7 @@ void LDesktop::InitDesktop(){ } void LDesktop::SettingsChanged(){ - if(issyncing){ return; } //don't refresh for internal modifications to the + if(issyncing){ return; } //don't refresh for internal modifications to the issyncing = true; qDebug() << "Found Settings Change:" << screenID; settings->sync(); //make sure to sync with external settings changes diff --git a/src-qt5/core/lumina-desktop/main.cpp b/src-qt5/core/lumina-desktop/main.cpp index 6017cad7..b2bfa9be 100644 --- a/src-qt5/core/lumina-desktop/main.cpp +++ b/src-qt5/core/lumina-desktop/main.cpp @@ -93,14 +93,14 @@ int main(int argc, char ** argv) if(DEBUG){ timer = new QTime(); timer->start(); } //Setup Log File //qInstallMessageHandler(MessageOutput); - if(DEBUG){ qDebug() << "Theme Init:" << timer->elapsed(); } - LuminaThemeEngine theme(&a); - QObject::connect(&theme, SIGNAL(updateIcons()), &a, SLOT(reloadIconTheme()) ); + //if(DEBUG){ qDebug() << "Theme Init:" << timer->elapsed(); } + //LuminaThemeEngine theme(&a); + //QObject::connect(&theme, SIGNAL(updateIcons()), &a, SLOT(reloadIconTheme()) ); //if(DEBUG){ qDebug() << "Load Locale:" << timer->elapsed(); } //LUtils::LoadTranslation(&a, "lumina-desktop"); if(DEBUG){ qDebug() << "Session Setup:" << timer->elapsed(); } a.setupSession(); - theme.refresh(); + //theme.refresh(); if(DEBUG){ qDebug() << "Exec Time:" << timer->elapsed(); delete timer;} int retCode = a.exec(); //qDebug() << "Stopping the window manager"; diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp index ae5350ab..cd88fb56 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp @@ -29,6 +29,8 @@ QSSPage::QSSPage(QWidget *parent, bool desktop) : TabPage(parent), m_ui(new Ui:: m_ui->createButton->setIcon(QIcon::fromTheme("document-new")); m_ui->editButton->setIcon(QIcon::fromTheme("accessories-text-editor")); m_ui->removeButton->setIcon(QIcon::fromTheme("edit-delete")); + m_ui->tool_enable->setEnabled(false); + m_ui->tool_disable->setEnabled(false); } QSSPage::~QSSPage(){ @@ -50,8 +52,10 @@ void QSSPage::on_qssListWidget_currentItemChanged(QListWidgetItem *current, QLis if(current!=0){ m_ui->list_disabled->clearSelection(); //clear any current selection on the other widget m_ui->list_disabled->setCurrentRow(-1); + m_ui->tool_enable->setEnabled(false); } //qDebug() << "Got Current Item Changed"; + m_ui->tool_disable->setEnabled(current!=0); if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -68,8 +72,10 @@ void QSSPage::on_list_disabled_currentItemChanged(QListWidgetItem *current, QLis if(current!=0){ m_ui->qssListWidget->clearSelection(); //clear any current selection on the other widget m_ui->qssListWidget->setCurrentRow(-1); + m_ui->tool_disable->setEnabled(false); } //qDebug() << "Got Current Item Changed"; + m_ui->tool_enable->setEnabled(current!=0); if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -105,11 +111,11 @@ void QSSPage::on_createButton_clicked(){ file.close(); //creating item QFileInfo info(filePath); - QListWidgetItem *item = new QListWidgetItem(info.fileName(), m_ui->qssListWidget); + QListWidgetItem *item = new QListWidgetItem(info.fileName(), m_ui->list_disabled); item->setToolTip(info.filePath()); item->setData(QSS_FULL_PATH_ROLE, info.filePath()); item->setData(QSS_WRITABLE_ROLE, info.isWritable()); - m_ui->qssListWidget->setCurrentRow(m_ui->qssListWidget->count()-1); + m_ui->list_disabled->setCurrentRow(m_ui->list_disabled->count()-1); QTimer::singleShot(10, this, SLOT(on_editButton_clicked()) ); } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui index 108bbbf9..f9a980f3 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui @@ -22,6 +22,12 @@ + + + 0 + 0 + + Increase Priority @@ -29,12 +35,19 @@ - + + .. + + + 0 + 0 + + Decrease priority of style @@ -42,12 +55,19 @@ - + + .. + + + 0 + 0 + + Qt::Horizontal @@ -61,6 +81,12 @@ + + + 0 + 0 + + Disable Style @@ -68,7 +94,8 @@ Disable - + + .. Qt::ToolButtonTextBesideIcon @@ -120,11 +147,18 @@ + + + 0 + 0 + + Enable - + + .. Qt::ToolButtonTextBesideIcon @@ -133,6 +167,12 @@ + + + 0 + 0 + + Qt::Horizontal -- cgit From 11383468325d5cf37761d2ee6ab112d9e8ecaa5b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 14 Sep 2017 12:41:48 -0400 Subject: Make sure the "leave" dialog is themeable, and theme it within the DarkGlass style. --- src-qt5/core/lumina-desktop/SystemWindow.cpp | 1 + src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/SystemWindow.cpp b/src-qt5/core/lumina-desktop/SystemWindow.cpp index cd09c9bd..c709bb2a 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.cpp +++ b/src-qt5/core/lumina-desktop/SystemWindow.cpp @@ -12,6 +12,7 @@ SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){ ui->setupUi(this); //load the designer file + this->setObjectName("LeaveDialog"); //Setup the window flags this->setWindowFlags( Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); //Setup the icons based on the current theme diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss index 70db70fc..2de9fefa 100644 --- a/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/DarkGlass.qss @@ -36,7 +36,7 @@ QWidget#LuminaPanelColor{ } /*Special taskmanager window buttons: based on window state*/ -LTBWidget, LPanel QToolButton{ +LTBWidget, LPanel QToolButton, QDialog#LeaveDialog QToolButton{ border: 1px solid transparent; border-radius: 3px; background: transparent; @@ -54,7 +54,7 @@ LTBWidget#WindowActive{ LTBWidget#WindowAttention{ background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); } -LTBWidget:hover, LTBWidget#WindowVisible:hover, LTBWidget#WindowInvisible:hover, LTBWidget#WindowActive:hover, LTBWidget#WindowAttention:hover, QToolButton:hover{ +LTBWidget:hover, LTBWidget#WindowVisible:hover, LTBWidget#WindowInvisible:hover, LTBWidget#WindowActive:hover, LTBWidget#WindowAttention:hover, QToolButton:hover, QDialog#LeaveDialog QToolButton:hover{ background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); color: palette(highlighted-text); border-width: 1px; -- cgit From 5b1831a22408a22d9c3bc03a82942a4bf092f311 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 15 Sep 2017 12:25:54 -0400 Subject: Add mouse cursor theme management to lthemeengine. Also fix up a number of other little bugs in various pages. --- .../src/lthemeengine/cursorthemepage.cpp | 139 +++++++++++++++++++++ .../src/lthemeengine/cursorthemepage.h | 29 +++++ .../src/lthemeengine/cursorthemepage.ui | 51 ++++++++ .../src/lthemeengine/iconthemepage.cpp | 4 +- .../src/lthemeengine/lthemeengine.cpp | 106 ++++++++++++++++ .../src/lthemeengine/lthemeengine.h | 6 + .../src/lthemeengine/lthemeengine.pro | 9 +- .../src/lthemeengine/mainwindow.cpp | 2 + .../src/lthemeengine/mainwindow.ui | 36 +++++- 9 files changed, 375 insertions(+), 7 deletions(-) create mode 100644 src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.cpp create mode 100644 src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.h create mode 100644 src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.ui (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.cpp new file mode 100644 index 00000000..1d84164f --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.cpp @@ -0,0 +1,139 @@ +#include +#include +#include +#include +#include +#include +#include +#include "lthemeengine.h" +#include "cursorthemepage.h" +#include "ui_cursorthemepage.h" + +CursorThemePage::CursorThemePage(QWidget *parent) : TabPage(parent), m_ui(new Ui::CursorThemePage){ + m_ui->setupUi(this); + loadThemes(); + readSettings(); +} + +CursorThemePage::~CursorThemePage(){ + delete m_ui; +} + +void CursorThemePage::writeSettings(){ + QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); + QTreeWidgetItem *item = m_ui->treeWidget->currentItem(); + if(item){ + settings.setValue("Appearance/cursor_theme", item->data(3, Qt::UserRole)); + lthemeengine::setCursorTheme(item->data(3, Qt::UserRole).toString() ); + } +} + +void CursorThemePage::readSettings(){ + QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); + QString name = settings.value("Appearance/cursor_theme").toString(); + if(name.isEmpty()){ return; } + for(int i = 0; i < m_ui->treeWidget->topLevelItemCount(); ++i){ + QTreeWidgetItem *item = m_ui->treeWidget->topLevelItem(i); + if(item->data(3, Qt::UserRole).toString() == name){ + m_ui->treeWidget->setCurrentItem(item); + break; + } + } +} + +void CursorThemePage::loadThemes(){ + /*QFileInfoList themeFileList; + foreach(QString path, lthemeengine::iconPaths()){ + QDir dir(path); + dir.setFilter(QDir::Dirs | QDir::NoDotDot | QDir::NoDot); + foreach (QFileInfo info, dir.entryInfoList()){ + QDir themeDir(info.absoluteFilePath()); + themeDir.setFilter(QDir::Files); + themeFileList << themeDir.entryInfoList(QStringList() << "index.theme"); + } + }*/ + /*foreach(QFileInfo info, themeFileList){ + loadTheme(info.canonicalFilePath()); + }*/ + QStringList themes = lthemeengine::availableSystemCursors(); + for(int i=0; isetIcon(0, icon1); + item->setIcon(1, icon2); + item->setIcon(2, icon3); + item->setText(3, name); + item->setData(3, Qt::UserRole, path.section("/",-1)); + item->setToolTip(3, comment); + item->setSizeHint(0, QSize(24,24)); + m_ui->treeWidget->addTopLevelItem(item); + m_ui->treeWidget->resizeColumnToContents(0); + m_ui->treeWidget->resizeColumnToContents(1); + m_ui->treeWidget->resizeColumnToContents(2); + m_ui->treeWidget->resizeColumnToContents(3); +} + +QIcon CursorThemePage::findIcon(const QString &themePath, int size, const QString &name){ + QSettings config(themePath, QSettings::IniFormat); + config.beginGroup("Icon Theme"); + QStringList dirs = config.value("Directories").toStringList(); + QStringList parents = config.value("Inherits").toStringList(); + bool haveInherits = config.contains("Inherits"); + config.endGroup(); + foreach (QString dir, dirs){ + config.beginGroup(dir); + if(config.value("Size").toInt() == size){ + QDir iconDir = QFileInfo(themePath).path() + "/" + dir; + iconDir.setFilter(QDir::Files); + iconDir.setNameFilters(QStringList () << name + ".*"); + if(iconDir.entryInfoList().isEmpty()) + continue; + return QIcon(iconDir.entryInfoList().first().absoluteFilePath()); + } + config.endGroup(); + } + foreach (QString dir, dirs){ + config.beginGroup(dir); + if(abs(config.value("Size").toInt() - size) < 4){ + QDir iconDir = QFileInfo(themePath).path() + "/" + dir; + iconDir.setFilter(QDir::Files); + iconDir.setNameFilters(QStringList () << name + ".*"); + if(iconDir.entryInfoList().isEmpty()) + continue; + return QIcon(iconDir.entryInfoList().first().absoluteFilePath()); + } + config.endGroup(); + } + if (!haveInherits){ return QIcon(); } + parents.append("hicolor"); //add fallback themes + parents.append("gnome"); + parents.removeDuplicates(); + foreach (QString parent, parents){ + QString parentThemePath = QDir(QFileInfo(themePath).path() + "/../" + parent).canonicalPath() + "/index.theme"; + if(!QFile::exists(parentThemePath) || parentThemePath == themePath){ continue; } + QIcon icon = findIcon(parentThemePath, size, name); + if(!icon.isNull()){ return icon; } + } + return QIcon(); +} diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.h new file mode 100644 index 00000000..e221520b --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.h @@ -0,0 +1,29 @@ +#ifndef CURSORTHEMEPAGE_H +#define CURSORTHEMEPAGE_H + +#include +#include "tabpage.h" + +namespace Ui { +class CursorThemePage; +} + +class CursorThemePage : public TabPage +{ + Q_OBJECT + +public: + explicit CursorThemePage(QWidget *parent = 0); + ~CursorThemePage(); + + void writeSettings(); + +private: + void readSettings(); + void loadThemes(); + void loadTheme(const QString &path); + QIcon findIcon(const QString &themePath, int size, const QString &name); + Ui::CursorThemePage *m_ui; +}; + +#endif // ICONTHEMEPAGE_H diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.ui new file mode 100644 index 00000000..3e0a5da1 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/cursorthemepage.ui @@ -0,0 +1,51 @@ + + + CursorThemePage + + + + 0 + 0 + 400 + 300 + + + + Form + + + + + + 4 + + + false + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + + diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/iconthemepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/iconthemepage.cpp index 1a09ac0d..7ed54f02 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/iconthemepage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/iconthemepage.cpp @@ -72,7 +72,7 @@ void IconThemePage::loadTheme(const QString &path){ config.endGroup(); QIcon icon1 = findIcon(path, 24, "document-save"); QIcon icon2 = findIcon(path, 24, "document-print"); - QIcon icon3 = findIcon(path, 24, "media-playback-stop"); + QIcon icon3 = findIcon(path, 24, "document-edit"); QTreeWidgetItem *item = new QTreeWidgetItem(); item->setIcon(0, icon1); item->setIcon(1, icon2); @@ -97,7 +97,7 @@ QIcon IconThemePage::findIcon(const QString &themePath, int size, const QString config.endGroup(); foreach (QString dir, dirs){ config.beginGroup(dir); - if(config.value("Size").toInt() == size){ + if(config.value("Size").toInt() == size || config.value("Type").toString().toLower()=="scalable"){ QDir iconDir = QFileInfo(themePath).path() + "/" + dir; iconDir.setFilter(QDir::Files); iconDir.setNameFilters(QStringList () << name + ".*"); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp index 701745c4..cb491aa6 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp @@ -8,6 +8,19 @@ #include +QStringList lthemeengine::readFile(QString filepath){ + QStringList out; + QFile file(filepath); + if(file.open(QIODevice::Text | QIODevice::ReadOnly)){ + QTextStream in(&file); + while(!in.atEnd()){ + out << in.readLine(); + } + file.close(); + } + return out; +} + QString lthemeengine::configPath(){ return QDir::homePath() + "/.config/lthemeengine/"; } @@ -91,3 +104,96 @@ QString lthemeengine::systemLanguageID(){ #endif return QLocale::system().name(); } + +QStringList lthemeengine::availableSystemCursors(){ //returns: [name] for each item + //Find all the directories which could contain themes + QStringList paths; + paths << QDir::homePath()+"/.icons"; + QStringList xdd = QString(getenv("XDG_DATA_HOME")).split(":"); + xdd << QString(getenv("XDG_DATA_DIRS")).split(":"); + for(int i=0; iaddButton(m_ui->tool_page_icons, m_ui->stackedWidget->addWidget(new IconThemePage(this))); bgroup->addButton(m_ui->tool_page_styles, m_ui->stackedWidget->addWidget(new QSSPage(this, false))); bgroup->addButton(m_ui->tool_page_deskstyles, m_ui->stackedWidget->addWidget(new QSSPage(this, true))); + bgroup->addButton(m_ui->tool_page_cursors, m_ui->stackedWidget->addWidget(new CursorThemePage(this)) ); connect(bgroup, SIGNAL(buttonClicked(int)), m_ui->stackedWidget, SLOT(setCurrentIndex(int)) ); QTimer::singleShot(10, m_ui->tool_page_general, SLOT(toggle())); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui index bfaf3eaf..dd676c37 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 657 - 500 + 672 + 723 @@ -158,6 +158,38 @@ + + + + + 0 + 0 + + + + Cursors + + + + .. + + + + 32 + 32 + + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + -- cgit From 4e5dafc37eee4317390a3a724081dcbe01c7d066 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 15 Sep 2017 15:39:39 -0400 Subject: Commit a "scrollbar-simple.qss" file, and some WIP on updating X cursors on theme change (not working yet) --- .../lumina-theme-engine/qss/scrollbar-simple.qss | 30 ++++++++++++++++++++++ .../lthemeengineplatformtheme.cpp | 11 ++++++-- .../lthemeengineplatformtheme.h | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss b/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss new file mode 100644 index 00000000..265ff20c --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss @@ -0,0 +1,30 @@ +/* SCROLLBARS (NOTE: Changing 1 subcontrol means you have to change all of them)*/ +QScrollBar{ + background: palette(alternate-base); +} +QScrollBar:horizontal{ + margin: 0px 0px 0px 0px; +} +QScrollBar:vertical{ + margin: 0px 0px 0px 0px; +} +QScrollBar::handle{ + background: palette(base); + border: 1px solid transparent; + border-radius: 7px; +} +QScrollBar::handle:hover, QScrollBar::add-line:hover, QScrollBar::sub-line:hover{ + background: palette(highlight); +} +QScrollBar::add-line{ +subcontrol-origin: none; +} +QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical{ +height: 0px; +} +QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal{ +width: 0px; +} +QScrollBar::sub-line{ +subcontrol-origin: none; +} diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp index 9cb755fb..a65798de 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp @@ -16,6 +16,8 @@ #include #include +#include + #include #include "lthemeengineplatformtheme.h" #if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) && !defined(QT_NO_DBUS) @@ -138,12 +140,16 @@ void lthemeenginePlatformTheme::applySettings(){ #endif QGuiApplication::setFont(m_generalFont); //apply font QIcon::setThemeName(m_iconTheme); //apply icons + setenv("X_CURSOR_THEME", m_cursorTheme.toLocal8Bit().data(), 1); + //qDebug() << "Icon Theme Change:" << m_iconTheme << QIcon::themeSearchPaths(); if(m_customPalette && m_usePalette){ QGuiApplication::setPalette(*m_customPalette); } //apply palette #ifdef QT_WIDGETS_LIB if(hasWidgets()){ + QEvent et(QEvent::ThemeChange); + QEvent ec(QEvent::CursorChange); foreach (QWidget *w, qApp->allWidgets()){ - QEvent e(QEvent::ThemeChange); - QApplication::sendEvent(w, &e); + QApplication::sendEvent(w, &et); + QApplication::sendEvent(w, &ec); } } #endif @@ -180,6 +186,7 @@ void lthemeenginePlatformTheme::readSettings(){ QString schemePath = settings.value("color_scheme_path","airy").toString(); m_customPalette = new QPalette(loadColorScheme(schemePath)); } + m_cursorTheme = settings.value("cursor_theme","").toString(); m_iconTheme = settings.value("icon_theme", "material-design-light").toString(); settings.endGroup(); settings.beginGroup("Fonts"); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h index 17323328..3bc9ebbf 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h @@ -66,7 +66,7 @@ private: #endif QString loadStyleSheets(const QStringList &paths); QPalette loadColorScheme(QString filePath); - QString m_style, m_iconTheme, m_userStyleSheet, m_prevStyleSheet; + QString m_style, m_iconTheme, m_userStyleSheet, m_cursorTheme; QPalette *m_customPalette = nullptr; QFont m_generalFont, m_fixedFont; int m_doubleClickInterval; -- cgit From bf9863518213fea4003e4d95743db6ffdf3ae29c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 18 Sep 2017 08:58:59 -0400 Subject: Deactivate the "themes" page within lumina-config. Replace that button with one that launches the theme engine config tool. --- src-qt5/core/libLumina/LUtils.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LUtils.h b/src-qt5/core/libLumina/LUtils.h index bfa900b1..a494d4da 100644 --- a/src-qt5/core/libLumina/LUtils.h +++ b/src-qt5/core/libLumina/LUtils.h @@ -55,7 +55,7 @@ public: //Create the exec string to open a terminal in a particular directory static QString GenerateOpenTerminalExec(QString term, QString dirpath); - + //List all the sub-directories of a parent dir (recursive) static QStringList listSubDirectories(QString dir, bool recursive = true); @@ -66,18 +66,18 @@ public: //Get the list of all file extensions which Qt can read (lowercase) static QStringList imageExtensions(bool wildcards = false); static QStringList videoExtensions(); - + //Load a translation file for a Lumina Project static QTranslator* LoadTranslation(QApplication *app, QString appname, QString locale = "", QTranslator *cTrans = 0); //Other localization shortcuts static QStringList knownLocales(); //Note: This only lists locales known to Lumina (so the i18n files need to be installed) static void setLocaleEnv(QString lang, QString msg="", QString time="", QString num="" ,QString money="",QString collate="", QString ctype=""); static QString currentLocale(); - + //Number format conversions static double DisplaySizeToBytes(QString num); //Turn a display size (like 50M or 50KB) into a double for calculations (bytes) static QString BytesToDisplaySize(qint64 bytes); //convert into a readable size (like 50M or 50KB) - + static QString SecondsToDisplay(int secs); //convert into a readable time }; #endif -- cgit From 2856ba1097e0179dc35a76fb3462fe7a0502bfaf Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 18 Sep 2017 09:24:42 -0400 Subject: Convert the "Glass" desktop theme over to the new format. --- .../core/lumina-theme-engine/desktop_qss/Glass.qss | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss new file mode 100644 index 00000000..1bfa92cd --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss @@ -0,0 +1,91 @@ +QWidget#LuminaBootSplash{ + background: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 palette(light), stop:1 palette(midlight) ); + border-radius: 5px; +} + +LDPlugin#applauncher{ + background-color: transparent; + border: none; +} +LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{ + background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(250, 250, 250, 30), stop:1 rgba(252, 252, 252, 70)); + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + color: white; +} + +LDPlugin#applauncher QToolButton:hover, LDPlugin#desktopview QListWidget::item:hover{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); + color: palette(highlighted-text); + border-width: 3px; + border-style: solid; + border-radius: 5px; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); +} +QWidget#LuminaPanelColor{ + background: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(252, 252, 252, 60), stop:1 rgba(255,255,255, 110)); + border-radius: 3px; +} + +/*Special taskmanager window buttons: based on window state*/ +LTBWidget, LPanel QToolButton, QDialog#LeaveDialog QToolButton{ + border: 1px solid transparent; + border-radius: 3px; + background: transparent; +} +LTBWidget::menu-indicator{ image: none; } /*disable the menu arrow*/ +LTBWidget#WindowVisible{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(mid), stop: 1 transparent); +} +LTBWidget#WindowInvisible{ + background: transparent; +} +LTBWidget#WindowActive{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(dark), stop: 1 transparent); +} +LTBWidget#WindowAttention{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); +} +LTBWidget:hover, LTBWidget#WindowVisible:hover, LTBWidget#WindowInvisible:hover, LTBWidget#WindowActive:hover, LTBWidget#WindowAttention:hover, QToolButton:hover, QDialog#LeaveDialog QToolButton:hover{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1.1, stop: 0.1 palette(highlight), stop: 1 transparent); + color: palette(highlighted-text); + border-width: 1px; + border-style: solid; + border-top-color: qradialgradient(spread:pad, cx:0.5, cy:1, radius:0.5, fx:0.5, fy:1, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); + border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255,255,255, 30), stop:0.724868 rgba(255,255,255, 60), stop:1 rgba(255,255,255, 10)); +} + +/* CALENDER WIDGET */ + /* (This is a special hack since there is no official support for stylesheets for this widget) */ + QCalendarWidget QWidget#qt_calendar_navigationbar{ + background-color: palette(base); + } +QCalendarWidget QWidget{ + background-color: palette(base); + alternate-background-color: palette(alternate-base); + color: palette(text); +} +QCalendarWidget QAbstractButton{ + background-color: transparent; +} +QCalendarWidget QAbstractButton::menu-indicator{ + image: none; +} +QCalendarWidget QAbstractItemView{ + selection-background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(253, 254, 254, 20), stop:1 rgba(255,255,255, 100)); + selection-color: palette(highlighted-text); +} +QCalendarWidget QWidget#qt_calendar_calendarview{ + background-color: palette(light); + border: none; +} -- cgit From a9671a98baf769f750f6fc3a85fe184968fbfda8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 18 Sep 2017 10:46:52 -0400 Subject: Fix up the icon sync on theme change, and change the icon for lumina-mediaplayer to one that exists in more themes --- .../desktop-plugins/applauncher/AppLauncherPlugin.h | 11 ++++++++--- .../panel-plugins/applauncher/AppLaunchButton.h | 16 ++++++++++------ .../lumina-desktop/panel-plugins/battery/LBattery.cpp | 2 +- .../core/lumina-desktop/panel-plugins/battery/LBattery.h | 15 ++++++++++++--- .../panel-plugins/taskmanager/LTaskButton.cpp | 7 ++++--- .../panel-plugins/taskmanager/LTaskButton.h | 13 +++++++++++-- 6 files changed, 46 insertions(+), 18 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h index 34a75ce8..c8e3a475 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h +++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.h @@ -30,7 +30,7 @@ public: ~AppLauncherPlugin(){} void Cleanup(); //special function for final cleanup - + private: QToolButton *button; QFileSystemWatcher *watcher; @@ -45,7 +45,7 @@ private slots: void iconLoaded(QString); //void openContextMenu(); - + //void increaseIconSize(); //void decreaseIconSize(); //void deleteFile(); @@ -63,11 +63,16 @@ public slots: void LocaleChange(){ loadButton(); //force reload } - + protected: void resizeEvent(QResizeEvent *ev){ LDPlugin::resizeEvent(ev); QTimer::singleShot(100, this, SLOT(loadButton()) ); } + void changeEvent(QEvent *ev){ + LDPlugin::changeEvent(ev); + QEvent::Type tmp = ev->type(); + if(tmp == QEvent::StyleChange || tmp==QEvent::ThemeChange || tmp==QEvent::LanguageChange || tmp==QEvent::LocaleChange){ loadButton(); } + } }; #endif diff --git a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.h b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.h index 3aa3c7ad..f146df66 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.h @@ -24,11 +24,11 @@ // PANEL PLUGIN BUTTON class AppLaunchButtonPlugin : public LPPlugin{ Q_OBJECT - + public: AppLaunchButtonPlugin(QWidget *parent = 0, QString id = "applauncher", bool horizontal=true); ~AppLaunchButtonPlugin(); - + private: QToolButton *button; QString appfile; @@ -50,14 +50,18 @@ public slots: this->layout()->update(); updateButtonVisuals(); } - - void LocaleChange(){ + void LocaleChange(){ updateButtonVisuals(); } - void ThemeChange(){ updateButtonVisuals(); } +protected: + void changeEvent(QEvent *ev){ + LPPlugin::changeEvent(ev); + QEvent::Type tmp = ev->type(); + if(tmp == QEvent::StyleChange || tmp==QEvent::ThemeChange || tmp==QEvent::LanguageChange || tmp==QEvent::LocaleChange){ updateButtonVisuals(); } + } }; -#endif \ No newline at end of file +#endif diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp index be5b8488..cae73d13 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp @@ -77,7 +77,7 @@ void LBattery::updateBattery(bool force){ break; } if(iconsessionSettings()->value("audiofiles/batterylow", LOS::LuminaShare()+"low-battery.ogg").toString(); LSession::handle()->playAudioFile(sfile); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h index 29562d5d..d14cfc53 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h @@ -25,12 +25,12 @@ class LBattery : public LPPlugin{ public: LBattery(QWidget *parent = 0, QString id = "battery", bool horizontal=true); ~LBattery(); - + private: QTimer *timer; QLabel *label; int iconOld; - + private slots: void updateBattery(bool force = false); QString getRemainingTime(); @@ -39,7 +39,7 @@ public slots: void LocaleChange(){ updateBattery(true); } - + void OrientationChange(){ if(this->layout()->direction()==QBoxLayout::LeftToRight){ label->setFixedSize( QSize(this->height(), this->height()) ); @@ -48,6 +48,15 @@ public slots: } updateBattery(true); //force icon refresh } +protected: + void changeEvent(QEvent *ev){ + LPPlugin::changeEvent(ev); + QEvent::Type tmp = ev->type(); + if(tmp==QEvent::ThemeChange || tmp==QEvent::LanguageChange || tmp==QEvent::LocaleChange){ + updateBattery(true); + } + } + }; #endif diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp index ab4e786f..8f867261 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.cpp @@ -30,7 +30,7 @@ LTaskButton::LTaskButton(QWidget *parent, bool smallDisplay) : LTBWidget(parent) } LTaskButton::~LTaskButton(){ - + } //=========== @@ -81,11 +81,12 @@ LWinInfo LTaskButton::currentWindow(){ //============= // PUBLIC SLOTS //============= + void LTaskButton::UpdateButton(){ if(winMenu->isVisible()){ return; } //skip this if the window menu is currently visible for now bool statusOnly = (WINLIST.length() == LWINLIST.length()); LWINLIST = WINLIST; - + winMenu->clear(); LXCB::WINDOWVISIBILITY showstate = LXCB::IGNORE; for(int i=0; isetIcon(WINLIST[i].icon(noicon)); cname = WINLIST[i].Class(); - if(cname.isEmpty()){ + if(cname.isEmpty()){ //Special case (chrome/chromium does not register *any* information with X except window title) cname = WINLIST[i].text(); if(cname.contains(" - ")){ cname = cname.section(" - ",-1); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h index 6b171c6a..ff551998 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/taskmanager/LTaskButton.h @@ -15,6 +15,7 @@ #include #include #include +#include // libLumina includes #include @@ -29,7 +30,7 @@ class LTaskButton : public LTBWidget{ public: LTaskButton(QWidget *parent=0, bool smallDisplay = true); ~LTaskButton(); - + //Window Information QList windows(); QString classname(); @@ -56,6 +57,7 @@ public slots: void UpdateMenus(); //re-create the menus (text + icons) private slots: + void buttonClicked(); void closeWindow(); //send the signal to close a window void maximizeWindow(); //send the signal to maximize/restore a window @@ -66,7 +68,14 @@ private slots: void triggerWindow(); //change b/w visible and invisible void winClicked(QAction*); void openActionMenu(); - +protected: + void changeEvent(QEvent *ev){ + LTBWidget::changeEvent(ev); + QEvent::Type tmp = ev->type(); + if(tmp==QEvent::ThemeChange || tmp==QEvent::LanguageChange || tmp==QEvent::LocaleChange){ + QTimer::singleShot(qrand()%100+500, this, SLOT(UpdateButton()) ); + } + } signals: void MenuClosed(); }; -- cgit From 39f54ac1bdfa1865516dfebd07ab52fe58e5e998 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 18 Sep 2017 11:10:08 -0400 Subject: A few more tweaks for the theme engine. Try to update application window icons when the theme changes. Minor change to the Glass desktop theme. --- src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss | 2 +- .../lthemeengine-qtplugin/lthemeengineplatformtheme.cpp | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss index 1bfa92cd..502c0a44 100644 --- a/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss +++ b/src-qt5/core/lumina-theme-engine/desktop_qss/Glass.qss @@ -1,5 +1,5 @@ QWidget#LuminaBootSplash{ - background: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 palette(light), stop:1 palette(midlight) ); + background: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 palette(base), stop:1 palette(light) ); border-radius: 5px; } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp index a65798de..545cce9f 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp @@ -139,7 +139,19 @@ void lthemeenginePlatformTheme::applySettings(){ } #endif QGuiApplication::setFont(m_generalFont); //apply font + bool ithemechange = m_iconTheme != QIcon::themeName(); QIcon::setThemeName(m_iconTheme); //apply icons + //See if we need to reload the application icon from the new theme + if(ithemechange){ + QString appIcon = qApp->windowIcon().name(); + if(!appIcon.isEmpty() && QIcon::hasThemeIcon(appIcon)){ qApp->setWindowIcon(QIcon::fromTheme(appIcon)); } + QWindowList wins = qApp->topLevelWindows(); + for(int i=0; iicon().name(); + if(!winIcon.isEmpty() && QIcon::hasThemeIcon(winIcon)){ wins[i]->setIcon(QIcon::fromTheme(winIcon)); } + } + } + bool cthemechange = m_cursorTheme != QString(getenv("X_CURSOR_THEME")); setenv("X_CURSOR_THEME", m_cursorTheme.toLocal8Bit().data(), 1); //qDebug() << "Icon Theme Change:" << m_iconTheme << QIcon::themeSearchPaths(); if(m_customPalette && m_usePalette){ QGuiApplication::setPalette(*m_customPalette); } //apply palette @@ -148,8 +160,8 @@ void lthemeenginePlatformTheme::applySettings(){ QEvent et(QEvent::ThemeChange); QEvent ec(QEvent::CursorChange); foreach (QWidget *w, qApp->allWidgets()){ - QApplication::sendEvent(w, &et); - QApplication::sendEvent(w, &ec); + if(ithemechange){ QApplication::sendEvent(w, &et); } + if(cthemechange){ QApplication::sendEvent(w, &ec); } } } #endif -- cgit From 6afa54c0af62552e30b61e0236706fd6403d2760 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 18 Sep 2017 12:26:29 -0400 Subject: Make sure we never overwrite an application's stylesheet if one is set. --- .../src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp | 10 ++++++---- .../src/lthemeengine-qtplugin/lthemeengineplatformtheme.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp index 545cce9f..934d2234 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp @@ -132,10 +132,12 @@ void lthemeenginePlatformTheme::applySettings(){ if(m_customPalette){ qApp->setPalette(*m_customPalette); } else{ qApp->setPalette(qApp->style()->standardPalette()); } } - //do not override application style - qApp->setStyleSheet(m_userStyleSheet); - //else{ qCDebug(llthemeengine) << "custom style sheet is disabled";} - //m_prevStyleSheet = m_userStyleSheet; + //do not override application style if one is already set by the app itself + if(qApp->styleSheet().isEmpty() || qApp->styleSheet()==m_oldStyleSheet){ + qApp->setStyleSheet(m_userStyleSheet); + m_oldStyleSheet = m_userStyleSheet; + } + } #endif QGuiApplication::setFont(m_generalFont); //apply font diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h index 3bc9ebbf..f521d457 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.h @@ -66,7 +66,7 @@ private: #endif QString loadStyleSheets(const QStringList &paths); QPalette loadColorScheme(QString filePath); - QString m_style, m_iconTheme, m_userStyleSheet, m_cursorTheme; + QString m_style, m_iconTheme, m_userStyleSheet, m_oldStyleSheet, m_cursorTheme; QPalette *m_customPalette = nullptr; QFont m_generalFont, m_fixedFont; int m_doubleClickInterval; -- cgit From c04fc4bd19594886fb9ff51dd3ba4b8145cd1765 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 18 Sep 2017 12:55:58 -0400 Subject: Cleanup the stylesheet usage on apps a bit more. Still apply any application styles if the app has it's own global stylesheet, but put the additional styles earlier in the priority so the app stylesheet has priority over any conflicting rules. --- .../src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp index 934d2234..670e1c9c 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-qtplugin/lthemeengineplatformtheme.cpp @@ -133,10 +133,10 @@ void lthemeenginePlatformTheme::applySettings(){ else{ qApp->setPalette(qApp->style()->standardPalette()); } } //do not override application style if one is already set by the app itself - if(qApp->styleSheet().isEmpty() || qApp->styleSheet()==m_oldStyleSheet){ - qApp->setStyleSheet(m_userStyleSheet); - m_oldStyleSheet = m_userStyleSheet; - } + QString orig = qApp->styleSheet(); + if(orig.startsWith(m_oldStyleSheet)){ orig = orig.remove(m_oldStyleSheet); } + qApp->setStyleSheet(m_userStyleSheet+orig); //make sure the app style has higher priority than ours + m_oldStyleSheet = m_userStyleSheet; } #endif -- cgit From ae0c4bc57dfb087c62a5d371c9a3d47f23adcf71 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 19 Sep 2017 11:39:45 -0400 Subject: Quick tag of version 1.3.3 in source (theme engine finished/integrated) --- src-qt5/core/libLumina/LDesktopUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index fe4cfd30..54e660e6 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -16,7 +16,7 @@ static QStringList fav; QString LDesktopUtils::LuminaDesktopVersion(){ - QString ver = "1.3.2"; + QString ver = "1.3.3"; #ifdef GIT_VERSION ver.append( QString(" (Git Revision: %1)").arg(GIT_VERSION) ); #endif -- cgit From c74782ec09381eadb1d6dec05f6be3dde8bd3319 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 20 Sep 2017 00:57:44 -0400 Subject: Get the window embed routine cleaned up and demo-ready. I am still using the reparenting method, but mixing it with a partial/automatic compositing of windows to ensure that we can provide frame transparency - even if window-transparency is not supported with this method. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 107 +++++++++++++++----------- src-qt5/core/libLumina/NativeWindowSystem.cpp | 5 +- src-qt5/core/libLumina/RootSubWindow.cpp | 7 +- 3 files changed, 71 insertions(+), 48 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index c01c16b3..876c701d 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -8,6 +8,8 @@ #include #include +#include +#include #include #include @@ -114,30 +116,43 @@ void NativeEmbedWidget::showWindow(){ } QImage NativeEmbedWidget::windowImage(QRect geom){ - //Pull the XCB pixmap out of the compositing layer - xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); + if(DISABLE_COMPOSITING){ + QList screens = static_cast( QApplication::instance() )->screens(); + //for(int i=0; icontains(this)){ + if(!screens.isEmpty()){ + return screens[0]->grabWindow(WIN->id(), geom.x(), geom.y(), geom.width(), geom.height()).toImage(); + } + //} + //} + return QImage(); + }else{ + //Pull the XCB pixmap out of the compositing layer + xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); - if(pix==0){ qDebug() << "Got blank pixmap!"; return QImage(); } - - //Convert this pixmap into a QImage - //xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, 0, 0, this->width(), this->height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); - xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, geom.x(), geom.y(), geom.width(), geom.height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); - if(ximg == 0){ qDebug() << "Got blank image!"; return QImage(); } - QImage img(ximg->data, ximg->width, ximg->height, ximg->stride, QImage::Format_ARGB32_Premultiplied); - img = img.copy(); //detach this image from the XCB data structures before we clean them up, otherwise the QImage will try to clean it up a second time on window close and crash - xcb_image_destroy(ximg); + if(pix==0){ qDebug() << "Got blank pixmap!"; return QImage(); } - //Cleanup the XCB data structures - xcb_free_pixmap(QX11Info::connection(), pix); - - return img; + //Convert this pixmap into a QImage + //xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, 0, 0, this->width(), this->height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); + xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, geom.x(), geom.y(), geom.width(), geom.height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); + if(ximg == 0){ qDebug() << "Got blank image!"; return QImage(); } + QImage img(ximg->data, ximg->width, ximg->height, ximg->stride, QImage::Format_ARGB32_Premultiplied); + img = img.copy(); //detach this image from the XCB data structures before we clean them up, otherwise the QImage will try to clean it up a second time on window close and crash + xcb_image_destroy(ximg); + //Cleanup the XCB data structures + xcb_free_pixmap(QX11Info::connection(), pix); + return img; + } } void NativeEmbedWidget::setWinUnpaused(){ paused = false; + winImage = QImage(); if(!DISABLE_COMPOSITING){ repaintWindow(); //update the cached image right away + }else if(this->isVisible()){ + showWindow(); } } // ============ @@ -186,6 +201,13 @@ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ }else{ xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); registerClientEvents(this->winId()); //child events get forwarded through the frame - watch this for changes too + //Also use a partial-composite here - make sure the window pixmap is available even when the window is obscured + xcb_composite_redirect_window(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_AUTOMATIC); + //Also alert us when the window visual changes + Damage dmgID = XDamageCreate(QX11Info::display(), WIN->id(), XDamageReportRawRectangles); + + WIN->addDamageID( (uint) dmgID); //save this for later + connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change } WIN->addFrameWinID(this->winId()); registerClientEvents(WIN->id()); @@ -221,7 +243,8 @@ void NativeEmbedWidget::lowerWindow(){ //Pause/resume void NativeEmbedWidget::pause(){ if(DISABLE_COMPOSITING){ - this->setVisible(false); + winImage = windowImage(QRect(QPoint(0,0), this->size())); + hideWindow(); }else{ if(winImage.isNull()){ repaintWindow(); } //make sure we have one image already cached first } @@ -229,10 +252,10 @@ void NativeEmbedWidget::pause(){ } void NativeEmbedWidget::resume(){ - paused = false; + //paused = false; syncWinSize(); if(DISABLE_COMPOSITING){ - this->setVisible(true); + //showWindow(); }else{ repaintWindow(); //update the cached image right away } @@ -241,7 +264,7 @@ void NativeEmbedWidget::resume(){ void NativeEmbedWidget::resyncWindow(){ if(WIN==0){ return; } - + syncWinSize(); if(DISABLE_COMPOSITING){ // Specs say to send an artificial configure event to the window if the window was reparented into the frame QPoint loc = this->mapToGlobal( QPoint(0,0)); @@ -263,21 +286,21 @@ void NativeEmbedWidget::resyncWindow(){ }else{ //Window is floating invisibly - make sure it is in the right place //Make sure the window size is syncronized and visual up to date - syncWinSize(); + //syncWinSize(); QTimer::singleShot(10, this, SLOT(repaintWindow()) ); } } void NativeEmbedWidget::repaintWindow(){ - if(DISABLE_COMPOSITING){ return; } + //if(DISABLE_COMPOSITING){ return; } //qDebug() << "Update Window Image:" << !paused; if(paused){ return; } - QImage tmp = windowImage( QRect(QPoint(0,0), this->size()) ); + /*QImage tmp = windowImage( QRect(QPoint(0,0), this->size()) ); if(!tmp.isNull()){ winImage = tmp; - }else{ qDebug() << "Got Null Image!!"; } - this->parentWidget()->update(); + }else{ qDebug() << "Got Null Image!!"; }*/ + this->parentWidget()->update(); //visual changed - need to update the image on the widget } void NativeEmbedWidget::reregisterEvents(){ @@ -306,34 +329,30 @@ void NativeEmbedWidget::hideEvent(QHideEvent *ev){ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ if(WIN==0){ return; } - //else if( winImage.isNull() ){return; } - else if(DISABLE_COMPOSITING){ - // Just make it solid black (underneath the embedded window) - // - only visible when looking through the edge of another window) - //QPainter P(this); - //P.fillRect(ev->rect(), Qt::black); - return; - } - //renderWindowToWidget(WIN->id(), this); - //return; - //else if(this->size()!=winSize){ QTimer::singleShot(0,this, SLOT(syncWinSize())); return; } //do not paint here - waiting to re-sync the sizes - //else if(this->size() != winImage.size()){ QTimer::singleShot(0, this, SLOT(repaintWindow()) ); return; } - //Need to paint the image from the window onto the widget as an overlay QRect geom = ev->rect(); //atomic updates + //qDebug() << "Paint Rect:" << geom; //geom.adjust(-10,-10,10,10); //add an additional few pixels in each direction to be painted - geom = geom.intersected(QRect(0,0,this->width(), this->height())); //ensure intersection with actual window - if( !QRect(QPoint(0,0),winImage.size()).contains(geom) ){ QTimer::singleShot(0,this, SLOT(repaintWindow()) );return; } + //geom = geom.intersected(QRect(0,0,this->width(), this->height())); //ensure intersection with actual window + QImage img; + if(!paused){ img = windowImage(geom); } + else if(!winImage.isNull()){ + if(winImage.size() == this->size()){ img = winImage.copy(geom); } + else{ img = winImage.scaled(geom.size()); } //this is a fast transformation - might be slightly distorted + } + //Need to paint the image from the window onto the widget as an overlay + QPainter P(this); P.setClipping(true); P.setClipRect(0,0,this->width(), this->height()); + if(DISABLE_COMPOSITING){ P.fillRect(geom, Qt::black); } //get weird effects when partial-compositing is enabled if you layer transparent window frames above other windows //qDebug() << "Paint Embed Window:" << geom << winImage.size(); - if(winImage.size() == this->size()){ - P.drawImage( geom , winImage, geom, Qt::NoOpaqueDetection); //1-to-1 mapping + //if(winImage.size() == this->size()){ + P.drawImage( geom , img, QRect(QPoint(0,0), img.size()), Qt::NoOpaqueDetection); //1-to-1 mapping //Note: Qt::NoOpaqueDetection Speeds up the paint by bypassing the checks to see if there are [semi-]transparent pixels // Since this is an embedded image - we fully expect there to be transparency all/most of the time. - }else{ - P.drawImage( geom , winImage); - } + // }else{ + //P.drawImage( geom , winImage); //auto-scale it to fit (transforming a static image while paused?) + // } //else{ QImage scaled = winImage.scaled(geom.size()); P.drawImage(geom, scaled); } //P.drawImage( geom , winImage, geom, Qt::NoOpaqueDetection); //1-to-1 mapping //Note: Qt::NoOpaqueDetection Speeds up the paint by bypassing the checks to see if there are [semi-]transparent pixels diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index f9e787ad..0ee65929 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -595,6 +595,9 @@ void NativeWindowSystem::RegisterVirtualRoot(WId id){ array[0] = id; //Set the property xcb_ewmh_set_virtual_roots(&obj->EWMH, QX11Info::appScreen(), 1, array); + //Now also enable automatic compositing for children of this window + //xcb_composite_redirect_window(QX11Info::connection(), id, XCB_COMPOSITE_REDIRECT_AUTOMATIC); + //xcb_composite_redirect_subwindows(QX11Info::connection(), id, XCB_COMPOSITE_REDIRECT_AUTOMATIC); } void NativeWindowSystem::setRoot_supportedActions(){ @@ -603,7 +606,7 @@ void NativeWindowSystem::setRoot_supportedActions(){ obj->EWMH._NET_WM_ICON, obj->EWMH._NET_WM_ICON_NAME, obj->EWMH._NET_WM_DESKTOP, - obj->ATOMS["_NET_WM_WINDOW_OPACITY"], + /*obj->ATOMS["_NET_WM_WINDOW_OPACITY"],*/ /*_NET_WINDOW_TYPE (and all the various types - 15 in total*/ obj->EWMH._NET_WM_WINDOW_TYPE, obj->EWMH._NET_WM_WINDOW_TYPE_DESKTOP, obj->EWMH._NET_WM_WINDOW_TYPE_DOCK, obj->EWMH._NET_WM_WINDOW_TYPE_TOOLBAR, obj->EWMH._NET_WM_WINDOW_TYPE_MENU, obj->EWMH._NET_WM_WINDOW_TYPE_UTILITY, diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 886d7a17..5fb8ece4 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -351,14 +351,14 @@ void RootSubWindow::startMoving(){ activeState = Move; offset = this->mapFromGlobal(curpt); setMouseCursor(activeState, true); //this one is an override cursor - //WinWidget->pause(); + WinWidget->pause(); this->grabMouse(); } void RootSubWindow::startResizing(){ activeState = getStateAtPoint( this->mapFromGlobal(QCursor::pos()), true); //also have it set the offset variable setMouseCursor(activeState, true); //this one is an override cursor - //WinWidget->pause(); + WinWidget->pause(); this->grabMouse(); } @@ -398,7 +398,8 @@ void RootSubWindow::propertiesChanged(QList props, QList }else if(!WinWidget->isPaused() && activeState==Normal){ if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size()){ qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); - this->setGeometry(WIN->geometry()); + this->setGeometry( QRect(this->geometry().topLeft(), WIN->geometry().size()) ); + WinWidget->resyncWindow(); } } break; -- cgit From af37fa6a5ec4c7efd3332c5abbebdb5adbfa201d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 20 Sep 2017 08:28:37 -0400 Subject: Streamline a bit more of the new Lumina2 window embed functionality. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index 876c701d..ff0f4734 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -116,7 +116,8 @@ void NativeEmbedWidget::showWindow(){ } QImage NativeEmbedWidget::windowImage(QRect geom){ - if(DISABLE_COMPOSITING){ + //if(DISABLE_COMPOSITING){ + if(!this->isVisible()){ return QImage(); } //nothing to grab yet QList screens = static_cast( QApplication::instance() )->screens(); //for(int i=0; icontains(this)){ @@ -126,7 +127,7 @@ QImage NativeEmbedWidget::windowImage(QRect geom){ //} //} return QImage(); - }else{ + /*}else{ //Pull the XCB pixmap out of the compositing layer xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); @@ -144,7 +145,7 @@ QImage NativeEmbedWidget::windowImage(QRect geom){ xcb_free_pixmap(QX11Info::connection(), pix); return img; - } + }*/ } void NativeEmbedWidget::setWinUnpaused(){ paused = false; @@ -154,6 +155,7 @@ void NativeEmbedWidget::setWinUnpaused(){ }else if(this->isVisible()){ showWindow(); } + resyncWindow(); //make sure the window knows about the new location } // ============ // PUBLIC @@ -203,6 +205,7 @@ bool NativeEmbedWidget::embedWindow(NativeWindow *window){ registerClientEvents(this->winId()); //child events get forwarded through the frame - watch this for changes too //Also use a partial-composite here - make sure the window pixmap is available even when the window is obscured xcb_composite_redirect_window(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_AUTOMATIC); + //xcb_composite_redirect_subwindows(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_MANUAL); //Also alert us when the window visual changes Damage dmgID = XDamageCreate(QX11Info::display(), WIN->id(), XDamageReportRawRectangles); @@ -264,10 +267,10 @@ void NativeEmbedWidget::resume(){ void NativeEmbedWidget::resyncWindow(){ if(WIN==0){ return; } - syncWinSize(); - if(DISABLE_COMPOSITING){ + //syncWinSize(); + //if(DISABLE_COMPOSITING){ // Specs say to send an artificial configure event to the window if the window was reparented into the frame - QPoint loc = this->mapToGlobal( QPoint(0,0)); + QPoint loc = this->mapToGlobal( QPoint(0,0) ); //Send an artificial configureNotify event to the window with the global position/size included xcb_configure_notify_event_t *event = (xcb_configure_notify_event_t*) calloc(32,1); //always 32-byes long, even if we don't need all of it event->x = loc.x(); @@ -283,12 +286,12 @@ void NativeEmbedWidget::resyncWindow(){ xcb_send_event(QX11Info::connection(), false, WIN->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, (char *) event); xcb_flush(QX11Info::connection()); free(event); - }else{ + /*}else{ //Window is floating invisibly - make sure it is in the right place //Make sure the window size is syncronized and visual up to date //syncWinSize(); QTimer::singleShot(10, this, SLOT(repaintWindow()) ); - } + }*/ } @@ -344,7 +347,7 @@ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ QPainter P(this); P.setClipping(true); P.setClipRect(0,0,this->width(), this->height()); - if(DISABLE_COMPOSITING){ P.fillRect(geom, Qt::black); } //get weird effects when partial-compositing is enabled if you layer transparent window frames above other windows + //if(DISABLE_COMPOSITING){ P.fillRect(geom, Qt::black); } //get weird effects when partial-compositing is enabled if you layer transparent window frames above other windows //qDebug() << "Paint Embed Window:" << geom << winImage.size(); //if(winImage.size() == this->size()){ P.drawImage( geom , img, QRect(QPoint(0,0), img.size()), Qt::NoOpaqueDetection); //1-to-1 mapping -- cgit From d098890ae7793ee6031a7a1f2cea852f301905df Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 20 Sep 2017 11:15:21 -0400 Subject: Cleanup a bit more of the embed stuff. --- src-qt5/core/libLumina/NativeEmbedWidget.cpp | 23 +++++------------------ src-qt5/core/libLumina/RootSubWindow.cpp | 18 ++++++++++++++---- src-qt5/core/libLumina/RootSubWindow.h | 1 + 3 files changed, 20 insertions(+), 22 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp index ff0f4734..57b6edde 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp @@ -331,11 +331,13 @@ void NativeEmbedWidget::hideEvent(QHideEvent *ev){ } void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ + QPainter P(this); + P.setClipping(true); + P.setClipRect(0,0,this->width(), this->height()); + P.fillRect(ev->rect(), Qt::transparent); if(WIN==0){ return; } QRect geom = ev->rect(); //atomic updates //qDebug() << "Paint Rect:" << geom; - //geom.adjust(-10,-10,10,10); //add an additional few pixels in each direction to be painted - //geom = geom.intersected(QRect(0,0,this->width(), this->height())); //ensure intersection with actual window QImage img; if(!paused){ img = windowImage(geom); } else if(!winImage.isNull()){ @@ -343,23 +345,8 @@ void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ else{ img = winImage.scaled(geom.size()); } //this is a fast transformation - might be slightly distorted } //Need to paint the image from the window onto the widget as an overlay + P.drawImage( geom , img, QRect(QPoint(0,0), img.size()), Qt::NoOpaqueDetection); //1-to-1 mapping - QPainter P(this); - P.setClipping(true); - P.setClipRect(0,0,this->width(), this->height()); - //if(DISABLE_COMPOSITING){ P.fillRect(geom, Qt::black); } //get weird effects when partial-compositing is enabled if you layer transparent window frames above other windows - //qDebug() << "Paint Embed Window:" << geom << winImage.size(); - //if(winImage.size() == this->size()){ - P.drawImage( geom , img, QRect(QPoint(0,0), img.size()), Qt::NoOpaqueDetection); //1-to-1 mapping - //Note: Qt::NoOpaqueDetection Speeds up the paint by bypassing the checks to see if there are [semi-]transparent pixels - // Since this is an embedded image - we fully expect there to be transparency all/most of the time. - // }else{ - //P.drawImage( geom , winImage); //auto-scale it to fit (transforming a static image while paused?) - // } - //else{ QImage scaled = winImage.scaled(geom.size()); P.drawImage(geom, scaled); } - //P.drawImage( geom , winImage, geom, Qt::NoOpaqueDetection); //1-to-1 mapping - //Note: Qt::NoOpaqueDetection Speeds up the paint by bypassing the checks to see if there are [semi-]transparent pixels - // Since this is an embedded image - we fully expect there to be transparency all/most of the time. } diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 5fb8ece4..5040f2f9 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -242,6 +242,16 @@ void RootSubWindow::enableFrame(bool on){ WIN->setProperty(NativeWindow::FrameExtents, QVariant::fromValue< QList >(extents) ); //save to structure now } +void RootSubWindow::enableFrame(QList types){ + static QList noframe; + if(noframe.isEmpty()){ noframe << NativeWindow::T_DESKTOP << NativeWindow::T_DOCK << NativeWindow::T_TOOLBAR << NativeWindow::T_MENU << NativeWindow::T_SPLASH << NativeWindow::T_DROPDOWN_MENU << NativeWindow::T_POPUP_MENU << NativeWindow::T_TOOLTIP << NativeWindow::T_NOTIFICATION << NativeWindow::T_COMBO << NativeWindow::T_DND; } + for(int i=0; i list){ QList vals; //Always ensure that visibility changes are evaluated last @@ -370,7 +380,7 @@ void RootSubWindow::propertiesChanged(QList props, QList switch(props[i]){ case NativeWindow::Visible: if(!WinWidget->isPaused() && (this->isVisible()!=vals[i].toBool()) && activeState==Normal ){ - qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); + //qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); if(vals[i].toBool()){ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/appear", "random").toString(), NativeWindow::Visible, vals[i]); } else{ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/disappear", "random").toString(), NativeWindow::Visible, vals[i]); } } @@ -397,7 +407,7 @@ void RootSubWindow::propertiesChanged(QList props, QList i--; }else if(!WinWidget->isPaused() && activeState==Normal){ if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size()){ - qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); + //qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); this->setGeometry( QRect(this->geometry().topLeft(), WIN->geometry().size()) ); WinWidget->resyncWindow(); } @@ -434,8 +444,8 @@ void RootSubWindow::propertiesChanged(QList props, QList mainLayout->setContentsMargins( vals[i].value< QList >().at(0),vals[i].value< QList >().at(2) - titleLabel->height(),vals[i].value< QList >().at(1),vals[i].value< QList >().at(3)); break;*/ case NativeWindow::WinTypes: - qDebug() << "Got Window Types:" << vals[i].value< QList >(); - enableFrame(vals[i].value< QList >().contains(NativeWindow::T_NORMAL) ); + //qDebug() << "Got Window Types:" << vals[i].value< QList >(); + enableFrame(vals[i].value< QList >() ); break; default: qDebug() << "Window Property Unused:" << props[i] << vals[i]; diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h index c1964724..67798140 100644 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ b/src-qt5/core/libLumina/RootSubWindow.h @@ -59,6 +59,7 @@ private: void initWindowFrame(); void enableFrame(bool); + void enableFrame(QList types); void LoadProperties( QList< NativeWindow::Property> list); -- cgit From 5a3d2fb042e341be62864ffd1f06ad278514fd7d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 20 Sep 2017 11:52:41 -0400 Subject: Get window type detection/usage all implemented. Now the window frame will get disabled/ignored for particular types of windows. --- src-qt5/core/libLumina/NativeWindowSystem.cpp | 22 +++++++++++++++++++++- src-qt5/core/libLumina/RootSubWindow.h | 1 + src-qt5/core/libLumina/RootWindow.cpp | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index 0ee65929..e8e9655a 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -492,7 +492,27 @@ void NativeWindowSystem::UpdateWindowProperties(NativeWindow* win, QList< Native } if(props.contains(NativeWindow::WinTypes)){ QList< NativeWindow::Type> types; - types << NativeWindow::T_NORMAL; //make this load appropriately later + xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_window_type_unchecked(&obj->EWMH, win->id()); + xcb_ewmh_get_atoms_reply_t reply; + if(1==xcb_ewmh_get_wm_window_type_reply(&obj->EWMH, cookie, &reply, NULL) ){ + for(unsigned int i=0; iEWMH._NET_WM_WINDOW_TYPE_DESKTOP){ types << NativeWindow::T_DESKTOP; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DOCK){ types << NativeWindow::T_DOCK; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_TOOLBAR){ types << NativeWindow::T_TOOLBAR; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_MENU){ types << NativeWindow::T_MENU; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_UTILITY){ types << NativeWindow::T_UTILITY; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_SPLASH){ types << NativeWindow::T_SPLASH; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DIALOG){ types << NativeWindow::T_DIALOG; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DROPDOWN_MENU){ types << NativeWindow::T_DROPDOWN_MENU; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_POPUP_MENU){ types << NativeWindow::T_POPUP_MENU; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_TOOLTIP){ types << NativeWindow::T_TOOLTIP; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_NOTIFICATION){ types << NativeWindow::T_NOTIFICATION; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_COMBO){ types << NativeWindow::T_COMBO; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DND){ types << NativeWindow::T_DND; } + else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_NORMAL){ types << NativeWindow::T_NORMAL; } + } + } + if(types.isEmpty()){ types << NativeWindow::T_NORMAL; } win->setProperty(NativeWindow::WinTypes, QVariant::fromValue< QList >(types) ); } } diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h index 67798140..598298e2 100644 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ b/src-qt5/core/libLumina/RootSubWindow.h @@ -66,6 +66,7 @@ private: static QStringList validAnimations(NativeWindow::Property); public slots: + void ensureVisible(){ WIN->setProperty(NativeWindow::Visible, true); } void giveMouseFocus(){ WinWidget->raiseWindow(); } void removeMouseFocus(){ WinWidget->lowerWindow(); } void giveKeyboardFocus(){ WIN->requestProperty(NativeWindow::Active, true, true); } diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index fdbc1eb8..705297be 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -239,7 +239,9 @@ void RootWindow::NewWindow(NativeWindow *win){ connect(subwin, SIGNAL(windowAnimFinished()), this, SLOT(checkMouseFocus()) ); WINDOWS << subwin; } + //QApplication::processEvents(); CheckWindowPosition(win->id(), true); //first-time run + //QTimer::singleShot(300, subwin, SLOT(ensureVisible())); win->setProperty(NativeWindow::Visible, true); //win->requestProperty( NativeWindow::Active, true); //win->requestProperties(QList() << NativeWindow::Visible << NativeWindow::Active, QList() << true << true, true); -- cgit From 8ada7303ef98d97b0da1d8cd05c4ad32d43bb858 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 21 Sep 2017 13:45:33 -0400 Subject: Fix up the application of theme settings from the system config file. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 13 ++--- src-qt5/core/libLumina/LuminaThemes.cpp | 56 +++++++++++----------- src-qt5/core/libLumina/LuminaThemes.h | 8 ++-- .../defaults/luminaDesktop-TrueOS.conf | 2 +- .../lumina-desktop/defaults/luminaDesktop.conf | 2 +- 5 files changed, 38 insertions(+), 43 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 54e660e6..9b7ee6d0 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -401,7 +401,7 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ QStringList syscolors = LTHEME::availableSystemColors(); //theme file //qDebug() << "Detected Themes/colors:" << systhemes << syscolors; - if( !themesettings[0].startsWith("/") || !QFile::exists(themesettings[0]) || !themesettings[0].endsWith(".qss.template")){ + if( !themesettings[0].startsWith("/") || !QFile::exists(themesettings[0]) || !themesettings[0].endsWith(".qss")){ themesettings[0] = themesettings[0].section(".qss",0,0).simplified(); for(int i=0; i::::] - list[i] = list[i].section(".qss.",0,0)+"::::"+dir.absoluteFilePath(list[i]); + list[i] = list[i].section(".qss",0,0)+"::::"+dir.absoluteFilePath(list[i]); } return list; } QStringList LTHEME::availableLocalThemes(){ //returns: [name::::path] for each item - QDir dir( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themes"); - QStringList list = dir.entryList(QStringList() <<"*.qss.template", QDir::Files, QDir::Name); + QDir dir( QString(getenv("XDG_CONFIG_HOME"))+"/lthemeengine/desktop_qss"); + QStringList list = dir.entryList(QStringList() <<"*.qss", QDir::Files, QDir::Name); for(int i=0; i::::] - list[i] = list[i].section(".qss.",0,0)+"::::"+dir.absoluteFilePath(list[i]); + list[i] = list[i].section(".qss",0,0)+"::::"+dir.absoluteFilePath(list[i]); } return list; } QStringList LTHEME::availableSystemColors(){ //returns: [name::::path] for each item //returns: [name::::path] for each item - QDir dir(LOS::LuminaShare()+"colors"); - QStringList list = dir.entryList(QStringList() <<"*.qss.colors", QDir::Files, QDir::Name); + QDir dir(LOS::LuminaShare()+"../lthemeengine/colors"); + QStringList list = dir.entryList(QStringList() <<"*.conf", QDir::Files, QDir::Name); for(int i=0; i::::] - list[i] = list[i].section(".qss.",0,0)+"::::"+dir.absoluteFilePath(list[i]); + list[i] = list[i].section(".conf",0,0)+"::::"+dir.absoluteFilePath(list[i]); } return list; } QStringList LTHEME::availableLocalColors(){ //returns: [name::::path] for each item - QDir dir(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/colors"); - QStringList list = dir.entryList(QStringList() <<"*.qss.colors", QDir::Files, QDir::Name); + QDir dir(QString(getenv("XDG_CONFIG_HOME"))+"/lthemeengine/colors"); + QStringList list = dir.entryList(QStringList() <<"*.conf", QDir::Files, QDir::Name); for(int i=0; i::::] - list[i] = list[i].section(".qss.",0,0)+"::::"+dir.absoluteFilePath(list[i]); + list[i] = list[i].section(".conf",0,0)+"::::"+dir.absoluteFilePath(list[i]); } return list; } @@ -122,15 +122,17 @@ QStringList LTHEME::availableSystemCursors(){ //returns: [name] for each item //Save a new theme/color file bool LTHEME::saveLocalTheme(QString name, QStringList contents){ - QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themes/"; - if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); } - return LUtils::writeFile(localdir+name+".qss.template", contents, true); + return false; //old format - do not use!! + //QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themes/"; + //if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); } + //return LUtils::writeFile(localdir+name+".qss.template", contents, true); } bool LTHEME::saveLocalColors(QString name, QStringList contents){ - QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/colors/"; - if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); } - return LUtils::writeFile(localdir+name+".qss.colors", contents, true); + return false; //old format - do not use!! + // QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/colors/"; + //if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); } + //return LUtils::writeFile(localdir+name+".qss.colors", contents, true); } //Return the currently selected Theme/Colors/Icons @@ -181,22 +183,22 @@ QString LTHEME::currentCursor(){ //Change the current Theme/Colors/Icons bool LTHEME::setCurrentSettings(QString themepath, QString colorpath, QString iconname, QString font, QString fontsize){ //QIcon::setThemeName(iconname); + //Save these settings into the theme engine settings QSettings engineset("lthemeengine","lthemeengine"); engineset.setValue("Appearance/icon_theme", iconname); - //engineset.setValue("Appearance/color_scheme_path", colorpath); //re-enable this once the color scheme has been synced with lthemeengine - //Need to add theme path saving here too later - - + engineset.setValue("Appearance/custom_palette", QFile::exists(colorpath) ); + engineset.setValue("Appearance/color_scheme_path", colorpath); + engineset.setValue("Interface/desktop_stylesheets", QStringList() << themepath); + return true; //Now save the theme settings file - QStringList contents; + /*QStringList contents; contents << "THEMEFILE="+themepath; contents << "COLORFILE="+colorpath; contents << "ICONTHEME="+iconname; contents << "FONTFAMILY="+font; contents << "FONTSIZE="+fontsize; bool ok = LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg", contents, true); - - return ok; + return ok;*/ } //Change the current Cursor Theme @@ -299,13 +301,13 @@ QStringList LTHEME::cursorInformation(QString name){ } } return out; -} +} QStringList LTHEME::CustomEnvSettings(bool useronly){ //view all the key=value settings QStringList newinfo; if(!useronly){ QStringList sysfiles; sysfiles << L_ETCDIR+"/lumina_environment.conf" << LOS::LuminaShare()+"lumina_environment.conf"; - for(int i=0; i%) ) diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf index 1327f148..40ece4f0 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf @@ -51,7 +51,7 @@ mime_default_application/x-shellscript=lumina-textedit.desktop #THEME SETTINGS theme_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default) -theme_colorfile=Black #Name of the color spec file to use for theming +theme_colorfile=darker #Name of the color spec file to use for theming theme_iconset=material-design-dark #Name of the icon theme to use theme_font=Arial #Name of the font family to use theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (%) ) -- cgit From 3f9e6a1de6bcc9b35f88c0216cb7d50d0241b119 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 21 Sep 2017 15:10:03 -0400 Subject: Fix up the loading of the theme settings before the session is started in Lumina 1, and also fix the pkg plist so it includes the qss files. --- src-qt5/core/lumina-desktop/LSession.cpp | 5 +++-- src-qt5/core/lumina-desktop/LSession.h | 31 ++++++++++++++++--------------- src-qt5/core/lumina-desktop/main.cpp | 1 + 3 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 2a1ec783..44f657c0 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -387,11 +387,12 @@ void LSession::checkWindowGeoms(){ void LSession::checkUserFiles(){ //internal version conversion examples: // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] - QString OVS = sessionsettings->value("DesktopVersion","0").toString(); //Old Version String + QSettings sset("lumina-desktop", "sessionsettings"); + QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String bool changed = LDesktopUtils::checkUserFiles(OVS); if(changed){ //Save the current version of the session to the settings file (for next time) - sessionsettings->setValue("DesktopVersion", this->applicationVersion()); + sset.setValue("DesktopVersion", LDesktopUtils::LuminaDesktopVersion()); } } diff --git a/src-qt5/core/lumina-desktop/LSession.h b/src-qt5/core/lumina-desktop/LSession.h index 0d69df84..43cddac7 100644 --- a/src-qt5/core/lumina-desktop/LSession.h +++ b/src-qt5/core/lumina-desktop/LSession.h @@ -39,7 +39,7 @@ #define SYSTEM_TRAY_CANCEL_MESSAGE 2 /*class MenuProxyStyle : public QProxyStyle{ -public: +public: int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const{ if(metric==PM_SmallIconSize){ return 22; } //override QMenu icon size (make it larger) else{ return QProxyStyle::pixelMetric(metric, option, widget); } //use the current style for everything else @@ -51,6 +51,8 @@ class LSession : public LSingleApplication{ public: LSession(int &argc, char **argv); ~LSession(); + + static void checkUserFiles(); //Functions to be called during startup void setupSession(); @@ -63,7 +65,7 @@ public: bool registerStartButton(QString ID); void unregisterStartButton(QString ID); - //Special functions for XCB event filter parsing only + //Special functions for XCB event filter parsing only // (DO NOT USE MANUALLY) void RootSizeChange(); void WindowPropertyEvent(); @@ -73,37 +75,37 @@ public: void WindowConfigureEvent(WId); void WindowDamageEvent(WId); void WindowSelectionClearEvent(WId); - + //System Access //Return a pointer to the current session static LSession* handle(){ return static_cast(LSession::instance()); } - + static void LaunchApplication(QString cmd); QFileInfoList DesktopFiles(); - + QRect screenGeom(int num); - + AppMenu* applicationMenu(); void systemWindow(); SettingsMenu* settingsMenu(); LXCB *XCB; //class for XCB usage - + QSettings* sessionSettings(); QSettings* DesktopPluginSettings(); - + //Keep track of which non-desktop window should be treated as active WId activeWindow(); //This will return the last active window if a desktop element is currently active - + //Temporarily change the session locale (nothing saved between sessions) void switchLocale(QString localeCode); - + //Play System Audio void playAudioFile(QString filepath); //Window Adjustment Routine (due to Fluxbox not respecting _NET_WM_STRUT) void adjustWindowGeom(WId win, bool maximize = false); - + private: //WMProcess *WM; QList DESKTOPS; @@ -136,9 +138,9 @@ private: QFileInfoList desktopFiles; void CleanupSession(); - + int VersionStringToNumber(QString version); - + public slots: void StartLogout(); void StartShutdown(bool skipupdates = false); @@ -161,7 +163,6 @@ private slots: void removeTrayWindow(WId); //Internal simplification functions - void checkUserFiles(); void refreshWindowManager(); void updateDesktops(); void registerDesktopWindows(); @@ -189,7 +190,7 @@ signals: void DesktopFilesChanged(); void MediaFilesChanged(); void WorkspaceChanged(); - + }; #endif diff --git a/src-qt5/core/lumina-desktop/main.cpp b/src-qt5/core/lumina-desktop/main.cpp index b2bfa9be..c272f263 100644 --- a/src-qt5/core/lumina-desktop/main.cpp +++ b/src-qt5/core/lumina-desktop/main.cpp @@ -76,6 +76,7 @@ int main(int argc, char ** argv) setenv("QT_QPA_PLATFORMTHEME", "lthemeengine", 1); unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); //causes pixel-specific scaling issues with the desktop - turn this on after-the-fact for other apps //Startup the session + LSession::checkUserFiles(); //make sure to create any config files before creating the QApplication LSession a(argc, argv); if(!a.isPrimaryProcess()){ return 0; } //Setup the log file -- cgit From 56d7717d8181974dc3c5cb35eb2436668bf2c6ce Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 21 Sep 2017 15:13:36 -0400 Subject: Make sure we don't run the checkUserFiles() function a second time --- src-qt5/core/lumina-desktop/LSession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 44f657c0..feb3c95c 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -120,7 +120,7 @@ void LSession::setupSession(){ //Setup the user's lumina settings directory as necessary splash.showScreen("user"); if(DEBUG){ qDebug() << " - Init User Files:" << timer->elapsed();} - checkUserFiles(); //adds these files to the watcher as well + //checkUserFiles(); //adds these files to the watcher as well //Initialize the internal variables DESKTOPS.clear(); -- cgit From ca75f41432756e1a2796c046787474514277012e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 21 Sep 2017 15:23:09 -0400 Subject: Oops - need to make sure that status function does not access any global QApplication instance. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 4 ++-- src-qt5/core/libLumina/LDesktopUtils.h | 2 +- src-qt5/core/lumina-desktop/LSession.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 9b7ee6d0..6c0543c0 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -456,12 +456,12 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ } -bool LDesktopUtils::checkUserFiles(QString lastversion){ +bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ //internal version conversion examples: // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] //returns true if something changed int oldversion = LDesktopUtils::VersionStringToNumber(lastversion); - int nversion = LDesktopUtils::VersionStringToNumber(QApplication::applicationVersion()); + int nversion = LDesktopUtils::VersionStringToNumber(currentversion); bool newversion = ( oldversion < nversion ); //increasing version number bool newrelease = ( lastversion.contains("-devel", Qt::CaseInsensitive) && QApplication::applicationVersion().contains("-release", Qt::CaseInsensitive) ); //Moving from devel to release diff --git a/src-qt5/core/libLumina/LDesktopUtils.h b/src-qt5/core/libLumina/LDesktopUtils.h index a9b44c67..b0ce6ba5 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.h +++ b/src-qt5/core/libLumina/LDesktopUtils.h @@ -43,7 +43,7 @@ public: //Load the default setup for the system static void LoadSystemDefaults(bool skipOS = false); - static bool checkUserFiles(QString lastversion); //returns true if something changed + static bool checkUserFiles(QString lastversion, QString currentversion); //returns true if something changed static int VersionStringToNumber(QString version); //convert the lumina version string to a number for comparisons //Migrating desktop settings from one ID to another diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index feb3c95c..99b20194 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -389,7 +389,7 @@ void LSession::checkUserFiles(){ // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] QSettings sset("lumina-desktop", "sessionsettings"); QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String - bool changed = LDesktopUtils::checkUserFiles(OVS); + bool changed = LDesktopUtils::checkUserFiles(OVS, LDesktopUtils::LuminaDesktopVersion()); if(changed){ //Save the current version of the session to the settings file (for next time) sset.setValue("DesktopVersion", LDesktopUtils::LuminaDesktopVersion()); -- cgit From 836dd026ae707965df8faf556debfde7a007b5d1 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 21 Sep 2017 16:04:22 -0400 Subject: Quick fix to ensure the status checkUserFiles function truly is static --- src-qt5/core/libLumina/LDesktopUtils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 6c0543c0..a5c1bd77 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -481,7 +481,10 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ //Convert from the old desktop numbering system to the new one (change occured with 1.0.1) if(oldversion<=1000001){ QStringList DS = LUtils::readFile(dset); - QList screens = QApplication::screens(); + char *tmp; + int tmpN = 0; + QApplication A(tmpN, &tmp); + QList screens = A.screens(); for(int i=0; i Date: Thu, 21 Sep 2017 16:13:28 -0400 Subject: Urg - more fixes... --- src-qt5/core/libLumina/LDesktopUtils.cpp | 6 +++--- src-qt5/core/lumina-desktop/LSession.cpp | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index a5c1bd77..262bf47b 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -155,8 +155,8 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ if(sysDefaults.isEmpty()){ sysDefaults = LUtils::readFile(LOS::LuminaShare()+"luminaDesktop.conf"); } //Find the number of the left-most desktop screen QString screen = "0"; - QDesktopWidget *desk =QApplication::desktop(); QRect screenGeom; + QDesktopWidget *desk =QApplication::desktop(); for(int i=0; iscreenCount(); i++){ if(desk->screenGeometry(i).x()==0){ screen = QString::number(i); @@ -479,7 +479,7 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ LDesktopUtils::upgradeFavorites(oldversion); } //Convert from the old desktop numbering system to the new one (change occured with 1.0.1) - if(oldversion<=1000001){ + /*if(oldversion<=1000001){ QStringList DS = LUtils::readFile(dset); char *tmp; int tmpN = 0; @@ -505,7 +505,7 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ } } LUtils::writeFile(dset, DS, true); - } + }*/ //Check the fluxbox configuration files dset = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/"; diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 99b20194..d1d6588e 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -389,6 +389,9 @@ void LSession::checkUserFiles(){ // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] QSettings sset("lumina-desktop", "sessionsettings"); QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String + char *tmp; + int tmpN = 0; + QApplication A(tmpN, &tmp); bool changed = LDesktopUtils::checkUserFiles(OVS, LDesktopUtils::LuminaDesktopVersion()); if(changed){ //Save the current version of the session to the settings file (for next time) -- cgit From a27815312eaac620881d67e8776c743595975b38 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 21 Sep 2017 16:15:49 -0400 Subject: Final fix - re-enable some backwards-compatible code and put a big warning at the top of the function --- src-qt5/core/libLumina/LDesktopUtils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 262bf47b..fb13a2a3 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -457,6 +457,8 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ } bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ + //WARNING: Make sure you create a QApplication instance before calling this function!!! + //internal version conversion examples: // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] //returns true if something changed @@ -479,7 +481,7 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ LDesktopUtils::upgradeFavorites(oldversion); } //Convert from the old desktop numbering system to the new one (change occured with 1.0.1) - /*if(oldversion<=1000001){ + if(oldversion<=1000001){ QStringList DS = LUtils::readFile(dset); char *tmp; int tmpN = 0; @@ -505,7 +507,7 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ } } LUtils::writeFile(dset, DS, true); - }*/ + } //Check the fluxbox configuration files dset = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/"; -- cgit From f98507eb3fef50e900c9ceb3606e4cdea78fbd64 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 2 Oct 2017 05:14:40 -0400 Subject: Add a "copy" button to the QSS page for copying files to make changes. --- .../src/lthemeengine/qsspage.cpp | 33 +++++++++++++++++ .../lumina-theme-engine/src/lthemeengine/qsspage.h | 1 + .../src/lthemeengine/qsspage.ui | 41 ++++++++++++++++++++-- 3 files changed, 73 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp index cd88fb56..6377016c 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp @@ -31,6 +31,7 @@ QSSPage::QSSPage(QWidget *parent, bool desktop) : TabPage(parent), m_ui(new Ui:: m_ui->removeButton->setIcon(QIcon::fromTheme("edit-delete")); m_ui->tool_enable->setEnabled(false); m_ui->tool_disable->setEnabled(false); + m_ui->copyButton->setEnabled(false); } QSSPage::~QSSPage(){ @@ -56,6 +57,7 @@ void QSSPage::on_qssListWidget_currentItemChanged(QListWidgetItem *current, QLis } //qDebug() << "Got Current Item Changed"; m_ui->tool_disable->setEnabled(current!=0); + m_ui->copyButton->setEnabled(current!=0); if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -76,6 +78,7 @@ void QSSPage::on_list_disabled_currentItemChanged(QListWidgetItem *current, QLis } //qDebug() << "Got Current Item Changed"; m_ui->tool_enable->setEnabled(current!=0); + m_ui->copyButton->setEnabled(current!=0); if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -127,6 +130,36 @@ void QSSPage::on_editButton_clicked(){ } } +void QSSPage::on_copyButton_clicked(){ + QListWidgetItem *sel = currentSelection(); + if(sel==0){ return; } + QString name = QInputDialog::getText(this, tr("Enter Style Sheet Name"), tr("File name:"), QLineEdit::Normal, sel->text().section(".qss",0,0)+"_copy"); + if(name.isEmpty()){ return; } + if(!name.endsWith(".qss", Qt::CaseInsensitive)){ name.append(".qss"); } + QString filePath; + if(desktop_qss){ filePath = lthemeengine::userDesktopStyleSheetPath() + name; } + else{ filePath = lthemeengine::userStyleSheetPath() + name; } + if(QFile::exists(filePath)){ + QMessageBox::warning(this, tr("Error"), tr("The file \"%1\" already exists").arg(filePath)); + return; + } + // Make sure the directory exists + QString dir = filePath.section("/",0,-2); + if(!QFile::exists(dir)){ + QDir D(dir); + D.mkpath(dir); + } + //Copy the file over + QFile::copy(sel->data(QSS_FULL_PATH_ROLE).toString(), filePath); + //creating item + QFileInfo info(filePath); + QListWidgetItem *item = new QListWidgetItem(info.fileName(), m_ui->list_disabled); + item->setToolTip(info.filePath()); + item->setData(QSS_FULL_PATH_ROLE, info.filePath()); + item->setData(QSS_WRITABLE_ROLE, info.isWritable()); + m_ui->list_disabled->setCurrentRow(m_ui->list_disabled->count()-1); +} + void QSSPage::on_removeButton_clicked(){ QListWidgetItem *item = currentSelection(); if(!item){ return; } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h index 5b0025c5..07df4ac2 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.h @@ -24,6 +24,7 @@ private slots: void on_qssListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *); void on_list_disabled_currentItemChanged(QListWidgetItem *current, QListWidgetItem *); void on_createButton_clicked(); + void on_copyButton_clicked(); void on_editButton_clicked(); void on_removeButton_clicked(); void on_renameButton_clicked(); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui index f9a980f3..def99dd0 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui @@ -63,7 +63,7 @@ - + 0 0 @@ -168,7 +168,7 @@ - + 0 0 @@ -222,16 +222,41 @@ true + + + 0 + 0 + + Create + + + + + 0 + 0 + + + + Copy + + + false + + + 0 + 0 + + Edit @@ -242,6 +267,12 @@ false + + + 0 + 0 + + Rename @@ -252,6 +283,12 @@ false + + + 0 + 0 + + Remove -- cgit From 63269d970b014f2475a6906a1afeba8d7920e16e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 2 Oct 2017 05:20:41 -0400 Subject: Remove the "ok" button, and change the "cancel" button to "close". --- src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp | 2 +- src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp index d4544c7b..28a5e558 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp @@ -55,7 +55,7 @@ void MainWindow::on_buttonBox_clicked(QAbstractButton *button){ if(p) { p->writeSettings(); } } } - if(id == QDialogButtonBox::Ok || id == QDialogButtonBox::Cancel){ + if(id == QDialogButtonBox::Ok || id == QDialogButtonBox::Cancel || id== QDialogButtonBox::Close){ close(); qApp->quit(); } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui index dd676c37..0dc3245d 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui @@ -293,7 +293,7 @@ Styles - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok + QDialogButtonBox::Apply|QDialogButtonBox::Close -- cgit From cf4afae359c39fc8adf767fe52538311656501ab Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 2 Oct 2017 06:06:18 -0400 Subject: Add a couple more "simple" stylesheets for sliders and tooltips. --- .../lumina-theme-engine/qss/sliders-simple.qss | 70 ++++++++++++++++++++++ .../lumina-theme-engine/qss/tooltip-simple.qss | 7 +++ 2 files changed, 77 insertions(+) create mode 100644 src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss create mode 100644 src-qt5/core/lumina-theme-engine/qss/tooltip-simple.qss (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss b/src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss new file mode 100644 index 00000000..e8311e92 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss @@ -0,0 +1,70 @@ +/* SLIDERS */ +QSlider::groove:horizontal { +border: 1px solid transparent; +background: palette(alternate-window); +height: 10px; +border-radius: 3px; +} +QSlider::groove:vertical { +border: 1px solid transparent; +background: palette(alternate-window); +width: 10px; +border-radius: 3px; +} +QSlider::sub-page:horizontal { +background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, + stop: 0 palette(highlight), stop: 1 palette(window)); +border: 1px solid transparent; +height: 10px; +border-radius: 3px; +} +QSlider::sub-page:vertical { +background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, + stop: 0 palette(highlight), stop: 1 palette(window)); +border: 1px solid transparent; +width: 10px; +border-radius: 3px; +} +QSlider::add-page:horizontal{ +background: palette(alternate-window); +border: 1px solid transparent; +height: 10px; +border-radius: 3px; +} +QSlider::add-page:vertical{ +background: palette(alternate-window); +border: 1px solid transparent; +width: 10px; +border-radius: 3px; +} +QSlider::handle:horizontal{ +background: palette(mid); +border: 1px solid palette(mid); +width: 1em; +border-radius: 1px; +} +QSlider::handle:vertical{ +background: palette(mid); +border: 1px solid palette(mid); +height: 1em; +border-radius: 1px; +} +QSlider::handle:horizontal:hover, QSlider::handle:vertical:hover{ +border: 1px solid palette(highlight); +background: palette(highlight); +} + +QSlider::sub-page:horizontal:disabled { +background: palette(highlight); +border-color: palette(highlight); +} + +QSlider::add-page:horizontal:disabled { +background: palette(highlight); +border-color: palette(highlight); +} + +QSlider::handle:horizontal:disabled { +background: palette(alternate-window); +border: 1px solid palette(highlight); +} diff --git a/src-qt5/core/lumina-theme-engine/qss/tooltip-simple.qss b/src-qt5/core/lumina-theme-engine/qss/tooltip-simple.qss new file mode 100644 index 00000000..9bee3e08 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/qss/tooltip-simple.qss @@ -0,0 +1,7 @@ +QToolTip{ + background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 palette(window), stop: 1 palette(alternate-window)); + border-radius: 3px; + border: 1px solid palette(highlight); + padding: 1px; + color: palette(text); +} -- cgit From a5e2dc9b732363c3b5d99aaa01f35c268d6aecbe Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 2 Oct 2017 06:11:01 -0400 Subject: Adjust the border on the simple scrollbar style, and update the pkg-plist. --- src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss b/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss index 265ff20c..d0c9b448 100644 --- a/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss +++ b/src-qt5/core/lumina-theme-engine/qss/scrollbar-simple.qss @@ -11,7 +11,7 @@ QScrollBar:vertical{ QScrollBar::handle{ background: palette(base); border: 1px solid transparent; - border-radius: 7px; + border-radius: 1px; } QScrollBar::handle:hover, QScrollBar::add-line:hover, QScrollBar::sub-line:hover{ background: palette(highlight); -- cgit From 711b219a001d0c4fdd61367903696fa1c6ff1a3d Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Tue, 3 Oct 2017 15:24:26 -0400 Subject: Added experimental video thumbnails in lumina-fm and fileinfo --- src-qt5/core/libLumina/LVideoSurface.cpp | 32 ++++++++++++++++++++++++++++++++ src-qt5/core/libLumina/LVideoSurface.h | 20 ++++++++++++++++++++ src-qt5/core/libLumina/LVideoSurface.pri | 9 +++++++++ 3 files changed, 61 insertions(+) create mode 100644 src-qt5/core/libLumina/LVideoSurface.cpp create mode 100644 src-qt5/core/libLumina/LVideoSurface.h create mode 100644 src-qt5/core/libLumina/LVideoSurface.pri (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoSurface.cpp b/src-qt5/core/libLumina/LVideoSurface.cpp new file mode 100644 index 00000000..6adec5d2 --- /dev/null +++ b/src-qt5/core/libLumina/LVideoSurface.cpp @@ -0,0 +1,32 @@ +#include "LVideoSurface.h" +#include + +LVideoSurface::LVideoSurface() : QAbstractVideoSurface() { + recording = 0; + frameImage = QImage(); +} + +QImage LVideoSurface::currentFrame() { + return frameImage; +} + +bool LVideoSurface::present(const QVideoFrame &frame) { + if(frame.isValid()) { + qDebug() << "Recording Frame" << frame.pixelFormat(); + QVideoFrame icon(frame); + icon.map(QAbstractVideoBuffer::ReadOnly); + frameImage = QImage(icon.bits(), icon.width(), icon.height(), icon.bytesPerLine(), QImage::Format_ARGB32_Premultiplied); + icon.unmap(); + emit frameReceived(frameImage); + if(recording++ == 2) ready = true; + return true; + } + ready = false; + return false; +} + +QList LVideoSurface::supportedPixelFormats(QAbstractVideoBuffer::HandleType type = QAbstractVideoBuffer::NoHandle) const { + Q_UNUSED(type); + return QList() << QVideoFrame::Format_ARGB32 << QVideoFrame::Format_RGB32 << QVideoFrame::Format_RGB24 + << QVideoFrame::Format_RGB565 << QVideoFrame::Format_RGB555 << QVideoFrame::Format_BGRA32 << QVideoFrame::Format_BGR32; +} diff --git a/src-qt5/core/libLumina/LVideoSurface.h b/src-qt5/core/libLumina/LVideoSurface.h new file mode 100644 index 00000000..adb4611d --- /dev/null +++ b/src-qt5/core/libLumina/LVideoSurface.h @@ -0,0 +1,20 @@ +#include +#include +#include + +class LVideoSurface : public QAbstractVideoSurface { + Q_OBJECT + + public: + LVideoSurface(); + virtual bool present(const QVideoFrame&); + virtual QList supportedPixelFormats(QAbstractVideoBuffer::HandleType) const; + QImage currentFrame(); + bool frameReady(); + signals: + void frameReceived(QImage); + private: + int recording; + QImage frameImage; + bool ready; +}; diff --git a/src-qt5/core/libLumina/LVideoSurface.pri b/src-qt5/core/libLumina/LVideoSurface.pri new file mode 100644 index 00000000..469b8c93 --- /dev/null +++ b/src-qt5/core/libLumina/LVideoSurface.pri @@ -0,0 +1,9 @@ +QT *= multimedia + +HEADERS *= $${PWD}/LVideoSurface.h +SOURCES *= $${PWD}/LVideoSurface.cpp + +INCLUDEPATH *= ${PWD} + +#Now the other dependendies of it +#include(LUtils.pri) -- cgit From 3005f7ab6b19cabf423b85ec7c3845d840c7cb18 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Tue, 3 Oct 2017 18:36:51 -0400 Subject: Reworked the VideoSurface subclass --- src-qt5/core/libLumina/LVideoSurface.cpp | 46 +++++++++++++++++++++++++------- src-qt5/core/libLumina/LVideoSurface.h | 15 ++++++----- 2 files changed, 44 insertions(+), 17 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoSurface.cpp b/src-qt5/core/libLumina/LVideoSurface.cpp index 6adec5d2..895a3a32 100644 --- a/src-qt5/core/libLumina/LVideoSurface.cpp +++ b/src-qt5/core/libLumina/LVideoSurface.cpp @@ -1,27 +1,29 @@ #include "LVideoSurface.h" #include -LVideoSurface::LVideoSurface() : QAbstractVideoSurface() { - recording = 0; - frameImage = QImage(); -} - -QImage LVideoSurface::currentFrame() { - return frameImage; +LVideoSurface::LVideoSurface(QObject *parent) : QAbstractVideoSurface(parent) { + frameImage = QPixmap(); } bool LVideoSurface::present(const QVideoFrame &frame) { + if(!frameImage.isNull()) { + emit frameReceived(frameImage); + return true; + } + if(frame.isValid()) { qDebug() << "Recording Frame" << frame.pixelFormat(); QVideoFrame icon(frame); icon.map(QAbstractVideoBuffer::ReadOnly); - frameImage = QImage(icon.bits(), icon.width(), icon.height(), icon.bytesPerLine(), QImage::Format_ARGB32_Premultiplied); + QImage img(icon.bits(), icon.width(), icon.height(), icon.bytesPerLine(), QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat())); + + if(frameImage.isNull()) + frameImage = QPixmap::fromImage(img.copy(img.rect())); + icon.unmap(); emit frameReceived(frameImage); - if(recording++ == 2) ready = true; return true; } - ready = false; return false; } @@ -30,3 +32,27 @@ QList LVideoSurface::supportedPixelFormats(QAbstractVi return QList() << QVideoFrame::Format_ARGB32 << QVideoFrame::Format_RGB32 << QVideoFrame::Format_RGB24 << QVideoFrame::Format_RGB565 << QVideoFrame::Format_RGB555 << QVideoFrame::Format_BGRA32 << QVideoFrame::Format_BGR32; } + +/*bool VideoSurface::isFormatSupported(const QVideoSurfaceFormat &format) const { + const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); + const QSize size = format.frameSize(); + + return imageFormat != QImage::Format_Invalid && !size.isEmpty() && format.handleType() == QAbstractVideoBuffer::NoHandle; +} + +void VideoSurface::stop() { + QAbstractVideoSurface::stop(); +} + +bool VideoSurface::start(const QVideoSurfaceFormat &format) { + const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); + const QSize size = format.frameSize(); + + if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) { + this->imageFormat = imageFormat; + QAbstractVideoSurface::start(format); + return true; + } else { + return false; + } +}*/ diff --git a/src-qt5/core/libLumina/LVideoSurface.h b/src-qt5/core/libLumina/LVideoSurface.h index adb4611d..42a140d9 100644 --- a/src-qt5/core/libLumina/LVideoSurface.h +++ b/src-qt5/core/libLumina/LVideoSurface.h @@ -1,20 +1,21 @@ #include #include +#include #include class LVideoSurface : public QAbstractVideoSurface { Q_OBJECT public: - LVideoSurface(); + LVideoSurface(QObject *parent=0); virtual bool present(const QVideoFrame&); virtual QList supportedPixelFormats(QAbstractVideoBuffer::HandleType) const; - QImage currentFrame(); - bool frameReady(); + /*virtual QList Date: Thu, 5 Oct 2017 17:06:58 -0400 Subject: Finished video thumnails for lumina-fm and lumina-fileinfo --- src-qt5/core/libLumina/LVideoSurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoSurface.cpp b/src-qt5/core/libLumina/LVideoSurface.cpp index 895a3a32..bd6b2c95 100644 --- a/src-qt5/core/libLumina/LVideoSurface.cpp +++ b/src-qt5/core/libLumina/LVideoSurface.cpp @@ -12,7 +12,7 @@ bool LVideoSurface::present(const QVideoFrame &frame) { } if(frame.isValid()) { - qDebug() << "Recording Frame" << frame.pixelFormat(); + //qDebug() << "Recording Frame" << frame.pixelFormat(); QVideoFrame icon(frame); icon.map(QAbstractVideoBuffer::ReadOnly); QImage img(icon.bits(), icon.width(), icon.height(), icon.bytesPerLine(), QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat())); -- cgit From 7c986120915920c18a85397cd81c73df65a1eafb Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 6 Oct 2017 09:23:11 -0400 Subject: Try to ensure that the transient QApplication for user file checks/updates is completely deleted. --- src-qt5/core/lumina-desktop/LSession.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index d1d6588e..0acd7303 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -391,12 +391,13 @@ void LSession::checkUserFiles(){ QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String char *tmp; int tmpN = 0; - QApplication A(tmpN, &tmp); + QApplication *A = new QApplication(tmpN, &tmp); bool changed = LDesktopUtils::checkUserFiles(OVS, LDesktopUtils::LuminaDesktopVersion()); if(changed){ //Save the current version of the session to the settings file (for next time) sset.setValue("DesktopVersion", LDesktopUtils::LuminaDesktopVersion()); } + delete A; } void LSession::refreshWindowManager(){ -- cgit From 7f013d766723468f4c4785411dcf5d42694cec3b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 10 Oct 2017 10:24:50 -0400 Subject: Fix up the QML test routine a bit, and add a couple works-in-progress for a new firefly screensaver. --- .../extrafiles/screensavers/Fireflies.qml | 18 ++++++++ .../extrafiles/screensavers/Firefly.qml | 52 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml new file mode 100644 index 00000000..36ed4df5 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 +import "." as QML + +Rectangle { + id : canvas + anchors.fill: parent + color: "black" + + Repeater { + model: Math.round(Math.random()*100)+30 + QML.Firefly { + parent: canvas + x: Math.round(Math.random()*canvas.width) + y: Math.round(Math.random()*canvas.height) + } + } //end of Repeater +} //end of canvas rectangle diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml new file mode 100644 index 00000000..704811a7 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml @@ -0,0 +1,52 @@ +import QtQuick 2.0 +import QtQuick.Window 2.2 +import QtGraphicalEffects 1.0 + +Item { + + RectangularGlow { + anchors.fill: fly + glowRadius: 0.1 + spread: 0.1 + color: Qt.rgba(Math.random()*255,Math.random()*255,0,0.3) + cornerRadius: fly.radius + glowRadius + } + + Rectangle { + id: fly + width: Math.round(Math.random()*3)+2 + height: width + color: Qt.rgba(Math.random()*255,Math.random()*255,0,0.8) + radius: Math.floor(width/2) + property int jitterX: Math.round(Math.random()*100)+10 + property int jitterY: Math.round(Math.random()*100)+10 + + } + + Behavior on x { + SmoothedAnimation { + velocity: 10+Math.random()*canvas.width/100 + } + } + Behavior on y { + SmoothedAnimation { + velocity: 10+Math.random()*canvas.height/100 + } + } + + Timer { + interval: Math.round(Math.random()*1000) + repeat: true + running: true + onTriggered: { + if ( (x+fly.jitterX)>canvas.width || (x+fly.jitterX)<0 ){ fly.jitterX = 0-fly.jitterX } + x = x+fly.jitterX + if( (y+fly.jitterY)>canvas.height || (y+fly.jitterY)<0 ){ fly.jitterY = 0-fly.jitterY } + y = y+fly.jitterY + fly.jitterX = (Math.round(Math.random())*2 - 1) *fly.jitterX + fly.jitterY = (Math.round(Math.random())*2 - 1) *fly.jitterY + fly.color = Qt.rgba(Math.random()*255,Math.random()*255,Math.random()*150,0.8) + + } + } //end of timer +} //end of item -- cgit From 23efad7b8634b32ff6f4d901af9997bc98206af3 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 10 Oct 2017 11:09:16 -0400 Subject: Update the Fireflies screensaver - seems to work fine now --- .../extrafiles/screensavers/Fireflies.qml | 3 +- .../extrafiles/screensavers/Firefly.qml | 39 ++++++++++++++-------- 2 files changed, 27 insertions(+), 15 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml index 36ed4df5..c2295a8f 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml @@ -8,11 +8,12 @@ Rectangle { color: "black" Repeater { - model: Math.round(Math.random()*100)+30 + model: Math.round(Math.random()*200)+60 QML.Firefly { parent: canvas x: Math.round(Math.random()*canvas.width) y: Math.round(Math.random()*canvas.height) } } //end of Repeater + } //end of canvas rectangle diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml index 704811a7..7b65d8ec 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml @@ -6,23 +6,28 @@ Item { RectangularGlow { anchors.fill: fly - glowRadius: 0.1 - spread: 0.1 - color: Qt.rgba(Math.random()*255,Math.random()*255,0,0.3) + glowRadius: Math.round(fly.radius /2) + spread: 0.5 + color: Qt.rgba(1,1,1,0.3) cornerRadius: fly.radius + glowRadius } Rectangle { id: fly - width: Math.round(Math.random()*3)+2 + width: Math.round(Math.random()*canvas.width/200)+2 height: width - color: Qt.rgba(Math.random()*255,Math.random()*255,0,0.8) + x: parent.x + y: parent.y + color: Qt.rgba(Math.random(),Math.random(),0,0.5) radius: Math.floor(width/2) property int jitterX: Math.round(Math.random()*100)+10 property int jitterY: Math.round(Math.random()*100)+10 - - } - + + Behavior on color { + ColorAnimation { + duration: 500 + } + } Behavior on x { SmoothedAnimation { velocity: 10+Math.random()*canvas.width/100 @@ -34,18 +39,24 @@ Item { } } + } + + + Timer { - interval: Math.round(Math.random()*1000) + interval: 5 repeat: true running: true + property bool starting: true onTriggered: { - if ( (x+fly.jitterX)>canvas.width || (x+fly.jitterX)<0 ){ fly.jitterX = 0-fly.jitterX } - x = x+fly.jitterX - if( (y+fly.jitterY)>canvas.height || (y+fly.jitterY)<0 ){ fly.jitterY = 0-fly.jitterY } - y = y+fly.jitterY + if(starting){ interval = Math.round(Math.random()*1000)+500; starting = false; } + if ( (fly.x+fly.jitterX)>parent.width || (fly.x+fly.jitterX)<0 ){ fly.jitterX = 0-fly.jitterX } + fly.x = fly.x+fly.jitterX + if( (fly.y+fly.jitterY)>parent.height || (fly.y+fly.jitterY)<0 ){ fly.jitterY = 0-fly.jitterY } + fly.y = fly.y+fly.jitterY fly.jitterX = (Math.round(Math.random())*2 - 1) *fly.jitterX fly.jitterY = (Math.round(Math.random())*2 - 1) *fly.jitterY - fly.color = Qt.rgba(Math.random()*255,Math.random()*255,Math.random()*150,0.8) + fly.color = Qt.rgba(Math.random(),Math.random(),Math.random(),0.5) } } //end of timer -- cgit From f81d342ebc0aba7295c78b91a0ecfb1cb013f723 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 10 Oct 2017 11:16:58 -0400 Subject: Make the number of fireflies scale a bit better with the size of the screen --- .../core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml index c2295a8f..d8dcc1ed 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml @@ -8,7 +8,7 @@ Rectangle { color: "black" Repeater { - model: Math.round(Math.random()*200)+60 + model: Math.round(Math.random()*canvas.width/10)+100 QML.Firefly { parent: canvas x: Math.round(Math.random()*canvas.width) -- cgit From 93536aa33906895760d87c79da5f74471fcf0696 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 10 Oct 2017 13:18:53 -0400 Subject: Change the layout of the screensaver files directory a bit. This adds the formalization of a JSON manifest for determining which screensavers are valid and how to launch them, as well as all sorts of other legal/author information as desired. --- .../extrafiles/screensavers/Fireflies.json | 26 +++++++ .../extrafiles/screensavers/Fireflies.qml | 19 ------ .../extrafiles/screensavers/Firefly.qml | 63 ----------------- .../extrafiles/screensavers/README.md | 79 ++++++++++++++++++++++ .../screensavers/qml_scripts/Fireflies.qml | 19 ++++++ .../screensavers/qml_scripts/Firefly.qml | 63 +++++++++++++++++ 6 files changed, 187 insertions(+), 82 deletions(-) create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Fireflies.qml create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Firefly.qml (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json new file mode 100644 index 00000000..e01d6d2b --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json @@ -0,0 +1,26 @@ +{ + "name" : { + "default" : "Fireflies" + }, + "description" : { + "default" : "Dancing balls of light on the screen" + }, + "author" : { + "name" : "Ken Moore", + "email" : "ken@ixsystems.com", + "website" : "https://github.com/beanpole135", + "company" : "iXsystems", + "company_website" : "http://ixsystems.com" + }, + "meta" : { + "license" : "3-clause BSD", + "license_url" : "https://github.com/trueos/lumina/blob/master/LICENSE", + "copyright" : "Copyright (c) 2017, Ken Moore (ken@ixsystems.com)", + "date_created" : "20171010", + "version" : "1.0" + } + "qml" : { + "qml_file" : "qml_scripts/Fireflies.qml", + "additional_files" : ["qml_scripts/Firefly.qml"] + } +} diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml deleted file mode 100644 index d8dcc1ed..00000000 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.qml +++ /dev/null @@ -1,19 +0,0 @@ -import QtQuick 2.0 -import QtGraphicalEffects 1.0 -import "." as QML - -Rectangle { - id : canvas - anchors.fill: parent - color: "black" - - Repeater { - model: Math.round(Math.random()*canvas.width/10)+100 - QML.Firefly { - parent: canvas - x: Math.round(Math.random()*canvas.width) - y: Math.round(Math.random()*canvas.height) - } - } //end of Repeater - -} //end of canvas rectangle diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml deleted file mode 100644 index 7b65d8ec..00000000 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Firefly.qml +++ /dev/null @@ -1,63 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Window 2.2 -import QtGraphicalEffects 1.0 - -Item { - - RectangularGlow { - anchors.fill: fly - glowRadius: Math.round(fly.radius /2) - spread: 0.5 - color: Qt.rgba(1,1,1,0.3) - cornerRadius: fly.radius + glowRadius - } - - Rectangle { - id: fly - width: Math.round(Math.random()*canvas.width/200)+2 - height: width - x: parent.x - y: parent.y - color: Qt.rgba(Math.random(),Math.random(),0,0.5) - radius: Math.floor(width/2) - property int jitterX: Math.round(Math.random()*100)+10 - property int jitterY: Math.round(Math.random()*100)+10 - - Behavior on color { - ColorAnimation { - duration: 500 - } - } - Behavior on x { - SmoothedAnimation { - velocity: 10+Math.random()*canvas.width/100 - } - } - Behavior on y { - SmoothedAnimation { - velocity: 10+Math.random()*canvas.height/100 - } - } - - } - - - - Timer { - interval: 5 - repeat: true - running: true - property bool starting: true - onTriggered: { - if(starting){ interval = Math.round(Math.random()*1000)+500; starting = false; } - if ( (fly.x+fly.jitterX)>parent.width || (fly.x+fly.jitterX)<0 ){ fly.jitterX = 0-fly.jitterX } - fly.x = fly.x+fly.jitterX - if( (fly.y+fly.jitterY)>parent.height || (fly.y+fly.jitterY)<0 ){ fly.jitterY = 0-fly.jitterY } - fly.y = fly.y+fly.jitterY - fly.jitterX = (Math.round(Math.random())*2 - 1) *fly.jitterX - fly.jitterY = (Math.round(Math.random())*2 - 1) *fly.jitterY - fly.color = Qt.rgba(Math.random(),Math.random(),Math.random(),0.5) - - } - } //end of timer -} //end of item diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md new file mode 100644 index 00000000..768f0e14 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md @@ -0,0 +1,79 @@ +## Screensaver Format +The screensaver system for the Lumina desktop allows for the creation and use of scripts written in the QML language, with a number of screensavers and other examples installed out-of-box. There are only a couple warnings/caveats to consider when developing a new screensaver: + +1. The root object in your QML script will be automatically sized to fit the screen as needed. Avoid trying to hard-code specific screen dimensions within your script as it will not work properly. +2. A JSON manifest file must be created (format listed below) and placed into one of the screensaver plugin directories for it to be recognized as a valid screensaver by the desktop. + + +### JSON Manifest +The manifest file contains all the information needed to actually validate/launch the screensaver, as well as additional information about the author and/or the screensaver itself. + +Example JSON manifest file (sample.json): +``` +{ + "name" : { + "default" : "sample", + "en_US" : "US English localization of the name" + "en" : "Generic english localization of the name" + } + + "description" : { + "default" : "sample screensaver", + "en_US" : "US English Localization of the description" + } + + "author" : { + "name" : "Me", + "email" : "Me@myself.net", + "website" : "http://mywebsite.net", + "company" : "iXsystems" + "company_website" : "http://ixsystems.com" + } + + "meta" : { + "license" : "3-clause BSD", + "license_url" : "https://github.com/trueos/lumina/blob/master/LICENSE", + "copyright" : "Copyright (c) 2017, Ken Moore (ken@ixsystems.com)", + "date_created" : "20171010", + "date_updated" : "20171011", + "version" : "1.0" + } + + "qml" : { + "exec" : "absolute/or/relative/path/to/script.qml", + "additional_files" : ["file/which/must/exist.png"], + "qt_min_version" : "5.0", + "qt_max_version" : "6.0" + } +} +``` + +Details of the individual items in the manifest: +* NOTE: for locale codes, both long and short version are acceptable: + Example 1: If the current locale is "en_GB", but the JSON manifest lists translations for "en_US" and "en", then the "en" translation will be used. + Example 2: If the current locale is "en_GB", but neither "en_GB" nor "en" translations exist, then the "default" version will be used. + +* **name** : (required) This is the official name of the screensaver to show to users + * *default* : (required) Non-translated name of the screensaver + * *[locale]* : (optional) Translated name for specific [locale] +* **description** : (required) This is a short description of the screensaver to show to users + * *default* : (required) Non-translated description of the screensaver + * *[locale]* : (optional) Translated description for specific [locale] +* **author** : (all optional) Additional information about the author(s) of the screensaver + * *name* : Name of the author + * *email* : Email to contact the author (useful for licensing questions and such) + * *website* : Personal website for the author (github/facebook/twitter profile, etc) + * *company* : Company for which the author is creating this screensaver + * *company_website* : Website for the company +* **meta** : (all optional) Additional information about the screensaver itself + * *license* : License the screensaver is released under + * *license_url* : Website which contains the full text of the license + * *copyright* : Copyright notice for this screensaver + * *date_created* : (yyyyMMdd) Date the screensaver was initially created + * *date_updated* : (yyyyMMdd) Date the screensaver was last updated + * *version* : Current version of the screensaver (typically updated every time "date_updated" is changed) +* **qml** : (required) Information about launching the screensaver and checking validity + * *exec* : (required) Absolute or relative path to the QML script (relative to the directory which contains the JSON manifest) + * *additional_files* : (optional) Array of paths for other files/scripts which must exist for the screensaver to work properly. + * *qt_min_version* : (optional) Minimum version of the Qt libraries that this screensaver supports + * *qt_max_version* : (optional) Maximum version of the Qt libraries that this screensaver supports diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Fireflies.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Fireflies.qml new file mode 100644 index 00000000..d8dcc1ed --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Fireflies.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 +import "." as QML + +Rectangle { + id : canvas + anchors.fill: parent + color: "black" + + Repeater { + model: Math.round(Math.random()*canvas.width/10)+100 + QML.Firefly { + parent: canvas + x: Math.round(Math.random()*canvas.width) + y: Math.round(Math.random()*canvas.height) + } + } //end of Repeater + +} //end of canvas rectangle diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Firefly.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Firefly.qml new file mode 100644 index 00000000..7b65d8ec --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Firefly.qml @@ -0,0 +1,63 @@ +import QtQuick 2.0 +import QtQuick.Window 2.2 +import QtGraphicalEffects 1.0 + +Item { + + RectangularGlow { + anchors.fill: fly + glowRadius: Math.round(fly.radius /2) + spread: 0.5 + color: Qt.rgba(1,1,1,0.3) + cornerRadius: fly.radius + glowRadius + } + + Rectangle { + id: fly + width: Math.round(Math.random()*canvas.width/200)+2 + height: width + x: parent.x + y: parent.y + color: Qt.rgba(Math.random(),Math.random(),0,0.5) + radius: Math.floor(width/2) + property int jitterX: Math.round(Math.random()*100)+10 + property int jitterY: Math.round(Math.random()*100)+10 + + Behavior on color { + ColorAnimation { + duration: 500 + } + } + Behavior on x { + SmoothedAnimation { + velocity: 10+Math.random()*canvas.width/100 + } + } + Behavior on y { + SmoothedAnimation { + velocity: 10+Math.random()*canvas.height/100 + } + } + + } + + + + Timer { + interval: 5 + repeat: true + running: true + property bool starting: true + onTriggered: { + if(starting){ interval = Math.round(Math.random()*1000)+500; starting = false; } + if ( (fly.x+fly.jitterX)>parent.width || (fly.x+fly.jitterX)<0 ){ fly.jitterX = 0-fly.jitterX } + fly.x = fly.x+fly.jitterX + if( (fly.y+fly.jitterY)>parent.height || (fly.y+fly.jitterY)<0 ){ fly.jitterY = 0-fly.jitterY } + fly.y = fly.y+fly.jitterY + fly.jitterX = (Math.round(Math.random())*2 - 1) *fly.jitterX + fly.jitterY = (Math.round(Math.random())*2 - 1) *fly.jitterY + fly.color = Qt.rgba(Math.random(),Math.random(),Math.random(),0.5) + + } + } //end of timer +} //end of item -- cgit From 526b11d189b41c94da315bb80de4c78e176f8471 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 10 Oct 2017 13:30:56 -0400 Subject: Cleanup a lot of stale/unused files within the Lumina2 souce tree. --- .../extrafiles/audiofiles/LICENCE | 7 ----- .../extrafiles/audiofiles/Login.ogg | Bin 32111 -> 0 bytes .../extrafiles/audiofiles/Logout.ogg | Bin 31255 -> 0 bytes .../extrafiles/audiofiles/low-battery.ogg | Bin 49748 -> 0 bytes .../extrafiles/lumina-desktop.desktop | 34 --------------------- .../wallpapers/Lumina_Wispy_blue-grey-zoom.jpg | Bin 6269314 -> 0 bytes .../wallpapers/Lumina_Wispy_blue-grey.jpg | Bin 6508360 -> 0 bytes .../extrafiles/wallpapers/Lumina_Wispy_gold.jpg | Bin 2523711 -> 0 bytes .../extrafiles/wallpapers/Lumina_Wispy_green.jpg | Bin 1286362 -> 0 bytes .../wallpapers/Lumina_Wispy_grey-blue-zoom.jpg | Bin 563037 -> 0 bytes .../wallpapers/Lumina_Wispy_grey-blue.jpg | Bin 361771 -> 0 bytes .../extrafiles/wallpapers/Lumina_Wispy_purple.jpg | Bin 926969 -> 0 bytes .../extrafiles/wallpapers/Lumina_Wispy_red.jpg | Bin 1141515 -> 0 bytes .../core/lumina-desktop-unified/lumina-desktop.pro | 3 ++ 14 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/LICENCE delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Login.ogg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Logout.ogg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/low-battery.ogg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/lumina-desktop.desktop delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey.jpg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_gold.jpg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_green.jpg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue.jpg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_purple.jpg delete mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_red.jpg (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/LICENCE b/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/LICENCE deleted file mode 100644 index aa601d5e..00000000 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/LICENCE +++ /dev/null @@ -1,7 +0,0 @@ -These audio files are BSD-licensed and were created/owned by the TrueOS Project: - - Login.ogg - - Logout.ogg - -These audio files are freely available on jewelbeat.com: -"Music by JewelBeat. Download your free music and free sound effects at www.jewelbeat.com." - - low-battery.ogg (http://www.jewelbeat.com/free/free-sound-effects/musical%20effects/Tympani_2.mp3 - converted to OGG afterward) diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Login.ogg b/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Login.ogg deleted file mode 100644 index 43a07e27..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Login.ogg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Logout.ogg b/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Logout.ogg deleted file mode 100644 index e63ae07f..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/Logout.ogg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/low-battery.ogg b/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/low-battery.ogg deleted file mode 100644 index d129a2b3..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/audiofiles/low-battery.ogg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/lumina-desktop.desktop b/src-qt5/core/lumina-desktop-unified/extrafiles/lumina-desktop.desktop deleted file mode 100644 index 7d87f93a..00000000 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/lumina-desktop.desktop +++ /dev/null @@ -1,34 +0,0 @@ -[Desktop Entry] -Exec=start-lumina-desktop -TryExec=start-lumina-desktop -Icon=Lumina-DE -Type=Application -Name=Lumina -Name[de]=Lumina -Name[en_GB]=Lumina -Name[en_ZA]=Lumina -Name[et]=Lumina -Name[fr]=Lumina -Name[fr_CA]=Lumina -Name[hi]=ल्यूमिना -Name[ja]=Lumina -Name[mt]=Lumina -Name[pl]=Lumina -Name[pt_BR]=Lumina -Name[ru]=Lumina -Name[uk]=Lumina -Name[vi]=Lumina -Comment=A Lightweight Desktop for FreeBSD -Comment[de]=Eine leichtgewichtige Arbeitsplatzumgebung für FreeBSD -Comment[en_GB]=A Lightweight Desktop for FreeBSD -Comment[en_ZA]=A Lightweight Desktop for FreeBSD -Comment[et]=Minimalistlik töölauakeskkond FreeBSD-le -Comment[fr]=Un environnement bureau léger pour FreeBSD -Comment[fr_CA]=Un environnement bureau léger pour FreeBSD -Comment[hi]=एक हल्का डेस्कटॉप फ्री बी.एस.डी के लिए -Comment[ja]=FreeBSD の為に作られた軽快なデスクトップ環境 -Comment[mt]=A Desktop irqiq għal FreeBSD -Comment[pl]=Lekkie Środowisko graficzne dla FreeBSD -Comment[pt_BR]=Um ambiente de trabalho leve para FreeBSD -Comment[uk]=Легковісне оточення стільниці для FreeBSD -Comment[vi]=Một máy tính để bàn nhẹ cho FreeBSD diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg deleted file mode 100644 index 481ca438..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey.jpg deleted file mode 100644 index 9da67596..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_blue-grey.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_gold.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_gold.jpg deleted file mode 100644 index cba03cee..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_gold.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_green.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_green.jpg deleted file mode 100644 index 80b0d3e3..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_green.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg deleted file mode 100644 index 4f753ed5..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue.jpg deleted file mode 100644 index c214cd78..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_grey-blue.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_purple.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_purple.jpg deleted file mode 100644 index e4c3d7a8..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_purple.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_red.jpg b/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_red.jpg deleted file mode 100644 index a092f636..00000000 Binary files a/src-qt5/core/lumina-desktop-unified/extrafiles/wallpapers/Lumina_Wispy_red.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index e8cf2f28..ba958401 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -54,6 +54,9 @@ desktop.files = lumina-desktop.desktop defaults.path = $${L_SHAREDIR}/lumina-desktop defaults.files = defaults/* +extrafiles.path = $${L_SHAREDIR}/lumina-desktop +extrafiles.files = extrafiles/* + TRANSLATIONS = i18n/lumina-desktop_af.ts \ i18n/lumina-desktop_ar.ts \ i18n/lumina-desktop_az.ts \ -- cgit From 7dd1ca13749571408725ac45e8d1e1d3bbf7c798 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 10 Oct 2017 15:29:13 -0400 Subject: Write up the new ScreenSaver plugins management class (untested) Also cleanup a bit more of the documentation for the new plugin system. --- .../extrafiles/screensavers/Fireflies.json | 2 +- .../lumina-desktop-unified/extrafiles/screensavers/README.md | 12 ++++++------ src-qt5/core/lumina-desktop-unified/lumina-desktop.pro | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json index e01d6d2b..8d0d25c4 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json @@ -18,7 +18,7 @@ "copyright" : "Copyright (c) 2017, Ken Moore (ken@ixsystems.com)", "date_created" : "20171010", "version" : "1.0" - } + }, "qml" : { "qml_file" : "qml_scripts/Fireflies.qml", "additional_files" : ["qml_scripts/Firefly.qml"] diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md index 768f0e14..d9093b44 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/README.md @@ -13,22 +13,22 @@ Example JSON manifest file (sample.json): { "name" : { "default" : "sample", - "en_US" : "US English localization of the name" + "en_US" : "US English localization of the name", "en" : "Generic english localization of the name" - } + }, "description" : { "default" : "sample screensaver", "en_US" : "US English Localization of the description" - } + }, "author" : { "name" : "Me", "email" : "Me@myself.net", "website" : "http://mywebsite.net", - "company" : "iXsystems" + "company" : "iXsystems", "company_website" : "http://ixsystems.com" - } + }, "meta" : { "license" : "3-clause BSD", @@ -37,7 +37,7 @@ Example JSON manifest file (sample.json): "date_created" : "20171010", "date_updated" : "20171011", "version" : "1.0" - } + }, "qml" : { "exec" : "absolute/or/relative/path/to/script.qml", diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index ba958401..9b0c2fb3 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -123,7 +123,7 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ -INSTALLS += target desktop defaults +INSTALLS += target desktop defaults extrafiles WITH_I18N{ INSTALLS += dotrans -- cgit From dfac324cb6b02d19857f0e5dcced099d31ce957d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 11 Oct 2017 10:34:53 -0400 Subject: Get the Lumina2 screensaver system converted over to the new QML-backed plugin system. Still need to clean up some old files within the source tree, but it all works right now. --- src-qt5/core/lumina-desktop-unified/LSession.cpp | 4 +- .../extrafiles/screensavers/Fireflies.json | 2 +- .../core/lumina-desktop-unified/global-includes.h | 1 + .../core/lumina-desktop-unified/lumina-desktop.pro | 13 ++++- .../src-screensaver/SSBaseWidget.cpp | 63 +++++++--------------- .../src-screensaver/SSBaseWidget.h | 12 ++--- 6 files changed, 39 insertions(+), 56 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index d70ff973..bace2dbe 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -356,12 +356,12 @@ void LSession::launchStartupApps(){ void LSession::checkUserFiles(){ //internal version conversion examples: // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] - QString OVS = DesktopSettings::instance()->value(DesktopSettings::System,"DesktopVersion","0").toString(); //Old Version String + /*QString OVS = DesktopSettings::instance()->value(DesktopSettings::System,"DesktopVersion","0").toString(); //Old Version String bool changed = LDesktopUtils::checkUserFiles(OVS); if(changed){ //Save the current version of the session to the settings file (for next time) DesktopSettings::instance()->setValue(DesktopSettings::System,"DesktopVersion", this->applicationVersion()); - } + }*/ } diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json index 8d0d25c4..c09de308 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Fireflies.json @@ -20,7 +20,7 @@ "version" : "1.0" }, "qml" : { - "qml_file" : "qml_scripts/Fireflies.qml", + "exec" : "qml_scripts/Fireflies.qml", "additional_files" : ["qml_scripts/Firefly.qml"] } } diff --git a/src-qt5/core/lumina-desktop-unified/global-includes.h b/src-qt5/core/lumina-desktop-unified/global-includes.h index 184f5b8d..ba1beb06 100644 --- a/src-qt5/core/lumina-desktop-unified/global-includes.h +++ b/src-qt5/core/lumina-desktop-unified/global-includes.h @@ -53,6 +53,7 @@ #include #include #include +#include // libLumina includes diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index 9b0c2fb3..6b9ee876 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -1,8 +1,15 @@ include($${PWD}/../../OS-detect.pri) -QT += core gui network -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets x11extras multimedia multimediawidgets concurrent svg +lessThan(QT_MAJOR_VERSION, 5) { + message("[ERROR] Qt 5.4+ is required to use the Lumina Desktop!") + exit +} +lessThan(QT_MINOR_VERSION, 4){ + message("[ERROR] Qt 5.4+ is required to use the Lumina Desktop!") + exit +} +QT *= core gui network widgets x11extras multimedia multimediawidgets concurrent svg quick qml TARGET = lumina-desktop-unified @@ -22,6 +29,8 @@ include(../libLumina/NativeWindow.pri) include(../libLumina/XDGMime.pri) include(../libLumina/LIconCache.pri) +include(../../src-cpp/plugins-screensaver.pri) + #include all the main individual source groups include(src-screensaver/screensaver.pri) include(src-events/events.pri) diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp index a6d5be60..227e51ac 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp @@ -12,10 +12,11 @@ // ======== // PUBLIC // ======== -SSBaseWidget::SSBaseWidget(QWidget *parent) : QWidget(parent){ +SSBaseWidget::SSBaseWidget(QWidget *parent) : QQuickView(parent->windowHandle()){ this->setObjectName("LuminaBaseSSWidget"); - ANIM = 0; - this->setMouseTracking(true); + this->setResizeMode(QQuickView::SizeRootObjectToView); + this->setColor(QColor("black")); //default color for the view + //this->setMouseTracking(true); plugType="none"; restartTimer = new QTimer(this); restartTimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "globals/plugin_time_seconds", 60).toInt() * 1000); @@ -24,7 +25,6 @@ SSBaseWidget::SSBaseWidget(QWidget *parent) : QWidget(parent){ } SSBaseWidget::~SSBaseWidget(){ - if(ANIM!=0){ this->stopPainting(); } } void SSBaseWidget::setPlugin(QString plug){ @@ -35,54 +35,27 @@ void SSBaseWidget::setPlugin(QString plug){ // PUBLIC SLOTS // ============= void SSBaseWidget::startPainting(){ - cplug = plugType; //free up any old animation instance - if(ANIM!=0){ - stopPainting(); - } + stopPainting(); //If a random plugin - grab one of the known plugins - if(cplug=="random"){ - QStringList valid = BaseAnimGroup::KnownAnimations(); - valid.removeAll("none"); //they want a screensaver - remove the "none" option from the valid list - if(valid.isEmpty()){ cplug = "none"; } //no known plugins - else{ cplug = valid[ qrand()%valid.length() ]; } //grab a random plugin - } - if(DEBUG){ qDebug() << " - Screen Saver:" << plugType << cplug; } - //Now list all the various plugins and start them appropriately - QString style; - if(cplug=="none"){ - style = "background: black;"; //show the underlying black parent widget - }else{ - style = "background: black;"; + if(plugType=="random"){ + QList valid = SSPluginSystem::findAllPlugins(); + if(!valid.isEmpty()){ cplug = valid[ qrand()%valid.length() ]; } //grab a random plugin + }else if(plugType!="none"){ + cplug = SSPluginSystem::findPlugin(plugType); } - this->setStyleSheet("QWidget#LuminaBaseSSWidget{ "+style+"}"); - this->repaint(); - //If not a stylesheet-based plugin - set it here - if(cplug!="none"){ - ANIM = BaseAnimGroup::NewAnimation(cplug, this); - connect(ANIM, SIGNAL(finished()), this, SLOT(startPainting()) ); //repeat the plugin as needed - ANIM->LoadAnimations(); + if(DEBUG){ qDebug() << " - Screen Saver:" << plugType << cplug.scriptURL() << cplug.isValid(); } + if(cplug.isValid()){ + this->setSource( cplug.scriptURL() ); + restartTimer->start(); } - //Now start the animation(s) - if(ANIM!=0){ - if(ANIM->animationCount()>0){ - if(DEBUG){ qDebug() << " - Starting SS Plugin:" << cplug << ANIM->animationCount() << ANIM->duration() << ANIM->loopCount(); } - ANIM->start(); - } - } - restartTimer->start(); + } void SSBaseWidget::stopPainting(){ - if(ANIM!=0){ - if(DEBUG){ qDebug() << "Stopping Animation!!"; } - ANIM->stop(); - //ANIM->clear(); - ANIM->deleteLater(); - ANIM = 0; - //Delete any child widgets of the canvas - QList widgets = this->findChildren("",Qt::FindDirectChildrenOnly); - for(int i=0; ideleteLater(); } + if(!this->source().isEmpty()){ + this->setSource(QUrl()); + cplug = SSPlugin(); //empty structure } if(restartTimer->isActive()){ restartTimer->stop(); } } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h index af809127..fdb23e66 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h @@ -10,9 +10,9 @@ #define _LUMINA_DESKTOP_SCREEN_SAVER_BASE_WIDGET_H #include "global-includes.h" -#include "animations/BaseAnimGroup.h" +#include -class SSBaseWidget : public QWidget{ +class SSBaseWidget : public QQuickView{ Q_OBJECT public: SSBaseWidget(QWidget *parent); @@ -25,8 +25,8 @@ public slots: void stopPainting(); private: - QString plugType, cplug; //type of custom painting to do - BaseAnimGroup *ANIM; + QString plugType; + SSPlugin cplug; QTimer *restartTimer; private slots: @@ -43,12 +43,12 @@ protected: ev->accept(); emit InputDetected(); } - void paintEvent(QPaintEvent*){ + /*void paintEvent(QPaintEvent*){ QStyleOption opt; opt.init(this); QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); - } + }*/ }; -- cgit From a2bb82ae14f9f52c15e08880a559781d6f9e9ecb Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 11 Oct 2017 12:14:26 -0400 Subject: A bit more cleanup for the screensaver system. Now the old animations are completely ignored in the build, and the mouse cursor is hidden while the screensaver is active. --- .../core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp | 6 +++--- src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h | 6 ------ src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp index 227e51ac..122307b3 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp @@ -16,10 +16,10 @@ SSBaseWidget::SSBaseWidget(QWidget *parent) : QQuickView(parent->windowHandle()) this->setObjectName("LuminaBaseSSWidget"); this->setResizeMode(QQuickView::SizeRootObjectToView); this->setColor(QColor("black")); //default color for the view - //this->setMouseTracking(true); + this->setCursor(Qt::BlankCursor); plugType="none"; restartTimer = new QTimer(this); - restartTimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "globals/plugin_time_seconds", 60).toInt() * 1000); + restartTimer->setInterval( DesktopSettings::instance()->value(DesktopSettings::ScreenSaver, "globals/plugin_time_seconds", 120).toInt() * 1000); restartTimer->setSingleShot(true); connect(restartTimer, SIGNAL(timeout()), this, SLOT(startPainting()) ); } @@ -47,7 +47,7 @@ void SSBaseWidget::startPainting(){ if(DEBUG){ qDebug() << " - Screen Saver:" << plugType << cplug.scriptURL() << cplug.isValid(); } if(cplug.isValid()){ this->setSource( cplug.scriptURL() ); - restartTimer->start(); + if(plugType=="random"){ restartTimer->start(); } } } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h index fdb23e66..72e02702 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.h @@ -43,12 +43,6 @@ protected: ev->accept(); emit InputDetected(); } - /*void paintEvent(QPaintEvent*){ - QStyleOption opt; - opt.init(this); - QPainter p(this); - style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); - }*/ }; diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri b/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri index f95891c1..92cc7bd2 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/screensaver.pri @@ -9,7 +9,7 @@ HEADERS *= $${PWD}/LLockScreen.h \ FORMS *= $${PWD}/LLockScreen.ui #update the includepath so we can just (#include ) as needed without paths -INCLUDEPATH *= ${PWD} +INCLUDEPATH *= $${PWD} #Now include all the screensaver animations/options -include(animations/animations.pri) +#include(animations/animations.pri) -- cgit From 2cedaf2c2ac9e4b4e3078c5a6f04ba5fc3f4f5b3 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 11 Oct 2017 14:46:54 -0400 Subject: Update lumina-checkpass with 2 additional options: 1. "-fd " pass in a file descriptor (such as 0 for standard input) to read password 2. "-f " pass in a file path to read the password Then update lumina-desktop-unified to use the "-f" version with a QTemporaryFile. I was trying to get it to use the "-fd" version, but the file descriptor I am getting from the QTemporaryFile does not seem to work properly - still need to track this down a bit more later but the -f option works fine for now. --- src-qt5/core/lumina-checkpass/main.c | 39 +++++++++++++++++++--- .../core/lumina-desktop-unified/global-includes.h | 1 + .../src-screensaver/LLockScreen.cpp | 13 +++++++- 3 files changed, 47 insertions(+), 6 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-checkpass/main.c b/src-qt5/core/lumina-checkpass/main.c index e12e7c78..481cce33 100644 --- a/src-qt5/core/lumina-checkpass/main.c +++ b/src-qt5/core/lumina-checkpass/main.c @@ -14,23 +14,52 @@ //=========================================== //Standard C libary #include // Standard C +#include #include // Usage output #include // User DB information +#include //PAM/security libraries #include #include #include +void showUsage(){ + puts("lumina-checkpass: Simple user-level check for password validity (for screen unlockers and such)."); + puts("Usage:"); + puts(" lumina-checkpass "); + puts(" lumina-checkpass -fd "); + puts(" lumina-checkpass -f "); + puts("Returns: 0 for a valid password, 1 for invalid"); +} + int main(int argc, char** argv){ //Check the inputs - if(argc!=2){ + if(argc<2){ //Invalid inputs - show the help text - puts("lumina-checkpass: Simple user-level check for password validity (for screen unlockers and such)."); - puts("Usage: lumina-checkpass "); - puts("Returns: 0 for a valid password, 1 for invalid"); + showUsage(); return 1; } + char*pass = 0; + if(argc==2){ pass = argv[1]; } + else if(argc==3 && 0==strcmp(argv[1],"-fd") ){ + FILE *fp = fdopen(atoi(argv[2]), "r"); + size_t len; + if(fp!=0){ + ssize_t slen = getline(&pass, &len, fp); + if(pass[slen-1]=='\n'){ pass[slen-1] = '\0'; } + } + fclose(fp); + }else if(argc==3 && 0==strcmp(argv[1],"-f") ){ + FILE *fp = fopen(argv[2], "r"); + size_t len; + if(fp!=0){ + ssize_t slen = getline(&pass, &len, fp); + if(pass[slen-1]=='\n'){ pass[slen-1] = '\0'; } + } + fclose(fp); + } + if(pass == 0){ puts("Could not read password!!"); return 1; } //error in reading password //Validate current user (make sure current UID matches the logged-in user, char* cUser = getlogin(); struct passwd *pwd = 0; @@ -44,7 +73,7 @@ int main(int argc, char** argv){ int ret = pam_start( "system", cUser, &pamc, &pamh); if(ret != PAM_SUCCESS){ return 1; } //could not init PAM //char* cPassword = argv[1]; - ret = pam_set_item(pamh, PAM_AUTHTOK, argv[1]); + ret = pam_set_item(pamh, PAM_AUTHTOK, pass); //Authenticate with PAM ret = pam_authenticate(pamh,0); //this can be true without verifying password if pam_self.so is used in the auth procedures (common) if( ret == PAM_SUCCESS ){ ret = pam_acct_mgmt(pamh,0); } //Check for valid, unexpired account and verify access restrictions diff --git a/src-qt5/core/lumina-desktop-unified/global-includes.h b/src-qt5/core/lumina-desktop-unified/global-includes.h index ba1beb06..ae57ac08 100644 --- a/src-qt5/core/lumina-desktop-unified/global-includes.h +++ b/src-qt5/core/lumina-desktop-unified/global-includes.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp index 0ff70142..b791ffd2 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp @@ -77,7 +77,18 @@ void LLockScreen::TryUnlock(){ this->setEnabled(false); QString pass = ui->line_password->text(); ui->line_password->clear(); - bool ok = (LUtils::runCmd("lumina-checkpass", QStringList() << pass) == 0); + //Create a temporary file for the password, then pass that file descriptor to lumina-checkpass + QTemporaryFile *TF = new QTemporaryFile(".XXXXXXXXXX"); + TF->setAutoRemove(true); + bool ok = false; + if( TF->open() ){ + QTextStream in(TF); + in << pass; + in.flush(); //make sure we push it to the file **right now** since we need to keep the file open + ok = (LUtils::runCmd("lumina-checkpass", QStringList() << "-f" << TF->fileName() ) == 0); + TF->close(); + } + delete TF; if(ok){ emit ScreenUnlocked(); this->setEnabled(true); -- cgit From f649d4976e64cfdf9b32022d55bfd08f39d00a8f Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 11 Oct 2017 20:51:56 -0400 Subject: Added framework to play video when the mouse is put over them. Breaks picture and video preview for lumina-fileinfo currently --- src-qt5/core/libLumina/LVideoLabel.cpp | 61 ++++++++++++++++++++++++++++++++ src-qt5/core/libLumina/LVideoLabel.h | 30 ++++++++++++++++ src-qt5/core/libLumina/LVideoLabel.pri | 8 +++++ src-qt5/core/libLumina/LVideoSurface.cpp | 23 ++++++------ src-qt5/core/libLumina/LVideoSurface.h | 11 ++++-- 5 files changed, 118 insertions(+), 15 deletions(-) create mode 100644 src-qt5/core/libLumina/LVideoLabel.cpp create mode 100644 src-qt5/core/libLumina/LVideoLabel.h create mode 100644 src-qt5/core/libLumina/LVideoLabel.pri (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp new file mode 100644 index 00000000..20b2cad4 --- /dev/null +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -0,0 +1,61 @@ +#include "LVideoLabel.h" + +LVideoLabel::LVideoLabel(QString file, bool video) : QLabel(){ + this->setScaledContents(true); + if(video) { + mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface); + thumbnail = QPixmap(); + entered = false; + surface = new LVideoSurface(this); + mediaPlayer->setVideoOutput(surface); + mediaPlayer->setMedia(QUrl("file://" + file)); + mediaPlayer->setPlaybackRate(3); + mediaPlayer->setMuted(true); + mediaPlayer->play(); + mediaPlayer->pause(); + this->connect(surface, SIGNAL(frameReceived(QPixmap)), this, SLOT(stopVideo(QPixmap))); + this->connect(mediaPlayer, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(setDuration(QMediaPlayer::MediaStatus))); + this->connect(this, SIGNAL(rollOver()), surface, SLOT(switchRollOver())); + }else{ + thumbnail = QPixmap(file); + this->setPixmap(thumbnail); + } +} + +LVideoLabel::~LVideoLabel() { + mediaPlayer->deleteLater(); + surface->deleteLater(); +} + +void LVideoLabel::stopVideo(QPixmap pix) { + if(!entered) { + if(thumbnail.isNull()) + thumbnail = QPixmap(pix.scaledToHeight(64)); + this->setPixmap(thumbnail); + mediaPlayer->pause(); + }else { + this->setPixmap(QPixmap(pix.scaledToHeight(64))); + } +} + +void LVideoLabel::setDuration(QMediaPlayer::MediaStatus status) { + if(status == QMediaPlayer::BufferedMedia) { + mediaPlayer->setPosition(mediaPlayer->duration() / 2); + mediaPlayer->play(); + } +} + +void LVideoLabel::enterEvent(QEvent *event) { + entered=true; + emit rollOver(); + mediaPlayer->setPosition(0); + mediaPlayer->play(); + QLabel::enterEvent(event); +} + +void LVideoLabel::leaveEvent(QEvent *event) { + entered=false; + mediaPlayer->setPosition(mediaPlayer->duration() / 2); + emit rollOver(); + QLabel::leaveEvent(event); +} diff --git a/src-qt5/core/libLumina/LVideoLabel.h b/src-qt5/core/libLumina/LVideoLabel.h new file mode 100644 index 00000000..fd293200 --- /dev/null +++ b/src-qt5/core/libLumina/LVideoLabel.h @@ -0,0 +1,30 @@ +#ifndef LVIDEOLABEL_H +#define LVIDEOLABEL_H + +#include +#include +#include "LVideoSurface.h" + +//class LVideoSurface; + +class LVideoLabel : public QLabel { + Q_OBJECT + public: + LVideoLabel(QString, bool); + ~LVideoLabel(); + protected: + void enterEvent(QEvent*); + void leaveEvent(QEvent*); + signals: + void rollOver(); + public slots: + void stopVideo(QPixmap); + void setDuration(QMediaPlayer::MediaStatus); + private: + QMediaPlayer *mediaPlayer; + LVideoSurface *surface; + QVideoWidget *videoPlayer; + QPixmap thumbnail; + bool entered; +}; +#endif diff --git a/src-qt5/core/libLumina/LVideoLabel.pri b/src-qt5/core/libLumina/LVideoLabel.pri new file mode 100644 index 00000000..f609df08 --- /dev/null +++ b/src-qt5/core/libLumina/LVideoLabel.pri @@ -0,0 +1,8 @@ +QT *= multimedia + +HEADERS *= $${PWD}/LVideoLabel.h +SOURCES *= $${PWD}/LVideoLabel.cpp + +INCLUDEPATH *= ${PWD} + +include(LVideoSurface.pri) diff --git a/src-qt5/core/libLumina/LVideoSurface.cpp b/src-qt5/core/libLumina/LVideoSurface.cpp index bd6b2c95..e3e87667 100644 --- a/src-qt5/core/libLumina/LVideoSurface.cpp +++ b/src-qt5/core/libLumina/LVideoSurface.cpp @@ -3,10 +3,12 @@ LVideoSurface::LVideoSurface(QObject *parent) : QAbstractVideoSurface(parent) { frameImage = QPixmap(); + entered = false; } bool LVideoSurface::present(const QVideoFrame &frame) { - if(!frameImage.isNull()) { + //qDebug() << surfaceFormat().pixelFormat() << frame.pixelFormat() << surfaceFormat().frameSize() << frame.size(); + if(!frameImage.isNull() && !entered) { emit frameReceived(frameImage); return true; } @@ -15,9 +17,10 @@ bool LVideoSurface::present(const QVideoFrame &frame) { //qDebug() << "Recording Frame" << frame.pixelFormat(); QVideoFrame icon(frame); icon.map(QAbstractVideoBuffer::ReadOnly); + //qDebug() << icon.width() << icon.height(); QImage img(icon.bits(), icon.width(), icon.height(), icon.bytesPerLine(), QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat())); - if(frameImage.isNull()) + if((frameImage.isNull() && !entered) or entered) frameImage = QPixmap::fromImage(img.copy(img.rect())); icon.unmap(); @@ -33,26 +36,22 @@ QList LVideoSurface::supportedPixelFormats(QAbstractVi << QVideoFrame::Format_RGB565 << QVideoFrame::Format_RGB555 << QVideoFrame::Format_BGRA32 << QVideoFrame::Format_BGR32; } -/*bool VideoSurface::isFormatSupported(const QVideoSurfaceFormat &format) const { - const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); - const QSize size = format.frameSize(); - - return imageFormat != QImage::Format_Invalid && !size.isEmpty() && format.handleType() == QAbstractVideoBuffer::NoHandle; +void LVideoSurface::stop() { + QAbstractVideoSurface::stop(); } -void VideoSurface::stop() { - QAbstractVideoSurface::stop(); +void LVideoSurface::switchRollOver() { + entered = !entered; } -bool VideoSurface::start(const QVideoSurfaceFormat &format) { +bool LVideoSurface::start(const QVideoSurfaceFormat &format) { const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); const QSize size = format.frameSize(); if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) { - this->imageFormat = imageFormat; QAbstractVideoSurface::start(format); return true; } else { return false; } -}*/ +} diff --git a/src-qt5/core/libLumina/LVideoSurface.h b/src-qt5/core/libLumina/LVideoSurface.h index 42a140d9..7a3dcaad 100644 --- a/src-qt5/core/libLumina/LVideoSurface.h +++ b/src-qt5/core/libLumina/LVideoSurface.h @@ -1,3 +1,6 @@ +#ifndef LVIDEOSURFACE_H +#define LVIDEOSURFACE_H + #include #include #include @@ -10,12 +13,14 @@ class LVideoSurface : public QAbstractVideoSurface { LVideoSurface(QObject *parent=0); virtual bool present(const QVideoFrame&); virtual QList supportedPixelFormats(QAbstractVideoBuffer::HandleType) const; - /*virtual QList Date: Thu, 12 Oct 2017 10:26:39 -0400 Subject: Add a new screensaver: Warp This is a starfield "warping" effect screensaver. Also turn off a bunch of debugging within the C++ screensaver plugin system --- .../extrafiles/screensavers/Warp.json | 25 ++++++++++ .../extrafiles/screensavers/qml_scripts/Warp.qml | 57 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json new file mode 100644 index 00000000..888df01f --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Warp.json @@ -0,0 +1,25 @@ +{ + "name" : { + "default" : "Warp" + }, + "description" : { + "default" : "Warp trail through the stars" + }, + "author" : { + "name" : "Ken Moore", + "email" : "ken@ixsystems.com", + "website" : "https://github.com/beanpole135", + "company" : "iXsystems", + "company_website" : "http://ixsystems.com" + }, + "meta" : { + "license" : "3-clause BSD", + "license_url" : "https://github.com/trueos/lumina/blob/master/LICENSE", + "copyright" : "Copyright (c) 2017, Ken Moore (ken@ixsystems.com)", + "date_created" : "20171012", + "version" : "1.0" + }, + "qml" : { + "exec" : "qml_scripts/Warp.qml" + } +} diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml new file mode 100644 index 00000000..4ad4378f --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml @@ -0,0 +1,57 @@ +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Rectangle { + id : canvas + anchors.fill: parent + color: "black" + + // CREATE STARFIELD + Repeater { + model: Math.round(Math.random()*canvas.width/10)+500 + Rectangle { + parent: canvas + x: Math.round(Math.random()*canvas.width) + y: Math.round(Math.random()*canvas.height) + width: Math.round(Math.random()*3)+3 + height: width + radius: width/2 + color: "white" + } + } //end of Repeater + + // NOW CREATE THE WARP EFFECT + ZoomBlur { + id: blur + anchors.fill: canvas + source: canvas + samples: 24 + length: canvas.width / 20 + horizontalOffset: 0 + verticalOffset: 0 + + Behavior on horizontalOffset{ + NumberAnimation{ + duration: 3000 + } + } + Behavior on verticalOffset{ + NumberAnimation{ + duration: 3000 + } + } + } //end of zoom blur + + Timer { + interval: 5 + repeat: true + running: true + property bool starting: true + onTriggered: { + if(starting){ interval = 3010; starting = false; } + blur.horizontalOffset = (Math.random()*canvas.width/4) - (canvas.width/8) + blur.verticalOffset = (Math.random()*canvas.height/4) - (canvas.height/8) + } + } //end of timer + +} //end of canvas rectangle -- cgit From 910fce821941ccf0671d5ec9508b6a5df4922277 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 12 Oct 2017 10:43:19 -0400 Subject: Add some color to the "Warp" starfield. --- .../extrafiles/screensavers/qml_scripts/Warp.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml index 4ad4378f..08ae15a0 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml @@ -5,7 +5,13 @@ Rectangle { id : canvas anchors.fill: parent color: "black" - + + function getStarColor(num){ + if(num < 0.5) { return "white" } + if(num < 1.5) { return "mistyrose" } + return "lightblue" + } + // CREATE STARFIELD Repeater { model: Math.round(Math.random()*canvas.width/10)+500 @@ -16,7 +22,8 @@ Rectangle { width: Math.round(Math.random()*3)+3 height: width radius: width/2 - color: "white" + color: getStarColor( (index%3) ) + } } //end of Repeater -- cgit From 221c57a127579d6ad4849b475e107d7b60369db3 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 12 Oct 2017 11:10:58 -0400 Subject: Remove the plaintext input option for lumina-checkpass, and add more usage reporting/output if the first input flag is invalid. --- src-qt5/core/lumina-checkpass/main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-checkpass/main.c b/src-qt5/core/lumina-checkpass/main.c index 481cce33..2f54c8e6 100644 --- a/src-qt5/core/lumina-checkpass/main.c +++ b/src-qt5/core/lumina-checkpass/main.c @@ -27,7 +27,7 @@ void showUsage(){ puts("lumina-checkpass: Simple user-level check for password validity (for screen unlockers and such)."); puts("Usage:"); - puts(" lumina-checkpass "); + //puts(" lumina-checkpass "); puts(" lumina-checkpass -fd "); puts(" lumina-checkpass -f "); puts("Returns: 0 for a valid password, 1 for invalid"); @@ -35,14 +35,13 @@ void showUsage(){ int main(int argc, char** argv){ //Check the inputs - if(argc<2){ + if(argc!=3){ //Invalid inputs - show the help text showUsage(); return 1; } char*pass = 0; - if(argc==2){ pass = argv[1]; } - else if(argc==3 && 0==strcmp(argv[1],"-fd") ){ + if(argc==3 && 0==strcmp(argv[1],"-fd") ){ FILE *fp = fdopen(atoi(argv[2]), "r"); size_t len; if(fp!=0){ @@ -56,6 +55,11 @@ int main(int argc, char** argv){ if(fp!=0){ ssize_t slen = getline(&pass, &len, fp); if(pass[slen-1]=='\n'){ pass[slen-1] = '\0'; } + }else{ + puts("[ERROR] Unknown option provided"); + puts("----------------"); + showUsage(); + return 1; } fclose(fp); } -- cgit From 465ea1c7cb25bbc45c33be0e7bef5541540c5b20 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 12 Oct 2017 11:38:04 -0400 Subject: Tinker with the color divisions in "Warp" a bit - ensure more even distribution of colors --- .../extrafiles/screensavers/qml_scripts/Warp.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml index 08ae15a0..1cf9bc37 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Warp.qml @@ -7,8 +7,8 @@ Rectangle { color: "black" function getStarColor(num){ - if(num < 0.5) { return "white" } - if(num < 1.5) { return "mistyrose" } + if(num < 1) { return "white" } + if(num < 2) { return "mistyrose" } return "lightblue" } -- cgit From d04f35ab9b827085d1cbee0bc2f7cae7787557ef Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 13 Oct 2017 16:25:18 -0400 Subject: Another checkpoint commit for Lumina 2 Almost have the QML-based desktop canvas working - still tracking down some QML syntax issues. --- src-qt5/core/libLumina/LDesktopUtils.pri | 1 + src-qt5/core/libLumina/NativeEmbedWidget.cpp | 423 --------- src-qt5/core/libLumina/NativeEmbedWidget.h | 74 -- src-qt5/core/libLumina/NativeEventFilter.cpp | 300 ------- src-qt5/core/libLumina/NativeEventFilter.h | 71 -- src-qt5/core/libLumina/NativeKeyToQt.cpp | 528 ----------- src-qt5/core/libLumina/NativeWindow.cpp | 123 --- src-qt5/core/libLumina/NativeWindow.h | 118 --- src-qt5/core/libLumina/NativeWindow.pri | 18 - src-qt5/core/libLumina/NativeWindowSystem.cpp | 986 --------------------- src-qt5/core/libLumina/NativeWindowSystem.h | 139 --- .../core/libLumina/RootSubWindow-animations.cpp | 116 --- src-qt5/core/libLumina/RootSubWindow.cpp | 601 ------------- src-qt5/core/libLumina/RootSubWindow.h | 109 --- src-qt5/core/libLumina/RootWindow-mgmt.cpp | 95 -- src-qt5/core/libLumina/RootWindow.cpp | 283 ------ src-qt5/core/libLumina/RootWindow.h | 92 -- src-qt5/core/libLumina/RootWindow.pri | 17 - .../obsolete/RootSubWindow-animations.cpp | 116 +++ src-qt5/core/libLumina/obsolete/RootSubWindow.cpp | 601 +++++++++++++ src-qt5/core/libLumina/obsolete/RootSubWindow.h | 109 +++ .../core/libLumina/obsolete/RootWindow-mgmt.cpp | 95 ++ src-qt5/core/libLumina/obsolete/RootWindow.cpp | 283 ++++++ src-qt5/core/libLumina/obsolete/RootWindow.h | 92 ++ src-qt5/core/libLumina/obsolete/RootWindow.pri | 17 + src-qt5/core/lumina-desktop-unified/LSession.cpp | 9 +- .../core/lumina-desktop-unified/global-includes.h | 9 +- .../core/lumina-desktop-unified/global-objects.h | 4 + .../core/lumina-desktop-unified/lumina-desktop.pro | 10 +- .../src-desktop/RootWindow.cpp | 33 + .../src-desktop/RootWindow.h | 32 + .../lumina-desktop-unified/src-desktop/desktop.pri | 8 +- 32 files changed, 1401 insertions(+), 4111 deletions(-) delete mode 100644 src-qt5/core/libLumina/NativeEmbedWidget.cpp delete mode 100644 src-qt5/core/libLumina/NativeEmbedWidget.h delete mode 100644 src-qt5/core/libLumina/NativeEventFilter.cpp delete mode 100644 src-qt5/core/libLumina/NativeEventFilter.h delete mode 100644 src-qt5/core/libLumina/NativeKeyToQt.cpp delete mode 100644 src-qt5/core/libLumina/NativeWindow.cpp delete mode 100644 src-qt5/core/libLumina/NativeWindow.h delete mode 100644 src-qt5/core/libLumina/NativeWindow.pri delete mode 100644 src-qt5/core/libLumina/NativeWindowSystem.cpp delete mode 100644 src-qt5/core/libLumina/NativeWindowSystem.h delete mode 100644 src-qt5/core/libLumina/RootSubWindow-animations.cpp delete mode 100644 src-qt5/core/libLumina/RootSubWindow.cpp delete mode 100644 src-qt5/core/libLumina/RootSubWindow.h delete mode 100644 src-qt5/core/libLumina/RootWindow-mgmt.cpp delete mode 100644 src-qt5/core/libLumina/RootWindow.cpp delete mode 100644 src-qt5/core/libLumina/RootWindow.h delete mode 100644 src-qt5/core/libLumina/RootWindow.pri create mode 100644 src-qt5/core/libLumina/obsolete/RootSubWindow-animations.cpp create mode 100644 src-qt5/core/libLumina/obsolete/RootSubWindow.cpp create mode 100644 src-qt5/core/libLumina/obsolete/RootSubWindow.h create mode 100644 src-qt5/core/libLumina/obsolete/RootWindow-mgmt.cpp create mode 100644 src-qt5/core/libLumina/obsolete/RootWindow.cpp create mode 100644 src-qt5/core/libLumina/obsolete/RootWindow.h create mode 100644 src-qt5/core/libLumina/obsolete/RootWindow.pri create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.pri b/src-qt5/core/libLumina/LDesktopUtils.pri index 80bbcfa8..fcacc586 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.pri +++ b/src-qt5/core/libLumina/LDesktopUtils.pri @@ -5,3 +5,4 @@ INCLUDEPATH *= ${PWD} #Now the other dependendies of it include(LUtils.pri) +include(LuminaThemes.pri) diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp deleted file mode 100644 index 57b6edde..00000000 --- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp +++ /dev/null @@ -1,423 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "NativeEmbedWidget.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -//#include -//#include -#include -#include - -#define DISABLE_COMPOSITING true - -/*inline xcb_render_pictformat_t get_pictformat(){ - static xcb_render_pictformat_t format = 0; - if(format==0){ - xcb_render_query_pict_formats_reply_t *reply = xcb_render_query_pict_formats_reply( QX11Info::connection(), xcb_render_query_pict_formats(QX11Info::connection()), NULL); - format = xcb_render_util_find_standard_format(reply, XCB_PICT_STANDARD_ARGB_32)->id; - free(reply); - } - return format; -} - - -inline void renderWindowToWidget(WId id, QWidget *widget, bool hastransparency = true){ - //window and widget are assumed to be the same size - //Pull the XCB pixmap out of the compositing layer - xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); - xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); - if(pix==0){ qDebug() << "Got blank pixmap!"; return; } - - xcb_render_picture_t pic_id = xcb_generate_id(QX11Info::connection()); - xcb_render_create_picture_aux(QX11Info::connection(), pic_id, pix, get_pictformat() , 0, NULL); - // - xcb_render_composite(QX11Info::connection(), hastransparency ? XCB_RENDER_PICT_OP_OVER : XCB_RENDER_PICT_OP_SRC, pic_id, XCB_RENDER_PICTURE_NONE, widget->x11RenderHandle(), - 0, 0, 0, 0, 0, 0, (uint16_t) widget->width(), (uint16_t) widget->height() ); -}*/ - -#define CLIENT_EVENT_MASK (XCB_EVENT_MASK_PROPERTY_CHANGE | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_FOCUS_CHANGE | \ - XCB_EVENT_MASK_POINTER_MOTION) - -#define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ - XCB_EVENT_MASK_BUTTON_RELEASE | \ - XCB_EVENT_MASK_POINTER_MOTION | \ - XCB_EVENT_MASK_EXPOSURE | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ - XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_ENTER_WINDOW) - -inline void registerClientEvents(WId id, bool client = true){ - uint32_t values[] = {XCB_NONE}; - values[0] = client ? CLIENT_EVENT_MASK : FRAME_EVENT_MASK ; - /*{ (XCB_EVENT_MASK_PROPERTY_CHANGE - | XCB_EVENT_MASK_BUTTON_PRESS - | XCB_EVENT_MASK_BUTTON_RELEASE - | XCB_EVENT_MASK_POINTER_MOTION - | XCB_EVENT_MASK_BUTTON_MOTION - | XCB_EVENT_MASK_EXPOSURE - | XCB_EVENT_MASK_STRUCTURE_NOTIFY - | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT - | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY - | XCB_EVENT_MASK_ENTER_WINDOW) - };*/ - xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, values); -} - -// ============ -// PRIVATE -// ============ -//Simplification functions for the XCB/XLib interactions -void NativeEmbedWidget::syncWinSize(QSize sz){ - if(WIN==0){ return; } - else if(!sz.isValid()){ sz = this->size(); } //use the current widget size - //qDebug() << "Sync Window Size:" << sz; - //if(sz == winSize){ return; } //no change - QPoint pt(0,0); - if(!DISABLE_COMPOSITING){ pt = this->mapToGlobal(QPoint(0,0)); } - const uint32_t valList[4] = {(uint32_t) pt.x(), (uint32_t) pt.y(), (uint32_t) sz.width(), (uint32_t) sz.height()}; - const uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; - xcb_configure_window(QX11Info::connection(), WIN->id(), mask, valList); - winSize = sz; //save this for checking later -} - -void NativeEmbedWidget::syncWidgetSize(QSize sz){ - //qDebug() << "Sync Widget Size:" << sz; - this->resize(sz); -} - -void NativeEmbedWidget::hideWindow(){ - //qDebug() << "Hide Embed Window"; - xcb_unmap_window(QX11Info::connection(), WIN->id()); -} - -void NativeEmbedWidget::showWindow(){ - //qDebug() << "Show Embed Window"; - xcb_map_window(QX11Info::connection(), WIN->id()); - reregisterEvents(); - if(!DISABLE_COMPOSITING){ - QTimer::singleShot(0,this, SLOT(repaintWindow())); - } -} - -QImage NativeEmbedWidget::windowImage(QRect geom){ - //if(DISABLE_COMPOSITING){ - if(!this->isVisible()){ return QImage(); } //nothing to grab yet - QList screens = static_cast( QApplication::instance() )->screens(); - //for(int i=0; icontains(this)){ - if(!screens.isEmpty()){ - return screens[0]->grabWindow(WIN->id(), geom.x(), geom.y(), geom.width(), geom.height()).toImage(); - } - //} - //} - return QImage(); - /*}else{ - //Pull the XCB pixmap out of the compositing layer - xcb_pixmap_t pix = xcb_generate_id(QX11Info::connection()); - xcb_composite_name_window_pixmap(QX11Info::connection(), WIN->id(), pix); - if(pix==0){ qDebug() << "Got blank pixmap!"; return QImage(); } - - //Convert this pixmap into a QImage - //xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, 0, 0, this->width(), this->height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); - xcb_image_t *ximg = xcb_image_get(QX11Info::connection(), pix, geom.x(), geom.y(), geom.width(), geom.height(), ~0, XCB_IMAGE_FORMAT_Z_PIXMAP); - if(ximg == 0){ qDebug() << "Got blank image!"; return QImage(); } - QImage img(ximg->data, ximg->width, ximg->height, ximg->stride, QImage::Format_ARGB32_Premultiplied); - img = img.copy(); //detach this image from the XCB data structures before we clean them up, otherwise the QImage will try to clean it up a second time on window close and crash - xcb_image_destroy(ximg); - - //Cleanup the XCB data structures - xcb_free_pixmap(QX11Info::connection(), pix); - - return img; - }*/ -} -void NativeEmbedWidget::setWinUnpaused(){ - paused = false; - winImage = QImage(); - if(!DISABLE_COMPOSITING){ - repaintWindow(); //update the cached image right away - }else if(this->isVisible()){ - showWindow(); - } - resyncWindow(); //make sure the window knows about the new location -} -// ============ -// PUBLIC -// ============ -NativeEmbedWidget::NativeEmbedWidget(QWidget *parent) : QWidget(parent){ - WIN = 0; //nothing embedded yet - paused = false; - this->setMouseTracking(true); - //this->setSizeIncrement(2,2); -} - -bool NativeEmbedWidget::embedWindow(NativeWindow *window){ - WIN = window; - - //Now send the embed event to the app - //qDebug() << " - send _XEMBED event"; - /*xcb_client_message_event_t event; - event.response_type = XCB_CLIENT_MESSAGE; - event.format = 32; - event.window = WIN->id(); - event.type = obj->ATOMS["_XEMBED"]; //_XEMBED - event.data.data32[0] = XCB_TIME_CURRENT_TIME; //CurrentTime; - event.data.data32[1] = 0; //XEMBED_EMBEDDED_NOTIFY - event.data.data32[2] = 0; - event.data.data32[3] = this->winId(); //WID of the container - event.data.data32[4] = 0; - - xcb_send_event(QX11Info::connection(), 0, WIN->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); - */ - //Now setup any redirects and return - if(!DISABLE_COMPOSITING){ - xcb_composite_redirect_window(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_MANUAL); //XCB_COMPOSITE_REDIRECT_[MANUAL/AUTOMATIC]); - xcb_composite_redirect_subwindows(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_MANUAL); //AUTOMATIC); //XCB_COMPOSITE_REDIRECT_[MANUAL/AUTOMATIC]); - - //Now create/register the damage handler - // -- XCB (Note: The XCB damage registration is completely broken at the moment - 9/15/15, Ken Moore) - // -- Retested 6/29/17 (no change) Ken Moore - //xcb_damage_damage_t dmgID = xcb_generate_id(QX11Info::connection()); //This is a typedef for a 32-bit unsigned integer - //xcb_damage_create(QX11Info::connection(), dmgID, WIN->id(), XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES); - // -- XLib (Note: This is only used because the XCB routine above does not work - needs to be fixed upstream in XCB itself). - Damage dmgID = XDamageCreate(QX11Info::display(), WIN->id(), XDamageReportRawRectangles); - - WIN->addDamageID( (uint) dmgID); //save this for later - connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change - }else{ - xcb_reparent_window(QX11Info::connection(), WIN->id(), this->winId(), 0, 0); - registerClientEvents(this->winId()); //child events get forwarded through the frame - watch this for changes too - //Also use a partial-composite here - make sure the window pixmap is available even when the window is obscured - xcb_composite_redirect_window(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_AUTOMATIC); - //xcb_composite_redirect_subwindows(QX11Info::connection(), WIN->id(), XCB_COMPOSITE_REDIRECT_MANUAL); - //Also alert us when the window visual changes - Damage dmgID = XDamageCreate(QX11Info::display(), WIN->id(), XDamageReportRawRectangles); - - WIN->addDamageID( (uint) dmgID); //save this for later - connect(WIN, SIGNAL(VisualChanged()), this, SLOT(repaintWindow()) ); //make sure we repaint the widget on visual change - } - WIN->addFrameWinID(this->winId()); - registerClientEvents(WIN->id()); - //qDebug() << "Events Registered:" << WIN->id() << this->winId(); - return true; -} - -bool NativeEmbedWidget::detachWindow(){ - xcb_reparent_window(QX11Info::connection(), WIN->id(), QX11Info::appRootWindow(), -1, -1); - //WIN = 0; - return true; -} - -bool NativeEmbedWidget::isEmbedded(){ - return (WIN!=0); -} - -void NativeEmbedWidget::raiseWindow(){ - if(DISABLE_COMPOSITING){ return; } - uint32_t val = XCB_STACK_MODE_ABOVE; - xcb_configure_window(QX11Info::connection(), WIN->id(), XCB_CONFIG_WINDOW_STACK_MODE, &val); -} - -void NativeEmbedWidget::lowerWindow(){ - if(DISABLE_COMPOSITING){ return; } - uint32_t val = XCB_STACK_MODE_BELOW; - xcb_configure_window(QX11Info::connection(), WIN->id(), XCB_CONFIG_WINDOW_STACK_MODE, &val); -} - -// ============== -// PUBLIC SLOTS -// ============== -//Pause/resume -void NativeEmbedWidget::pause(){ - if(DISABLE_COMPOSITING){ - winImage = windowImage(QRect(QPoint(0,0), this->size())); - hideWindow(); - }else{ - if(winImage.isNull()){ repaintWindow(); } //make sure we have one image already cached first - } - paused = true; -} - -void NativeEmbedWidget::resume(){ - //paused = false; - syncWinSize(); - if(DISABLE_COMPOSITING){ - //showWindow(); - }else{ - repaintWindow(); //update the cached image right away - } - QTimer::singleShot(10, this, SLOT(setWinUnpaused()) ); -} - -void NativeEmbedWidget::resyncWindow(){ - if(WIN==0){ return; } - //syncWinSize(); - //if(DISABLE_COMPOSITING){ - // Specs say to send an artificial configure event to the window if the window was reparented into the frame - QPoint loc = this->mapToGlobal( QPoint(0,0) ); - //Send an artificial configureNotify event to the window with the global position/size included - xcb_configure_notify_event_t *event = (xcb_configure_notify_event_t*) calloc(32,1); //always 32-byes long, even if we don't need all of it - event->x = loc.x(); - event->y = loc.y(); - event->width = this->width(); - event->height = this->height(); - event->border_width = 0; - event->above_sibling = XCB_NONE; - event->override_redirect = false; - event->window = WIN->id(); - event->event = WIN->id(); - event->response_type = XCB_CONFIGURE_NOTIFY; - xcb_send_event(QX11Info::connection(), false, WIN->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, (char *) event); - xcb_flush(QX11Info::connection()); - free(event); - /*}else{ - //Window is floating invisibly - make sure it is in the right place - //Make sure the window size is syncronized and visual up to date - //syncWinSize(); - QTimer::singleShot(10, this, SLOT(repaintWindow()) ); - }*/ - -} - -void NativeEmbedWidget::repaintWindow(){ - //if(DISABLE_COMPOSITING){ return; } - //qDebug() << "Update Window Image:" << !paused; - if(paused){ return; } - /*QImage tmp = windowImage( QRect(QPoint(0,0), this->size()) ); - if(!tmp.isNull()){ - winImage = tmp; - }else{ qDebug() << "Got Null Image!!"; }*/ - this->parentWidget()->update(); //visual changed - need to update the image on the widget -} - -void NativeEmbedWidget::reregisterEvents(){ - if(WIN!=0){ registerClientEvents(WIN->id()); } -} - -// ============== -// PROTECTED -// ============== -void NativeEmbedWidget::resizeEvent(QResizeEvent *ev){ - QWidget::resizeEvent(ev); - if(WIN!=0 && !paused){ - syncWinSize(ev->size()); - } //syncronize the window with the new widget size -} - -void NativeEmbedWidget::showEvent(QShowEvent *ev){ - if(WIN!=0){ showWindow(); } - QWidget::showEvent(ev); -} - -void NativeEmbedWidget::hideEvent(QHideEvent *ev){ - if(WIN!=0){ hideWindow(); } - QWidget::hideEvent(ev); -} - -void NativeEmbedWidget::paintEvent(QPaintEvent *ev){ - QPainter P(this); - P.setClipping(true); - P.setClipRect(0,0,this->width(), this->height()); - P.fillRect(ev->rect(), Qt::transparent); - if(WIN==0){ return; } - QRect geom = ev->rect(); //atomic updates - //qDebug() << "Paint Rect:" << geom; - QImage img; - if(!paused){ img = windowImage(geom); } - else if(!winImage.isNull()){ - if(winImage.size() == this->size()){ img = winImage.copy(geom); } - else{ img = winImage.scaled(geom.size()); } //this is a fast transformation - might be slightly distorted - } - //Need to paint the image from the window onto the widget as an overlay - P.drawImage( geom , img, QRect(QPoint(0,0), img.size()), Qt::NoOpaqueDetection); //1-to-1 mapping - - -} - -void NativeEmbedWidget::enterEvent(QEvent *ev){ - QWidget::enterEvent(ev); - //qDebug() << "Enter Embed Widget"; - //raiseWindow(); //this->grabMouse(); -} - -void NativeEmbedWidget::leaveEvent(QEvent *ev){ - QWidget::leaveEvent(ev); - /*qDebug() << "Leave Embed Widget"; - QPoint pt = QCursor::pos(); - QPoint relpt = this->parentWidget()->mapFromGlobal(pt); - qDebug() << " - Geom:" << this->geometry() << "Global pt:" << pt << "Relative pt:" << relpt; - if(!this->geometry().contains(relpt) ){ lowerWindow(); }*/ -} - -void NativeEmbedWidget::mouseMoveEvent(QMouseEvent *ev){ - QWidget::mouseMoveEvent(ev); - //Forward this event on to the window -} - -void NativeEmbedWidget::mousePressEvent(QMouseEvent *ev){ - QWidget::mousePressEvent(ev); - //Forward this event on to the window -} - -void NativeEmbedWidget::mouseReleaseEvent(QMouseEvent *ev){ - QWidget::mouseReleaseEvent(ev); - //Forward this event on to the window -} - -/*bool NativeEmbedWidget::nativeEvent(const QByteArray &eventType, void *message, long *result){ - if(eventType=="xcb_generic_event_t" && WIN!=0){ - //Convert to known event type (for X11 systems) - xcb_generic_event_t *ev = static_cast(message); - //qDebug() << "Got Embed Window Event:" << xcb_event_get_label(ev->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) << xcb_event_get_request_label(ev->response_type); - uint32_t mask = 0; - switch( ev->response_type & XCB_EVENT_RESPONSE_TYPE_MASK){ - case XCB_BUTTON_PRESS: - //This is a mouse button press - mask = XCB_EVENT_MASK_BUTTON_PRESS; - break; - case XCB_BUTTON_RELEASE: - //This is a mouse button release - //qDebug() << "Button Release Event"; - mask = XCB_EVENT_MASK_BUTTON_RELEASE; - break; - case XCB_MOTION_NOTIFY: - //This is a mouse movement event - mask = XCB_EVENT_MASK_POINTER_MOTION; - break; - case XCB_ENTER_NOTIFY: - //This is a mouse movement event when mouse goes over a new window - mask = XCB_EVENT_MASK_ENTER_WINDOW; - break; - case XCB_LEAVE_NOTIFY: - //This is a mouse movement event when mouse goes leaves a window - mask = XCB_EVENT_MASK_LEAVE_WINDOW; - break; - default: - mask = 0; - } - - //Now forward this event on to the embedded window - if(mask!=0){ - qDebug() << " - Got a mouse event"; - xcb_send_event(QX11Info::connection(), true, WIN->id(),mask, (char*) ev); - return true; - } - } - return false; -}*/ diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h deleted file mode 100644 index 16bb46dc..00000000 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ /dev/null @@ -1,74 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is a container object for embedding a native window into a QWidget -// and maintaining a 1-to-1 mapping of sizing and other properties -// while also providing compositing effects between the two windows -//=========================================== -#ifndef _LUMINA_NATIVE_EMBED_WIDGET_H -#define _LUMINA_NATIVE_EMBED_WIDGET_H - -#include "NativeWindow.h" -#include -#include -#include -#include -#include -#include -#include - -class NativeEmbedWidget : public QWidget{ - Q_OBJECT -private: - NativeWindow *WIN; - QSize winSize; - QImage winImage; - bool paused, hasAlphaChannel; - -private slots: - //Simplification functions - void syncWinSize(QSize sz = QSize()); - void syncWidgetSize(QSize sz); - void hideWindow(); - void showWindow(); - QImage windowImage(QRect geom); - - void setWinUnpaused(); - -public: - NativeEmbedWidget(QWidget *parent); - - bool embedWindow(NativeWindow *window); - bool detachWindow(); - bool isEmbedded(); //status of the embed - bool isPaused(){ return paused; } - -public slots: - void raiseWindow(); - void lowerWindow(); - - //Pause/resume - void pause(); - void resume(); - - void resyncWindow(); - void repaintWindow(); - void reregisterEvents(); - -protected: - void resizeEvent(QResizeEvent *ev); - void showEvent(QShowEvent *ev); - void hideEvent(QHideEvent *ev); - void paintEvent(QPaintEvent *ev); - void enterEvent(QEvent *ev); - void leaveEvent(QEvent *ev); - void mouseMoveEvent(QMouseEvent *ev); - void mousePressEvent(QMouseEvent *ev); - void mouseReleaseEvent(QMouseEvent *ev); - //bool nativeEvent(const QByteArray &eventType, void *message, long *result); -}; - -#endif diff --git a/src-qt5/core/libLumina/NativeEventFilter.cpp b/src-qt5/core/libLumina/NativeEventFilter.cpp deleted file mode 100644 index c13c1fc8..00000000 --- a/src-qt5/core/libLumina/NativeEventFilter.cpp +++ /dev/null @@ -1,300 +0,0 @@ -//=========================================== -// Lumina-desktop source code -// Copyright (c) 2015-2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "NativeEventFilter.h" -#include -#include - -//#include -//#include - -//================================================== -// NOTE: All the XCB interactions and atoms are accessed via: -// obj->XCB->EWMH.(atom name) -// obj->XCB->(do something) -//================================================== - -/* -List of XCB response types (since almost impossible to find good docs on XCB) -switch (xcb_generic_event_t*->response_type & ~0x80) -case values: -XCB_KEY_[PRESS | RELEASE] -XCB_BUTTON_[PRESS | RELEASE] -XCB_MOTION_NOTIFY -XCB_ENTER_NOTIFY -XCB_LEAVE_NOTIFY -XCB_FOCUS_[IN | OUT] -XCB_KEYMAP_NOTIFY -XCB_EXPOSE -XCB_GRAPHICS_EXPOSURE -XCB_VISIBILITY_NOTIFY -XCB_CREATE_NOTIFY -XCB_DESTROY_NOTIFY -XCB_UNMAP_NOTIFY -XCB_MAP_[NOTIFY | REQUEST] -XCB_REPARENT_NOTIFY -XCB_CONFIGURE_[NOTIFY | REQUEST] -XCB_GRAVITY_NOTIFY -XCB_RESIZE_REQUEST -XCB_CIRCULATE_[NOTIFY | REQUEST] -XCB_PROPERTY_NOTIFY -XCB_SELECTION_[CLEAR | REQUEST | NOTIFY] -XCB_COLORMAP_NOTIFY -XCB_CLIENT_MESSAGE -*/ - -//SYSTEM TRAY STANDARD DEFINITIONS -#define SYSTEM_TRAY_REQUEST_DOCK 0 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2 - -//#include -#include -#include -#include -#include - -#define DEBUG 0 - -//Special objects/variables for XCB parsing -static xcb_ewmh_connection_t EWMH; -//static LXCB *XCB = 0; -static xcb_atom_t _NET_SYSTEM_TRAY_OPCODE = 0; - -inline void ParsePropertyEvent(xcb_property_notify_event_t *ev, NativeEventFilter *obj){ - //qDebug() << "Got Property Event:" << ev->window << ev->atom; - NativeWindow::Property prop = NativeWindow::None; - //Now determine which properties are getting changed, and update the native window as appropriate - if(ev->atom == EWMH._NET_WM_NAME){ prop = NativeWindow::Title; } - else if(ev->atom == EWMH._NET_WM_ICON){ prop = NativeWindow::Icon; } - else if(ev->atom == EWMH._NET_WM_ICON_NAME){ prop = NativeWindow::ShortTitle; } - else if(ev->atom == EWMH._NET_WM_DESKTOP){ prop = NativeWindow::Workspace; } - else if(ev->atom == EWMH._NET_WM_WINDOW_TYPE ){ prop = NativeWindow::WinTypes; } - else if( ev->atom == EWMH._NET_WM_STATE){ prop = NativeWindow::States; } - //Send out the signal if necessary - if(prop!=NativeWindow::None){ - //if(DEBUG){ - //qDebug() << "Detected Property Change:" << ev->window << prop; - //} - obj->emit WindowPropertyChanged(ev->window, prop); - }else{ - //Quick re-check of the simple properties (nothing like the icon or other graphics) - obj->emit WindowPropertiesChanged(ev->window, QList() << NativeWindow::Title - << NativeWindow::ShortTitle << NativeWindow::Workspace ); - //qDebug() << "Unknown Property Change:" << ev->window << ev->atom; - } -} - -inline void ParseClientMessageEvent(xcb_client_message_event_t *ev, NativeEventFilter *obj){ - NativeWindow::Property prop = NativeWindow::None; - QVariant val; - if(ev->type==EWMH._NET_WM_NAME){ prop = NativeWindow::Title; } - else if(ev->type==EWMH._NET_WM_ICON){ prop = NativeWindow::Icon; } - else if(ev->type==EWMH._NET_WM_ICON_NAME){ prop = NativeWindow::ShortTitle; } - else if(ev->type==EWMH._NET_WM_DESKTOP){ - prop = NativeWindow::Workspace; - val = QVariant( (int) ev->data.data32[0] ); - }else if(ev->type==EWMH._NET_WM_WINDOW_TYPE){ prop = NativeWindow::WinTypes; } - else if(ev->type==EWMH._NET_WM_STATE){ prop = NativeWindow::States; } - - if(prop!=NativeWindow::None){ - //if(DEBUG){ - qDebug() << "Detected Property Change Request:" << ev->window << prop; //} - if(val.isNull()){ obj->emit WindowPropertyChanged(ev->window, prop); } - else{ obj->emit RequestWindowPropertyChange(ev->window, prop, val); } - } - -} - - -//Constructor for the Event Filter wrapper -NativeEventFilter::NativeEventFilter() : QObject(){ - EF = new EventFilter(this); - if(EWMH.nb_screens <=0){ - xcb_intern_atom_cookie_t *cookie = xcb_ewmh_init_atoms(QX11Info::connection(), &EWMH); - if(!xcb_ewmh_init_atoms_replies(&EWMH, cookie, NULL) ){ - qDebug() << "Error with XCB atom initializations"; - } - } - if(_NET_SYSTEM_TRAY_OPCODE==0){ - //_NET_SYSTEM_TRAY_OPCODE - xcb_intern_atom_cookie_t cookie = xcb_intern_atom(QX11Info::connection(), 0, 23,"_NET_SYSTEM_TRAY_OPCODE"); - xcb_intern_atom_reply_t *r = xcb_intern_atom_reply(QX11Info::connection(), cookie, NULL); - if(r){ - _NET_SYSTEM_TRAY_OPCODE = r->atom; - free(r); - } - } -} - -void NativeEventFilter::start(){ - if(DEBUG){ qDebug() << " - Install event filter..."; } - QCoreApplication::instance()->installNativeEventFilter(EF); - if(DEBUG){ qDebug() << " - Run request check..."; } - -} - -void NativeEventFilter::stop(){ - QCoreApplication::instance()->installNativeEventFilter(0); -} - -//============================= -// EventFilter Class -//============================= - -//Constructor for the XCB event filter -EventFilter::EventFilter(NativeEventFilter *parent) : QAbstractNativeEventFilter(){ - obj = parent; -} - -//This function format taken directly from the Qt5.3 documentation -bool EventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *){ - //qDebug() << "New Event"; - if(eventType=="xcb_generic_event_t"){ - //Convert to known event type (for X11 systems) - xcb_generic_event_t *ev = static_cast(message); - //Now parse the event and emit signals as necessary - switch( ev->response_type & ~0x80){ -//============================== -// INTERACTIVITY EVENTS -//============================== - case XCB_KEY_PRESS: - //This is a keyboard key press - //qDebug() << "Key Press Event" - obj->emit KeyPressed( ((xcb_key_press_event_t *) ev)->detail, ((xcb_key_press_event_t *) ev)->root ); - break; - case XCB_KEY_RELEASE: - //This is a keyboard key release - //qDebug() << "Key Release Event"; - obj->emit KeyReleased( ((xcb_key_release_event_t *) ev)->detail, ((xcb_key_release_event_t *) ev)->root ); - break; - case XCB_BUTTON_PRESS: - //This is a mouse button press - //qDebug() << "Button Press Event"; - obj->emit MousePressed( ((xcb_button_press_event_t *) ev)->detail, ((xcb_button_press_event_t *) ev)->root ); - break; - case XCB_BUTTON_RELEASE: - //This is a mouse button release - //qDebug() << "Button Release Event"; - obj->emit MouseReleased( ((xcb_button_release_event_t *) ev)->detail, ((xcb_button_release_event_t *) ev)->root ); - break; - case XCB_MOTION_NOTIFY: - //This is a mouse movement event - if(DEBUG){ qDebug() << "Motion Notify Event"; } - obj->emit MouseMovement(); - break; - case XCB_ENTER_NOTIFY: - //This is a mouse movement event when mouse goes over a new window - //qDebug() << "Enter Notify Event"; - obj->emit MouseEnterWindow( ((xcb_enter_notify_event_t *) ev)->root ); - break; - case XCB_LEAVE_NOTIFY: - //This is a mouse movement event when mouse goes leaves a window - //qDebug() << "Leave Notify Event"; - obj->emit MouseLeaveWindow( ((xcb_leave_notify_event_t *) ev)->root ); - break; -//============================== - case XCB_EXPOSE: - //qDebug() << "Expose Notify Event:"; - //qDebug() << " - Given Window:" << ((xcb_property_notify_event_t*)ev)->window; - break; -//============================== - case XCB_MAP_NOTIFY: - //qDebug() << "Window Map Event:" << ((xcb_map_notify_event_t *)ev)->window; - obj->emit WindowPropertyChanged( ((xcb_map_notify_event_t *)ev)->window, NativeWindow::Visible, true); - break; //This is just a notification that a window was mapped - nothing needs to change here - case XCB_MAP_REQUEST: - //qDebug() << "Window Map Request Event"; - obj->emit WindowCreated( ((xcb_map_request_event_t *) ev)->window ); - break; -//============================== - case XCB_CREATE_NOTIFY: - //qDebug() << "Window Create Event"; - break; -//============================== - case XCB_UNMAP_NOTIFY: - //qDebug() << "Window Unmap Event:" << ((xcb_unmap_notify_event_t *)ev)->window; - obj->emit WindowPropertyChanged( ((xcb_map_notify_event_t *)ev)->window, NativeWindow::Visible, false); - break; -//============================== - case XCB_DESTROY_NOTIFY: - //qDebug() << "Window Closed Event:" << ((xcb_destroy_notify_event_t *)ev)->window; - obj->emit WindowDestroyed( ((xcb_destroy_notify_event_t *) ev)->window ); - break; -//============================== - case XCB_FOCUS_IN: - //qDebug() << "Focus In Event:"; - break; -//============================== - case XCB_FOCUS_OUT: - //qDebug() << "Focus Out Event:"; - break; -//============================== - case XCB_PROPERTY_NOTIFY: - //qDebug() << "Property Notify Event:"; - ParsePropertyEvent((xcb_property_notify_event_t*)ev, obj); - break; -//============================== - case XCB_CLIENT_MESSAGE: - //qDebug() << "Client Message Event"; - //qDebug() << " - Given Window:" << ((xcb_client_message_event_t*)ev)->window; - if( ((xcb_client_message_event_t*)ev)->type == _NET_SYSTEM_TRAY_OPCODE && ((xcb_client_message_event_t*)ev)->format == 32){ - //data32[0] is timestamp, [1] is opcode, [2] is window handle - if(SYSTEM_TRAY_REQUEST_DOCK == ((xcb_client_message_event_t*)ev)->data.data32[1]){ - obj->emit TrayWindowCreated( ((xcb_client_message_event_t*)ev)->data.data32[2] ); - //addTrayApp( ((xcb_client_message_event_t*)ev)->data.data32[2] ); - } - //Ignore the System Tray messages at the moment - }else if(((xcb_client_message_event_t*)ev)->window != QX11Info::appRootWindow()){ - ParseClientMessageEvent((xcb_client_message_event_t*)ev, obj); - } - break; -//============================== - case XCB_CONFIGURE_NOTIFY: - //qDebug() << "Configure Notify Event"; - /*obj->emit WindowPropertiesChanged( ((xcb_configure_notify_event_t*)ev)->window, - QList() << NativeWindow::GlobalPos << NativeWindow::Size, - QList() << QPoint(((xcb_configure_notify_event_t*)ev)->x, ((xcb_configure_notify_event_t*)ev)->y) << - QSize(((xcb_configure_notify_event_t*)ev)->width, ((xcb_configure_notify_event_t*)ev)->height) );*/ - obj->emit WindowPropertyChanged( ((xcb_configure_notify_event_t*)ev)->window, NativeWindow::Size, - QSize(((xcb_configure_notify_event_t*)ev)->width, ((xcb_configure_notify_event_t*)ev)->height) ); - break; -//============================== - case XCB_CONFIGURE_REQUEST: - //qDebug() << "Configure Request Event"; - obj->emit RequestWindowPropertiesChange( ((xcb_configure_request_event_t*)ev)->window, - QList() << NativeWindow::GlobalPos << NativeWindow::Size, - QList() << QPoint(((xcb_configure_request_event_t*)ev)->x, ((xcb_configure_request_event_t*)ev)->y) << - QSize(((xcb_configure_request_event_t*)ev)->width, ((xcb_configure_request_event_t*)ev)->height) ); - break; -//============================== - case XCB_RESIZE_REQUEST: - //qDebug() << "Resize Request Event"; - obj->emit RequestWindowPropertyChange( ((xcb_resize_request_event_t*)ev)->window, - NativeWindow::Size, QSize(((xcb_resize_request_event_t*)ev)->width, ((xcb_resize_request_event_t*)ev)->height) ); - break; -//============================== - case XCB_SELECTION_CLEAR: - //qDebug() << "Selection Clear Event"; - break; -//============================== - case 85: //not sure what event this is - but it seems to come up very often (just hide the notice) - case 0: - case XCB_GE_GENERIC: - break; //generic event - don't do anything special - default: - //if( (ev->response_type & ~0x80)==TrayDmgID){ - obj->emit PossibleDamageEvent( ((xcb_damage_notify_event_t*)ev)->drawable ); - //checkDamageID( ((xcb_damage_notify_event_t*)ev)->drawable ); - //}else{ - //qDebug() << "Default Event:" << (ev->response_type & ~0x80); - //} -//============================== - } - } - return false; - //never stop event handling (this will not impact the X events themselves - just the internal Qt application) -} diff --git a/src-qt5/core/libLumina/NativeEventFilter.h b/src-qt5/core/libLumina/NativeEventFilter.h deleted file mode 100644 index a3be3ef1..00000000 --- a/src-qt5/core/libLumina/NativeEventFilter.h +++ /dev/null @@ -1,71 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2012-2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class provides the XCB event handling/registrations that are needed -//=========================================== -#ifndef _LUMINA_DESKTOP_NATIVE_EVENT_FILTER_H -#define _LUMINA_DESKTOP_NATIVE_EVENT_FILTER_H - -#include -#include -#include - -#include "NativeWindow.h" - - -class NativeEventFilter : public QObject{ - Q_OBJECT -private: - QAbstractNativeEventFilter* EF; - WId WMFlag; //used to flag a running WM process - -public: - NativeEventFilter(); - ~NativeEventFilter(){} - - void start(); - void stop(); - -signals: - //Window Signals - void WindowCreated(WId); - void WindowDestroyed(WId); - void WindowPropertyChanged(WId, NativeWindow::Property); - void WindowPropertiesChanged(WId, QList); - void WindowPropertyChanged(WId, NativeWindow::Property, QVariant); - void WindowPropertiesChanged(WId, QList, QList); - void RequestWindowPropertyChange(WId, NativeWindow::Property, QVariant); - void RequestWindowPropertiesChange(WId, QList, QList); - - //System Tray Signals - void TrayWindowCreated(WId); - void TrayWindowDestroyed(WId); - - //Miscellaneos Signals - void PossibleDamageEvent(WId); - - //Input Event Signals - void KeyPressed(int, WId); - void KeyReleased(int, WId); - void MousePressed(int, WId); - void MouseReleased(int, WId); - void MouseMovement(); - void MouseEnterWindow(WId); - void MouseLeaveWindow(WId); -}; - -class EventFilter : public QAbstractNativeEventFilter{ -public: - EventFilter(NativeEventFilter *parent); - ~EventFilter(){} - - virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *); - -private: - NativeEventFilter *obj; -}; - -#endif diff --git a/src-qt5/core/libLumina/NativeKeyToQt.cpp b/src-qt5/core/libLumina/NativeKeyToQt.cpp deleted file mode 100644 index 06056be7..00000000 --- a/src-qt5/core/libLumina/NativeKeyToQt.cpp +++ /dev/null @@ -1,528 +0,0 @@ - -#include - -#include -#include - -// XCB/X11 Includes -#define XK_MISCELLANY -#define XK_XKB_KEYS -#define XK_LATIN1 -#define XK_LATIN2 -#define XK_LATIN3 -#define XK_LATIN4 -#define XK_LATIN8 -#define XK_LATIN9 -//NOTE: Look at the keysymdef.h file for additional define/characters which we may need later -#include -#include - - -//Small simplification functions -Qt::Key NativeWindowSystem::KeycodeToQt(int keycode){ - static xcb_key_symbols_t *SYM = 0; - if(SYM==0){ SYM = xcb_key_symbols_alloc(QX11Info::connection()); } - xcb_keysym_t symbol = xcb_key_symbols_get_keysym(SYM, keycode,0); - //not sure about the "column" input - we want raw keys though so ignore the "modified" key states (columns) for now - //qDebug() << "Try to convert keycode to Qt::Key:" << keycode << symbol; - //Now map this symbol to the appropriate Qt::Key enumeration - switch(symbol){ - //FUNCTION KEYS - case XK_F1: return Qt::Key_F1; - case XK_F2: return Qt::Key_F2; - case XK_F3: return Qt::Key_F3; - case XK_F4: return Qt::Key_F4; - case XK_F5: return Qt::Key_F5; - case XK_F6: return Qt::Key_F6; - case XK_F7: return Qt::Key_F7; - case XK_F8: return Qt::Key_F8; - case XK_F9: return Qt::Key_F9; - case XK_F10: return Qt::Key_F10; - case XK_F11: return Qt::Key_F11; - case XK_F12: return Qt::Key_F12; - case XK_F13: return Qt::Key_F13; - case XK_F14: return Qt::Key_F14; - case XK_F15: return Qt::Key_F15; - case XK_F16: return Qt::Key_F16; - case XK_F17: return Qt::Key_F17; - case XK_F18: return Qt::Key_F18; - case XK_F19: return Qt::Key_F19; - case XK_F20: return Qt::Key_F20; - case XK_F21: return Qt::Key_F21; - case XK_F22: return Qt::Key_F22; - case XK_F23: return Qt::Key_F23; - case XK_F24: return Qt::Key_F24; - case XK_F25: return Qt::Key_F25; - case XK_F26: return Qt::Key_F26; - case XK_F27: return Qt::Key_F27; - case XK_F28: return Qt::Key_F28; - case XK_F29: return Qt::Key_F29; - case XK_F30: return Qt::Key_F30; - case XK_F31: return Qt::Key_F31; - case XK_F32: return Qt::Key_F32; - case XK_F33: return Qt::Key_F33; - case XK_F34: return Qt::Key_F34; - case XK_F35: return Qt::Key_F35; - //Miscellaneous Keys - case XK_BackSpace: return Qt::Key_Backspace; - case XK_Delete: return Qt::Key_Delete; - //case XK_LineFeed: return Qt::Key_Backspace; - case XK_Clear: return Qt::Key_Clear; - case XK_Return: return Qt::Key_Return; - case XK_Pause: return Qt::Key_Pause; - case XK_Scroll_Lock: return Qt::Key_ScrollLock; - case XK_Sys_Req: return Qt::Key_SysReq; - case XK_Escape: return Qt::Key_Escape; - case XK_Select: return Qt::Key_Select; - case XK_Print: return Qt::Key_Print; - //case XK_Execute: return Qt::Key_Execute; - case XK_Insert: return Qt::Key_Insert; - case XK_Undo: return Qt::Key_Undo; - case XK_Redo: return Qt::Key_Redo; - case XK_Menu: return Qt::Key_Menu; - case XK_Find: return Qt::Key_Find; - case XK_Cancel: return Qt::Key_Cancel; - case XK_Help: return Qt::Key_Help; - //case XK_Break: return Qt::Key_Break; - //case XK_Mode_switch: return Qt::Key_Backspace; - //case XK_script_switch: return Qt::Key_Backspace; - case XK_Num_Lock: return Qt::Key_NumLock; - //Cursor Controls - case XK_Home: return Qt::Key_Home; - case XK_Left: return Qt::Key_Left; - case XK_Up: return Qt::Key_Up; - case XK_Right: return Qt::Key_Right; - case XK_Down: return Qt::Key_Down; - //case XK_Prior: return Qt::Key_Backspace; - case XK_Page_Up: return Qt::Key_PageUp; - case XK_Page_Down: return Qt::Key_PageDown; - //case XK_Next: return Qt::Key_Backspace; - case XK_End: return Qt::Key_End; - //case XK_Begin: return Qt::Key_Backspace; - // Keypad Functions and numbers - case XK_KP_Space: return Qt::Key_Space; - case XK_KP_Tab: return Qt::Key_Tab; - case XK_KP_Enter: return Qt::Key_Enter; - case XK_KP_F1: return Qt::Key_F1; - case XK_KP_F2: return Qt::Key_F2; - case XK_KP_F3: return Qt::Key_F3; - case XK_KP_F4: return Qt::Key_F4; - case XK_KP_Home: return Qt::Key_Home; - case XK_KP_Left: return Qt::Key_Left; - case XK_KP_Up: return Qt::Key_Up; - case XK_KP_Right: return Qt::Key_Right; - case XK_KP_Down: return Qt::Key_Down; - //case XK_KP_Prior: return Qt::Key_ - case XK_KP_Page_Up: return Qt::Key_PageUp; - //case XK_KP_Next: return Qt::Key_ - case XK_KP_Page_Down: return Qt::Key_PageDown; - case XK_KP_End: return Qt::Key_End; - //case XK_KP_Begin: return Qt::Key_ - case XK_KP_Insert: return Qt::Key_Insert; - case XK_KP_Delete: return Qt::Key_Delete; - case XK_KP_Equal: return Qt::Key_Equal; - case XK_KP_Multiply: return Qt::Key_Asterisk; - case XK_KP_Add: return Qt::Key_Plus; - case XK_KP_Separator: return Qt::Key_Comma; //X11 definitions say this is often comma - case XK_KP_Subtract: return Qt::Key_Minus; - case XK_KP_Decimal: return Qt::Key_Period; - case XK_KP_Divide: return Qt::Key_Slash; - case XK_KP_0: return Qt::Key_0; - case XK_KP_1: return Qt::Key_1; - case XK_KP_2: return Qt::Key_2; - case XK_KP_3: return Qt::Key_3; - case XK_KP_4: return Qt::Key_4; - case XK_KP_5: return Qt::Key_5; - case XK_KP_6: return Qt::Key_6; - case XK_KP_7: return Qt::Key_7; - case XK_KP_8: return Qt::Key_8; - case XK_KP_9: return Qt::Key_9; - // Modifier Keys - case XK_Shift_L: return Qt::Key_Shift; - case XK_Shift_R: return Qt::Key_Shift; - case XK_Control_L: return Qt::Key_Control; - case XK_Control_R: return Qt::Key_Control; - case XK_Caps_Lock: return Qt::Key_CapsLock; - //case XK_Shift_Lock: return Qt::Key_ShiftLock; - case XK_Meta_L: return Qt::Key_Meta; - case XK_Meta_R: return Qt::Key_Meta; - case XK_Alt_L: return Qt::Key_Alt; - case XK_Alt_R: return Qt::Key_Alt; - case XK_Super_L: return Qt::Key_Super_L; - case XK_Super_R: return Qt::Key_Super_R; - case XK_Hyper_L: return Qt::Key_Hyper_L; - case XK_Hyper_R: return Qt::Key_Hyper_R; - case XK_space: return Qt::Key_Space; - case XK_exclam: return Qt::Key_Exclam; - case XK_quotedbl: return Qt::Key_QuoteDbl; - case XK_numbersign: return Qt::Key_NumberSign; - case XK_dollar: return Qt::Key_Dollar; - case XK_percent: return Qt::Key_Percent; - case XK_ampersand: return Qt::Key_Ampersand; - case XK_apostrophe: return Qt::Key_Apostrophe; - case XK_parenleft: return Qt::Key_ParenLeft; - case XK_parenright: return Qt::Key_ParenRight; - case XK_asterisk: return Qt::Key_Asterisk; - case XK_plus: return Qt::Key_Plus; - case XK_comma: return Qt::Key_Comma; - case XK_minus: return Qt::Key_Minus; - case XK_period: return Qt::Key_Period; - case XK_slash: return Qt::Key_Slash; - case XK_0: return Qt::Key_0; - case XK_1: return Qt::Key_1; - case XK_2: return Qt::Key_2; - case XK_3: return Qt::Key_3; - case XK_4: return Qt::Key_4; - case XK_5: return Qt::Key_5; - case XK_6: return Qt::Key_6; - case XK_7: return Qt::Key_7; - case XK_8: return Qt::Key_8; - case XK_9: return Qt::Key_9; - case XK_colon: return Qt::Key_Colon; - case XK_semicolon: return Qt::Key_Semicolon; - case XK_less: return Qt::Key_Less; - case XK_equal: return Qt::Key_Equal; - case XK_greater: return Qt::Key_Greater; - case XK_question: return Qt::Key_Question; - case XK_at: return Qt::Key_At; - case XK_A: return Qt::Key_A; - case XK_B: return Qt::Key_B; - case XK_C: return Qt::Key_C; - case XK_D: return Qt::Key_D; - case XK_E: return Qt::Key_E; - case XK_F: return Qt::Key_F; - case XK_G: return Qt::Key_G; - case XK_H: return Qt::Key_H; - case XK_I: return Qt::Key_I; - case XK_J: return Qt::Key_J; - case XK_K: return Qt::Key_K; - case XK_L: return Qt::Key_L; - case XK_M: return Qt::Key_M; - case XK_N: return Qt::Key_N; - case XK_O: return Qt::Key_O; - case XK_P: return Qt::Key_P; - case XK_Q: return Qt::Key_Q; - case XK_R: return Qt::Key_R; - case XK_S: return Qt::Key_S; - case XK_T: return Qt::Key_T; - case XK_U: return Qt::Key_U; - case XK_V: return Qt::Key_V; - case XK_W: return Qt::Key_W; - case XK_X: return Qt::Key_X; - case XK_Y : return Qt::Key_Y; - case XK_Z: return Qt::Key_Z; - case XK_bracketleft: return Qt::Key_BracketLeft; - case XK_backslash: return Qt::Key_Backslash; - case XK_bracketright: return Qt::Key_BracketRight; - case XK_asciicircum: return Qt::Key_AsciiCircum; - case XK_underscore: return Qt::Key_Underscore; - case XK_grave: return Qt::Key_Agrave; - case XK_a: return Qt::Key_A; - case XK_b: return Qt::Key_B; - case XK_c: return Qt::Key_C; - case XK_d: return Qt::Key_D; - case XK_e: return Qt::Key_E; - case XK_f : return Qt::Key_F; - case XK_g: return Qt::Key_G; - case XK_h: return Qt::Key_H; - case XK_i: return Qt::Key_I; - case XK_j: return Qt::Key_J; - case XK_k: return Qt::Key_K; - case XK_l: return Qt::Key_L; - case XK_m: return Qt::Key_M; - case XK_n: return Qt::Key_N; - case XK_o: return Qt::Key_O; - case XK_p: return Qt::Key_P; - case XK_q: return Qt::Key_Q; - case XK_r: return Qt::Key_R; - case XK_s: return Qt::Key_S; - case XK_t : return Qt::Key_T; - case XK_u: return Qt::Key_U; - case XK_v: return Qt::Key_V; - case XK_w: return Qt::Key_W; - case XK_x: return Qt::Key_X; - case XK_y: return Qt::Key_Y; - case XK_z: return Qt::Key_Z; - case XK_braceleft: return Qt::Key_BraceLeft; - case XK_bar: return Qt::Key_Bar; - case XK_braceright: return Qt::Key_BraceRight; - case XK_asciitilde: return Qt::Key_AsciiTilde; - - case XK_nobreakspace: return Qt::Key_nobreakspace; - case XK_exclamdown: return Qt::Key_exclamdown; - case XK_cent: return Qt::Key_cent; - case XK_sterling: return Qt::Key_sterling; - case XK_currency: return Qt::Key_currency; - case XK_yen: return Qt::Key_yen; - case XK_brokenbar: return Qt::Key_brokenbar; - case XK_section: return Qt::Key_section; - case XK_diaeresis: return Qt::Key_diaeresis; - case XK_copyright: return Qt::Key_copyright; - case XK_ordfeminine: return Qt::Key_ordfeminine; - case XK_guillemotleft: return Qt::Key_guillemotleft; - case XK_notsign: return Qt::Key_notsign; - case XK_hyphen: return Qt::Key_hyphen; - case XK_registered: return Qt::Key_registered; - case XK_macron: return Qt::Key_macron; - case XK_degree: return Qt::Key_degree; - case XK_plusminus: return Qt::Key_plusminus; - case XK_twosuperior: return Qt::Key_twosuperior; - case XK_threesuperior: return Qt::Key_threesuperior; - case XK_acute: return Qt::Key_acute; - case XK_mu: return Qt::Key_mu; - case XK_paragraph: return Qt::Key_paragraph; - case XK_periodcentered: return Qt::Key_periodcentered; - case XK_cedilla: return Qt::Key_cedilla; - case XK_onesuperior: return Qt::Key_onesuperior; - case XK_masculine: return Qt::Key_masculine; - case XK_guillemotright: return Qt::Key_guillemotright; - case XK_onequarter: return Qt::Key_onequarter; - case XK_onehalf: return Qt::Key_onehalf; - case XK_threequarters: return Qt::Key_threequarters; - case XK_questiondown: return Qt::Key_questiondown; - case XK_Agrave: return Qt::Key_Agrave; - case XK_Aacute: return Qt::Key_Aacute; - case XK_Acircumflex: return Qt::Key_Acircumflex; - case XK_Atilde: return Qt::Key_Atilde; - case XK_Adiaeresis: return Qt::Key_Adiaeresis; - case XK_Aring: return Qt::Key_Aring; - case XK_AE: return Qt::Key_AE; - case XK_Ccedilla: return Qt::Key_Ccedilla; - case XK_Egrave: return Qt::Key_Egrave; - case XK_Eacute: return Qt::Key_Eacute; - case XK_Ecircumflex: return Qt::Key_Ecircumflex; - case XK_Ediaeresis: return Qt::Key_Ediaeresis; - case XK_Igrave: return Qt::Key_Igrave; - case XK_Iacute: return Qt::Key_Iacute; - case XK_Icircumflex: return Qt::Key_Icircumflex; - case XK_Idiaeresis: return Qt::Key_Idiaeresis; - case XK_ETH: return Qt::Key_ETH; - //case XK_Eth: return Qt::Key_Eth; - case XK_Ntilde: return Qt::Key_Ntilde; - case XK_Ograve: return Qt::Key_Ograve; - case XK_Oacute: return Qt::Key_Oacute; - case XK_Ocircumflex: return Qt::Key_Ocircumflex; - case XK_Otilde: return Qt::Key_Otilde; - case XK_Odiaeresis: return Qt::Key_Odiaeresis; - case XK_multiply: return Qt::Key_multiply; - //case XK_Oslash: return Qt::Key_AsciiTilde; - case XK_Ooblique: return Qt::Key_Ooblique; - case XK_Ugrave: return Qt::Key_Ugrave; - case XK_Uacute: return Qt::Key_Uacute; - case XK_Ucircumflex: return Qt::Key_Ucircumflex; - case XK_Udiaeresis: return Qt::Key_Udiaeresis; - case XK_Yacute: return Qt::Key_Yacute; - case XK_THORN: return Qt::Key_THORN; - //case XK_Thorn: return Qt::Key_AsciiTilde; - case XK_ssharp: return Qt::Key_ssharp; - /*case XK_agrave: return Qt::Key_AsciiTilde; - case XK_aacute: return Qt::Key_AsciiTilde; - case XK_acircumflex: return Qt::Key_AsciiTilde; - case XK_atilde: return Qt::Key_AsciiTilde; - case XK_adiaeresis: return Qt::Key_AsciiTilde; - case XK_aring: return Qt::Key_AsciiTilde; - case XK_ae: return Qt::Key_AsciiTilde; - case XK_ccedilla: return Qt::Key_AsciiTilde; - case XK_egrave: return Qt::Key_AsciiTilde; - case XK_eacute: return Qt::Key_AsciiTilde; - case XK_ecircumflex: return Qt::Key_AsciiTilde; - case XK_ediaeresis: return Qt::Key_AsciiTilde; - case XK_igrave: return Qt::Key_AsciiTilde; - case XK_iacute: return Qt::Key_AsciiTilde; - case XK_icircumflex: return Qt::Key_AsciiTilde; - case XK_idiaeresis: return Qt::Key_AsciiTilde; - case XK_eth: return Qt::Key_AsciiTilde; - case XK_ntilde: return Qt::Key_AsciiTilde; - case XK_ograve: return Qt::Key_AsciiTilde; - case XK_oacute: return Qt::Key_AsciiTilde; - case XK_ocircumflex: return Qt::Key_AsciiTilde; - case XK_otilde: return Qt::Key_AsciiTilde; - case XK_odiaeresis: return Qt::Key_AsciiTilde; - case XK_division: return Qt::Key_AsciiTilde; - case XK_oslash: return Qt::Key_AsciiTilde; - case XK_ooblique: return Qt::Key_AsciiTilde; - case XK_ugrave: return Qt::Key_AsciiTilde; - case XK_uacute: return Qt::Key_AsciiTilde; - case XK_ucircumflex: return Qt::Key_AsciiTilde; - case XK_udiaeresis: return Qt::Key_AsciiTilde; - case XK_yacute: return Qt::Key_AsciiTilde; - case XK_thorn: return Qt::Key_AsciiTilde; - case XK_ydiaeresis: return Qt::Key_AsciiTilde; - - case: XK_Agonek: return Qt::Key_AsciiTilde; - case XK_breve: return Qt::Key_AsciiTilde; - case XK_Lstroke: return Qt::Key_AsciiTilde; - case XK_Lcaron: return Qt::Key_AsciiTilde; - case XK_Sacute: return Qt::Key_AsciiTilde; - case XK_Scaron: return Qt::Key_AsciiTilde; - case XK_Scedilla: return Qt::Key_AsciiTilde; - case XK_Tcaron: return Qt::Key_AsciiTilde; - case XK_Zacute: return Qt::Key_AsciiTilde; - case XK_Zcaron: return Qt::Key_AsciiTilde; - case XK_Zabovedot: return Qt::Key_AsciiTilde; - case XK_aogonek: return Qt::Key_AsciiTilde; - case XK_ogonek: return Qt::Key_AsciiTilde; - case XK_lstroke: return Qt::Key_AsciiTilde; - case XK_lcaron: return Qt::Key_AsciiTilde; - case XK_sacute: return Qt::Key_AsciiTilde; - case XK_caron: return Qt::Key_AsciiTilde; - case XK_scaron: return Qt::Key_AsciiTilde; - case XK_scedilla: return Qt::Key_AsciiTilde; - case XK_tcaron: return Qt::Key_AsciiTilde; - case XK_zacute: return Qt::Key_AsciiTilde; - case XK_doubleacute: return Qt::Key_AsciiTilde; - case XK_zcaron: return Qt::Key_AsciiTilde; - case XK_zabovedot: return Qt::Key_AsciiTilde; - case XK_Racute: return Qt::Key_AsciiTilde; - case XK_Abreve: return Qt::Key_AsciiTilde; - case XK_Lacute: return Qt::Key_AsciiTilde; - case XK_Cacute: return Qt::Key_AsciiTilde; - case XK_Ccaron: return Qt::Key_AsciiTilde; - case XK_Eogonek: return Qt::Key_AsciiTilde; - case XK_Ecaron: return Qt::Key_AsciiTilde; - case XK_Dcaron: return Qt::Key_AsciiTilde; - case XK_Dstroke: return Qt::Key_AsciiTilde; - case XK_Nacute: return Qt::Key_AsciiTilde; - case XK_Ncaron: return Qt::Key_AsciiTilde; - case XK_Odoubleacute: return Qt::Key_AsciiTilde; - case XK_Rcaron: return Qt::Key_AsciiTilde; - case XK_Uring: return Qt::Key_AsciiTilde; - case XK_Udoubleacute: return Qt::Key_AsciiTilde; - case XK_Tcedilla: return Qt::Key_AsciiTilde; - case XK_racute: return Qt::Key_AsciiTilde; - case XK_abreve: return Qt::Key_AsciiTilde; - case XK_lacute: return Qt::Key_AsciiTilde; - case XK_cacute: return Qt::Key_AsciiTilde; - case XK_ccaron: return Qt::Key_AsciiTilde; - case XK_eogonek: return Qt::Key_AsciiTilde; - case XK_ecaron: return Qt::Key_AsciiTilde; - case XK_dcaron: return Qt::Key_AsciiTilde; - case XK_dstroke: return Qt::Key_AsciiTilde; - case XK_nacute: return Qt::Key_AsciiTilde; - case XK_ncaron: return Qt::Key_AsciiTilde; - case XK_odoubleacute: return Qt::Key_AsciiTilde; - case XK_rcaron: return Qt::Key_AsciiTilde; - case XK_uring: return Qt::Key_AsciiTilde; - case XK_udoubleacute: return Qt::Key_AsciiTilde; - case XK_tcedilla: return Qt::Key_AsciiTilde; - case XK_abovedot: return Qt::Key_AsciiTilde; - case XK_Hstroke: return Qt::Key_AsciiTilde; - case XK_Hcircumflex: return Qt::Key_AsciiTilde; - case XK_Iabovedot: return Qt::Key_AsciiTilde; - case XK_Gbreve: return Qt::Key_AsciiTilde; - case XK_Jcircumflex: return Qt::Key_AsciiTilde; - case XK_hstroke: return Qt::Key_AsciiTilde; - case XK_hcircumflex: return Qt::Key_AsciiTilde; - case XK_idotless: return Qt::Key_AsciiTilde; - case XK_gbreve: return Qt::Key_AsciiTilde; - case XK_jcircumflex: return Qt::Key_AsciiTilde; - case XK_Cabovedot: return Qt::Key_AsciiTilde; - case XK_Ccircumflex: return Qt::Key_AsciiTilde; - case XK_Gabovedot: return Qt::Key_AsciiTilde; - case XK_Gcircumflex: return Qt::Key_AsciiTilde; - case XK_Ubreve: return Qt::Key_AsciiTilde; - case XK_Scircumflex: return Qt::Key_AsciiTilde; - case XK_cabovedot: return Qt::Key_AsciiTilde; - case XK_ccircumflex: return Qt::Key_AsciiTilde; - case XK_gabovedot: return Qt::Key_AsciiTilde; - case XK_gcircumflex: return Qt::Key_AsciiTilde; - case XK_ubreve: return Qt::Key_AsciiTilde; - case XK_scircumflex: return Qt::Key_AsciiTilde; - case XK_kra: return Qt::Key_AsciiTilde; - case XK_kappa: return Qt::Key_AsciiTilde; - case XK_Rcedilla: return Qt::Key_AsciiTilde; - case XK_Itilde: return Qt::Key_AsciiTilde; - case XK_Lcedilla: return Qt::Key_AsciiTilde; - case XK_Emacron: return Qt::Key_AsciiTilde; - case XK_Gcedilla: return Qt::Key_AsciiTilde; - case XK_Tslash: return Qt::Key_AsciiTilde; - case XK_rcedilla: return Qt::Key_AsciiTilde; - case XK_itilde: return Qt::Key_AsciiTilde; - case XK_lcedilla: return Qt::Key_AsciiTilde; - case XK_emacron: return Qt::Key_AsciiTilde; - case XK_gcedilla: return Qt::Key_AsciiTilde; - case XK_tslash: return Qt::Key_AsciiTilde; - case XK_ENG: return Qt::Key_AsciiTilde; - case XK_eng: return Qt::Key_AsciiTilde; - case XK_Amacron: return Qt::Key_AsciiTilde; - case XK_Iogonek: return Qt::Key_AsciiTilde; - case XK_Eabovedot: return Qt::Key_AsciiTilde; - case XK_Imacron: return Qt::Key_AsciiTilde; - case XK_Ncedilla: return Qt::Key_AsciiTilde; - case XK_Omacron: return Qt::Key_AsciiTilde; - case XK_Kcedilla: return Qt::Key_AsciiTilde; - case XK_Uogonek: return Qt::Key_AsciiTilde; - case XK_Utilde: return Qt::Key_AsciiTilde; - case XK_Umacron: return Qt::Key_AsciiTilde; - case XK_amacron: return Qt::Key_AsciiTilde; - case XK_iogonek: return Qt::Key_AsciiTilde; - case XK_eabovedot: return Qt::Key_AsciiTilde; - case XK_imacron: return Qt::Key_AsciiTilde; - case XK_ncedilla: return Qt::Key_AsciiTilde; - case XK_omacron: return Qt::Key_AsciiTilde; - case XK_kcedilla: return Qt::Key_AsciiTilde; - case XK_uogonek: return Qt::Key_AsciiTilde; - case XK_utilde: return Qt::Key_AsciiTilde; - case XK_umacron: return Qt::Key_AsciiTilde; - case XK_Wcircumflex: return Qt::Key_AsciiTilde; - case XK_wcircumflex: return Qt::Key_AsciiTilde; - case XK_Ycircumflex: return Qt::Key_AsciiTilde; - case XK_ycircumflex: return Qt::Key_AsciiTilde; - case XK_Babovedot: return Qt::Key_AsciiTilde; - case XK_babovedot: return Qt::Key_AsciiTilde; - case XK_Dabovedot: return Qt::Key_AsciiTilde; - case XK_dabovedot: return Qt::Key_AsciiTilde; - case XK_Fabovedot: return Qt::Key_AsciiTilde; - case XK_fabovedot: return Qt::Key_AsciiTilde; - case XK_Mabovedot: return Qt::Key_AsciiTilde; - case XK_mabovedot: return Qt::Key_AsciiTilde; - case XK_Pabovedot: return Qt::Key_AsciiTilde; - case XK_pabovedot: return Qt::Key_AsciiTilde; - case XK_Sabovedot: return Qt::Key_AsciiTilde; - case XK_sabovedot: return Qt::Key_AsciiTilde; - case XK_Tabovedot: return Qt::Key_AsciiTilde; - case XK_tabovedot: return Qt::Key_AsciiTilde; - case XK_Wgrave: return Qt::Key_AsciiTilde; - case XK_wgrave: return Qt::Key_AsciiTilde; - case XK_Wacute: return Qt::Key_AsciiTilde; - case XK_wacute: return Qt::Key_AsciiTilde; - case XK_Wdiaeresis: return Qt::Key_AsciiTilde; - case XK_wdiaeresis: return Qt::Key_AsciiTilde; - case XK_Ygrave: return Qt::Key_AsciiTilde; - case XK_ygrave: return Qt::Key_AsciiTilde; - case XK_OE: return Qt::Key_AsciiTilde; - case XK_oe: return Qt::Key_AsciiTilde; - case XK_Ydiaeresis: return Qt::Key_AsciiTilde;*/ - default: - qDebug() << "Unknown Key"; - } - qDebug() << " -- Simple Qt Map:" << (Qt::Key)(symbol); - qDebug() << " -- Key Sequence Map:" << QKeySequence(symbol); - qDebug() << " - Not implemented yet"; - return Qt::Key_unknown; -} - -NativeWindowSystem::MouseButton NativeWindowSystem::MouseToQt(int keycode){ - switch(keycode){ - case 1: - return NativeWindowSystem::LeftButton; - case 3: - return NativeWindowSystem::RightButton; - case 2: - return NativeWindowSystem::MidButton; - case 4: - return NativeWindowSystem::WheelUp; - case 5: - return NativeWindowSystem::WheelDown; - case 6: - return NativeWindowSystem::WheelLeft; - case 7: - return NativeWindowSystem::WheelRight; - case 8: - return NativeWindowSystem::BackButton; //Not sure if this is correct yet (1/27/17) - case 9: - return NativeWindowSystem::ForwardButton; //Not sure if this is correct yet (1/27/17) - default: - return NativeWindowSystem::NoButton; - } -} diff --git a/src-qt5/core/libLumina/NativeWindow.cpp b/src-qt5/core/libLumina/NativeWindow.cpp deleted file mode 100644 index 02cc001e..00000000 --- a/src-qt5/core/libLumina/NativeWindow.cpp +++ /dev/null @@ -1,123 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "NativeWindow.h" - -#include - -// === PUBLIC === -NativeWindow::NativeWindow(WId id) : QObject(){ - winid = id; - frameid = 0; - dmgID = 0; -} - -NativeWindow::~NativeWindow(){ - hash.clear(); -} - -void NativeWindow::addFrameWinID(WId fid){ - frameid = fid; -} - -void NativeWindow::addDamageID(unsigned int dmg){ - dmgID = dmg; -} - -bool NativeWindow::isRelatedTo(WId tmp){ - return (relatedTo.contains(tmp) || winid == tmp || frameid == tmp); -} - -WId NativeWindow::id(){ - return winid; -} - -WId NativeWindow::frameId(){ - return frameid; -} - -unsigned int NativeWindow::damageId(){ - return dmgID; -} - -QVariant NativeWindow::property(NativeWindow::Property prop){ - if(hash.contains(prop)){ return hash.value(prop); } - else if(prop == NativeWindow::RelatedWindows){ return QVariant::fromValue(relatedTo); } - return QVariant(); //null variant -} - -void NativeWindow::setProperty(NativeWindow::Property prop, QVariant val, bool force){ - if(prop == NativeWindow::RelatedWindows){ relatedTo = val.value< QList >(); } - else if(prop == NativeWindow::None || (!force && hash.value(prop)==val)){ return; } - else{ hash.insert(prop, val); } - emit PropertiesChanged(QList() << prop, QList() << val); -} - -void NativeWindow::setProperties(QList props, QList vals, bool force){ - for(int i=0; i=vals.length()){ props.removeAt(i); i--; continue; } //no corresponding value for this property - if(props[i] == NativeWindow::None || (!force && (hash.value(props[i]) == vals[i])) ){ props.removeAt(i); vals.removeAt(i); i--; continue; } //Invalid property or identical value - hash.insert(props[i], vals[i]); - } - emit PropertiesChanged(props, vals); -} - -void NativeWindow::requestProperty(NativeWindow::Property prop, QVariant val, bool force){ - if(prop == NativeWindow::None || prop == NativeWindow::RelatedWindows || (!force && hash.value(prop)==val) ){ return; } - emit RequestPropertiesChange(winid, QList() << prop, QList() << val); -} - -void NativeWindow::requestProperties(QList props, QList vals, bool force){ - //Verify/adjust inputs as needed - for(int i=0; i=vals.length()){ props.removeAt(i); i--; continue; } //no corresponding value for this property - if(props[i] == NativeWindow::None || props[i] == NativeWindow::RelatedWindows || (!force && hash.value(props[i])==vals[i]) ){ props.removeAt(i); vals.removeAt(i); i--; continue; } //Invalid property or identical value - /*if( (props[i] == NativeWindow::Visible || props[i] == NativeWindow::Active) && frameid !=0){ - //These particular properties needs to change the frame - not the window itself - emit RequestPropertiesChange(frameid, QList() << props[i], QList() << vals[i]); - props.removeAt(i); vals.removeAt(i); i--; - }*/ - } - emit RequestPropertiesChange(winid, props, vals); -} - -QRect NativeWindow::geometry(){ - //Calculate the "full" geometry of the window + frame (if any) - //Check that the size is between the min/max limitations - QSize size = hash.value(NativeWindow::Size).toSize(); - QSize min = hash.value(NativeWindow::MinSize).toSize(); - QSize max = hash.value(NativeWindow::MaxSize).toSize(); - if(min.isValid() && min.width() > size.width() ){ size.setWidth(min.width()); } - if(min.isValid() && min.height() > size.height()){ size.setHeight(min.height()); } - if(max.isValid() && max.width() < size.width() && max.width()>min.width()){ size.setWidth(max.width()); } - if(max.isValid() && max.height() < size.height() && max.height()>min.height()){ size.setHeight(max.height()); } - //Assemble the full geometry - QRect geom( hash.value(NativeWindow::GlobalPos).toPoint(), size ); - //Now adjust the window geom by the frame margins - QList frame = hash.value(NativeWindow::FrameExtents).value< QList >(); //Left,Right,Top,Bottom - //qDebug() << "Calculate Geometry:" << geom << frame; - if(frame.length()==4){ - geom = geom.adjusted( -frame[0], -frame[2], frame[1], frame[3] ); - } - //qDebug() << " - Total:" << geom; - return geom; -} -// ==== PUBLIC SLOTS === -void NativeWindow::toggleVisibility(){ - setProperty(NativeWindow::Visible, !property(NativeWindow::Visible).toBool() ); -} - -void NativeWindow::requestClose(){ - emit RequestClose(winid); -} - -void NativeWindow::requestKill(){ - emit RequestKill(winid); -} - -void NativeWindow::requestPing(){ - emit RequestPing(winid); -} diff --git a/src-qt5/core/libLumina/NativeWindow.h b/src-qt5/core/libLumina/NativeWindow.h deleted file mode 100644 index 67436259..00000000 --- a/src-qt5/core/libLumina/NativeWindow.h +++ /dev/null @@ -1,118 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is a container object for setting/announcing changes -// in a native window's properties. -// The WM will usually run the "setProperty" function on this object, -// and any other classes/widgets which watch this window can act appropriatly after-the-fact -// Non-WM classes should use the "Request" signals to ask the WM to do something, and listen for changes later -//=========================================== -#ifndef _LUMINA_DESKTOP_NATIVE_WINDOW_H -#define _LUMINA_DESKTOP_NATIVE_WINDOW_H - -#include -#include -#include -#include -#include -#include -#include - -class NativeWindow : public QObject{ - Q_OBJECT -public: - enum State{ S_MODAL, S_STICKY, S_MAX_VERT, S_MAX_HORZ, S_SHADED, S_SKIP_TASKBAR, S_SKIP_PAGER, S_HIDDEN, S_FULLSCREEN, S_ABOVE, S_BELOW, S_ATTENTION }; - enum Type{T_DESKTOP, T_DOCK, T_TOOLBAR, T_MENU, T_UTILITY, T_SPLASH, T_DIALOG, T_DROPDOWN_MENU, T_POPUP_MENU, T_TOOLTIP, T_NOTIFICATION, T_COMBO, T_DND, T_NORMAL }; - enum Action {A_MOVE, A_RESIZE, A_MINIMIZE, A_SHADE, A_STICK, A_MAX_VERT, A_MAX_HORZ, A_FULLSCREEN, A_CHANGE_DESKTOP, A_CLOSE, A_ABOVE, A_BELOW}; - - enum Property{ /*QVariant Type*/ - None=0, /*null*/ - MinSize=1, /*QSize*/ - MaxSize=2, /*QSize*/ - Size=3, /*QSize*/ - GlobalPos=4, /*QPoint*/ - Title=5, /*QString*/ - ShortTitle=6, /*QString*/ - Icon=7, /*QIcon*/ - Name=8, /*QString*/ - Workspace=9, /*int*/ - States=10, /*QList : Current state of the window */ - WinTypes=11, /*QList : Current type of window (typically does not change)*/ - WinActions=12, /*QList : Current actions that the window allows (Managed/set by the WM)*/ - FrameExtents=13, /*QList : [Left, Right, Top, Bottom] in pixels */ - RelatedWindows=14, /* QList - better to use the "isRelatedTo(WId)" function instead of reading this directly*/ - Active=15, /*bool*/ - Visible=16 /*bool*/ - }; - - static QList allProperties(){ - //Return all the available properties (excluding "None" and "FrameExtents" (WM control only) ) - QList props; - props << MinSize << MaxSize << Size << GlobalPos << Title << ShortTitle << Icon << Name << Workspace \ - << States << WinTypes << WinActions << RelatedWindows << Active << Visible; - return props; - }; - - NativeWindow(WId id); - ~NativeWindow(); - - void addFrameWinID(WId); - void addDamageID(unsigned int); - bool isRelatedTo(WId); - - WId id(); - WId frameId(); - unsigned int damageId(); - - //QWindow* window(); - - QVariant property(NativeWindow::Property); - void setProperty(NativeWindow::Property, QVariant, bool force = false); - void setProperties(QList, QList, bool force = false); - void requestProperty(NativeWindow::Property, QVariant, bool force = false); - void requestProperties(QList, QList, bool force = false); - - QRect geometry(); //this returns the "full" geometry of the window (window + frame) - -public slots: - void toggleVisibility(); - void requestClose(); //ask the app to close the window (may/not depending on activity) - void requestKill(); //ask the WM to kill the app associated with this window (harsh - only use if not responding) - void requestPing(); //ask the app if it is still active (a WindowNotResponding signal will get sent out if there is no reply); - -private: - QHash hash; - //QWindow *WIN; - WId winid, frameid; - QList relatedTo; - unsigned int dmgID; - -signals: - //General Notifications - void PropertiesChanged(QList, QList); - void RequestPropertiesChange(WId, QList, QList); - void WindowClosed(WId); - void WindowNotResponding(WId); //will be sent out if a window does not respond to a ping request - void VisualChanged(); - - //Action Requests (not automatically emitted - typically used to ask the WM to do something) - //Note: "WId" should be the NativeWindow id() - void RequestClose(WId); //Close the window - void RequestKill(WId); //Kill the window/app (usually from being unresponsive) - void RequestPing(WId); //Verify that the window is still active (such as not closing after a request - void RequestReparent(WId, WId, QPoint); //client window, frame window, relative origin point in frame - // System Tray Icon Embed/Unembed Requests - //void RequestEmbed(WId, QWidget*); - //void RequestUnEmbed(WId, QWidget*); -}; - -// Declare the enumerations as Qt MetaTypes -Q_DECLARE_METATYPE(NativeWindow::Type); -Q_DECLARE_METATYPE(NativeWindow::Action); -Q_DECLARE_METATYPE(NativeWindow::State); -Q_DECLARE_METATYPE(NativeWindow::Property); - -#endif diff --git a/src-qt5/core/libLumina/NativeWindow.pri b/src-qt5/core/libLumina/NativeWindow.pri deleted file mode 100644 index c906d6fd..00000000 --- a/src-qt5/core/libLumina/NativeWindow.pri +++ /dev/null @@ -1,18 +0,0 @@ - -# Files -QT *= x11extras -LIBS *= -lc -lxcb -lxcb-ewmh -lxcb-icccm -lxcb-image -lxcb-composite -lxcb-damage -lxcb-util -lxcb-keysyms -lXdamage -#QT *= -lxcb-render -lxcb-render-util - -SOURCES *= $${PWD}/NativeWindow.cpp \ - $${PWD}/NativeWindowSystem.cpp \ - $${PWD}/NativeKeyToQt.cpp \ - $${PWD}/NativeEventFilter.cpp \ - $${PWD}/NativeEmbedWidget.cpp - -HEADERS *= $${PWD}/NativeWindow.h \ - $${PWD}/NativeWindowSystem.h \ - $${PWD}/NativeEventFilter.h \ - $${PWD}/NativeEmbedWidget.h - -INCLUDEPATH *= $${PWD} diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp deleted file mode 100644 index e8e9655a..00000000 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ /dev/null @@ -1,986 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is the XCB version of the NativeWindowSystem class, -// used for interacting with the X11 display system on BSD/Linux/Unix systems -//=========================================== -#include "NativeWindowSystem.h" - -//Additional Qt includes -#include -#include -#include -#include -#include -#include -#include - - -//XCB Library includes -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//XLib includes (XCB Damage lib does not appear to register for damage events properly) -#include - -//SYSTEM TRAY STANDARD DEFINITIONS -#define _NET_SYSTEM_TRAY_ORIENTATION_HORZ 0 -#define _NET_SYSTEM_TRAY_ORIENTATION_VERT 1 -#define SYSTEM_TRAY_REQUEST_DOCK 0 -#define SYSTEM_TRAY_BEGIN_MESSAGE 1 -#define SYSTEM_TRAY_CANCEL_MESSAGE 2 - -#define URGENCYHINT (1L << 8) //For window urgency detection - -#define ROOT_WIN_EVENT_MASK (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ - XCB_EVENT_MASK_BUTTON_PRESS | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_POINTER_MOTION | \ - XCB_EVENT_MASK_PROPERTY_CHANGE | \ - XCB_EVENT_MASK_FOCUS_CHANGE | \ - XCB_EVENT_MASK_ENTER_WINDOW) - -#define NORMAL_WIN_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ - XCB_EVENT_MASK_BUTTON_RELEASE | \ - XCB_EVENT_MASK_POINTER_MOTION | \ - XCB_EVENT_MASK_BUTTON_MOTION | \ - XCB_EVENT_MASK_EXPOSURE | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ - XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_ENTER_WINDOW | \ - XCB_EVENT_MASK_PROPERTY_CHANGE | \ - XCB_EVENT_MASK_FOCUS_CHANGE) - -#define CLIENT_EVENT_MASK (XCB_EVENT_MASK_PROPERTY_CHANGE | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_FOCUS_CHANGE | \ - XCB_EVENT_MASK_POINTER_MOTION) - -#define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ - XCB_EVENT_MASK_BUTTON_RELEASE | \ - XCB_EVENT_MASK_POINTER_MOTION | \ - XCB_EVENT_MASK_EXPOSURE | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ - XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_ENTER_WINDOW) - -inline void registerClientEvents(WId id, bool client = true){ - uint32_t values[] = {XCB_NONE}; - values[0] = client ? CLIENT_EVENT_MASK : FRAME_EVENT_MASK ; - /*{ (XCB_EVENT_MASK_PROPERTY_CHANGE - | XCB_EVENT_MASK_BUTTON_PRESS - | XCB_EVENT_MASK_BUTTON_RELEASE - | XCB_EVENT_MASK_POINTER_MOTION - | XCB_EVENT_MASK_BUTTON_MOTION - | XCB_EVENT_MASK_EXPOSURE - | XCB_EVENT_MASK_STRUCTURE_NOTIFY - | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT - | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY - | XCB_EVENT_MASK_ENTER_WINDOW) - };*/ - xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, values); -} - -/*inline void registerClientEvents(WId id){ - uint32_t value_list[1] = {NORMAL_WIN_EVENT_MASK}; - xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); -}*/ - -//Internal XCB private objects class -class NativeWindowSystem::p_objects{ -public: - xcb_ewmh_connection_t EWMH; //This is where all the screen info and atoms are located - QHash ATOMS; - xcb_screen_t *root_screen; - xcb_window_t root_window, wm_window, tray_window; - - //Functions for setting up these objects as needed - bool init_ATOMS(){ - xcb_intern_atom_cookie_t *cookie = xcb_ewmh_init_atoms(QX11Info::connection(), &EWMH); - if(!xcb_ewmh_init_atoms_replies(&EWMH, cookie, NULL) ){ - qDebug() << "Error with XCB atom initializations"; - return false; - } - - QStringList atoms; - atoms << "WM_TAKE_FOCUS" << "WM_DELETE_WINDOW" << "WM_PROTOCOLS" << "_NET_WM_WINDOW_OPACITY" - << "WM_CHANGE_STATE" << "_NET_SYSTEM_TRAY_OPCODE" << "_NET_SYSTEM_TRAY_ORIENTATION" << "_XEMBED" - << "_NET_SYSTEM_TRAY_VISUAL" << QString("_NET_SYSTEM_TRAY_S%1").arg(QString::number(QX11Info::appScreen())); - //Create all the requests for the atoms - QList reply; - for(int i=0; iatom); - free(reply[i]); //done with this reply - }else{ - //Invalid atom - could not be created - qDebug() << "Could not initialize XCB atom:" << atoms[i]; - } - } //loop over reply - return (ATOMS.keys().length() == atoms.length()); - } - - WId getTransientFor(WId win){ - xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_transient_for_unchecked(QX11Info::connection(), win); - xcb_window_t trans; - if(1!= xcb_icccm_get_wm_transient_for_reply(QX11Info::connection(), cookie, &trans, NULL) ){ - return win; //error in fetching transient window ID (or none found) - }else{ - return trans; - } -} - - bool register_wm(){ - uint32_t value_list[1] = {ROOT_WIN_EVENT_MASK}; - xcb_generic_error_t *status = xcb_request_check( QX11Info::connection(), xcb_change_window_attributes_checked(QX11Info::connection(), root_window, XCB_CW_EVENT_MASK, value_list)); - if(status!=0){ return false; } - uint32_t params[] = {1}; - wm_window = xcb_generate_id(QX11Info::connection()); //need a new ID - xcb_create_window(QX11Info::connection(), root_screen->root_depth, \ - wm_window, root_window, -1, -1, 1, 1, 0, \ - XCB_WINDOW_CLASS_INPUT_OUTPUT, root_screen->root_visual, \ - XCB_CW_OVERRIDE_REDIRECT, params); - if(wm_window==0){ return false; } - //Set the _NET_SUPPORTING_WM property on the root window first - xcb_ewmh_set_supporting_wm_check(&EWMH, root_window, wm_window); - //Also set this property on the child window (pointing to itself) - xcb_ewmh_set_supporting_wm_check(&EWMH, wm_window, wm_window); - //Now also setup the root event mask on the wm_window - status = xcb_request_check( QX11Info::connection(), xcb_change_window_attributes_checked(QX11Info::connection(), wm_window, XCB_CW_EVENT_MASK, value_list)); - if(status!=0){ return false; } - return true; - } - - bool start_system_tray(){ - xcb_atom_t _NET_SYSTEM_TRAY_S = ATOMS.value( QString("_NET_SYSTEM_TRAY_S%1").arg(QString::number(QX11Info::appScreen())) ); - //Make sure that there is no other system tray running - xcb_get_selection_owner_reply_t *ownreply = xcb_get_selection_owner_reply(QX11Info::connection(), \ - xcb_get_selection_owner_unchecked(QX11Info::connection(), _NET_SYSTEM_TRAY_S), NULL); - if(ownreply == 0){ - qWarning() << " - Could not get owner selection reply"; - return false; - }else if(ownreply->owner != 0){ - free(ownreply); - qWarning() << " - An alternate system tray is currently in use"; - return false; - } - free(ownreply); - //Now create the window to use (just offscreen) - tray_window = xcb_generate_id(QX11Info::connection()); //need a new ID - uint32_t params[] = {1}; - xcb_create_window(QX11Info::connection(), root_screen->root_depth, \ - tray_window, root_screen->root, -1, -1, 1, 1, 0, \ - XCB_WINDOW_CLASS_INPUT_OUTPUT, root_screen->root_visual, \ - XCB_CW_OVERRIDE_REDIRECT, params); - //Now register this widget as the system tray - xcb_set_selection_owner(QX11Info::connection(), tray_window, _NET_SYSTEM_TRAY_S, XCB_CURRENT_TIME); - //Make sure that it was registered properly - ownreply = xcb_get_selection_owner_reply(QX11Info::connection(), \ - xcb_get_selection_owner_unchecked(QX11Info::connection(), _NET_SYSTEM_TRAY_S), NULL); - if(ownreply==0 || ownreply->owner != tray_window){ - if(ownreply!=0){ free(ownreply); } - qWarning() << " - Could not register the system tray"; - xcb_destroy_window(QX11Info::connection(), tray_window); - return false; - } - free(ownreply); //done with structure - //Now register the orientation of the system tray - uint32_t orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; - xcb_change_property(QX11Info::connection(), XCB_PROP_MODE_REPLACE, tray_window, \ - ATOMS.value("_NET_SYSTEM_TRAY_ORIENTATION"), XCB_ATOM_CARDINAL, 32, 1, &orient); - - //Now set the visual ID for the system tray (same as the root window, but TrueColor) - xcb_visualtype_t *type = xcb_aux_find_visual_by_attrs(root_screen, XCB_VISUAL_CLASS_TRUE_COLOR, 32); - if(type!=0){ - xcb_change_property(QX11Info::connection(), XCB_PROP_MODE_REPLACE, tray_window, \ - ATOMS.value("_NET_SYSTEM_TRAY_VISUAL"), XCB_ATOM_VISUALID, 32, 1, &type->visual_id); - }else{ - qWarning() << " - Could not set TrueColor visual for system tray"; - } - - //Finally, send out an X event letting others know that the system tray is up and running - xcb_client_message_event_t event; - event.response_type = XCB_CLIENT_MESSAGE; - event.format = 32; - event.window = root_screen->root; - event.type = EWMH.MANAGER; //MANAGER atom - event.data.data32[0] = XCB_TIME_CURRENT_TIME; //CurrentTime; - event.data.data32[1] = _NET_SYSTEM_TRAY_S; //_NET_SYSTEM_TRAY_S atom - event.data.data32[2] = tray_window; - event.data.data32[3] = 0; - event.data.data32[4] = 0; - - xcb_send_event(QX11Info::connection(), 0, root_screen->root, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); - return true; - } - -}; //end private objects class - - -//inline functions for setting up the internal objects - - -// === PUBLIC === -NativeWindowSystem::NativeWindowSystem() : QObject(){ - obj = 0; - pingTimer = 0; - screenLocked = false; -} - -NativeWindowSystem::~NativeWindowSystem(){ - xcb_ewmh_connection_wipe(&(obj->EWMH)); - free(obj); -} - -//Overarching start/stop functions -bool NativeWindowSystem::start(){ - //Initialize the XCB/EWMH objects - if(obj==0){ - obj = new p_objects(); //instantiate the private objects - obj->wm_window = 0; - obj->tray_window = 0; - xcb_intern_atom_cookie_t *cookie = xcb_ewmh_init_atoms(QX11Info::connection(), &obj->EWMH); - if(!xcb_ewmh_init_atoms_replies(&obj->EWMH, cookie, NULL) ){ - qDebug() << "Error with XCB atom initializations"; - return false; - } - obj->root_screen = xcb_aux_get_screen(QX11Info::connection(), QX11Info::appScreen()); - obj->root_window = obj->root_screen->root; //simplification for later - minor duplication of memory (unsigned int) - //Initialize all the extra atoms that the EWMH object does not have - if( !obj->init_ATOMS() ){ return false; } - } //Done with private object init - bool ok = obj->register_wm(); - if(ok){ - setRoot_supportedActions(); - ok = obj->start_system_tray(); - }else{ - qWarning() << "Could not register the WM"; - } - return ok; -} - -void NativeWindowSystem::stop(){ - -} - -// === PRIVATE === -NativeWindow* NativeWindowSystem::findWindow(WId id, bool checkRelated){ - //qDebug() << "Find Window:" << id; - for(int i=0; iid() ){ return NWindows[i]; } - else if(id==NWindows[i]->frameId() ){ return NWindows[i]; } - //if(checkRelated && NWindows[i]->isRelatedTo(id)){ return NWindows[i]; } - //else if(!checkRelated && id==NWindows[i]->id()){ return NWindows[i]; } - } - //Check to see if this is a transient for some other window - if(checkRelated){ - //WId tid = obj->getTransientFor(id); - //if(tid!=id){ return findWindow(tid, checkRelated); } //call it recursively as needed - //qDebug() << " -- Could not find Window!"; - } - return 0; -} - -NativeWindow* NativeWindowSystem::findTrayWindow(WId id){ - for(int i=0; iisRelatedTo(id)){ return TWindows[i]; } - } - return 0; -} - -void NativeWindowSystem::UpdateWindowProperties(NativeWindow* win, QList< NativeWindow::Property > props){ - //Put the properties in logical groups as appropriate (some XCB calls return multiple properties) - if(props.contains(NativeWindow::Title)){ - //Try the EWMH standards first - // _NET_WM_NAME - QString name; - xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_name_unchecked(&obj->EWMH, win->id()); - if(cookie.sequence != 0){ - xcb_ewmh_get_utf8_strings_reply_t data; - if( 1 == xcb_ewmh_get_wm_name_reply(&obj->EWMH, cookie, &data, NULL) ){ - name = QString::fromUtf8(data.strings, data.strings_len); - } - } - if(name.isEmpty()){ - //_NET_WM_VISIBLE_NAME - xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_visible_name_unchecked(&obj->EWMH, win->id()); - if(cookie.sequence != 0){ - xcb_ewmh_get_utf8_strings_reply_t data; - if( 1 == xcb_ewmh_get_wm_visible_name_reply(&obj->EWMH, cookie, &data, NULL) ){ - name = QString::fromUtf8(data.strings, data.strings_len); - } - } - } - if(name.isEmpty()){ - //Now try the ICCCM standard - xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_name_unchecked(QX11Info::connection(), win->id()); - xcb_icccm_get_text_property_reply_t reply; - if(1 == xcb_icccm_get_wm_name_reply(QX11Info::connection(), cookie, &reply, NULL) ){ - name = QString::fromLocal8Bit(reply.name, reply.name_len); - xcb_icccm_get_text_property_reply_wipe(&reply); - } - } - win->setProperty(NativeWindow::Title, name); - } //end TITLE property - - if(props.contains(NativeWindow::ShortTitle)){ - //Try the EWMH standards first - // _NET_WM_ICON_NAME - QString name; - xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_icon_name_unchecked(&obj->EWMH, win->id()); - if(cookie.sequence != 0){ - xcb_ewmh_get_utf8_strings_reply_t data; - if( 1 == xcb_ewmh_get_wm_icon_name_reply(&obj->EWMH, cookie, &data, NULL) ){ - name = QString::fromUtf8(data.strings, data.strings_len); - } - } - if(name.isEmpty()){ - //_NET_WM_VISIBLE_ICON_NAME - xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_visible_icon_name_unchecked(&obj->EWMH, win->id()); - if(cookie.sequence != 0){ - xcb_ewmh_get_utf8_strings_reply_t data; - if( 1 == xcb_ewmh_get_wm_visible_icon_name_reply(&obj->EWMH, cookie, &data, NULL) ){ - name = QString::fromUtf8(data.strings, data.strings_len); - } - } - } - if(name.isEmpty()){ - //Now try the ICCCM standard - xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_icon_name_unchecked(QX11Info::connection(), win->id()); - xcb_icccm_get_text_property_reply_t reply; - if(1 == xcb_icccm_get_wm_icon_name_reply(QX11Info::connection(), cookie, &reply, NULL) ){ - name = QString::fromLocal8Bit(reply.name, reply.name_len); - xcb_icccm_get_text_property_reply_wipe(&reply); - } - } - win->setProperty(NativeWindow::ShortTitle, name); - } //end SHORTTITLE property - - if(props.contains(NativeWindow::Icon)){ - //See if this is a tray icon first (different routine - entire app window is the icon) - QIcon icon; - if(win == findTrayWindow(win->id())){ - //Tray Icon Window - QPixmap pix; - //Get the current QScreen (for XCB->Qt conversion) - QList scrnlist = QApplication::screens(); - //Try to grab the given window directly with Qt - for(int i=0; igrabWindow(win->id()); - } - icon.addPixmap(pix); - }else{ - //Standard window - //Fetch the _NET_WM_ICON for the window and return it as a QIcon - xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_icon_unchecked(&obj->EWMH, win->id()); - xcb_ewmh_get_wm_icon_reply_t reply; - if(1 == xcb_ewmh_get_wm_icon_reply(&obj->EWMH, cookie, &reply, NULL)){ - xcb_ewmh_wm_icon_iterator_t iter = xcb_ewmh_get_wm_icon_iterator(&reply); - //Just use the first - bool done =false; - while(!done){ - //Now convert the current data into a Qt image - // - first 2 elements are width and height (removed via XCB functions) - // - data in rows from left to right and top to bottom - QImage image(iter.width, iter.height, QImage::Format_ARGB32); //initial setup - uint* dat = iter.data; - //dat+=2; //remember the first 2 element offset - for(int i=0; isetProperty(NativeWindow::Icon, icon); - } //end ICON property - - if(props.contains(NativeWindow::MinSize) || props.contains(NativeWindow::MaxSize) - || props.contains(NativeWindow::Size) || props.contains(NativeWindow::GlobalPos) ){ - //Try the ICCCM "Normal Hints" structure first (newer spec?) - xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_normal_hints_unchecked(QX11Info::connection(), win->id()); - xcb_size_hints_t reply; - bool ok = false; - if(1==xcb_icccm_get_wm_normal_hints_reply(QX11Info::connection(), cookie, &reply, NULL) ){ ok = true; } - else{ - //Could not find normal hints, try the older "size hints" instead - cookie = xcb_icccm_get_wm_size_hints_unchecked(QX11Info::connection(), win->id(), XCB_ATOM_WM_SIZE_HINTS); - if(1==xcb_icccm_get_wm_size_hints_reply(QX11Info::connection(), cookie, &reply, NULL) ){ ok = true; } - } - if(ok){ - bool initsize = win->property(NativeWindow::Size).isNull(); //initial window size - if( (reply.flags&XCB_ICCCM_SIZE_HINT_US_POSITION)==XCB_ICCCM_SIZE_HINT_US_POSITION ){ win->setProperty(NativeWindow::GlobalPos, QPoint(reply.x,reply.y)); } - if( (reply.flags&XCB_ICCCM_SIZE_HINT_US_SIZE)==XCB_ICCCM_SIZE_HINT_US_SIZE ){ win->setProperty(NativeWindow::Size, QSize(reply.width, reply.height)); } - if( (reply.flags&XCB_ICCCM_SIZE_HINT_P_POSITION)==XCB_ICCCM_SIZE_HINT_P_POSITION ){ win->setProperty(NativeWindow::GlobalPos, QPoint(reply.x,reply.y)); } - if( (reply.flags&XCB_ICCCM_SIZE_HINT_P_SIZE)==XCB_ICCCM_SIZE_HINT_P_SIZE ){ win->setProperty(NativeWindow::Size, QSize(reply.width, reply.height)); } - if( (reply.flags&XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)==XCB_ICCCM_SIZE_HINT_P_MIN_SIZE ){ win->setProperty(NativeWindow::MinSize, QSize(reply.min_width, reply.min_height)); } - if( (reply.flags&XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)==XCB_ICCCM_SIZE_HINT_P_MAX_SIZE ){ win->setProperty(NativeWindow::MaxSize, QSize(reply.max_width, reply.max_height)); } - if( (reply.flags&XCB_ICCCM_SIZE_HINT_BASE_SIZE)==XCB_ICCCM_SIZE_HINT_BASE_SIZE && initsize ){ win->setProperty(NativeWindow::Size, QSize(reply.base_width, reply.base_height)); } - //if( (reply.flags&XCB_ICCCM_SIZE_HINT_P_RESIZE_INC)==XCB_ICCCM_SIZE_HINT_P_RESIZE_INC ){ hints.width_inc=reply.width_inc; hints.height_inc=reply.height_inc; } - //if( (reply.flags&XCB_ICCCM_SIZE_HINT_P_ASPECT)==XCB_ICCCM_SIZE_HINT_P_ASPECT ){ hints.min_aspect_num=reply.min_aspect_num; hints.min_aspect_den=reply.min_aspect_den; hints.max_aspect_num=reply.max_aspect_num; hints.max_aspect_den=reply.max_aspect_den;} - //if( (reply.flags&XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY)==XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY ){ hints.win_gravity=reply.win_gravity; } - } - } //end of geometry properties - - if(props.contains(NativeWindow::Name)){ - //Put the app/class name here (much more static than the "Title" properties - xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_class_unchecked(QX11Info::connection(), win->id()); - xcb_icccm_get_wm_class_reply_t reply; - if(1 == xcb_icccm_get_wm_class_reply(QX11Info::connection(), cookie, &reply, NULL) ){ - //Returns: "::::" - win->setProperty(NativeWindow::Name, ( QString::fromLocal8Bit(reply.instance_name)+"::::"+QString::fromLocal8Bit(reply.class_name) )); - xcb_icccm_get_wm_class_reply_wipe(&reply); - } - } //end NAME property - - if(props.contains(NativeWindow::Workspace)){ - xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_desktop_unchecked(&obj->EWMH, win->id()); - uint32_t num = 0; - int wkspace = -1; - if(1==xcb_ewmh_get_wm_desktop_reply(&obj->EWMH, cookie, &num, NULL) ){ - if(num!=0xFFFFFFFF){ wkspace = num; } - }/*else{ - //Error in fetching property (not set?) - // - put it on the current screen - out = WM_Get_Current_Desktop(); - }*/ - win->setProperty(NativeWindow::Workspace, wkspace); - } - if(props.contains(NativeWindow::FrameExtents)){ - //Just assign default values to this - need to automate it later - //win->setProperty(NativeWindow::FrameExtents, QVariant::fromValue >(QList() << 5 << 5 << 5+QFontMetrics(QFont()).height() << 5) ); - } - if(props.contains(NativeWindow::RelatedWindows)){ - WId orig = win->id(); - WId tid = obj->getTransientFor(orig); - QList list; - while(tid != orig){ - list << tid; - orig = tid; - tid = obj->getTransientFor(orig); - } - win->setProperty(NativeWindow::RelatedWindows, QVariant::fromValue(list)); - } - if(props.contains(NativeWindow::Visible)){ - xcb_get_window_attributes_reply_t *attr = xcb_get_window_attributes_reply(QX11Info::connection(), xcb_get_window_attributes(QX11Info::connection(), win->id()) , NULL); - if(attr != 0){ - win->setProperty(NativeWindow::Visible, attr->map_state == XCB_MAP_STATE_VIEWABLE); - free(attr); - } - } - if(props.contains(NativeWindow::WinTypes)){ - QList< NativeWindow::Type> types; - xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_window_type_unchecked(&obj->EWMH, win->id()); - xcb_ewmh_get_atoms_reply_t reply; - if(1==xcb_ewmh_get_wm_window_type_reply(&obj->EWMH, cookie, &reply, NULL) ){ - for(unsigned int i=0; iEWMH._NET_WM_WINDOW_TYPE_DESKTOP){ types << NativeWindow::T_DESKTOP; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DOCK){ types << NativeWindow::T_DOCK; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_TOOLBAR){ types << NativeWindow::T_TOOLBAR; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_MENU){ types << NativeWindow::T_MENU; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_UTILITY){ types << NativeWindow::T_UTILITY; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_SPLASH){ types << NativeWindow::T_SPLASH; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DIALOG){ types << NativeWindow::T_DIALOG; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DROPDOWN_MENU){ types << NativeWindow::T_DROPDOWN_MENU; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_POPUP_MENU){ types << NativeWindow::T_POPUP_MENU; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_TOOLTIP){ types << NativeWindow::T_TOOLTIP; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_NOTIFICATION){ types << NativeWindow::T_NOTIFICATION; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_COMBO){ types << NativeWindow::T_COMBO; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_DND){ types << NativeWindow::T_DND; } - else if(reply.atoms[i]==obj->EWMH._NET_WM_WINDOW_TYPE_NORMAL){ types << NativeWindow::T_NORMAL; } - } - } - if(types.isEmpty()){ types << NativeWindow::T_NORMAL; } - win->setProperty(NativeWindow::WinTypes, QVariant::fromValue< QList >(types) ); - } -} - -void NativeWindowSystem::ChangeWindowProperties(NativeWindow* win, QList< NativeWindow::Property > props, QList vals){ - if(props.length() == 0 || vals.length()!=props.length() || win ==0 ){ return; } - //qDebug() << "Change Window Properties:" << props << vals; - if(props.contains(NativeWindow::Title)){ - - } - if(props.contains(NativeWindow::ShortTitle)){ - - } - if(props.contains(NativeWindow::Icon)){ - - } - if(props.contains(NativeWindow::Size) || props.contains(NativeWindow::GlobalPos) ){ - /*xcb_configure_window_value_list_t valList; - //valList.x = 0; //Note that this is the relative position - should always be 0,0 relative to the embed widget - //valList.y = 0; - QSize sz = win->property(NativeWindow::Size).toSize(); - if(props.contains(NativeWindow::Size)){ - sz = vals[ props.indexOf(NativeWindow::Size) ] .toSize(); - } - valList.width = sz.width(); - valList.height = sz.height(); - if(props.contains(NativeWindow::GlobalPos)){ - QPoint pt = vals[ props.indexOf(NativeWindow::GlobalPos) ] .toPoint(); - valList.x = pt.x(); - valList.y = pt.y(); - }else{ - valList.x = win->property(NativeWindow::GlobalPos).toPoint().x(); - valList.y = win->property(NativeWindow::GlobalPos).toPoint().y(); - } - uint16_t mask = 0; - mask = mask | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; - //qDebug() << "Configure window Geometry:" << sz; - xcb_configure_window_aux(QX11Info::connection(), win->id(), mask, &valList);*/ - } - if(props.contains(NativeWindow::Name)){ - - } - if(props.contains(NativeWindow::Workspace)){ - int num = vals[ props.indexOf(NativeWindow::Workspace) ].toInt(); - xcb_ewmh_set_wm_desktop(&obj->EWMH, win->id(), (num<0 ? 0xFFFFFFFF : qAbs(num) ) ); - } - if(props.contains(NativeWindow::RelatedWindows)){ - - } - if(props.contains(NativeWindow::Visible)){ - //qDebug() << "Check Window Visibility:" << vals[ props.indexOf(NativeWindow::Visible) ]; - if( vals[ props.indexOf(NativeWindow::Visible) ].toBool() ){ - //qDebug() << " - Map it!"; - xcb_map_window(QX11Info::connection(), win->id()); - }else{ - //qDebug() << " - Unmap it!"; - xcb_unmap_window(QX11Info::connection(), win->id()); - } - } - if(props.contains(NativeWindow::Active)){ - //Only one window can be "Active" at a time - so only do anything if this window wants to be active - if(vals[props.indexOf(NativeWindow::Active)].toBool() ){ - //Lower the currently active window (invisible window) to the bottom of the stack - xcb_window_t cactive; - if( 1 == xcb_ewmh_get_active_window_reply( &obj->EWMH, - xcb_ewmh_get_active_window_unchecked(&obj->EWMH, QX11Info::appScreen()), - &cactive, NULL) ){ - uint32_t val = XCB_STACK_MODE_BELOW; - xcb_configure_window(QX11Info::connection(), cactive, XCB_CONFIG_WINDOW_STACK_MODE, &val); - } - - xcb_ewmh_set_active_window(&obj->EWMH, QX11Info::appScreen(), win->id() ); - //Also send the active window a message to take input focus - xcb_set_input_focus(QX11Info::connection(), XCB_INPUT_FOCUS_PARENT, win->id(), XCB_CURRENT_TIME); - //Send the window a WM_TAKE_FOCUS message -/* xcb_client_message_event_t event; - event.response_type = XCB_CLIENT_MESSAGE; - event.format = 32; - event.window = win->id(); - event.type = obj->ATOMS["WM_PROTOCOLS"]; - event.data.data32[0] = obj->ATOMS["WM_TAKE_FOCUS"]; - event.data.data32[1] = XCB_TIME_CURRENT_TIME; //CurrentTime; - event.data.data32[2] = 0; - event.data.data32[3] = 0; - event.data.data32[4] = 0; - - xcb_send_event(QX11Info::connection(), 0, win->id(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); - xcb_flush(QX11Info::connection()); -*/ - } - } - -} - -// === PUBLIC SLOTS === -//These are the slots which are typically only used by the desktop system itself or the NativeEventFilter -void NativeWindowSystem::RegisterVirtualRoot(WId id){ - //Convert to XCB array - xcb_window_t array[1]; - array[0] = id; - //Set the property - xcb_ewmh_set_virtual_roots(&obj->EWMH, QX11Info::appScreen(), 1, array); - //Now also enable automatic compositing for children of this window - //xcb_composite_redirect_window(QX11Info::connection(), id, XCB_COMPOSITE_REDIRECT_AUTOMATIC); - //xcb_composite_redirect_subwindows(QX11Info::connection(), id, XCB_COMPOSITE_REDIRECT_AUTOMATIC); -} - -void NativeWindowSystem::setRoot_supportedActions(){ -//NET_WM standards (ICCCM implied - no standard way to list those) - xcb_atom_t list[] = {obj->EWMH._NET_WM_NAME, - obj->EWMH._NET_WM_ICON, - obj->EWMH._NET_WM_ICON_NAME, - obj->EWMH._NET_WM_DESKTOP, - /*obj->ATOMS["_NET_WM_WINDOW_OPACITY"],*/ - /*_NET_WINDOW_TYPE (and all the various types - 15 in total*/ - obj->EWMH._NET_WM_WINDOW_TYPE, obj->EWMH._NET_WM_WINDOW_TYPE_DESKTOP, obj->EWMH._NET_WM_WINDOW_TYPE_DOCK, - obj->EWMH._NET_WM_WINDOW_TYPE_TOOLBAR, obj->EWMH._NET_WM_WINDOW_TYPE_MENU, obj->EWMH._NET_WM_WINDOW_TYPE_UTILITY, - obj->EWMH._NET_WM_WINDOW_TYPE_SPLASH, obj->EWMH._NET_WM_WINDOW_TYPE_DIALOG, obj->EWMH._NET_WM_WINDOW_TYPE_NORMAL, - obj->EWMH._NET_WM_WINDOW_TYPE_DROPDOWN_MENU, obj->EWMH._NET_WM_WINDOW_TYPE_POPUP_MENU, obj->EWMH._NET_WM_WINDOW_TYPE_TOOLTIP, - obj->EWMH._NET_WM_WINDOW_TYPE_NOTIFICATION, obj->EWMH._NET_WM_WINDOW_TYPE_COMBO, obj->EWMH._NET_WM_WINDOW_TYPE_DND, - }; - xcb_ewmh_set_supported(&obj->EWMH, QX11Info::appScreen(), 20,list); -} - -void NativeWindowSystem::setRoot_numberOfWorkspaces(QStringList names){ - if(names.isEmpty()){ names << "one"; } - //First set the overall number of workspaces - xcb_ewmh_set_number_of_desktops(&obj->EWMH, QX11Info::appScreen(), names.length()); - //Now set the names for the workspaces - //EWMH LIBRARY BROKEN - appears to be a mismatch in the function header (looking for a single char array, instead of a list of char arrays) - // Ken Moore - 6/27/17 - /* - char *array[ names.length() ]; - for(int i=0; iEWMH, QX11Info::appScreen(), names.length(), array); - */ -} - -void NativeWindowSystem::setRoot_currentWorkspace(int num){ - xcb_ewmh_set_current_desktop(&obj->EWMH, QX11Info::appScreen(), num); -} - -void NativeWindowSystem::setRoot_clientList(QList list, bool stackorder){ - //convert the QList into a generic array - xcb_window_t array[list.length()]; - for(int i=0; iEWMH, QX11Info::appScreen(), list.length(), array); - }else{ - xcb_ewmh_set_client_list(&obj->EWMH, QX11Info::appScreen(), list.length(), array); - } -} - -void NativeWindowSystem::setRoot_desktopGeometry(QRect geom){ - //This one is a combo function - // This will set the "DESKTOP_VIEWPORT" property (point) - // as well as the "DESKTOP_GEOMETRY" property (size) - //Turn the QList into xcb_ewmh_coordinates_t* - xcb_ewmh_coordinates_t array[1]; - array[0].x=geom.x(); array[0].y=geom.y(); - //Now set the property - xcb_ewmh_set_desktop_viewport(&obj->EWMH, QX11Info::appScreen(), 1, array); - xcb_ewmh_set_desktop_geometry(&obj->EWMH, QX11Info::appScreen(), geom.width(), geom.height()); -} - -void NativeWindowSystem::setRoot_desktopWorkarea(QList list){ - //Convert to the XCB/EWMH data structures - xcb_ewmh_geometry_t array[list.length()]; - for(int i=0; iEWMH, QX11Info::appScreen(), list.length(), array); -} - -void NativeWindowSystem::setRoot_activeWindow(WId win){ - /*xcb_ewmh_set_active_window(&obj->EWMH, QX11Info::appScreen(), win); - //Also send the active window a message to take input focus - //Send the window a WM_TAKE_FOCUS message - xcb_client_message_event_t event; - event.response_type = XCB_CLIENT_MESSAGE; - event.format = 32; - event.window = win; - event.type = obj->ATOMS["WM_PROTOCOLS"]; - event.data.data32[0] = obj->ATOMS["WM_TAKE_FOCUS"]; - event.data.data32[1] = XCB_TIME_CURRENT_TIME; //CurrentTime; - event.data.data32[2] = 0; - event.data.data32[3] = 0; - event.data.data32[4] = 0; - - xcb_send_event(QX11Info::connection(), 0, win, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); - xcb_flush(QX11Info::connection());*/ -} - -int NativeWindowSystem::currentWorkspace(){ - xcb_get_property_cookie_t cookie = xcb_ewmh_get_current_desktop_unchecked(&obj->EWMH, QX11Info::appScreen()); - uint32_t num = 0; - if(1==xcb_ewmh_get_current_desktop_reply(&obj->EWMH, cookie, &num, NULL) ){ - return num; - }else{ - return 0; - } -} - -//NativeWindowEventFilter interactions -void NativeWindowSystem::NewWindowDetected(WId id){ - //Make sure this can be managed first - if(findWindow(id, false) != 0){ findWindow(id,false)->setProperty(NativeWindow::Visible, true, true); return; } //already managed - xcb_get_window_attributes_cookie_t cookie = xcb_get_window_attributes(QX11Info::connection(), id); - xcb_get_window_attributes_reply_t *attr = xcb_get_window_attributes_reply(QX11Info::connection(), cookie, NULL); - if(attr == 0){ return; } //could not get attributes of window - if(attr->override_redirect){ free(attr); return; } //window has override redirect set (do not manage) - free(attr); - //Now go ahead and create/populate the container for this window - NativeWindow *win = new NativeWindow(id); - //Register for events from this window - registerClientEvents(win->id()); - NWindows << win; - UpdateWindowProperties(win, NativeWindow::allProperties()); - qDebug() << "New Window [& associated ID's]:" << win->id() << win->property(NativeWindow::Name).toString(); - //Now setup the connections with this window - connect(win, SIGNAL(RequestClose(WId)), this, SLOT(RequestClose(WId)) ); - connect(win, SIGNAL(RequestKill(WId)), this, SLOT(RequestKill(WId)) ); - connect(win, SIGNAL(RequestPing(WId)), this, SLOT(RequestPing(WId)) ); - connect(win, SIGNAL(RequestReparent(WId, WId, QPoint)), this, SLOT(RequestReparent(WId, WId, QPoint)) ); - connect(win, SIGNAL(RequestPropertiesChange(WId, QList, QList)), this, SLOT(RequestPropertiesChange(WId, QList, QList)) ); - emit NewWindowAvailable(win); -} - -void NativeWindowSystem::NewTrayWindowDetected(WId id){ - //Make sure this can be managed first - if(findTrayWindow(id) != 0){ return; } //already managed - xcb_get_window_attributes_cookie_t cookie = xcb_get_window_attributes(QX11Info::connection(), id); - xcb_get_window_attributes_reply_t *attr = xcb_get_window_attributes_reply(QX11Info::connection(), cookie, NULL); - if(attr == 0){ return; } //could not get attributes of window - if(attr->override_redirect){ free(attr); return; } //window has override redirect set (do not manage) - free(attr); - //Register for events from this window - #define TRAY_WIN_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ - XCB_EVENT_MASK_BUTTON_RELEASE | \ - XCB_EVENT_MASK_POINTER_MOTION | \ - XCB_EVENT_MASK_BUTTON_MOTION | \ - XCB_EVENT_MASK_EXPOSURE | \ - XCB_EVENT_MASK_STRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | \ - XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | \ - XCB_EVENT_MASK_ENTER_WINDOW) - - uint32_t value_list[1] = {TRAY_WIN_EVENT_MASK}; - xcb_change_window_attributes(QX11Info::connection(), id, XCB_CW_EVENT_MASK, value_list); - //Now go ahead and create/populate the container for this window - NativeWindow *win = new NativeWindow(id); - TWindows << win; - UpdateWindowProperties(win, NativeWindow::allProperties()); - emit NewTrayWindowAvailable(win); -} - -void NativeWindowSystem::WindowCloseDetected(WId id){ - NativeWindow *win = findWindow(id, false); - //qDebug() << "Got Window Closed" << id << win; - //qDebug() << "Old Window List:" << NWindows.length(); - if(win!=0){ - NWindows.removeAll(win); - //RequestReparent(id, QX11Info::appRootWindow(), QPoint(0,0)); - win->emit WindowClosed(id); - //qDebug() << "Visible Window Closed!!!"; - //win->deleteLater(); - }else{ - win = findTrayWindow(id); - if(win!=0){ - TWindows.removeAll(win); - win->emit WindowClosed(id); - win->deleteLater(); - } - } - //qDebug() << " - Now:" << NWindows.length(); -} - -void NativeWindowSystem::WindowPropertyChanged(WId id, NativeWindow::Property prop){ - //NOTE: This is triggered by the NativeEventFilter - not by changes to the NativeWindow objects themselves - NativeWindow *win = findWindow(id, prop!=NativeWindow::Visible); - if(win==0){ win = findTrayWindow(id); } - if(win!=0){ - UpdateWindowProperties(win, QList() << prop); - }else if(prop != 0){ - //Could not find the window for a specific property with an undefined value - // - update this property for all the windows just in case - for(int i=0; i() << prop); - } - } -} - -void NativeWindowSystem::WindowPropertiesChanged(WId id, QList props){ - //NOTE: This is triggered by the NativeEventFilter - not by changes to the NativeWindow objects themselves - NativeWindow *win = findWindow(id); - if(win==0){ win = findTrayWindow(id); } - if(win!=0){ - UpdateWindowProperties(win, props); - }else{ - //Could not find the window for a specific property with an undefined value - // - update this property for all the windows just in case - for(int i=0; isetProperty(prop, val); - } -} - -void NativeWindowSystem::WindowPropertiesChanged(WId id, QList props, QList vals){ - NativeWindow *win = findWindow(id); - if(win==0){ win = findTrayWindow(id); } - if(win!=0){ - for(int i=0; isetProperty(props[i], vals[i]); } - } -} - -void NativeWindowSystem::RequestPropertyChange(WId id, NativeWindow::Property prop, QVariant val){ - //This is just a simplified version of the multiple-property function - RequestPropertiesChange(id, QList() << prop, QList() << val); -} - -void NativeWindowSystem::RequestPropertiesChange(WId win, QList props, QList vals){ - //Find the window object associated with this id - bool istraywin = false; //just in case we care later if it is a tray window or a regular window - NativeWindow *WIN = findWindow(win); - if(WIN==0){ istraywin = true; WIN = findTrayWindow(win); } - if(WIN==0){ return; } //invalid window ID - no longer available - //Now make any changes as needed - ChangeWindowProperties(WIN, props, vals); -} - -void NativeWindowSystem::GotPong(WId id){ - if(waitingForPong.contains(id)){ - waitingForPong.remove(id); - } - if(waitingForPong.isEmpty() && pingTimer!=0){ pingTimer->stop(); } -} - -void NativeWindowSystem::NewKeyPress(int keycode, WId win){ - emit NewInputEvent(); - if(screenLocked){ return; } - Qt::Key key = KeycodeToQt(keycode); - if(key!=Qt::Key_unknown){ emit KeyPressDetected(win, key); } -} - -void NativeWindowSystem::NewKeyRelease(int keycode, WId win){ - emit NewInputEvent(); - if(screenLocked){ return; } - Qt::Key key = KeycodeToQt(keycode); - if(key!=Qt::Key_unknown){ emit KeyReleaseDetected(win, key); } -} - -void NativeWindowSystem::NewMousePress(int buttoncode, WId win){ - emit NewInputEvent(); - if(screenLocked){ return; } - emit MousePressDetected(win, MouseToQt(buttoncode)); -} - -void NativeWindowSystem::NewMouseRelease(int buttoncode, WId win){ - emit NewInputEvent(); - if(screenLocked){ return; } - emit MouseReleaseDetected(win, MouseToQt(buttoncode)); -} - -void NativeWindowSystem::CheckDamageID(WId win){ - for(int i=0; idamageId() == win || NWindows[i]->id() == win || NWindows[i]->frameId()==win){ - NWindows[i]->emit VisualChanged(); - //qDebug() << "Got DAMAGE Event"; - return; - } - } - NativeWindow *WIN = findTrayWindow(win); - if(WIN!=0){ - UpdateWindowProperties(WIN, QList() << NativeWindow::Icon); - } -} - -// === PRIVATE SLOTS === -//These are the slots which are built-in and automatically connected when a new NativeWindow is created - -void NativeWindowSystem::RequestClose(WId win){ - //Send the window a WM_DELETE_WINDOW message - xcb_client_message_event_t event; - event.response_type = XCB_CLIENT_MESSAGE; - event.format = 32; - event.window = win; - event.type = obj->ATOMS.value("WM_PROTOCOLS"); - event.data.data32[0] = obj->ATOMS.value("WM_DELETE_WINDOW"); - event.data.data32[1] = XCB_TIME_CURRENT_TIME; //CurrentTime; - event.data.data32[2] = 0; - event.data.data32[3] = 0; - event.data.data32[4] = 0; - - xcb_send_event(QX11Info::connection(), 0, win, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); - xcb_flush(QX11Info::connection()); -} - -void NativeWindowSystem::RequestKill(WId win){ - xcb_kill_client(QX11Info::connection(), win); -} - -void NativeWindowSystem::RequestPing(WId win){ - waitingForPong.insert(win, QDateTime::currentDateTime().addSecs(5) ); - xcb_ewmh_send_wm_ping(&obj->EWMH, win, XCB_CURRENT_TIME); - if(pingTimer==0){ - pingTimer = new QTimer(this); - pingTimer->setInterval(2000); //2seconds - connect(pingTimer, SIGNAL(timeout()), this, SLOT(checkPings()) ); - } - pingTimer->start(); -} - -void NativeWindowSystem::RequestReparent(WId win, WId container, QPoint relorigin){ - NativeWindow *WIN = findWindow(win); - if(WIN==0){ return; } //could not find corresponding window structure -//Reparent the window into the container - xcb_reparent_window(QX11Info::connection(), win, container, relorigin.x(), relorigin.y()); - //xcb_map_window(QX11Info::connection(), win); - - //Now send the embed event to the app - //qDebug() << " - send _XEMBED event"; - xcb_client_message_event_t event; - event.response_type = XCB_CLIENT_MESSAGE; - event.format = 32; - event.window = win; - event.type = obj->ATOMS["_XEMBED"]; //_XEMBED - event.data.data32[0] = XCB_TIME_CURRENT_TIME; //CurrentTime; - event.data.data32[1] = 0; //XEMBED_EMBEDDED_NOTIFY - event.data.data32[2] = 0; - event.data.data32[3] = container; //WID of the container - event.data.data32[4] = 0; - - xcb_send_event(QX11Info::connection(), 0, win, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event); - - //Now setup any redirects and return - //this->SelectInput(win, true); //Notify of structure changes - registerClientEvents(win); - //xcb_composite_redirect_window(QX11Info::connection(), win, XCB_COMPOSITE_REDIRECT_MANUAL); //XCB_COMPOSITE_REDIRECT_[MANUAL/AUTOMATIC]); - - //Now map the window (will be a transparent child of the container) - xcb_map_window(QX11Info::connection(), win); - xcb_map_window(QX11Info::connection(), container); - //Now create/register the damage handler - // -- XCB (Note: The XCB damage registration is completely broken at the moment - 9/15/15, Ken Moore) - // -- Retested 6/29/17 (no change) Ken Moore - //xcb_damage_damage_t dmgID = xcb_generate_id(QX11Info::connection()); //This is a typedef for a 32-bit unsigned integer - //xcb_damage_create(QX11Info::connection(), dmgID, win, XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES); - // -- XLib (Note: This is only used because the XCB routine above does not work - needs to be fixed upstream in XCB itself). - Damage dmgID = XDamageCreate(QX11Info::display(), win, XDamageReportRawRectangles); - WIN->addDamageID( (uint) dmgID); //save this for later - //qDebug() << " - Done"; - //return ( (uint) dmgID ); -} -/* - xcb_reparent_window(QX11Info::connection(), client, parent, relorigin.x(), relorigin.y()); - - //Now ensure that we still get event for these windows - registerClientEvents(client); //make sure we re-do this after reparenting - registerClientEvents(parent); - xcb_map_window(QX11Info::connection(), parent); -}*/ diff --git a/src-qt5/core/libLumina/NativeWindowSystem.h b/src-qt5/core/libLumina/NativeWindowSystem.h deleted file mode 100644 index b67ecc94..00000000 --- a/src-qt5/core/libLumina/NativeWindowSystem.h +++ /dev/null @@ -1,139 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is a Qt5/Lumina wrapper around native graphics system calls -// It is primarily designed around the creation/modification of instances of -// the "NativeWindow" class for passing information around -//=========================================== -#ifndef _LUMINA_NATIVE_WINDOW_SYSTEM_H -#define _LUMINA_NATIVE_WINDOW_SYSTEM_H - -#include "NativeWindow.h" -#include -#include -#include - -class NativeWindowSystem : public QObject{ - Q_OBJECT -private: - QList NWindows; - QList TWindows; - - //Simplifications to find an already-created window object - NativeWindow* findWindow(WId id, bool checkRelated = true); - - NativeWindow* findTrayWindow(WId id); - - //Now define a simple private_objects class so that each implementation - // has a storage container for defining/placing private objects as needed - class p_objects; - p_objects* obj; - - //Internal timers/variables for managing pings - QTimer *pingTimer; - QHash waitingForPong; - void checkPings(){ - QDateTime cur = QDateTime::currentDateTime(); - QList waiting = waitingForPong.keys(); - for(int i=0; istop(); } - NativeWindow *win = findWindow(waiting[i]); - if(win==0){ win = findTrayWindow(waiting[i]); } - if(win!=0){ win->emit WindowNotResponding(waiting[i]); } - } - } - } - - // Since some properties may be easier to update in bulk - // let the native system interaction do them in whatever logical groups are best - void UpdateWindowProperties(NativeWindow* win, QList< NativeWindow::Property > props); - void ChangeWindowProperties(NativeWindow* win, QList< NativeWindow::Property > props, QList vals); - - //Generic private variables - bool screenLocked; - -public: - //enum Property{ None, CurrentWorkspace, Workspaces, VirtualRoots, WorkAreas }; - enum MouseButton{NoButton, LeftButton, RightButton, MidButton, BackButton, ForwardButton, TaskButton, WheelUp, WheelDown, WheelLeft, WheelRight}; - - NativeWindowSystem(); - ~NativeWindowSystem(); - - //Overarching start/stop functions - bool start(); - void stop(); - - //General-purpose listing functions - QList currentWindows(){ return NWindows; } - QList currentTrayWindows(){ return TWindows; } - - //Small simplification functions - static Qt::Key KeycodeToQt(int keycode); - static NativeWindowSystem::MouseButton MouseToQt(int button); - -public slots: - //These are the slots which are typically only used by the desktop system itself or the NativeWindowEventFilter - - //This is called by the lock screen to keep the NWS aware of the current status - // it is **NOT** the function to call for the user to actually lock the session (that is in the screensaver/lockscreen class) - void ScreenLockChanged(bool lock){ - screenLocked = lock; - } - - //Root Window property registrations - void RegisterVirtualRoot(WId); - void setRoot_supportedActions(); - void setRoot_numberOfWorkspaces(QStringList names); - void setRoot_currentWorkspace(int); - void setRoot_clientList(QList, bool stackorder = false); - void setRoot_desktopGeometry(QRect); - void setRoot_desktopWorkarea(QList); - void setRoot_activeWindow(WId); - - // - Workspaces - int currentWorkspace(); - //void GoToWorkspace(int); - - - //NativeWindowEventFilter interactions - void NewWindowDetected(WId); //will automatically create the new NativeWindow object - void NewTrayWindowDetected(WId); //will automatically create the new NativeWindow object - void WindowCloseDetected(WId); //will update the lists and make changes if needed - void WindowPropertyChanged(WId, NativeWindow::Property); //will rescan the window and update the object as needed - void WindowPropertiesChanged(WId, QList); - void WindowPropertyChanged(WId, NativeWindow::Property, QVariant); //will save that property/value to the right object - void WindowPropertiesChanged(WId, QList, QList); - void RequestPropertyChange(WId, NativeWindow::Property, QVariant); - void RequestPropertiesChange(WId, QList, QList); - void GotPong(WId); - - void NewKeyPress(int keycode, WId win = 0); - void NewKeyRelease(int keycode, WId win = 0); - void NewMousePress(int buttoncode, WId win = 0); - void NewMouseRelease(int buttoncode, WId win = 0); - void CheckDamageID(WId); - -private slots: - //These are the slots which are built-in and automatically connected when a new NativeWindow is created - void RequestClose(WId); - void RequestKill(WId); - void RequestPing(WId); - void RequestReparent(WId, WId, QPoint); //client, parent, relative origin point in parent - -signals: - void NewWindowAvailable(NativeWindow*); - void NewTrayWindowAvailable(NativeWindow*); - void NewInputEvent(); //a mouse or keypress was detected (lock-state independent); - void KeyPressDetected(WId, Qt::Key); //only emitted if lockstate = false - void KeyReleaseDetected(WId, Qt::Key); //only emitted if lockstate = false - void MousePressDetected(WId, NativeWindowSystem::MouseButton); //only emitted if lockstate = false - void MouseReleaseDetected(WId, NativeWindowSystem::MouseButton); //only emitted if lockstate = false - -}; - -#endif diff --git a/src-qt5/core/libLumina/RootSubWindow-animations.cpp b/src-qt5/core/libLumina/RootSubWindow-animations.cpp deleted file mode 100644 index efab20fe..00000000 --- a/src-qt5/core/libLumina/RootSubWindow-animations.cpp +++ /dev/null @@ -1,116 +0,0 @@ -//=========================================== -// Lumina Desktop source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "RootSubWindow.h" -#include - -QStringList RootSubWindow::validAnimations(NativeWindow::Property prop){ - QStringList valid; - if(prop == NativeWindow::Visible){ - valid << "zoom" << "wipe-center-vertical" << "wipe-center-horizontal" << "shade-top" << "shade-right" << "shade-left" << "shade-bottom"; - }else if(prop == NativeWindow::Size){ - //Note: this is used for pretty much all geometry changes to the window where it is visible both before/after animation - valid << "direct"; - } - return valid; -} - -void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVariant nval){ - if(anim->state()==QAbstractAnimation::Running){ return; } //already running - animResetProp.clear(); - //Special case - random animation each time - if(name=="random"){ - QStringList valid = validAnimations(prop); - if(!valid.isEmpty()){ name = valid.at(qrand()%valid.length()); } - } - //Now setup the animation - if(prop == NativeWindow::Visible){ - //NOTE: Assigns values for "invisible->visible" animation: will reverse it afterwards as needed - anim->setPropertyName("geometry"); - QRect geom = this->geometry(); - if(name == "zoom"){ - //Zoom to/from the center point - anim->setStartValue( QRect(geom.center(), QSize(0,0)) ); - anim->setEndValue(geom); - }else if(name == "wipe-center-vertical"){ - anim->setStartValue( QRect( geom.center().x(), geom.y(), 0, geom.height()) ); - anim->setEndValue( geom ); - }else if(name == "wipe-center-horizontal"){ - anim->setStartValue( QRect( geom.x(), geom.center().y(), geom.width(), 0) ); - anim->setEndValue( geom ); - }else if(name == "shade-top"){ - anim->setStartValue( QRect( geom.x(), geom.y(), geom.width(), 0) ); - anim->setEndValue( geom ); - }else if(name == "shade-bottom"){ - anim->setStartValue( QRect( geom.x(), geom.y()+geom.height(), geom.width(), 0) ); - anim->setEndValue( geom ); - }else if(name == "shade-left"){ - anim->setStartValue( QRect( geom.x(), geom.y(), 0, geom.height()) ); - anim->setEndValue( geom ); - }else if(name == "shade-right"){ - anim->setStartValue( QRect( geom.x()+geom.width(), geom.y(), 0, geom.height()) ); - anim->setEndValue( geom ); - }else{ - //Invalid/None animation - if(nval.toBool()){ this->show(); } - else{ this->hide(); } - return; - } - if(nval.toBool()){ - this->setGeometry( anim->startValue().toRect() ); //ensure the window is the initial geom before it becomes visible - //QTimer::singleShot( anim->duration()+5, this, SLOT(activate()) ); - }else{ - QVariant tmp = anim->startValue(); - anim->setStartValue(anim->endValue()); - anim->setEndValue(tmp); - animResetProp = anim->startValue(); - QTimer::singleShot(anim->duration(), this, SLOT(hide()) ); - } - WinWidget->pause(); - anim->start(); - this->show(); - } //end of Visibility animation - else if(prop == NativeWindow::Size){ - //This is pretty much all geometry animations where the window is visible->visible - anim->setPropertyName("geometry"); - anim->setStartValue(this->geometry()); - anim->setEndValue(nval.toRect()); - /*if(name==""){ - // TO-DO modify the path from beginning->end somehow - }*/ - // Now start the animation - WinWidget->pause(); - anim->start(); - this->show(); - } -} - -void RootSubWindow::animFinished(){ - if(closing){ this->close(); return;} - else if(anim->propertyName()=="geometry"){ - if(!animResetProp.isNull()){ - /*qDebug() << "Animation Finished, Reset Geometry:" << animResetProp.toRect(); - qDebug() << " - Starting Value:" << anim->startValue().toRect(); - qDebug() << " - Ending Value:" << anim->endValue().toRect();*/ - this->setGeometry( animResetProp.toRect() ); - //Also ensure that the proper geometry is saved to the window structure - QRect curg = this->geometry(); - QRect wing = WIN->geometry(); - //qDebug() << " - After Animation Reset:" << curg << wing; - if(curg!=wing){ - QRect clientg = clientGlobalGeom(); - //qDebug() << "Sub Window geometry:" << clientg; - WIN->setProperties(QList< NativeWindow::Property>() << NativeWindow::Size << NativeWindow::GlobalPos, - QList() << clientg.size() << clientg.topLeft() ); - } - } - WinWidget->resyncWindow(); //also let the window know about the current geometry - } - animResetProp = QVariant(); //clear the variable - //QTimer::singleShot(10, WinWidget, SLOT(resume()) ); - WinWidget->resume(); - emit windowAnimFinished(); -} diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp deleted file mode 100644 index 5040f2f9..00000000 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ /dev/null @@ -1,601 +0,0 @@ -//=========================================== -// Lumina Desktop source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "RootSubWindow.h" -#include -#include -#include -#include -#include -#include - -#define WIN_BORDER 5 - -#include -#include - -// === PUBLIC === -RootSubWindow::RootSubWindow(QWidget *root, NativeWindow *win) : QFrame(root){ - this->setAttribute(Qt::WA_DeleteOnClose); - this->setMouseTracking(true); - //Create the QWindow and QWidget containers for the window - WIN = win; - closing = false; - initWindowFrame(); - //Hookup the signals/slots - connect(WIN, SIGNAL(PropertiesChanged(QList, QList)), this, SLOT(propertiesChanged(QList, QList))); - WinWidget->embedWindow(WIN); - //qDebug() << "[NEW WINDOW]" << WIN->id() << WinWidget->winId() << this->winId(); - activeState = RootSubWindow::Normal; - LoadAllProperties(); -} - -RootSubWindow::~RootSubWindow(){ - //qDebug() << "Visible Window Destroyed"; - WIN->deleteLater(); -} - -WId RootSubWindow::id(){ - return WIN->id(); -} - -NativeWindow* RootSubWindow::nativeWindow(){ - return WIN; -} - -// === PRIVATE === -RootSubWindow::ModState RootSubWindow::getStateAtPoint(QPoint pt, bool setoffset){ - //Note: pt should be in widget-relative coordinates, not global - if(!WinWidget->geometry().contains(pt) && !titleBar->geometry().contains(pt)){ - //above the frame itself - need to figure out which quadrant it is in (8-directions) - if(pt.y() < WIN_BORDER){ - //One of the top options - if(pt.x() < this->width()/5){ - if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()); } //difference from top-left corner - return ResizeTopLeft; - }else if(pt.x() > (this->width()*4.0/5.0)){ - if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()); } //difference from top-right corner - return ResizeTopRight; - }else{ - if(setoffset){ offset.setX(0); offset.setY(pt.y()); } //difference from top edge (X does not matter) - return ResizeTop; - } - }else if(pt.y() > (this->height()-WIN_BORDER) ){ - //One of the bottom options - if(pt.x() < this->width()/5){ - if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()-this->height()); } //difference from bottom-left corner - return ResizeBottomLeft; - }else if(pt.x() > (this->width()*4.0/5.0)){ - if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()-this->height()); } //difference from bottom-right corner - return ResizeBottomRight; - }else{ - if(setoffset){ offset.setX(0); offset.setY(pt.y()-this->height()); } //difference from bottom edge (X does not matter) - return ResizeBottom; - } - }else if(pt.x() < WIN_BORDER){ - //Left side options - if(pt.y() < this->height()/5){ - if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()); } //difference from top-left corner - return ResizeTopLeft; - }else if(pt.y() > (this->height()*4.0/5.0)){ - if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()-this->height()); } //difference from bottom-left corner - return ResizeBottomLeft; - }else{ - if(setoffset){ offset.setX(pt.x()); offset.setY(0); } //difference from left edge (Y does not matter) - return ResizeLeft; - } - }else if(pt.x() > (this->width()-WIN_BORDER) ){ - //Right side options - if(pt.y() < this->height()/5){ - if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()); } //difference from top-right corner - return ResizeTopRight; - }else if(pt.y() > (this->height()*4.0/5.0)){ - if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()-this->height()); } //difference from bottom-right corner - return ResizeBottomRight; - }else{ - if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(0); } //difference from right edge (Y does not matter) - return ResizeRight; - } - }else{ - return Normal; - } - } - //if it gets this far just return normal - return Normal; -} - -void RootSubWindow::setMouseCursor(ModState state, bool override){ - if(currentCursor==state && !override){ return; } //nothing to change - Qt::CursorShape shape; - switch(state){ - case Normal: - shape = Qt::ArrowCursor; - break; - case Move: - shape = Qt::SizeAllCursor; - break; - case ResizeTop: - shape = Qt::SizeVerCursor; - break; - case ResizeTopRight: - shape = Qt::SizeBDiagCursor; - break; - case ResizeRight: - shape = Qt::SizeHorCursor; - break; - case ResizeBottomRight: - shape = Qt::SizeFDiagCursor; - break; - case ResizeBottom: - shape = Qt::SizeVerCursor; - break; - case ResizeBottomLeft: - shape = Qt::SizeBDiagCursor; - break; - case ResizeLeft: - shape = Qt::SizeHorCursor; - break; - case ResizeTopLeft: - shape = Qt::SizeFDiagCursor; - break; - } - if(override){ - QApplication::setOverrideCursor(QCursor(shape)); - }else{ - currentCursor = state; - this->setCursor(shape); - } -} - -void RootSubWindow::initWindowFrame(){ - //qDebug() << "Create RootSubWindow Frame"; - this->setContentsMargins(0,0,0,0); - mainLayout = new QVBoxLayout(this); - mainLayout->setContentsMargins(0,0,0,0); - titleBar = new QWidget(this); - titleBar->setContentsMargins(0,0,0,0); - titleBarL = new QHBoxLayout(titleBar); - titleBarL->setContentsMargins(0,0,0,0); - closeB = new QToolButton(this); - maxB = new QToolButton(this); - minB = new QToolButton(this); - otherB = new QToolButton(this); - anim = new QPropertyAnimation(this); - anim->setTargetObject(this); - anim->setDuration(200); //1/5 second (appx) - connect(anim, SIGNAL(finished()), this, SLOT(animFinished()) ); - titleLabel = new QLabel(this); - titleLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - otherM = new QMenu(this); //menu of other actions - otherB->setMenu(otherM); - otherB->setPopupMode(QToolButton::InstantPopup); - otherB->setAutoRaise(true); - WinWidget = new NativeEmbedWidget(this); - connect(closeB, SIGNAL(clicked()), this, SLOT(triggerClose()) ); - connect(maxB, SIGNAL(clicked()), this, SLOT(toggleMaximize()) ); - connect(minB, SIGNAL(clicked()), this, SLOT(toggleMinimize()) ); - //Now assemble the frame layout based on the current settings - titleBarL->addWidget(otherB); - titleBarL->addWidget(titleLabel); - titleBarL->addWidget(minB); - titleBarL->addWidget(maxB); - titleBarL->addWidget(closeB); - WinWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - titleBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); - mainLayout->addWidget(titleBar); - mainLayout->addWidget(WinWidget); - mainLayout->setAlignment(titleBar, Qt::AlignTop); - //Setup the cursors for the buttons - closeB->setCursor(Qt::ArrowCursor); - minB->setCursor(Qt::ArrowCursor); - maxB->setCursor(Qt::ArrowCursor); - otherB->setCursor(Qt::ArrowCursor); - titleLabel->setCursor(Qt::ArrowCursor); - WinWidget->setCursor(Qt::ArrowCursor); - //Now all the stylesheet options - this->setObjectName("WindowFrame"); - closeB->setObjectName("Button_Close"); - minB->setObjectName("Button_Minimize"); - maxB->setObjectName("Button_Maximize"); - otherM->setObjectName("Menu_Actions"); - titleLabel->setObjectName("Label_Title"); - this->setStyleSheet("QFrame#WindowFrame{background-color: rgba(0,0,0,125)} QWidget#Label_Title{background-color: transparent; color: white; } QToolButton{background-color: transparent; border: 1px solid transparent; border-radius: 3px; } QToolButton::hover{background-color: rgba(255,255,255,150); } QToolButton::pressed{ background-color: white; } QToolButton::menu-arrow{ image: none; }"); - //And adjust the margins - mainLayout->setSpacing(0); - titleBarL->setSpacing(1); - this->setFrameStyle(QFrame::NoFrame); - this->setLineWidth(0); - this->setMidLineWidth(0); - this->setFrameRect(QRect(0,0,0,0)); - - //Setup the timer object to syncronize info - moveTimer = new QTimer(this); - moveTimer->setSingleShot(true); - moveTimer->setInterval(100); //1/10 second - connect(moveTimer, SIGNAL(timeout()), WinWidget, SLOT(resyncWindow()) ); - - //Now load the icons for the button - LIconCache::instance()->loadIcon(closeB, "window-close"); - LIconCache::instance()->loadIcon(maxB, "window-maximize"); - LIconCache::instance()->loadIcon(minB, "window-minimize"); - LIconCache::instance()->loadIcon(otherB, "list"); -} - -void RootSubWindow::enableFrame(bool on){ - //Make the individual frame elements visible as needed - if(on){ this->setContentsMargins(WIN_BORDER,WIN_BORDER,WIN_BORDER,WIN_BORDER); }//default border - else{ this->setContentsMargins(0, 0, 0, 0); } - titleBar->setVisible(on); - //And now calculate/save the frame extents - QList extents; extents << 0 << 0 << 0 << 0; //left, right, top, bottom - if(on){ - extents[0] = WIN_BORDER; - extents[1] = WIN_BORDER; - extents[2] = WIN_BORDER + titleBar->height(); - extents[3] = WIN_BORDER; - } - //qDebug() << "SET FRAME EXTENTS:" << extents; - WIN->requestProperty(NativeWindow::FrameExtents, QVariant::fromValue< QList >(extents) ); //save on raw window itself - WIN->setProperty(NativeWindow::FrameExtents, QVariant::fromValue< QList >(extents) ); //save to structure now -} - -void RootSubWindow::enableFrame(QList types){ - static QList noframe; - if(noframe.isEmpty()){ noframe << NativeWindow::T_DESKTOP << NativeWindow::T_DOCK << NativeWindow::T_TOOLBAR << NativeWindow::T_MENU << NativeWindow::T_SPLASH << NativeWindow::T_DROPDOWN_MENU << NativeWindow::T_POPUP_MENU << NativeWindow::T_TOOLTIP << NativeWindow::T_NOTIFICATION << NativeWindow::T_COMBO << NativeWindow::T_DND; } - for(int i=0; i list){ - QList vals; - //Always ensure that visibility changes are evaluated last - bool addvisible = false; - for(int i=0; iproperty(list[i]); - } - //if(addvisible){ list << NativeWindow::Visible; vals << WIN->property(NativeWindow::Visible); } - propertiesChanged(list, vals); -} - -QRect RootSubWindow::clientGlobalGeom(){ - QRect tot = this->geometry(); - QList frame = WIN->property(NativeWindow::FrameExtents).value< QList >(); - //Now adjust this to take out the frame - tot.adjust(frame[0], frame[2], -frame[1], -frame[3]); - return tot; -} - -// === PUBLIC SLOTS === -void RootSubWindow::clientClosed(){ - //qDebug() << "Client Closed"; - closing = true; - if(anim->state()!=QAbstractAnimation::Running){ this->close(); } -} - -void RootSubWindow::LoadAllProperties(){ - QList< NativeWindow::Property> list; - list << NativeWindow::WinTypes << NativeWindow::WinActions << NativeWindow::States - << NativeWindow::MinSize << NativeWindow::MaxSize << NativeWindow::Title << NativeWindow::ShortTitle - << NativeWindow::Icon << NativeWindow::Size << NativeWindow::GlobalPos;// << NativeWindow::Visible << NativeWindow::Active; - LoadProperties(list); - //WIN->requestProperty(NativeWindow::Visible, true); -} - -//Button Actions - public so they can be tied to key shortcuts and stuff as well -void RootSubWindow::toggleMinimize(){ - WIN->toggleVisibility(); -} - -void RootSubWindow::toggleMaximize(){ - //Get the current screen that this window is on - QList screens = QApplication::screens(); - QRect rect; - int primaryscreen = 0; //fallback value - for(int i=0; igeometry().intersected(this->geometry()); - if( (intersect.width()-rect.width() + intersect.height()-rect.height()) > 0){ - rect = intersect; - primaryscreen = i; - } - } - //Now that we have the screen dimensions, lets check/change the window - rect = screens[primaryscreen]->availableGeometry(); - QList< NativeWindow::State > states = WIN->property(NativeWindow::States).value< QList< NativeWindow::State> >(); - if(rect == this->geometry() || states.contains(NativeWindow::S_MAX_VERT) || states.contains(NativeWindow::S_MAX_HORZ)){ - //Already maximized - try to restore it to the previous size/location - if(!lastMaxGeom.isNull()){ - rect = lastMaxGeom; - }else{ - // no last geometry - started out maximized? - // make it half the screen size and centered on the screen - QPoint center = rect.center(); - rect.setWidth( rect.width()/2 ); - rect.setHeight( rect.height()/2 ); - rect.moveTopLeft( center - QPoint(rect.width()/2, rect.height()/2) ); - } - lastMaxGeom = QRect(); //clear this saved geom - }else{ - //Not maximized yet - go ahead and make it so - lastMaxGeom = this->geometry(); //save this for later; - } - //qDebug() << "Toggle Maximize:" << this->geometry() << rect; - QString anim_type = DesktopSettings::instance()->value(DesktopSettings::Animation, "window/move", "random").toString(); - loadAnimation(anim_type, NativeWindow::Size, rect); -} - -void RootSubWindow::triggerClose(){ - WIN->requestClose(); -} - -void RootSubWindow::toggleSticky(){ - QList< NativeWindow::State> states = WIN->property(NativeWindow::States).value< QList< NativeWindow::State > >(); - if(states.contains(NativeWindow::S_STICKY)){ - states.removeAll(NativeWindow::S_STICKY); - }else{ - states << NativeWindow::S_STICKY; - } - WIN->requestProperty(NativeWindow::States, QVariant::fromValue >(states) ); -} - -void RootSubWindow::activate(){ - //WinWidget->raiseWindow(); - WIN->requestProperty(NativeWindow::Active, true, true); -} - -//Mouse Interactivity -void RootSubWindow::startMoving(){ - //If the cursor is not over this window, move it to the center of the titlebar - QPoint curpt = QCursor::pos(); //global coords - if(!this->geometry().contains(curpt)){ - curpt = this->mapToGlobal(titleBar->geometry().center()); - QCursor::setPos(curpt); - } - //Calculate the offset - activeState = Move; - offset = this->mapFromGlobal(curpt); - setMouseCursor(activeState, true); //this one is an override cursor - WinWidget->pause(); - this->grabMouse(); -} - -void RootSubWindow::startResizing(){ - activeState = getStateAtPoint( this->mapFromGlobal(QCursor::pos()), true); //also have it set the offset variable - setMouseCursor(activeState, true); //this one is an override cursor - WinWidget->pause(); - this->grabMouse(); -} - -// === PRIVATE SLOTS === -void RootSubWindow::propertiesChanged(QList props, QList vals){ - for(int i=0; iisPaused() && (this->isVisible()!=vals[i].toBool()) && activeState==Normal ){ - //qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); - if(vals[i].toBool()){ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/appear", "random").toString(), NativeWindow::Visible, vals[i]); } - else{ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/disappear", "random").toString(), NativeWindow::Visible, vals[i]); } - } - break; - case NativeWindow::Title: - titleLabel->setText(vals[i].toString()); - break; - case NativeWindow::Icon: - //qDebug() << "Got Icon Change:" << vals[i]; - if(vals[i].value().isNull() ){ LIconCache::instance()->loadIcon(otherB, "list"); } - else{ otherB->setIcon(vals[i].value()); } - break; - case NativeWindow::GlobalPos: - if(vals[i].toPoint()!=QPoint(0,0)){ - WinWidget->resyncWindow(); - } - break; - case NativeWindow::Size: - //qDebug() << " - SIZE CHANGE"; - if(WIN->property(NativeWindow::FrameExtents).isNull() && (iisPaused() && activeState==Normal){ - if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size()){ - //qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); - this->setGeometry( QRect(this->geometry().topLeft(), WIN->geometry().size()) ); - WinWidget->resyncWindow(); - } - } - break; - case NativeWindow::MinSize: - if(vals[i].toSize().isValid()){ - //Just larger than titlebar, with enough space for 8 characters in the titlebar (+4 buttons) - //qDebug() << "Got invalid Min Size: Set a reasonable default minimum"; - WinWidget->setMinimumSize( QSize( this->fontMetrics().height()*4 + this->fontMetrics().width("O")*10, this->fontMetrics().height()*10) ); - WIN->setProperty(NativeWindow::MinSize, WinWidget->minimumSize()); - }else{ - WinWidget->setMinimumSize(vals[i].toSize()); - } - if(WIN->property(NativeWindow::Size).toSize().width() < WinWidget->minimumSize().width() \ - || WIN->property(NativeWindow::Size).toSize().height() < WinWidget->minimumSize().height() ){ - WIN->setProperty(NativeWindow::Size, WinWidget->minimumSize(), true); //force this - //WinWidget->resize(WinWidget->minimumSize()); - } - break; - case NativeWindow::MaxSize: - WinWidget->setMaximumSize(vals[i].toSize()); - break; - case NativeWindow::Active: - if(vals[i].toBool()){ activate(); } //WinWidget->raiseWindow(); } - break; - /*case NativeWindow::FrameExtents: - qDebug() << " - FRAME CHANGE"; - if(vals[i].isNull()){ - vals[i] = QVariant::fromValue >( QList() << WinWidget->geometry().x() << this->width()-WinWidget->geometry().x()-WinWidget->geometry().width() << WinWidget->y() << this->height() - WinWidget->y() - WinWidget->geometry().height() ); - WIN->setProperty(NativeWindow::FrameExtents, vals[i]); - } - qDebug() << "Setting Frame Extents:" << vals[i].value >(); - mainLayout->setContentsMargins( vals[i].value< QList >().at(0),vals[i].value< QList >().at(2) - titleLabel->height(),vals[i].value< QList >().at(1),vals[i].value< QList >().at(3)); - break;*/ - case NativeWindow::WinTypes: - //qDebug() << "Got Window Types:" << vals[i].value< QList >(); - enableFrame(vals[i].value< QList >() ); - break; - default: - qDebug() << "Window Property Unused:" << props[i] << vals[i]; - } - } -} - -// === PROTECTED === -void RootSubWindow::mousePressEvent(QMouseEvent *ev){ - activate(); - this->raise(); - QFrame::mousePressEvent(ev); - //qDebug() << "Frame Mouse Press Event"; - if(activeState != Normal){ return; } // do nothing - already in a state of grabbed mouse - offset.setX(0); offset.setY(0); - if(ev->button()==Qt::LeftButton){ - if(this->childAt(ev->pos())!=0){ - //Clicked on the titlebar - startMoving(); - }else{ - //Clicked on the frame somewhere - startResizing(); - } - } - -} - -void RootSubWindow::mouseMoveEvent(QMouseEvent *ev){ - QFrame::mouseMoveEvent(ev); - if(activeState == Normal){ - setMouseCursor( getStateAtPoint(ev->pos()) ); //just update the mouse cursor - }else{ - //Currently in a modification state - QRect geom = this->geometry(); - QSize minsize(WinWidget->minimumSize().width() + (2*WIN_BORDER), WinWidget->minimumSize().height()+(2*WIN_BORDER)+titleBar->geometry().size().height()); - switch(activeState){ - case Move: - geom.moveTopLeft(ev->globalPos()-offset); //will not change size - break; - case ResizeTop: - geom.setTop(ev->globalPos().y()-offset.y()); - if(geom.size().height() < minsize.height()){ - geom.setTop(geom.y() - (minsize.height()-geom.size().height())); //reset back to min height - } - break; - case ResizeTopRight: - geom.setTopRight(ev->globalPos()-offset); - if(geom.size().height() < minsize.height()){ - geom.setTop(geom.y() - (minsize.height()-geom.size().height())); //reset back to min height - } - if(geom.size().width() < minsize.width()){ - geom.setRight(geom.x() + minsize.width()); //reset back to min width - } - break; - case ResizeRight: - geom.setRight(ev->globalPos().x()-offset.x()); - if(geom.size().width() < minsize.width()){ - geom.setRight(geom.x() + minsize.width()); //reset back to min width - } - break; - case ResizeBottomRight: - geom.setBottomRight(ev->globalPos()-offset); - if(geom.size().height() < minsize.height()){ - geom.setBottom(geom.y() + minsize.height()); //reset back to min height - } - if(geom.size().width() < minsize.width()){ - geom.setRight(geom.x() + minsize.width()); //reset back to min width - } - break; - case ResizeBottom: - geom.setBottom(ev->globalPos().y()-offset.y()); - if(geom.size().height() < minsize.height()){ - geom.setBottom(geom.y() + minsize.height()); //reset back to min height - } - break; - case ResizeBottomLeft: - geom.setBottomLeft(ev->globalPos()-offset); - if(geom.size().height() < minsize.height()){ - geom.setBottom(geom.y() + minsize.height()); //reset back to min height - } - if(geom.size().width() < minsize.width()){ - geom.setLeft(geom.x() - (minsize.width()-geom.size().width())); //reset back to min width - } - break; - case ResizeLeft: - geom.setLeft(ev->globalPos().x()-offset.x()); - if(geom.size().width() < minsize.width()){ - geom.setLeft(geom.x() - (minsize.width()-geom.size().width())); //reset back to min width - } - break; - case ResizeTopLeft: - geom.setTopLeft(ev->globalPos()-offset); - if(geom.size().height() < minsize.height()){ - geom.setTop(geom.y() - (minsize.height()-geom.size().height())); //reset back to min height - } - if(geom.size().width() < minsize.width()){ - geom.setLeft(geom.x() - (minsize.width()-geom.size().width())); //reset back to min width - } - break; - default: - break; - } - //if( (geom.width()%2==0 && geom.height()%2==0) || activeState==Move){ - //qDebug() << " Change Window:" << this->geometry() << geom; - if(activeState==Move){ this->setGeometry(geom); } - else{ - //qDebug() << " Change Window Dimensions:" << this->geometry() << geom; - //qDebug() << " - Mouse Pos:" << ev->globalPos() << ev->pos() << "Offset" << offset; - this->setGeometry(geom); - } - //} - } -} - -void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ - //Check for a right-click event - //qDebug() << "Frame Mouse Release Event"; - QFrame::mouseReleaseEvent(ev); - if( (activeState==Normal) && (titleBar->geometry().contains(ev->pos())) && (ev->button()==Qt::RightButton) ){ - //WinWidget->raiseWindow();//need to ensure the native window is always on top of this frame but under the menu - otherM->popup(ev->globalPos()); - return; - } - if(activeState!=Normal){ - if(WinWidget->isPaused()){ WinWidget->resume(); } - activeState = Normal; - QApplication::restoreOverrideCursor(); - setMouseCursor( getStateAtPoint(ev->pos()) ); - } - if(QFrame::mouseGrabber() == this){ this->releaseMouse(); } - activate(); - //QTimer::singleShot(0, WinWidget, SLOT(raiseWindow()) ); -} - -/*void RootSubWindow::enterEvent(QEvent *ev){ - QFrame::enterEvent(ev); - WinWidget->raiseWindow(); -}*/ -/*void RootSubWindow::leaveEvent(QEvent *ev){ - QFrame::leaveEvent(ev); - if(activeState == Normal){ - setMouseCursor(Normal); - } - if(!QRect(QPoint(0,0),this->size()).contains( this->mapFromGlobal(QCursor::pos())) ){ WinWidget->lowerWindow(); } -}*/ - -void RootSubWindow::moveEvent(QMoveEvent *ev){ - //qDebug() << "Got Move Event:" << ev->pos() << WinWidget->geometry(); - QFrame::moveEvent(ev); - if(!closing && !WinWidget->isPaused()){ - moveTimer->start(); - } -} diff --git a/src-qt5/core/libLumina/RootSubWindow.h b/src-qt5/core/libLumina/RootSubWindow.h deleted file mode 100644 index 598298e2..00000000 --- a/src-qt5/core/libLumina/RootSubWindow.h +++ /dev/null @@ -1,109 +0,0 @@ -//=========================================== -// Lumina Desktop source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This class embeds a native window -// within the RootWindow area -//=========================================== -#ifndef _LUMINA_ROOT_WINDOW_SUB_WINDOW_H -#define _LUMINA_ROOT_WINDOW_SUB_WINDOW_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class RootSubWindow : public QFrame{ - Q_OBJECT -public: - RootSubWindow(QWidget *root, NativeWindow *win); - ~RootSubWindow(); - - WId id(); - NativeWindow* nativeWindow(); - -private: - //Window status - enum ModState{Normal, Move, ResizeTop, ResizeTopRight, ResizeRight, ResizeBottomRight, ResizeBottom, ResizeBottomLeft, ResizeLeft, ResizeTopLeft}; - ModState activeState; - ModState currentCursor; - QPoint offset; //needed for movement calculations (offset from mouse click to movement point) - //Functions for getting/setting state - ModState getStateAtPoint(QPoint pt, bool setoffset = false); //generally used for mouse location detection - void setMouseCursor(ModState, bool override = false); //Update the mouse cursor based on state - - //Native window embed objects - NativeWindow *WIN; - NativeEmbedWidget *WinWidget; - bool closing; - //Title bar objects - QBoxLayout *titleBarL, *mainLayout; - QToolButton *closeB, *maxB, *minB, *otherB; - QLabel *titleLabel; - QMenu *otherM; //menu of other actions - QWidget *titleBar; - //Other random objects (animations,etc) - QPropertyAnimation *anim; - QVariant animResetProp; - QTimer *moveTimer; - QRect lastGeom, lastMaxGeom; //frame coordinates - - void initWindowFrame(); - void enableFrame(bool); - void enableFrame(QList types); - - void LoadProperties( QList< NativeWindow::Property> list); - - static QStringList validAnimations(NativeWindow::Property); - -public slots: - void ensureVisible(){ WIN->setProperty(NativeWindow::Visible, true); } - void giveMouseFocus(){ WinWidget->raiseWindow(); } - void removeMouseFocus(){ WinWidget->lowerWindow(); } - void giveKeyboardFocus(){ WIN->requestProperty(NativeWindow::Active, true, true); } - - void clientClosed(); - void LoadAllProperties(); - - QRect clientGlobalGeom(); - - //Button Actions - public so they can be tied to key shortcuts and stuff as well - void toggleMinimize(); - void toggleMaximize(); - void triggerClose(); - void toggleSticky(); - void activate(); - - //Mouse Interactivity - void startMoving(); - void startResizing(); - -private slots: - void propertiesChanged(QList, QList); - - void loadAnimation(QString name, NativeWindow::Property, QVariant nval); //new val - void animFinished(); - -protected: - void mousePressEvent(QMouseEvent*); - void mouseMoveEvent(QMouseEvent*); - void mouseReleaseEvent(QMouseEvent*); - //void leaveEvent(QEvent *ev); - //void enterEvent(QEvent *ev); - void moveEvent(QMoveEvent *ev); - -signals: - void windowMoved(RootSubWindow*); - void windowAnimFinished(); -}; - -#endif diff --git a/src-qt5/core/libLumina/RootWindow-mgmt.cpp b/src-qt5/core/libLumina/RootWindow-mgmt.cpp deleted file mode 100644 index 24ea639b..00000000 --- a/src-qt5/core/libLumina/RootWindow-mgmt.cpp +++ /dev/null @@ -1,95 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "RootWindow.h" - -//Primary/private function -void RootWindow::arrangeWindows(RootSubWindow *primary, QString type, bool primaryonly){ - if(type.isEmpty()){ type = "center"; } - if(primary==0){ - //Get the currently active window and treat that as the primary - for(int i=0; inativeWindow()->property(NativeWindow::Active).toBool()){ primary = WINDOWS[i]; } - } - if(primary==0 && !WINDOWS.isEmpty()){ primary = WINDOWS[0]; } //just use the first one in the list - } - //Now get the current screen that the mouse cursor is over (and valid area) - QScreen *screen = screenUnderMouse(); - QRect desktopArea = screen->availableGeometry(); - //qDebug() << "Arrange Windows:" << primary->geometry() << type << primaryonly << desktopArea; - //Now start filtering out all the windows that need to be ignored - int wkspace = primary->nativeWindow()->property(NativeWindow::Workspace).toInt(); - QList winlist = WINDOWS; - for(int i=0; inativeWindow()->property(NativeWindow::Workspace).toInt()!=wkspace - || !winlist[i]->nativeWindow()->property(NativeWindow::Visible).toBool() - || desktopArea.intersected(winlist[i]->geometry()).isNull() ){ - //window is outside of the desired area or invisible - ignore it - winlist.removeAt(i); - i--; - } - } - if(!winlist.contains(primary)){ winlist << primary; } //could be doing this on a window right before it is shown - else if(primaryonly){ winlist.removeAll(primary); winlist << primary; } //move primary window to last - //QRegion used; - for(int i=0; igeometry(); - //verify that the window is contained by the desktop area - if(geom.width()>desktopArea.width()){ geom.setWidth(desktopArea.width()); } - if(geom.height()>desktopArea.height()){ geom.setHeight(desktopArea.height()); } - //Now apply the proper placement routine - if(type=="center"){ - QPoint ct = desktopArea.center(); - winlist[i]->setGeometry( ct.x()-(geom.width()/2), ct.y()-(geom.height()/2), geom.width(), geom.height()); - }else if(type=="snap"){ - - }else if(type=="single_max"){ - winlist[i]->setGeometry( desktopArea.x(), desktopArea.y(), desktopArea.width(), desktopArea.height()); - }else if(type=="under-mouse"){ - QPoint ct = QCursor::pos(); - geom = QRect(ct.x()-(geom.width()/2), ct.y()-(geom.height()/2), geom.width(), geom.height() ); - //Now verify that the top of the window is still contained within the desktop area - if(geom.y() < desktopArea.y() ){ geom.moveTop(desktopArea.y()); } - winlist[i]->setGeometry(geom); - - } - //qDebug() << " - New Geometry:" << winlist[i]->geometry(); - } //end loop over winlist -} - -// ================ -// Public slots for starting the arrangement routine(s) above -// ================ -void RootWindow::ArrangeWindows(WId primary, QString type){ - RootSubWindow* win = windowForId(primary); - if(type.isEmpty()){ type = "center"; } //grab the default arrangement format - arrangeWindows(win, type); -} - -void RootWindow::TileWindows(WId primary, QString type){ - RootSubWindow* win = windowForId(primary); - if(type.isEmpty()){ type = "single_max"; } //grab the default arrangement format for tiling - arrangeWindows(win, type); -} - -void RootWindow::CheckWindowPosition(WId id, bool newwindow){ - //used after a "drop" to validate/snap/re-arrange window(s) as needed - // if "newwindow" is true, then this is the first-placement routine for a window before it initially appears - RootSubWindow* win = windowForId(id); - if(win==0){ return; } //invalid window - QRect geom = win->nativeWindow()->geometry(); - bool changed = false; - //Make sure it is on the screen (quick check) - if(geom.x() < 0){ changed = true; geom.moveLeft(0); } - if(geom.y() < 0){ changed = true; geom.moveTop(0); } - if(geom.width() < 20){ changed = true; geom.setWidth(100); } - if(geom.height() < 20){ changed = true; geom.setHeight(100); } - if(changed){ win->setGeometry(geom); } - //Now run it through the window arrangement routine - arrangeWindows(win, newwindow ?"center" : "snap", true); -} diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp deleted file mode 100644 index 705297be..00000000 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ /dev/null @@ -1,283 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2016, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include "RootWindow.h" - -#include -#include -#include - -#define DEBUG 0 - -// === PUBLIC === -RootWindow::RootWindow() : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint | Qt::WindowStaysOnBottomHint){ - qRegisterMetaType("WId"); - autoResizeTimer = 0; - lastActiveMouse = 0; - mouseFocusTimer = 0; - this->setMouseTracking(true); -} - -RootWindow::~RootWindow(){ - -} - -void RootWindow::start(){ - - if(autoResizeTimer==0){ - autoResizeTimer = new QTimer(this); - autoResizeTimer->setInterval(100); //1/10 second (collect all nearly-simultaneous signals and compress into a single update) - autoResizeTimer->setSingleShot(true); - connect(autoResizeTimer, SIGNAL(timeout()), this, SLOT(ResizeRoot()) ); - connect(QApplication::desktop(), SIGNAL(resized(int)), autoResizeTimer, SLOT(start()) ); - connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), autoResizeTimer, SLOT(start()) ); - } - if(mouseFocusTimer==0){ - mouseFocusTimer = new QTimer(this); - mouseFocusTimer->setInterval(100); - connect(mouseFocusTimer, SIGNAL(timeout()), this, SLOT(checkMouseFocus()) ); - - } - this->show(); - ResizeRoot(); - emit RegisterVirtualRoot(this->winId()); -} - -// === PRIVATE === -void RootWindow::updateScreenPixmap(screeninfo *info){ - QPixmap pix(info->area.size()); - if(info->scale == RootWindow::SolidColor){ - QColor color; - if(info->file.startsWith("rgb(")){ - QStringList colors = info->file.section(")",0,0).section("(",1,1).split(","); - color = QColor(colors[0].toInt(), colors[1].toInt(), colors[2].toInt()); - }else{ - color = QColor(info->file); - } - pix.fill(color); - }else{ - QPixmap raw(info->file); //load the image from file - //Now apply the proper aspect ratio as needed - if(info->scale == RootWindow::Stretch || info->scale == RootWindow::Full || info->scale == RootWindow::Fit){ - Qt::AspectRatioMode armode = Qt::KeepAspectRatio; - if(info->scale == RootWindow::Stretch ){ armode = Qt::IgnoreAspectRatio; } - else if(info->scale == RootWindow::Full ){ armode = Qt::KeepAspectRatioByExpanding; } - if(raw.height()!=info->area.height() && raw.width() !=info->area.width()){ - raw = raw.scaled(info->area.size(), armode); - } - } - //Now calculate offset and draw width/height - QRect drawRect(0,0, raw.width(), raw.height()); - if(info->scale == RootWindow::Full ){ - drawRect.moveTo( (info->area.width() - raw.width())/2, (info->area.height() - raw.height())/2 ); - }else if(info->scale == RootWindow::Fit ){ - drawRect.moveTo( (info->area.width() - raw.width())/2, (info->area.height() - raw.height())/2 ); - }else if(info->scale == RootWindow::Center ){ - drawRect.moveTo( (info->area.width() - raw.width())/2, (info->area.height() - raw.height())/2 ); - }else if(info->scale == RootWindow::Tile ){ - //Draw the entire area - no offset - drawRect.setHeight(info->area.height()); - drawRect.setWidth(info->area.width()); - }else if(info->scale == RootWindow::BottomLeft ){ - drawRect.moveTo( 0 , info->area.height() - raw.height() ); - }else if(info->scale == RootWindow::BottomRight ){ - drawRect.moveTo( (info->area.width() - raw.width()), (info->area.height() - raw.height()) ); - }else if(info->scale == RootWindow::BottomCenter ){ - drawRect.moveTo( (info->area.width() - raw.width())/2, info->area.height() - raw.height() ); - }else if(info->scale == RootWindow::TopLeft ){ - drawRect.moveTo( 0, 0 ); - }else if(info->scale == RootWindow::TopRight ){ - drawRect.moveTo( (info->area.width() - raw.width()), 0); - }else if(info->scale == RootWindow::TopCenter ){ - drawRect.moveTo( (info->area.width() - raw.width())/2, 0); - }else if(info->scale == RootWindow::CenterLeft ){ - drawRect.moveTo( 0, (info->area.height() - raw.height())/2 ); - }else if(info->scale == RootWindow::CenterRight ){ - drawRect.moveTo( (info->area.width() - raw.width()), (info->area.height() - raw.height())/2 ); - } - - QPainter P(&pix); - P.setBrush(raw); - P.setBrushOrigin( drawRect.x(), drawRect.y() ); - P.drawRect( drawRect ); -} //end SolidColor Check - - info->wallpaper = pix; -} - -RootSubWindow* RootWindow::windowForId(WId id){ - RootSubWindow *tmp = 0; - for(int i=0; iid() == id){ tmp = WINDOWS[i]; } - } - return tmp; -} - -QScreen* RootWindow::screenUnderMouse(){ - QPoint mpos = QCursor::pos(); - QList scrns = QApplication::screens(); - for(int i=0; igeometry().contains(mpos)){ return scrns[i]; } - } - //Could not find an exact match - just return the first one - return scrns.first(); -} - -// === PUBLIC SLOTS === -void RootWindow::ResizeRoot(){ - if(DEBUG){ qDebug() << "Resize Root..."; } - QList scrns = QApplication::screens(); - //Update all the screen locations and ID's in the WALLPAPERS list - QRect fullscreen; - QStringList valid; - //Update the size of the rootWindow itself - for(int i=0; iname() << scrns[i]->geometry(); } - fullscreen = fullscreen.united(scrns[i]->geometry()); - valid << scrns[i]->name(); - for(int j=0; jname()){ - QSize oldsize = WALLPAPERS[j].area.size(); - WALLPAPERS[j].area = scrns[i]->geometry(); - if(oldsize != WALLPAPERS[j].area.size()){ updateScreenPixmap(&WALLPAPERS[j]); } - break; - } - } - } - //Now clean up any invalid screen info in the WALLPAPERS List - QStringList invalid; - for(int i=0; isetGeometry(fullscreen); - this->update(); - emit RootResized(fullscreen); - if(!valid.isEmpty()){ emit NewScreens(valid); } - if(!invalid.isEmpty()){ emit RemovedScreens(invalid); } - if(DEBUG){ qDebug() << " - Geom after change:" << this->geometry(); } -} - -void RootWindow::ChangeWallpaper(QString id, RootWindow::ScaleType scale, QString file){ - bool found = false; - for(int i=0; i scrns = QApplication::screens(); - for(int i=0; iname()==id){ - screeninfo info; - info.id = id; - info.file = file; - info.scale = scale; - info.area = scrns[i]->geometry(); - updateScreenPixmap(&info); - //qDebug() << " --- Loaded Wallpaper:" << info.id << info.file << info.area; - WALLPAPERS << info; - break; - } - } - } //end check for a new id - -} - -void RootWindow::checkMouseFocus(){ - QPoint cpos = QCursor::pos(); - if(lastCursorPos != cpos){ emit MouseMoved(); } - lastCursorPos = cpos; - QWidget *child = this->childAt(QCursor::pos()); - while(child!=0 && child->whatsThis()!="RootSubWindow"){ - child = child->parentWidget(); - if(child==this){ child = 0;} //end of the line - } - - if(child==lastActiveMouse){ return; } //nothing new to do - //Make sure the child is actually a RootSubWindow - if(lastActiveMouse!=0){ lastActiveMouse->removeMouseFocus(); lastActiveMouse = 0; } - if(child!=0){ - lastActiveMouse = static_cast(child); - - if(DesktopSettings::instance()->value(DesktopSettings::WM, "focusFollowsMouse", true).toBool()){ - lastActiveMouse->giveKeyboardFocus(); - if(DesktopSettings::instance()->value(DesktopSettings::WM, "raiseOnFocus", false).toBool()){ - lastActiveMouse->raise(); - } - } - lastActiveMouse->giveMouseFocus(); //always give mouse focus on mouseover - } -} - -void RootWindow::NewWindow(NativeWindow *win){ - RootSubWindow *subwin = 0; - //qDebug() << "Got New Window:" << win->property(NativeWindow::Title); - for(int i=0; iid() == win->id()){ subwin = WINDOWS[i]; } - } - if(subwin==0){ - subwin = new RootSubWindow(this, win); - subwin->setWhatsThis("RootSubWindow"); - connect(win, SIGNAL(WindowClosed(WId)), this, SLOT(CloseWindow(WId)) ); - connect(subwin, SIGNAL(windowAnimFinished()), this, SLOT(checkMouseFocus()) ); - WINDOWS << subwin; - } - //QApplication::processEvents(); - CheckWindowPosition(win->id(), true); //first-time run - //QTimer::singleShot(300, subwin, SLOT(ensureVisible())); - win->setProperty(NativeWindow::Visible, true); - //win->requestProperty( NativeWindow::Active, true); - //win->requestProperties(QList() << NativeWindow::Visible << NativeWindow::Active, QList() << true << true, true); - if(!mouseFocusTimer->isActive()){ mouseFocusTimer->start(); } -} - -void RootWindow::CloseWindow(WId win){ - for(int i=0; iid() == win){ - if(lastActiveMouse==WINDOWS[i]){ lastActiveMouse = 0; } //no longer valid - WINDOWS.takeAt(i)->clientClosed(); - break; - } - } - if(WINDOWS.isEmpty()){ mouseFocusTimer->stop(); } //no windows to look for -} - -// === PRIVATE SLOTS === - -// === PROTECTED === -void RootWindow::paintEvent(QPaintEvent *ev){ - //qDebug() << "RootWindow: PaintEvent:" << ev->rect(); //<< QDateTime::currentDateTime()->toString(QDateTime::ShortDate); - //QWidget::paintEvent(ev); - bool found = false; - QPainter painter(this); - QRect geom = ev->rect(); - geom.adjust(-100,-100,100,100); //give it a few more pixels in each direction to repaint (noticing some issues in Qt 5.7.1) - for(int i=0; i -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "RootSubWindow.h" - -#include -#include - -class RootWindow : public QWidget{ - Q_OBJECT -public: - enum ScaleType{ SolidColor, Stretch, Full, Fit, Center, Tile, BottomLeft, BottomRight, BottomCenter, \ - TopLeft, TopRight, TopCenter, CenterLeft, CenterRight}; - - RootWindow(); - ~RootWindow(); - - void start(); - -private: - struct screeninfo{ - QString id; - QRect area; - QString file; - ScaleType scale; - QPixmap wallpaper; //Note: This pixmap will always be the same size as "area" - }; - QTimer *autoResizeTimer, *mouseFocusTimer; - RootSubWindow *lastActiveMouse; - QPoint lastCursorPos; - - QList WALLPAPERS; - void updateScreenPixmap(screeninfo *info); //used for recalculating the wallpaper pixmap based on file/area/scale as needed - - //Window Management - QList WINDOWS; - RootSubWindow* windowForId(WId id); - void arrangeWindows(RootSubWindow *primary = 0, QString type = "", bool primaryonly = false); - - QScreen* screenUnderMouse(); - - -public slots: - void ResizeRoot(); - void ChangeWallpaper(QString id, RootWindow::ScaleType scale, QString file); - //Note: for "SingleColor" scaling the "file" variable should be "rgb(R,G,B)" or "#hexcode" - void checkMouseFocus(); - - void NewWindow(NativeWindow*); - void CloseWindow(WId); //automatically connected for any new native window - - //Window arrangement functions - defined in "RootWindow-mgmt.cpp" - void ArrangeWindows(WId primary = 0, QString type = ""); - void TileWindows(WId primary = 0, QString type = ""); - void CheckWindowPosition(WId, bool newwindow = false); //used after a "drop" to validate/snap/re-arrange window(s) as needed - -private slots: - -protected: - void paintEvent(QPaintEvent *ev); - -signals: - void RegisterVirtualRoot(WId); - void RootResized(QRect); - void NewScreens(QStringList); // [screen_id_1, screen_id_2, etc..] - void RemovedScreens(QStringList); // [screen_id_1, screen_id_2, etc..] - void WorkspaceChanged(int); - void MouseMoved(); - -}; - -#endif diff --git a/src-qt5/core/libLumina/RootWindow.pri b/src-qt5/core/libLumina/RootWindow.pri deleted file mode 100644 index 9426b6b4..00000000 --- a/src-qt5/core/libLumina/RootWindow.pri +++ /dev/null @@ -1,17 +0,0 @@ - -# Files -SOURCES *= $${PWD}/RootWindow.cpp \ - $${PWD}/RootWindow-mgmt.cpp \ - $${PWD}/RootSubWindow.cpp \ - $${PWD}/RootSubWindow-animations.cpp - -HEADERS *= $${PWD}/RootWindow.h \ - $${PWD}/RootSubWindow.h - -INCLUDEPATH *= ${PWD} - -# include other library dependencies -include(LUtils.pri) -include(NativeWindow.pri) -include(LIconCache.pri) -include(DesktopSettings.pri) diff --git a/src-qt5/core/libLumina/obsolete/RootSubWindow-animations.cpp b/src-qt5/core/libLumina/obsolete/RootSubWindow-animations.cpp new file mode 100644 index 00000000..efab20fe --- /dev/null +++ b/src-qt5/core/libLumina/obsolete/RootSubWindow-animations.cpp @@ -0,0 +1,116 @@ +//=========================================== +// Lumina Desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "RootSubWindow.h" +#include + +QStringList RootSubWindow::validAnimations(NativeWindow::Property prop){ + QStringList valid; + if(prop == NativeWindow::Visible){ + valid << "zoom" << "wipe-center-vertical" << "wipe-center-horizontal" << "shade-top" << "shade-right" << "shade-left" << "shade-bottom"; + }else if(prop == NativeWindow::Size){ + //Note: this is used for pretty much all geometry changes to the window where it is visible both before/after animation + valid << "direct"; + } + return valid; +} + +void RootSubWindow::loadAnimation(QString name, NativeWindow::Property prop, QVariant nval){ + if(anim->state()==QAbstractAnimation::Running){ return; } //already running + animResetProp.clear(); + //Special case - random animation each time + if(name=="random"){ + QStringList valid = validAnimations(prop); + if(!valid.isEmpty()){ name = valid.at(qrand()%valid.length()); } + } + //Now setup the animation + if(prop == NativeWindow::Visible){ + //NOTE: Assigns values for "invisible->visible" animation: will reverse it afterwards as needed + anim->setPropertyName("geometry"); + QRect geom = this->geometry(); + if(name == "zoom"){ + //Zoom to/from the center point + anim->setStartValue( QRect(geom.center(), QSize(0,0)) ); + anim->setEndValue(geom); + }else if(name == "wipe-center-vertical"){ + anim->setStartValue( QRect( geom.center().x(), geom.y(), 0, geom.height()) ); + anim->setEndValue( geom ); + }else if(name == "wipe-center-horizontal"){ + anim->setStartValue( QRect( geom.x(), geom.center().y(), geom.width(), 0) ); + anim->setEndValue( geom ); + }else if(name == "shade-top"){ + anim->setStartValue( QRect( geom.x(), geom.y(), geom.width(), 0) ); + anim->setEndValue( geom ); + }else if(name == "shade-bottom"){ + anim->setStartValue( QRect( geom.x(), geom.y()+geom.height(), geom.width(), 0) ); + anim->setEndValue( geom ); + }else if(name == "shade-left"){ + anim->setStartValue( QRect( geom.x(), geom.y(), 0, geom.height()) ); + anim->setEndValue( geom ); + }else if(name == "shade-right"){ + anim->setStartValue( QRect( geom.x()+geom.width(), geom.y(), 0, geom.height()) ); + anim->setEndValue( geom ); + }else{ + //Invalid/None animation + if(nval.toBool()){ this->show(); } + else{ this->hide(); } + return; + } + if(nval.toBool()){ + this->setGeometry( anim->startValue().toRect() ); //ensure the window is the initial geom before it becomes visible + //QTimer::singleShot( anim->duration()+5, this, SLOT(activate()) ); + }else{ + QVariant tmp = anim->startValue(); + anim->setStartValue(anim->endValue()); + anim->setEndValue(tmp); + animResetProp = anim->startValue(); + QTimer::singleShot(anim->duration(), this, SLOT(hide()) ); + } + WinWidget->pause(); + anim->start(); + this->show(); + } //end of Visibility animation + else if(prop == NativeWindow::Size){ + //This is pretty much all geometry animations where the window is visible->visible + anim->setPropertyName("geometry"); + anim->setStartValue(this->geometry()); + anim->setEndValue(nval.toRect()); + /*if(name==""){ + // TO-DO modify the path from beginning->end somehow + }*/ + // Now start the animation + WinWidget->pause(); + anim->start(); + this->show(); + } +} + +void RootSubWindow::animFinished(){ + if(closing){ this->close(); return;} + else if(anim->propertyName()=="geometry"){ + if(!animResetProp.isNull()){ + /*qDebug() << "Animation Finished, Reset Geometry:" << animResetProp.toRect(); + qDebug() << " - Starting Value:" << anim->startValue().toRect(); + qDebug() << " - Ending Value:" << anim->endValue().toRect();*/ + this->setGeometry( animResetProp.toRect() ); + //Also ensure that the proper geometry is saved to the window structure + QRect curg = this->geometry(); + QRect wing = WIN->geometry(); + //qDebug() << " - After Animation Reset:" << curg << wing; + if(curg!=wing){ + QRect clientg = clientGlobalGeom(); + //qDebug() << "Sub Window geometry:" << clientg; + WIN->setProperties(QList< NativeWindow::Property>() << NativeWindow::Size << NativeWindow::GlobalPos, + QList() << clientg.size() << clientg.topLeft() ); + } + } + WinWidget->resyncWindow(); //also let the window know about the current geometry + } + animResetProp = QVariant(); //clear the variable + //QTimer::singleShot(10, WinWidget, SLOT(resume()) ); + WinWidget->resume(); + emit windowAnimFinished(); +} diff --git a/src-qt5/core/libLumina/obsolete/RootSubWindow.cpp b/src-qt5/core/libLumina/obsolete/RootSubWindow.cpp new file mode 100644 index 00000000..5040f2f9 --- /dev/null +++ b/src-qt5/core/libLumina/obsolete/RootSubWindow.cpp @@ -0,0 +1,601 @@ +//=========================================== +// Lumina Desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "RootSubWindow.h" +#include +#include +#include +#include +#include +#include + +#define WIN_BORDER 5 + +#include +#include + +// === PUBLIC === +RootSubWindow::RootSubWindow(QWidget *root, NativeWindow *win) : QFrame(root){ + this->setAttribute(Qt::WA_DeleteOnClose); + this->setMouseTracking(true); + //Create the QWindow and QWidget containers for the window + WIN = win; + closing = false; + initWindowFrame(); + //Hookup the signals/slots + connect(WIN, SIGNAL(PropertiesChanged(QList, QList)), this, SLOT(propertiesChanged(QList, QList))); + WinWidget->embedWindow(WIN); + //qDebug() << "[NEW WINDOW]" << WIN->id() << WinWidget->winId() << this->winId(); + activeState = RootSubWindow::Normal; + LoadAllProperties(); +} + +RootSubWindow::~RootSubWindow(){ + //qDebug() << "Visible Window Destroyed"; + WIN->deleteLater(); +} + +WId RootSubWindow::id(){ + return WIN->id(); +} + +NativeWindow* RootSubWindow::nativeWindow(){ + return WIN; +} + +// === PRIVATE === +RootSubWindow::ModState RootSubWindow::getStateAtPoint(QPoint pt, bool setoffset){ + //Note: pt should be in widget-relative coordinates, not global + if(!WinWidget->geometry().contains(pt) && !titleBar->geometry().contains(pt)){ + //above the frame itself - need to figure out which quadrant it is in (8-directions) + if(pt.y() < WIN_BORDER){ + //One of the top options + if(pt.x() < this->width()/5){ + if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()); } //difference from top-left corner + return ResizeTopLeft; + }else if(pt.x() > (this->width()*4.0/5.0)){ + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()); } //difference from top-right corner + return ResizeTopRight; + }else{ + if(setoffset){ offset.setX(0); offset.setY(pt.y()); } //difference from top edge (X does not matter) + return ResizeTop; + } + }else if(pt.y() > (this->height()-WIN_BORDER) ){ + //One of the bottom options + if(pt.x() < this->width()/5){ + if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()-this->height()); } //difference from bottom-left corner + return ResizeBottomLeft; + }else if(pt.x() > (this->width()*4.0/5.0)){ + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()-this->height()); } //difference from bottom-right corner + return ResizeBottomRight; + }else{ + if(setoffset){ offset.setX(0); offset.setY(pt.y()-this->height()); } //difference from bottom edge (X does not matter) + return ResizeBottom; + } + }else if(pt.x() < WIN_BORDER){ + //Left side options + if(pt.y() < this->height()/5){ + if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()); } //difference from top-left corner + return ResizeTopLeft; + }else if(pt.y() > (this->height()*4.0/5.0)){ + if(setoffset){ offset.setX(pt.x()); offset.setY(pt.y()-this->height()); } //difference from bottom-left corner + return ResizeBottomLeft; + }else{ + if(setoffset){ offset.setX(pt.x()); offset.setY(0); } //difference from left edge (Y does not matter) + return ResizeLeft; + } + }else if(pt.x() > (this->width()-WIN_BORDER) ){ + //Right side options + if(pt.y() < this->height()/5){ + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()); } //difference from top-right corner + return ResizeTopRight; + }else if(pt.y() > (this->height()*4.0/5.0)){ + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(pt.y()-this->height()); } //difference from bottom-right corner + return ResizeBottomRight; + }else{ + if(setoffset){ offset.setX(pt.x()-this->width()); offset.setY(0); } //difference from right edge (Y does not matter) + return ResizeRight; + } + }else{ + return Normal; + } + } + //if it gets this far just return normal + return Normal; +} + +void RootSubWindow::setMouseCursor(ModState state, bool override){ + if(currentCursor==state && !override){ return; } //nothing to change + Qt::CursorShape shape; + switch(state){ + case Normal: + shape = Qt::ArrowCursor; + break; + case Move: + shape = Qt::SizeAllCursor; + break; + case ResizeTop: + shape = Qt::SizeVerCursor; + break; + case ResizeTopRight: + shape = Qt::SizeBDiagCursor; + break; + case ResizeRight: + shape = Qt::SizeHorCursor; + break; + case ResizeBottomRight: + shape = Qt::SizeFDiagCursor; + break; + case ResizeBottom: + shape = Qt::SizeVerCursor; + break; + case ResizeBottomLeft: + shape = Qt::SizeBDiagCursor; + break; + case ResizeLeft: + shape = Qt::SizeHorCursor; + break; + case ResizeTopLeft: + shape = Qt::SizeFDiagCursor; + break; + } + if(override){ + QApplication::setOverrideCursor(QCursor(shape)); + }else{ + currentCursor = state; + this->setCursor(shape); + } +} + +void RootSubWindow::initWindowFrame(){ + //qDebug() << "Create RootSubWindow Frame"; + this->setContentsMargins(0,0,0,0); + mainLayout = new QVBoxLayout(this); + mainLayout->setContentsMargins(0,0,0,0); + titleBar = new QWidget(this); + titleBar->setContentsMargins(0,0,0,0); + titleBarL = new QHBoxLayout(titleBar); + titleBarL->setContentsMargins(0,0,0,0); + closeB = new QToolButton(this); + maxB = new QToolButton(this); + minB = new QToolButton(this); + otherB = new QToolButton(this); + anim = new QPropertyAnimation(this); + anim->setTargetObject(this); + anim->setDuration(200); //1/5 second (appx) + connect(anim, SIGNAL(finished()), this, SLOT(animFinished()) ); + titleLabel = new QLabel(this); + titleLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + otherM = new QMenu(this); //menu of other actions + otherB->setMenu(otherM); + otherB->setPopupMode(QToolButton::InstantPopup); + otherB->setAutoRaise(true); + WinWidget = new NativeEmbedWidget(this); + connect(closeB, SIGNAL(clicked()), this, SLOT(triggerClose()) ); + connect(maxB, SIGNAL(clicked()), this, SLOT(toggleMaximize()) ); + connect(minB, SIGNAL(clicked()), this, SLOT(toggleMinimize()) ); + //Now assemble the frame layout based on the current settings + titleBarL->addWidget(otherB); + titleBarL->addWidget(titleLabel); + titleBarL->addWidget(minB); + titleBarL->addWidget(maxB); + titleBarL->addWidget(closeB); + WinWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + titleBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + mainLayout->addWidget(titleBar); + mainLayout->addWidget(WinWidget); + mainLayout->setAlignment(titleBar, Qt::AlignTop); + //Setup the cursors for the buttons + closeB->setCursor(Qt::ArrowCursor); + minB->setCursor(Qt::ArrowCursor); + maxB->setCursor(Qt::ArrowCursor); + otherB->setCursor(Qt::ArrowCursor); + titleLabel->setCursor(Qt::ArrowCursor); + WinWidget->setCursor(Qt::ArrowCursor); + //Now all the stylesheet options + this->setObjectName("WindowFrame"); + closeB->setObjectName("Button_Close"); + minB->setObjectName("Button_Minimize"); + maxB->setObjectName("Button_Maximize"); + otherM->setObjectName("Menu_Actions"); + titleLabel->setObjectName("Label_Title"); + this->setStyleSheet("QFrame#WindowFrame{background-color: rgba(0,0,0,125)} QWidget#Label_Title{background-color: transparent; color: white; } QToolButton{background-color: transparent; border: 1px solid transparent; border-radius: 3px; } QToolButton::hover{background-color: rgba(255,255,255,150); } QToolButton::pressed{ background-color: white; } QToolButton::menu-arrow{ image: none; }"); + //And adjust the margins + mainLayout->setSpacing(0); + titleBarL->setSpacing(1); + this->setFrameStyle(QFrame::NoFrame); + this->setLineWidth(0); + this->setMidLineWidth(0); + this->setFrameRect(QRect(0,0,0,0)); + + //Setup the timer object to syncronize info + moveTimer = new QTimer(this); + moveTimer->setSingleShot(true); + moveTimer->setInterval(100); //1/10 second + connect(moveTimer, SIGNAL(timeout()), WinWidget, SLOT(resyncWindow()) ); + + //Now load the icons for the button + LIconCache::instance()->loadIcon(closeB, "window-close"); + LIconCache::instance()->loadIcon(maxB, "window-maximize"); + LIconCache::instance()->loadIcon(minB, "window-minimize"); + LIconCache::instance()->loadIcon(otherB, "list"); +} + +void RootSubWindow::enableFrame(bool on){ + //Make the individual frame elements visible as needed + if(on){ this->setContentsMargins(WIN_BORDER,WIN_BORDER,WIN_BORDER,WIN_BORDER); }//default border + else{ this->setContentsMargins(0, 0, 0, 0); } + titleBar->setVisible(on); + //And now calculate/save the frame extents + QList extents; extents << 0 << 0 << 0 << 0; //left, right, top, bottom + if(on){ + extents[0] = WIN_BORDER; + extents[1] = WIN_BORDER; + extents[2] = WIN_BORDER + titleBar->height(); + extents[3] = WIN_BORDER; + } + //qDebug() << "SET FRAME EXTENTS:" << extents; + WIN->requestProperty(NativeWindow::FrameExtents, QVariant::fromValue< QList >(extents) ); //save on raw window itself + WIN->setProperty(NativeWindow::FrameExtents, QVariant::fromValue< QList >(extents) ); //save to structure now +} + +void RootSubWindow::enableFrame(QList types){ + static QList noframe; + if(noframe.isEmpty()){ noframe << NativeWindow::T_DESKTOP << NativeWindow::T_DOCK << NativeWindow::T_TOOLBAR << NativeWindow::T_MENU << NativeWindow::T_SPLASH << NativeWindow::T_DROPDOWN_MENU << NativeWindow::T_POPUP_MENU << NativeWindow::T_TOOLTIP << NativeWindow::T_NOTIFICATION << NativeWindow::T_COMBO << NativeWindow::T_DND; } + for(int i=0; i list){ + QList vals; + //Always ensure that visibility changes are evaluated last + bool addvisible = false; + for(int i=0; iproperty(list[i]); + } + //if(addvisible){ list << NativeWindow::Visible; vals << WIN->property(NativeWindow::Visible); } + propertiesChanged(list, vals); +} + +QRect RootSubWindow::clientGlobalGeom(){ + QRect tot = this->geometry(); + QList frame = WIN->property(NativeWindow::FrameExtents).value< QList >(); + //Now adjust this to take out the frame + tot.adjust(frame[0], frame[2], -frame[1], -frame[3]); + return tot; +} + +// === PUBLIC SLOTS === +void RootSubWindow::clientClosed(){ + //qDebug() << "Client Closed"; + closing = true; + if(anim->state()!=QAbstractAnimation::Running){ this->close(); } +} + +void RootSubWindow::LoadAllProperties(){ + QList< NativeWindow::Property> list; + list << NativeWindow::WinTypes << NativeWindow::WinActions << NativeWindow::States + << NativeWindow::MinSize << NativeWindow::MaxSize << NativeWindow::Title << NativeWindow::ShortTitle + << NativeWindow::Icon << NativeWindow::Size << NativeWindow::GlobalPos;// << NativeWindow::Visible << NativeWindow::Active; + LoadProperties(list); + //WIN->requestProperty(NativeWindow::Visible, true); +} + +//Button Actions - public so they can be tied to key shortcuts and stuff as well +void RootSubWindow::toggleMinimize(){ + WIN->toggleVisibility(); +} + +void RootSubWindow::toggleMaximize(){ + //Get the current screen that this window is on + QList screens = QApplication::screens(); + QRect rect; + int primaryscreen = 0; //fallback value + for(int i=0; igeometry().intersected(this->geometry()); + if( (intersect.width()-rect.width() + intersect.height()-rect.height()) > 0){ + rect = intersect; + primaryscreen = i; + } + } + //Now that we have the screen dimensions, lets check/change the window + rect = screens[primaryscreen]->availableGeometry(); + QList< NativeWindow::State > states = WIN->property(NativeWindow::States).value< QList< NativeWindow::State> >(); + if(rect == this->geometry() || states.contains(NativeWindow::S_MAX_VERT) || states.contains(NativeWindow::S_MAX_HORZ)){ + //Already maximized - try to restore it to the previous size/location + if(!lastMaxGeom.isNull()){ + rect = lastMaxGeom; + }else{ + // no last geometry - started out maximized? + // make it half the screen size and centered on the screen + QPoint center = rect.center(); + rect.setWidth( rect.width()/2 ); + rect.setHeight( rect.height()/2 ); + rect.moveTopLeft( center - QPoint(rect.width()/2, rect.height()/2) ); + } + lastMaxGeom = QRect(); //clear this saved geom + }else{ + //Not maximized yet - go ahead and make it so + lastMaxGeom = this->geometry(); //save this for later; + } + //qDebug() << "Toggle Maximize:" << this->geometry() << rect; + QString anim_type = DesktopSettings::instance()->value(DesktopSettings::Animation, "window/move", "random").toString(); + loadAnimation(anim_type, NativeWindow::Size, rect); +} + +void RootSubWindow::triggerClose(){ + WIN->requestClose(); +} + +void RootSubWindow::toggleSticky(){ + QList< NativeWindow::State> states = WIN->property(NativeWindow::States).value< QList< NativeWindow::State > >(); + if(states.contains(NativeWindow::S_STICKY)){ + states.removeAll(NativeWindow::S_STICKY); + }else{ + states << NativeWindow::S_STICKY; + } + WIN->requestProperty(NativeWindow::States, QVariant::fromValue >(states) ); +} + +void RootSubWindow::activate(){ + //WinWidget->raiseWindow(); + WIN->requestProperty(NativeWindow::Active, true, true); +} + +//Mouse Interactivity +void RootSubWindow::startMoving(){ + //If the cursor is not over this window, move it to the center of the titlebar + QPoint curpt = QCursor::pos(); //global coords + if(!this->geometry().contains(curpt)){ + curpt = this->mapToGlobal(titleBar->geometry().center()); + QCursor::setPos(curpt); + } + //Calculate the offset + activeState = Move; + offset = this->mapFromGlobal(curpt); + setMouseCursor(activeState, true); //this one is an override cursor + WinWidget->pause(); + this->grabMouse(); +} + +void RootSubWindow::startResizing(){ + activeState = getStateAtPoint( this->mapFromGlobal(QCursor::pos()), true); //also have it set the offset variable + setMouseCursor(activeState, true); //this one is an override cursor + WinWidget->pause(); + this->grabMouse(); +} + +// === PRIVATE SLOTS === +void RootSubWindow::propertiesChanged(QList props, QList vals){ + for(int i=0; iisPaused() && (this->isVisible()!=vals[i].toBool()) && activeState==Normal ){ + //qDebug() << "Got Visibility Change:" << vals[i] << this->geometry() << WIN->geometry(); + if(vals[i].toBool()){ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/appear", "random").toString(), NativeWindow::Visible, vals[i]); } + else{ loadAnimation( DesktopSettings::instance()->value(DesktopSettings::Animation, "window/disappear", "random").toString(), NativeWindow::Visible, vals[i]); } + } + break; + case NativeWindow::Title: + titleLabel->setText(vals[i].toString()); + break; + case NativeWindow::Icon: + //qDebug() << "Got Icon Change:" << vals[i]; + if(vals[i].value().isNull() ){ LIconCache::instance()->loadIcon(otherB, "list"); } + else{ otherB->setIcon(vals[i].value()); } + break; + case NativeWindow::GlobalPos: + if(vals[i].toPoint()!=QPoint(0,0)){ + WinWidget->resyncWindow(); + } + break; + case NativeWindow::Size: + //qDebug() << " - SIZE CHANGE"; + if(WIN->property(NativeWindow::FrameExtents).isNull() && (iisPaused() && activeState==Normal){ + if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size()){ + //qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); + this->setGeometry( QRect(this->geometry().topLeft(), WIN->geometry().size()) ); + WinWidget->resyncWindow(); + } + } + break; + case NativeWindow::MinSize: + if(vals[i].toSize().isValid()){ + //Just larger than titlebar, with enough space for 8 characters in the titlebar (+4 buttons) + //qDebug() << "Got invalid Min Size: Set a reasonable default minimum"; + WinWidget->setMinimumSize( QSize( this->fontMetrics().height()*4 + this->fontMetrics().width("O")*10, this->fontMetrics().height()*10) ); + WIN->setProperty(NativeWindow::MinSize, WinWidget->minimumSize()); + }else{ + WinWidget->setMinimumSize(vals[i].toSize()); + } + if(WIN->property(NativeWindow::Size).toSize().width() < WinWidget->minimumSize().width() \ + || WIN->property(NativeWindow::Size).toSize().height() < WinWidget->minimumSize().height() ){ + WIN->setProperty(NativeWindow::Size, WinWidget->minimumSize(), true); //force this + //WinWidget->resize(WinWidget->minimumSize()); + } + break; + case NativeWindow::MaxSize: + WinWidget->setMaximumSize(vals[i].toSize()); + break; + case NativeWindow::Active: + if(vals[i].toBool()){ activate(); } //WinWidget->raiseWindow(); } + break; + /*case NativeWindow::FrameExtents: + qDebug() << " - FRAME CHANGE"; + if(vals[i].isNull()){ + vals[i] = QVariant::fromValue >( QList() << WinWidget->geometry().x() << this->width()-WinWidget->geometry().x()-WinWidget->geometry().width() << WinWidget->y() << this->height() - WinWidget->y() - WinWidget->geometry().height() ); + WIN->setProperty(NativeWindow::FrameExtents, vals[i]); + } + qDebug() << "Setting Frame Extents:" << vals[i].value >(); + mainLayout->setContentsMargins( vals[i].value< QList >().at(0),vals[i].value< QList >().at(2) - titleLabel->height(),vals[i].value< QList >().at(1),vals[i].value< QList >().at(3)); + break;*/ + case NativeWindow::WinTypes: + //qDebug() << "Got Window Types:" << vals[i].value< QList >(); + enableFrame(vals[i].value< QList >() ); + break; + default: + qDebug() << "Window Property Unused:" << props[i] << vals[i]; + } + } +} + +// === PROTECTED === +void RootSubWindow::mousePressEvent(QMouseEvent *ev){ + activate(); + this->raise(); + QFrame::mousePressEvent(ev); + //qDebug() << "Frame Mouse Press Event"; + if(activeState != Normal){ return; } // do nothing - already in a state of grabbed mouse + offset.setX(0); offset.setY(0); + if(ev->button()==Qt::LeftButton){ + if(this->childAt(ev->pos())!=0){ + //Clicked on the titlebar + startMoving(); + }else{ + //Clicked on the frame somewhere + startResizing(); + } + } + +} + +void RootSubWindow::mouseMoveEvent(QMouseEvent *ev){ + QFrame::mouseMoveEvent(ev); + if(activeState == Normal){ + setMouseCursor( getStateAtPoint(ev->pos()) ); //just update the mouse cursor + }else{ + //Currently in a modification state + QRect geom = this->geometry(); + QSize minsize(WinWidget->minimumSize().width() + (2*WIN_BORDER), WinWidget->minimumSize().height()+(2*WIN_BORDER)+titleBar->geometry().size().height()); + switch(activeState){ + case Move: + geom.moveTopLeft(ev->globalPos()-offset); //will not change size + break; + case ResizeTop: + geom.setTop(ev->globalPos().y()-offset.y()); + if(geom.size().height() < minsize.height()){ + geom.setTop(geom.y() - (minsize.height()-geom.size().height())); //reset back to min height + } + break; + case ResizeTopRight: + geom.setTopRight(ev->globalPos()-offset); + if(geom.size().height() < minsize.height()){ + geom.setTop(geom.y() - (minsize.height()-geom.size().height())); //reset back to min height + } + if(geom.size().width() < minsize.width()){ + geom.setRight(geom.x() + minsize.width()); //reset back to min width + } + break; + case ResizeRight: + geom.setRight(ev->globalPos().x()-offset.x()); + if(geom.size().width() < minsize.width()){ + geom.setRight(geom.x() + minsize.width()); //reset back to min width + } + break; + case ResizeBottomRight: + geom.setBottomRight(ev->globalPos()-offset); + if(geom.size().height() < minsize.height()){ + geom.setBottom(geom.y() + minsize.height()); //reset back to min height + } + if(geom.size().width() < minsize.width()){ + geom.setRight(geom.x() + minsize.width()); //reset back to min width + } + break; + case ResizeBottom: + geom.setBottom(ev->globalPos().y()-offset.y()); + if(geom.size().height() < minsize.height()){ + geom.setBottom(geom.y() + minsize.height()); //reset back to min height + } + break; + case ResizeBottomLeft: + geom.setBottomLeft(ev->globalPos()-offset); + if(geom.size().height() < minsize.height()){ + geom.setBottom(geom.y() + minsize.height()); //reset back to min height + } + if(geom.size().width() < minsize.width()){ + geom.setLeft(geom.x() - (minsize.width()-geom.size().width())); //reset back to min width + } + break; + case ResizeLeft: + geom.setLeft(ev->globalPos().x()-offset.x()); + if(geom.size().width() < minsize.width()){ + geom.setLeft(geom.x() - (minsize.width()-geom.size().width())); //reset back to min width + } + break; + case ResizeTopLeft: + geom.setTopLeft(ev->globalPos()-offset); + if(geom.size().height() < minsize.height()){ + geom.setTop(geom.y() - (minsize.height()-geom.size().height())); //reset back to min height + } + if(geom.size().width() < minsize.width()){ + geom.setLeft(geom.x() - (minsize.width()-geom.size().width())); //reset back to min width + } + break; + default: + break; + } + //if( (geom.width()%2==0 && geom.height()%2==0) || activeState==Move){ + //qDebug() << " Change Window:" << this->geometry() << geom; + if(activeState==Move){ this->setGeometry(geom); } + else{ + //qDebug() << " Change Window Dimensions:" << this->geometry() << geom; + //qDebug() << " - Mouse Pos:" << ev->globalPos() << ev->pos() << "Offset" << offset; + this->setGeometry(geom); + } + //} + } +} + +void RootSubWindow::mouseReleaseEvent(QMouseEvent *ev){ + //Check for a right-click event + //qDebug() << "Frame Mouse Release Event"; + QFrame::mouseReleaseEvent(ev); + if( (activeState==Normal) && (titleBar->geometry().contains(ev->pos())) && (ev->button()==Qt::RightButton) ){ + //WinWidget->raiseWindow();//need to ensure the native window is always on top of this frame but under the menu + otherM->popup(ev->globalPos()); + return; + } + if(activeState!=Normal){ + if(WinWidget->isPaused()){ WinWidget->resume(); } + activeState = Normal; + QApplication::restoreOverrideCursor(); + setMouseCursor( getStateAtPoint(ev->pos()) ); + } + if(QFrame::mouseGrabber() == this){ this->releaseMouse(); } + activate(); + //QTimer::singleShot(0, WinWidget, SLOT(raiseWindow()) ); +} + +/*void RootSubWindow::enterEvent(QEvent *ev){ + QFrame::enterEvent(ev); + WinWidget->raiseWindow(); +}*/ +/*void RootSubWindow::leaveEvent(QEvent *ev){ + QFrame::leaveEvent(ev); + if(activeState == Normal){ + setMouseCursor(Normal); + } + if(!QRect(QPoint(0,0),this->size()).contains( this->mapFromGlobal(QCursor::pos())) ){ WinWidget->lowerWindow(); } +}*/ + +void RootSubWindow::moveEvent(QMoveEvent *ev){ + //qDebug() << "Got Move Event:" << ev->pos() << WinWidget->geometry(); + QFrame::moveEvent(ev); + if(!closing && !WinWidget->isPaused()){ + moveTimer->start(); + } +} diff --git a/src-qt5/core/libLumina/obsolete/RootSubWindow.h b/src-qt5/core/libLumina/obsolete/RootSubWindow.h new file mode 100644 index 00000000..598298e2 --- /dev/null +++ b/src-qt5/core/libLumina/obsolete/RootSubWindow.h @@ -0,0 +1,109 @@ +//=========================================== +// Lumina Desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This class embeds a native window +// within the RootWindow area +//=========================================== +#ifndef _LUMINA_ROOT_WINDOW_SUB_WINDOW_H +#define _LUMINA_ROOT_WINDOW_SUB_WINDOW_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class RootSubWindow : public QFrame{ + Q_OBJECT +public: + RootSubWindow(QWidget *root, NativeWindow *win); + ~RootSubWindow(); + + WId id(); + NativeWindow* nativeWindow(); + +private: + //Window status + enum ModState{Normal, Move, ResizeTop, ResizeTopRight, ResizeRight, ResizeBottomRight, ResizeBottom, ResizeBottomLeft, ResizeLeft, ResizeTopLeft}; + ModState activeState; + ModState currentCursor; + QPoint offset; //needed for movement calculations (offset from mouse click to movement point) + //Functions for getting/setting state + ModState getStateAtPoint(QPoint pt, bool setoffset = false); //generally used for mouse location detection + void setMouseCursor(ModState, bool override = false); //Update the mouse cursor based on state + + //Native window embed objects + NativeWindow *WIN; + NativeEmbedWidget *WinWidget; + bool closing; + //Title bar objects + QBoxLayout *titleBarL, *mainLayout; + QToolButton *closeB, *maxB, *minB, *otherB; + QLabel *titleLabel; + QMenu *otherM; //menu of other actions + QWidget *titleBar; + //Other random objects (animations,etc) + QPropertyAnimation *anim; + QVariant animResetProp; + QTimer *moveTimer; + QRect lastGeom, lastMaxGeom; //frame coordinates + + void initWindowFrame(); + void enableFrame(bool); + void enableFrame(QList types); + + void LoadProperties( QList< NativeWindow::Property> list); + + static QStringList validAnimations(NativeWindow::Property); + +public slots: + void ensureVisible(){ WIN->setProperty(NativeWindow::Visible, true); } + void giveMouseFocus(){ WinWidget->raiseWindow(); } + void removeMouseFocus(){ WinWidget->lowerWindow(); } + void giveKeyboardFocus(){ WIN->requestProperty(NativeWindow::Active, true, true); } + + void clientClosed(); + void LoadAllProperties(); + + QRect clientGlobalGeom(); + + //Button Actions - public so they can be tied to key shortcuts and stuff as well + void toggleMinimize(); + void toggleMaximize(); + void triggerClose(); + void toggleSticky(); + void activate(); + + //Mouse Interactivity + void startMoving(); + void startResizing(); + +private slots: + void propertiesChanged(QList, QList); + + void loadAnimation(QString name, NativeWindow::Property, QVariant nval); //new val + void animFinished(); + +protected: + void mousePressEvent(QMouseEvent*); + void mouseMoveEvent(QMouseEvent*); + void mouseReleaseEvent(QMouseEvent*); + //void leaveEvent(QEvent *ev); + //void enterEvent(QEvent *ev); + void moveEvent(QMoveEvent *ev); + +signals: + void windowMoved(RootSubWindow*); + void windowAnimFinished(); +}; + +#endif diff --git a/src-qt5/core/libLumina/obsolete/RootWindow-mgmt.cpp b/src-qt5/core/libLumina/obsolete/RootWindow-mgmt.cpp new file mode 100644 index 00000000..24ea639b --- /dev/null +++ b/src-qt5/core/libLumina/obsolete/RootWindow-mgmt.cpp @@ -0,0 +1,95 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "RootWindow.h" + +//Primary/private function +void RootWindow::arrangeWindows(RootSubWindow *primary, QString type, bool primaryonly){ + if(type.isEmpty()){ type = "center"; } + if(primary==0){ + //Get the currently active window and treat that as the primary + for(int i=0; inativeWindow()->property(NativeWindow::Active).toBool()){ primary = WINDOWS[i]; } + } + if(primary==0 && !WINDOWS.isEmpty()){ primary = WINDOWS[0]; } //just use the first one in the list + } + //Now get the current screen that the mouse cursor is over (and valid area) + QScreen *screen = screenUnderMouse(); + QRect desktopArea = screen->availableGeometry(); + //qDebug() << "Arrange Windows:" << primary->geometry() << type << primaryonly << desktopArea; + //Now start filtering out all the windows that need to be ignored + int wkspace = primary->nativeWindow()->property(NativeWindow::Workspace).toInt(); + QList winlist = WINDOWS; + for(int i=0; inativeWindow()->property(NativeWindow::Workspace).toInt()!=wkspace + || !winlist[i]->nativeWindow()->property(NativeWindow::Visible).toBool() + || desktopArea.intersected(winlist[i]->geometry()).isNull() ){ + //window is outside of the desired area or invisible - ignore it + winlist.removeAt(i); + i--; + } + } + if(!winlist.contains(primary)){ winlist << primary; } //could be doing this on a window right before it is shown + else if(primaryonly){ winlist.removeAll(primary); winlist << primary; } //move primary window to last + //QRegion used; + for(int i=0; igeometry(); + //verify that the window is contained by the desktop area + if(geom.width()>desktopArea.width()){ geom.setWidth(desktopArea.width()); } + if(geom.height()>desktopArea.height()){ geom.setHeight(desktopArea.height()); } + //Now apply the proper placement routine + if(type=="center"){ + QPoint ct = desktopArea.center(); + winlist[i]->setGeometry( ct.x()-(geom.width()/2), ct.y()-(geom.height()/2), geom.width(), geom.height()); + }else if(type=="snap"){ + + }else if(type=="single_max"){ + winlist[i]->setGeometry( desktopArea.x(), desktopArea.y(), desktopArea.width(), desktopArea.height()); + }else if(type=="under-mouse"){ + QPoint ct = QCursor::pos(); + geom = QRect(ct.x()-(geom.width()/2), ct.y()-(geom.height()/2), geom.width(), geom.height() ); + //Now verify that the top of the window is still contained within the desktop area + if(geom.y() < desktopArea.y() ){ geom.moveTop(desktopArea.y()); } + winlist[i]->setGeometry(geom); + + } + //qDebug() << " - New Geometry:" << winlist[i]->geometry(); + } //end loop over winlist +} + +// ================ +// Public slots for starting the arrangement routine(s) above +// ================ +void RootWindow::ArrangeWindows(WId primary, QString type){ + RootSubWindow* win = windowForId(primary); + if(type.isEmpty()){ type = "center"; } //grab the default arrangement format + arrangeWindows(win, type); +} + +void RootWindow::TileWindows(WId primary, QString type){ + RootSubWindow* win = windowForId(primary); + if(type.isEmpty()){ type = "single_max"; } //grab the default arrangement format for tiling + arrangeWindows(win, type); +} + +void RootWindow::CheckWindowPosition(WId id, bool newwindow){ + //used after a "drop" to validate/snap/re-arrange window(s) as needed + // if "newwindow" is true, then this is the first-placement routine for a window before it initially appears + RootSubWindow* win = windowForId(id); + if(win==0){ return; } //invalid window + QRect geom = win->nativeWindow()->geometry(); + bool changed = false; + //Make sure it is on the screen (quick check) + if(geom.x() < 0){ changed = true; geom.moveLeft(0); } + if(geom.y() < 0){ changed = true; geom.moveTop(0); } + if(geom.width() < 20){ changed = true; geom.setWidth(100); } + if(geom.height() < 20){ changed = true; geom.setHeight(100); } + if(changed){ win->setGeometry(geom); } + //Now run it through the window arrangement routine + arrangeWindows(win, newwindow ?"center" : "snap", true); +} diff --git a/src-qt5/core/libLumina/obsolete/RootWindow.cpp b/src-qt5/core/libLumina/obsolete/RootWindow.cpp new file mode 100644 index 00000000..705297be --- /dev/null +++ b/src-qt5/core/libLumina/obsolete/RootWindow.cpp @@ -0,0 +1,283 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "RootWindow.h" + +#include +#include +#include + +#define DEBUG 0 + +// === PUBLIC === +RootWindow::RootWindow() : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint | Qt::WindowStaysOnBottomHint){ + qRegisterMetaType("WId"); + autoResizeTimer = 0; + lastActiveMouse = 0; + mouseFocusTimer = 0; + this->setMouseTracking(true); +} + +RootWindow::~RootWindow(){ + +} + +void RootWindow::start(){ + + if(autoResizeTimer==0){ + autoResizeTimer = new QTimer(this); + autoResizeTimer->setInterval(100); //1/10 second (collect all nearly-simultaneous signals and compress into a single update) + autoResizeTimer->setSingleShot(true); + connect(autoResizeTimer, SIGNAL(timeout()), this, SLOT(ResizeRoot()) ); + connect(QApplication::desktop(), SIGNAL(resized(int)), autoResizeTimer, SLOT(start()) ); + connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), autoResizeTimer, SLOT(start()) ); + } + if(mouseFocusTimer==0){ + mouseFocusTimer = new QTimer(this); + mouseFocusTimer->setInterval(100); + connect(mouseFocusTimer, SIGNAL(timeout()), this, SLOT(checkMouseFocus()) ); + + } + this->show(); + ResizeRoot(); + emit RegisterVirtualRoot(this->winId()); +} + +// === PRIVATE === +void RootWindow::updateScreenPixmap(screeninfo *info){ + QPixmap pix(info->area.size()); + if(info->scale == RootWindow::SolidColor){ + QColor color; + if(info->file.startsWith("rgb(")){ + QStringList colors = info->file.section(")",0,0).section("(",1,1).split(","); + color = QColor(colors[0].toInt(), colors[1].toInt(), colors[2].toInt()); + }else{ + color = QColor(info->file); + } + pix.fill(color); + }else{ + QPixmap raw(info->file); //load the image from file + //Now apply the proper aspect ratio as needed + if(info->scale == RootWindow::Stretch || info->scale == RootWindow::Full || info->scale == RootWindow::Fit){ + Qt::AspectRatioMode armode = Qt::KeepAspectRatio; + if(info->scale == RootWindow::Stretch ){ armode = Qt::IgnoreAspectRatio; } + else if(info->scale == RootWindow::Full ){ armode = Qt::KeepAspectRatioByExpanding; } + if(raw.height()!=info->area.height() && raw.width() !=info->area.width()){ + raw = raw.scaled(info->area.size(), armode); + } + } + //Now calculate offset and draw width/height + QRect drawRect(0,0, raw.width(), raw.height()); + if(info->scale == RootWindow::Full ){ + drawRect.moveTo( (info->area.width() - raw.width())/2, (info->area.height() - raw.height())/2 ); + }else if(info->scale == RootWindow::Fit ){ + drawRect.moveTo( (info->area.width() - raw.width())/2, (info->area.height() - raw.height())/2 ); + }else if(info->scale == RootWindow::Center ){ + drawRect.moveTo( (info->area.width() - raw.width())/2, (info->area.height() - raw.height())/2 ); + }else if(info->scale == RootWindow::Tile ){ + //Draw the entire area - no offset + drawRect.setHeight(info->area.height()); + drawRect.setWidth(info->area.width()); + }else if(info->scale == RootWindow::BottomLeft ){ + drawRect.moveTo( 0 , info->area.height() - raw.height() ); + }else if(info->scale == RootWindow::BottomRight ){ + drawRect.moveTo( (info->area.width() - raw.width()), (info->area.height() - raw.height()) ); + }else if(info->scale == RootWindow::BottomCenter ){ + drawRect.moveTo( (info->area.width() - raw.width())/2, info->area.height() - raw.height() ); + }else if(info->scale == RootWindow::TopLeft ){ + drawRect.moveTo( 0, 0 ); + }else if(info->scale == RootWindow::TopRight ){ + drawRect.moveTo( (info->area.width() - raw.width()), 0); + }else if(info->scale == RootWindow::TopCenter ){ + drawRect.moveTo( (info->area.width() - raw.width())/2, 0); + }else if(info->scale == RootWindow::CenterLeft ){ + drawRect.moveTo( 0, (info->area.height() - raw.height())/2 ); + }else if(info->scale == RootWindow::CenterRight ){ + drawRect.moveTo( (info->area.width() - raw.width()), (info->area.height() - raw.height())/2 ); + } + + QPainter P(&pix); + P.setBrush(raw); + P.setBrushOrigin( drawRect.x(), drawRect.y() ); + P.drawRect( drawRect ); +} //end SolidColor Check + + info->wallpaper = pix; +} + +RootSubWindow* RootWindow::windowForId(WId id){ + RootSubWindow *tmp = 0; + for(int i=0; iid() == id){ tmp = WINDOWS[i]; } + } + return tmp; +} + +QScreen* RootWindow::screenUnderMouse(){ + QPoint mpos = QCursor::pos(); + QList scrns = QApplication::screens(); + for(int i=0; igeometry().contains(mpos)){ return scrns[i]; } + } + //Could not find an exact match - just return the first one + return scrns.first(); +} + +// === PUBLIC SLOTS === +void RootWindow::ResizeRoot(){ + if(DEBUG){ qDebug() << "Resize Root..."; } + QList scrns = QApplication::screens(); + //Update all the screen locations and ID's in the WALLPAPERS list + QRect fullscreen; + QStringList valid; + //Update the size of the rootWindow itself + for(int i=0; iname() << scrns[i]->geometry(); } + fullscreen = fullscreen.united(scrns[i]->geometry()); + valid << scrns[i]->name(); + for(int j=0; jname()){ + QSize oldsize = WALLPAPERS[j].area.size(); + WALLPAPERS[j].area = scrns[i]->geometry(); + if(oldsize != WALLPAPERS[j].area.size()){ updateScreenPixmap(&WALLPAPERS[j]); } + break; + } + } + } + //Now clean up any invalid screen info in the WALLPAPERS List + QStringList invalid; + for(int i=0; isetGeometry(fullscreen); + this->update(); + emit RootResized(fullscreen); + if(!valid.isEmpty()){ emit NewScreens(valid); } + if(!invalid.isEmpty()){ emit RemovedScreens(invalid); } + if(DEBUG){ qDebug() << " - Geom after change:" << this->geometry(); } +} + +void RootWindow::ChangeWallpaper(QString id, RootWindow::ScaleType scale, QString file){ + bool found = false; + for(int i=0; i scrns = QApplication::screens(); + for(int i=0; iname()==id){ + screeninfo info; + info.id = id; + info.file = file; + info.scale = scale; + info.area = scrns[i]->geometry(); + updateScreenPixmap(&info); + //qDebug() << " --- Loaded Wallpaper:" << info.id << info.file << info.area; + WALLPAPERS << info; + break; + } + } + } //end check for a new id + +} + +void RootWindow::checkMouseFocus(){ + QPoint cpos = QCursor::pos(); + if(lastCursorPos != cpos){ emit MouseMoved(); } + lastCursorPos = cpos; + QWidget *child = this->childAt(QCursor::pos()); + while(child!=0 && child->whatsThis()!="RootSubWindow"){ + child = child->parentWidget(); + if(child==this){ child = 0;} //end of the line + } + + if(child==lastActiveMouse){ return; } //nothing new to do + //Make sure the child is actually a RootSubWindow + if(lastActiveMouse!=0){ lastActiveMouse->removeMouseFocus(); lastActiveMouse = 0; } + if(child!=0){ + lastActiveMouse = static_cast(child); + + if(DesktopSettings::instance()->value(DesktopSettings::WM, "focusFollowsMouse", true).toBool()){ + lastActiveMouse->giveKeyboardFocus(); + if(DesktopSettings::instance()->value(DesktopSettings::WM, "raiseOnFocus", false).toBool()){ + lastActiveMouse->raise(); + } + } + lastActiveMouse->giveMouseFocus(); //always give mouse focus on mouseover + } +} + +void RootWindow::NewWindow(NativeWindow *win){ + RootSubWindow *subwin = 0; + //qDebug() << "Got New Window:" << win->property(NativeWindow::Title); + for(int i=0; iid() == win->id()){ subwin = WINDOWS[i]; } + } + if(subwin==0){ + subwin = new RootSubWindow(this, win); + subwin->setWhatsThis("RootSubWindow"); + connect(win, SIGNAL(WindowClosed(WId)), this, SLOT(CloseWindow(WId)) ); + connect(subwin, SIGNAL(windowAnimFinished()), this, SLOT(checkMouseFocus()) ); + WINDOWS << subwin; + } + //QApplication::processEvents(); + CheckWindowPosition(win->id(), true); //first-time run + //QTimer::singleShot(300, subwin, SLOT(ensureVisible())); + win->setProperty(NativeWindow::Visible, true); + //win->requestProperty( NativeWindow::Active, true); + //win->requestProperties(QList() << NativeWindow::Visible << NativeWindow::Active, QList() << true << true, true); + if(!mouseFocusTimer->isActive()){ mouseFocusTimer->start(); } +} + +void RootWindow::CloseWindow(WId win){ + for(int i=0; iid() == win){ + if(lastActiveMouse==WINDOWS[i]){ lastActiveMouse = 0; } //no longer valid + WINDOWS.takeAt(i)->clientClosed(); + break; + } + } + if(WINDOWS.isEmpty()){ mouseFocusTimer->stop(); } //no windows to look for +} + +// === PRIVATE SLOTS === + +// === PROTECTED === +void RootWindow::paintEvent(QPaintEvent *ev){ + //qDebug() << "RootWindow: PaintEvent:" << ev->rect(); //<< QDateTime::currentDateTime()->toString(QDateTime::ShortDate); + //QWidget::paintEvent(ev); + bool found = false; + QPainter painter(this); + QRect geom = ev->rect(); + geom.adjust(-100,-100,100,100); //give it a few more pixels in each direction to repaint (noticing some issues in Qt 5.7.1) + for(int i=0; i +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "RootSubWindow.h" + +#include +#include + +class RootWindow : public QWidget{ + Q_OBJECT +public: + enum ScaleType{ SolidColor, Stretch, Full, Fit, Center, Tile, BottomLeft, BottomRight, BottomCenter, \ + TopLeft, TopRight, TopCenter, CenterLeft, CenterRight}; + + RootWindow(); + ~RootWindow(); + + void start(); + +private: + struct screeninfo{ + QString id; + QRect area; + QString file; + ScaleType scale; + QPixmap wallpaper; //Note: This pixmap will always be the same size as "area" + }; + QTimer *autoResizeTimer, *mouseFocusTimer; + RootSubWindow *lastActiveMouse; + QPoint lastCursorPos; + + QList WALLPAPERS; + void updateScreenPixmap(screeninfo *info); //used for recalculating the wallpaper pixmap based on file/area/scale as needed + + //Window Management + QList WINDOWS; + RootSubWindow* windowForId(WId id); + void arrangeWindows(RootSubWindow *primary = 0, QString type = "", bool primaryonly = false); + + QScreen* screenUnderMouse(); + + +public slots: + void ResizeRoot(); + void ChangeWallpaper(QString id, RootWindow::ScaleType scale, QString file); + //Note: for "SingleColor" scaling the "file" variable should be "rgb(R,G,B)" or "#hexcode" + void checkMouseFocus(); + + void NewWindow(NativeWindow*); + void CloseWindow(WId); //automatically connected for any new native window + + //Window arrangement functions - defined in "RootWindow-mgmt.cpp" + void ArrangeWindows(WId primary = 0, QString type = ""); + void TileWindows(WId primary = 0, QString type = ""); + void CheckWindowPosition(WId, bool newwindow = false); //used after a "drop" to validate/snap/re-arrange window(s) as needed + +private slots: + +protected: + void paintEvent(QPaintEvent *ev); + +signals: + void RegisterVirtualRoot(WId); + void RootResized(QRect); + void NewScreens(QStringList); // [screen_id_1, screen_id_2, etc..] + void RemovedScreens(QStringList); // [screen_id_1, screen_id_2, etc..] + void WorkspaceChanged(int); + void MouseMoved(); + +}; + +#endif diff --git a/src-qt5/core/libLumina/obsolete/RootWindow.pri b/src-qt5/core/libLumina/obsolete/RootWindow.pri new file mode 100644 index 00000000..9426b6b4 --- /dev/null +++ b/src-qt5/core/libLumina/obsolete/RootWindow.pri @@ -0,0 +1,17 @@ + +# Files +SOURCES *= $${PWD}/RootWindow.cpp \ + $${PWD}/RootWindow-mgmt.cpp \ + $${PWD}/RootSubWindow.cpp \ + $${PWD}/RootSubWindow-animations.cpp + +HEADERS *= $${PWD}/RootWindow.h \ + $${PWD}/RootSubWindow.h + +INCLUDEPATH *= ${PWD} + +# include other library dependencies +include(LUtils.pri) +include(NativeWindow.pri) +include(LIconCache.pri) +include(DesktopSettings.pri) diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index bace2dbe..cc754005 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -129,15 +129,15 @@ void LSession::setupSession(){ QList scrns= QApplication::screens(); for(int i=0; iname(); - Lumina::ROOTWIN->ChangeWallpaper(scrns[i]->name(), RootWindow::Stretch, LOS::LuminaShare()+"desktop-background.jpg"); + RootDesktopObject::instance()->ChangeWallpaper(scrns[i]->name(), LOS::LuminaShare()+"desktop-background.jpg"); } - Lumina::ROOTWIN->start(); + //Lumina::ROOTWIN->start(); Lumina::NWS->setRoot_numberOfWorkspaces(QStringList() << "one" << "two"); Lumina::NWS->setRoot_currentWorkspace(0); if(DEBUG){ qDebug() << " - Create Desktop Context Menu"; } - DesktopContextMenu *cmenu = new DesktopContextMenu(Lumina::ROOTWIN); + /*DesktopContextMenu *cmenu = new DesktopContextMenu(Lumina::ROOTWIN); connect(cmenu, SIGNAL(showLeaveDialog()), this, SLOT(StartLogout()) ); - cmenu->start(); + cmenu->start();*/ //desktopFiles = QDir(QDir::homePath()+"/Desktop").entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); //updateDesktops(); @@ -229,6 +229,7 @@ void LSession::setupGlobalConnections(){ connect(Lumina::ROOTWIN, SIGNAL(RegisterVirtualRoot(WId)), Lumina::NWS, SLOT(RegisterVirtualRoot(WId)) ); connect(Lumina::ROOTWIN, SIGNAL(RootResized(QRect)), Lumina::NWS, SLOT(setRoot_desktopGeometry(QRect)) ); connect(Lumina::ROOTWIN, SIGNAL(MouseMoved()), Lumina::SS, SLOT(newInputEvent()) ); + connect(Lumina::ROOTWIN, SIGNAL(startLogout()), this, SLOT(StartLogout()) ); //Native Window Class connections connect(Lumina::NEF, SIGNAL(WindowCreated(WId)), Lumina::NWS, SLOT(NewWindowDetected(WId))); diff --git a/src-qt5/core/lumina-desktop-unified/global-includes.h b/src-qt5/core/lumina-desktop-unified/global-includes.h index ae57ac08..91604362 100644 --- a/src-qt5/core/lumina-desktop-unified/global-includes.h +++ b/src-qt5/core/lumina-desktop-unified/global-includes.h @@ -55,7 +55,13 @@ #include #include #include +#include +#include +#include +// C++ Backend classes for QML interface +#include +#include // libLumina includes #include @@ -66,7 +72,6 @@ #include #include #include -#include #include #include #include @@ -74,8 +79,6 @@ #include #include -// Standard C includes -#include //Setup any global defines (no classes or global objects: use "global-objects.h" for that) diff --git a/src-qt5/core/lumina-desktop-unified/global-objects.h b/src-qt5/core/lumina-desktop-unified/global-objects.h index 0c990dc6..c204587f 100644 --- a/src-qt5/core/lumina-desktop-unified/global-objects.h +++ b/src-qt5/core/lumina-desktop-unified/global-objects.h @@ -25,8 +25,12 @@ #include "src-screensaver/LScreenSaver.h" //#include "src-WM/LWindowManager.h" +#include #include "LSession.h" +// Standard C includes +#include + //Any special defines for settings/testing #define ANIMTIME 80 //animation time in milliseconds diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index 6b9ee876..21e46b22 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -16,18 +16,13 @@ TARGET = lumina-desktop-unified target.path = $${L_BINDIR} #include all the special classes from the Lumina tree -include(../libLumina/ResizeMenu.pri) include(../libLumina/LDesktopUtils.pri) #includes LUtils and LOS include(../libLumina/LuminaXDG.pri) -#include(../libLumina/LuminaX11.pri) include(../libLumina/LuminaSingleApplication.pri) -include(../libLumina/LuminaThemes.pri) include(../libLumina/DesktopSettings.pri) -include(../libLumina/RootWindow.pri) include(../libLumina/ExternalProcess.pri) -include(../libLumina/NativeWindow.pri) +include(../../src-cpp/NativeWindow.pri) include(../libLumina/XDGMime.pri) -include(../libLumina/LIconCache.pri) include(../../src-cpp/plugins-screensaver.pri) @@ -45,8 +40,7 @@ SOURCES += main.cpp \ HEADERS += global-includes.h \ global-objects.h \ LSession.h \ - BootSplash.h \ - JsonMenu.h + BootSplash.h FORMS += BootSplash.ui diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp new file mode 100644 index 00000000..c0710bbc --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp @@ -0,0 +1,33 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "RootWindow.h" + +RootWindow::RootWindow(){ + root_win = QWindow::fromWinId( QX11Info::appRootWindow() ); // + root_view = new QQuickView(root_win); //make it a child of the root window + root_obj = RootDesktopObject::instance(); + syncRootSize(); + connect(root_win, SIGNAL(widthChanged(int)), this, SLOT(syncRootSize()) ); + connect(root_win, SIGNAL(heightChanged(int)),this, SLOT(syncRootSize()) ); + //Now setup the QQuickView + root_view->setResizeMode(QQuickView::SizeRootObjectToView); + root_view->engine()->rootContext()->setContextProperty("RootObject", root_obj); + root_view->setSource(QUrl("qrc:///qml/RootDesktop")); + root_view->show(); +} + +RootWindow::~RootWindow(){ + root_view->deleteLater(); + root_obj->deleteLater(); +} + +void RootWindow::syncRootSize(){ + if(root_win->width() != root_view->width() || root_win->height() != root_view->height()){ + root_view->setGeometry(0, 0, root_win->width(), root_win->height() ); + emit RootResized(root_view->geometry()); + } +} diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h new file mode 100644 index 00000000..1050ba21 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h @@ -0,0 +1,32 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_DESKTOP_ROOT_WINDOW_H +#define _LUMINA_DESKTOP_ROOT_WINDOW_H +#include + +class RootWindow : public QObject{ + Q_OBJECT +private: + QWindow *root_win; + QQuickView *root_view; + RootDesktopObject *root_obj; + +public: + RootWindow(); + ~RootWindow(); + +public slots: + void syncRootSize(); + +signals: + void startLogout(); + void RegisterVirtualRoot(WId); + void RootResized(QRect); + void MouseMoved(); +}; + +#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri b/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri index 75aef8a6..25aa02b7 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri @@ -1,6 +1,8 @@ -SOURCES *= $${PWD}/ContextMenu.cpp +SOURCES *= $${PWD}/RootWindow.cpp -HEADERS *= $${PWD}/ContextMenu.h +HEADERS *= $${PWD}/RootWindow.h #update the includepath so we can just #include as needed without paths -INCLUDEPATH *= ${PWD} +INCLUDEPATH *= $${PWD} + +include(../../../src-cpp/Desktop.pri) -- cgit From c1b01a5e939aa39b52d13f91ebd73fe1092c4669 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 16 Oct 2017 09:30:19 -0400 Subject: Update the backend process-running routine for Lumina (LUtils) This gives us an extra function with additional hooks (environment, working directory) It also gets rid of all that ugly QFuture stuff which never quite worked as expected anyway. --- src-qt5/core/libLumina/LUtils.cpp | 80 +++++++++++++++++++++------------------ src-qt5/core/libLumina/LUtils.h | 3 ++ 2 files changed, 47 insertions(+), 36 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index 491778ca..820b55e8 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -14,7 +14,7 @@ #include -inline QStringList ProcessRun(QString cmd, QStringList args){ +/*inline QStringList ProcessRun(QString cmd, QStringList args){ //Assemble outputs QStringList out; out << "1" << ""; //error code, string output QProcess proc; @@ -38,50 +38,58 @@ inline QStringList ProcessRun(QString cmd, QStringList args){ out[0] = QString::number(proc.exitCode()); out[1] = info+QString(proc.readAllStandardOutput()); return out; -} +}*/ + //============= // LUtils Functions //============= -int LUtils::runCmd(QString cmd, QStringList args){ - /*QProcess proc; - proc.setProcessChannelMode(QProcess::MergedChannels); - if(args.isEmpty()){ - proc.start(cmd); - }else{ - proc.start(cmd, args); +QString LUtils::runCommand(bool &success, QString command, QStringList arguments, QString workdir, QStringList env){ + QProcess proc; + proc.setProcessChannelMode(QProcess::MergedChannels); //need output + //First setup the process environment as necessary + QProcessEnvironment PE = QProcessEnvironment::systemEnvironment(); + if(!env.isEmpty()){ + for(int i=0; i future = QtConcurrent::run(ProcessRun, cmd, args); - return future.result()[1].split("\n"); //Split the return message into lines + bool success; + QString log = LUtils::runCommand(success, cmd, args); + return log.split("\n"); + /*QFuture future = QtConcurrent::run(ProcessRun, cmd, args); + return future.result()[1].split("\n"); //Split the return message into lines*/ } QStringList LUtils::readFile(QString filepath){ diff --git a/src-qt5/core/libLumina/LUtils.h b/src-qt5/core/libLumina/LUtils.h index a494d4da..ee04c023 100644 --- a/src-qt5/core/libLumina/LUtils.h +++ b/src-qt5/core/libLumina/LUtils.h @@ -30,6 +30,9 @@ class LUtils{ public: + //Run an external command and return output & exit code + static QString runCommand(bool &success, QString command, QStringList arguments = QStringList(), QString workdir = "", QStringList env = QStringList()); + //Run an external command and return the exit code static int runCmd(QString cmd, QStringList args = QStringList()); //Run an external command and return any text output (one line per entry) -- cgit From e152255ec8e2bb7c0604fbbe569d47f345678ea6 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 16 Oct 2017 11:54:07 -0400 Subject: Clean up the session file-init routine. Now the user files are scanned/created from within the start-lumina-desktop process, not the desktop process. This fixes the loading of the theme engine for the desktop process on first-run situations, and also ensures that the desktop process does not need to make any major changes to it's configs while it is still running. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 5 +---- src-qt5/core/lumina-desktop/LSession.cpp | 16 +++++++++++----- src-qt5/core/lumina-desktop/LSession.h | 2 +- src-qt5/core/lumina-desktop/main.cpp | 25 +++++-------------------- src-qt5/core/lumina-session/main.cpp | 20 ++++++++++---------- src-qt5/core/lumina-session/session.cpp | 26 ++++++++++++++++++++++++-- src-qt5/core/lumina-session/session.h | 2 ++ 7 files changed, 54 insertions(+), 42 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index fb13a2a3..c65f6faf 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -483,10 +483,7 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ //Convert from the old desktop numbering system to the new one (change occured with 1.0.1) if(oldversion<=1000001){ QStringList DS = LUtils::readFile(dset); - char *tmp; - int tmpN = 0; - QApplication A(tmpN, &tmp); - QList screens = A.screens(); + QList screens = QApplication::screens(); for(int i=0; i 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] + qDebug() << "Check User Files"; + //char tmp[] = "junk\0"; + //int tmpN = 0; + //QApplication A(tmpN, (char **)&tmp); QSettings sset("lumina-desktop", "sessionsettings"); QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String - char *tmp; - int tmpN = 0; - QApplication *A = new QApplication(tmpN, &tmp); + qDebug() << " - Old Version:" << OVS; + qDebug() << " - Current Version:" << LDesktopUtils::LuminaDesktopVersion(); bool changed = LDesktopUtils::checkUserFiles(OVS, LDesktopUtils::LuminaDesktopVersion()); + qDebug() << " - Made Changes:" << changed; if(changed){ //Save the current version of the session to the settings file (for next time) sset.setValue("DesktopVersion", LDesktopUtils::LuminaDesktopVersion()); } - delete A; + qDebug() << "Finished with user files check"; + //delete A; + return changed; } void LSession::refreshWindowManager(){ diff --git a/src-qt5/core/lumina-desktop/LSession.h b/src-qt5/core/lumina-desktop/LSession.h index 43cddac7..a25f3c15 100644 --- a/src-qt5/core/lumina-desktop/LSession.h +++ b/src-qt5/core/lumina-desktop/LSession.h @@ -52,7 +52,7 @@ public: LSession(int &argc, char **argv); ~LSession(); - static void checkUserFiles(); + static bool checkUserFiles(); //Functions to be called during startup void setupSession(); diff --git a/src-qt5/core/lumina-desktop/main.cpp b/src-qt5/core/lumina-desktop/main.cpp index c272f263..826d697c 100644 --- a/src-qt5/core/lumina-desktop/main.cpp +++ b/src-qt5/core/lumina-desktop/main.cpp @@ -76,36 +76,21 @@ int main(int argc, char ** argv) setenv("QT_QPA_PLATFORMTHEME", "lthemeengine", 1); unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); //causes pixel-specific scaling issues with the desktop - turn this on after-the-fact for other apps //Startup the session - LSession::checkUserFiles(); //make sure to create any config files before creating the QApplication LSession a(argc, argv); if(!a.isPrimaryProcess()){ return 0; } + //Ensure that the user's config files exist + /*if( LSession::checkUserFiles() ){ //make sure to create any config files before creating the QApplication + qDebug() << "User files changed - restarting the desktop session"; + return 787; //return special restart code + }*/ //Setup the log file - /* logfile.setFileName( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/logs/runtime.log" ); - qDebug() << "Lumina Log File:" << logfile.fileName(); - if(QFile::exists(logfile.fileName()+".old")){ QFile::remove(logfile.fileName()+".old"); } - if(logfile.exists()){ QFile::rename(logfile.fileName(), logfile.fileName()+".old"); } - //Make sure the parent directory exists - if(!QFile::exists(QDir::homePath()+"/.lumina/logs")){ - QDir dir; - dir.mkpath(QDir::homePath()+"/.lumina/logs"); - } - logfile.open(QIODevice::WriteOnly | QIODevice::Append);*/ QTime *timer=0; if(DEBUG){ timer = new QTime(); timer->start(); } - //Setup Log File - //qInstallMessageHandler(MessageOutput); - //if(DEBUG){ qDebug() << "Theme Init:" << timer->elapsed(); } - //LuminaThemeEngine theme(&a); - //QObject::connect(&theme, SIGNAL(updateIcons()), &a, SLOT(reloadIconTheme()) ); - //if(DEBUG){ qDebug() << "Load Locale:" << timer->elapsed(); } - //LUtils::LoadTranslation(&a, "lumina-desktop"); if(DEBUG){ qDebug() << "Session Setup:" << timer->elapsed(); } a.setupSession(); - //theme.refresh(); if(DEBUG){ qDebug() << "Exec Time:" << timer->elapsed(); delete timer;} int retCode = a.exec(); //qDebug() << "Stopping the window manager"; qDebug() << "Finished Closing Down Lumina"; - //logfile.close(); return retCode; } diff --git a/src-qt5/core/lumina-session/main.cpp b/src-qt5/core/lumina-session/main.cpp index 71244a8b..3b71bdca 100644 --- a/src-qt5/core/lumina-session/main.cpp +++ b/src-qt5/core/lumina-session/main.cpp @@ -55,14 +55,6 @@ int main(int argc, char ** argv) return QProcess::execute("xinit", args); } qDebug() << "Starting the Lumina desktop on current X11 session:" << disp; - //Setup any initialization values - LTHEME::LoadCustomEnvSettings(); - LXDG::setEnvironmentVars(); - setenv("DESKTOP_SESSION","Lumina",1); - setenv("XDG_CURRENT_DESKTOP","Lumina",1); - unsetenv("QT_QPA_PLATFORMTHEME"); //causes issues with Lumina themes - not many people have this by default... - //Check for any missing user config files - //Check for any stale desktop lock files and clean them up QString cfile = QDir::tempPath()+"/.LSingleApp-%1-%2-%3"; @@ -81,14 +73,22 @@ int main(int argc, char ** argv) } //Configure X11 monitors if needed - if(LUtils::isValidBinary("lumina-xconfig")){ + if(LUtils::isValidBinary("lumina-xconfig")){ qDebug() << " - Resetting monitor configuration to last-used settings"; QProcess::execute("lumina-xconfig --reset-monitors"); } qDebug() << " - Starting the session..."; + //Setup any initialization values + LTHEME::LoadCustomEnvSettings(); + LXDG::setEnvironmentVars(); + setenv("DESKTOP_SESSION","Lumina",1); + setenv("XDG_CURRENT_DESKTOP","Lumina",1); + unsetenv("QT_QPA_PLATFORMTHEME"); //causes issues with Lumina themes - not many people have this by default... //Startup the session - QCoreApplication a(argc, argv); + QApplication a(argc, argv); + setenv("QP_QPA_PLATFORMTHEME","lthemeengine",1); //make sure this is after the QApplication - not actually using the theme plugin for **this** process LSession sess; + sess.checkFiles(); //Make sure user files are created/installed first sess.start(unified); int retCode = a.exec(); qDebug() << "Finished Closing Down Lumina"; diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index 3fdf9e66..743fc396 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -15,6 +15,7 @@ #include #include +#include void LSession::stopall(){ stopping = true; @@ -38,8 +39,12 @@ void LSession::procFinished(){ stopped++; if(!stopping){ //See if this process is the main desktop binary - if(PROCS[i]->objectName()=="runtime"){ stopall(); } - else if(PROCS[i]->objectName()=="wm" && wmfails<2){ wmfails++; PROCS[i]->start(QIODevice::ReadOnly); wmTimer->start(); } //restart the WM + if(PROCS[i]->objectName()=="runtime"){ + qDebug() << "Got Desktop Process Finished:" << PROCS[i]->exitCode(); + //if(PROCS[i]->exitCode()==787){ PROCS[i]->start(QIODevice::ReadOnly); } //special internal restart code + //else{ + stopall(); //} + }else if(PROCS[i]->objectName()=="wm" && wmfails<2){ wmfails++; PROCS[i]->start(QIODevice::ReadOnly); wmTimer->start(); } //restart the WM //if(PROCS[i]->program().section("/",-1) == "lumina-desktop"){ stopall(); } //start closing down everything //else{ PROCS[i]->start(QIODevice::ReadOnly); } //restart the process //break; @@ -164,3 +169,20 @@ void LSession::start(bool unified){ startProcess("runtime","lumina-desktop-unified"); } } + +void LSession::checkFiles(){ +//internal version conversion examples: + // [1.0.0 -> 1000000], [1.2.3 -> 1002003], [0.6.1 -> 6001] + qDebug() << "[Lumina] Checking User Files"; + QSettings sset("lumina-desktop", "sessionsettings"); + QString OVS = sset.value("DesktopVersion","0").toString(); //Old Version String + qDebug() << " - Old Version:" << OVS; + qDebug() << " - Current Version:" << LDesktopUtils::LuminaDesktopVersion(); + bool changed = LDesktopUtils::checkUserFiles(OVS, LDesktopUtils::LuminaDesktopVersion()); + qDebug() << " - Made Changes:" << changed; + if(changed){ + //Save the current version of the session to the settings file (for next time) + sset.setValue("DesktopVersion", LDesktopUtils::LuminaDesktopVersion()); + } + qDebug() << "Finished with user files check"; +} diff --git a/src-qt5/core/lumina-session/session.h b/src-qt5/core/lumina-session/session.h index 5cf1ccfa..3bbcbb8e 100644 --- a/src-qt5/core/lumina-session/session.h +++ b/src-qt5/core/lumina-session/session.h @@ -83,4 +83,6 @@ public: void start(bool unified = false); + void checkFiles(); + }; -- cgit From cd928a79ff4bf6da55689bc100168355ec962b50 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 16 Oct 2017 21:00:07 -0400 Subject: Updated how video thumbnails are loaded. Now cached to stop crash when resizing. --- src-qt5/core/libLumina/LVideoLabel.cpp | 50 +++++++++++++++++---------------- src-qt5/core/libLumina/LVideoLabel.h | 9 ++++-- src-qt5/core/libLumina/LVideoLabel.pri | 5 +++- src-qt5/core/libLumina/LuminaThemes.cpp | 6 ++++ 4 files changed, 42 insertions(+), 28 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp index 20b2cad4..3b2ce468 100644 --- a/src-qt5/core/libLumina/LVideoLabel.cpp +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -1,40 +1,42 @@ #include "LVideoLabel.h" -LVideoLabel::LVideoLabel(QString file, bool video) : QLabel(){ - this->setScaledContents(true); - if(video) { - mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface); - thumbnail = QPixmap(); - entered = false; - surface = new LVideoSurface(this); - mediaPlayer->setVideoOutput(surface); - mediaPlayer->setMedia(QUrl("file://" + file)); - mediaPlayer->setPlaybackRate(3); - mediaPlayer->setMuted(true); - mediaPlayer->play(); - mediaPlayer->pause(); - this->connect(surface, SIGNAL(frameReceived(QPixmap)), this, SLOT(stopVideo(QPixmap))); - this->connect(mediaPlayer, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(setDuration(QMediaPlayer::MediaStatus))); - this->connect(this, SIGNAL(rollOver()), surface, SLOT(switchRollOver())); - }else{ - thumbnail = QPixmap(file); - this->setPixmap(thumbnail); - } +LVideoLabel::LVideoLabel(QString file, QWidget *parent) : QLabel(parent) { + this->setScaledContents(true); + mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface); + thumbnail = QPixmap(); + this->setPixmap(thumbnail); + entered = false; + surface = new LVideoSurface(this); + mediaPlayer->setVideoOutput(surface); + mediaPlayer->setPlaybackRate(3); + mediaPlayer->setMuted(true); + mediaPlayer->setMedia(QUrl("file://" + file)); + mediaPlayer->play(); + mediaPlayer->pause(); + + this->connect(surface, SIGNAL(frameReceived(QPixmap)), this, SLOT(stopVideo(QPixmap))); + this->connect(mediaPlayer, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(setDuration(QMediaPlayer::MediaStatus))); + this->connect(this, SIGNAL(rollOver()), surface, SLOT(switchRollOver())); } LVideoLabel::~LVideoLabel() { mediaPlayer->deleteLater(); - surface->deleteLater(); + delete surface; +} + +void LVideoLabel::setShrinkPixmap(bool shrink) { + this->shrink = shrink; } void LVideoLabel::stopVideo(QPixmap pix) { if(!entered) { + emit frameReceived(pix); if(thumbnail.isNull()) - thumbnail = QPixmap(pix.scaledToHeight(64)); - this->setPixmap(thumbnail); + thumbnail = pix; + this->setPixmap((shrink) ? thumbnail.scaledToHeight(64) : thumbnail); mediaPlayer->pause(); }else { - this->setPixmap(QPixmap(pix.scaledToHeight(64))); + this->setPixmap((shrink) ? pix.scaledToHeight(64) : pix); } } diff --git a/src-qt5/core/libLumina/LVideoLabel.h b/src-qt5/core/libLumina/LVideoLabel.h index fd293200..fa590e5a 100644 --- a/src-qt5/core/libLumina/LVideoLabel.h +++ b/src-qt5/core/libLumina/LVideoLabel.h @@ -10,21 +10,24 @@ class LVideoLabel : public QLabel { Q_OBJECT public: - LVideoLabel(QString, bool); + LVideoLabel(QString, QWidget* parent=NULL); ~LVideoLabel(); + void setShrinkPixmap(bool); + protected: void enterEvent(QEvent*); void leaveEvent(QEvent*); signals: void rollOver(); - public slots: + void frameReceived(QPixmap); + private slots: void stopVideo(QPixmap); void setDuration(QMediaPlayer::MediaStatus); private: QMediaPlayer *mediaPlayer; LVideoSurface *surface; - QVideoWidget *videoPlayer; QPixmap thumbnail; bool entered; + bool shrink; }; #endif diff --git a/src-qt5/core/libLumina/LVideoLabel.pri b/src-qt5/core/libLumina/LVideoLabel.pri index f609df08..384b3aae 100644 --- a/src-qt5/core/libLumina/LVideoLabel.pri +++ b/src-qt5/core/libLumina/LVideoLabel.pri @@ -1,8 +1,11 @@ QT *= multimedia HEADERS *= $${PWD}/LVideoLabel.h +HEADERS *= $${PWD}/LVideoSurface.h SOURCES *= $${PWD}/LVideoLabel.cpp +SOURCES *= $${PWD}/LVideoSurface.cpp INCLUDEPATH *= ${PWD} -include(LVideoSurface.pri) +#Now the other dependendies of it +#include(LUtils.pri) diff --git a/src-qt5/core/libLumina/LuminaThemes.cpp b/src-qt5/core/libLumina/LuminaThemes.cpp index f6868651..857e604b 100644 --- a/src-qt5/core/libLumina/LuminaThemes.cpp +++ b/src-qt5/core/libLumina/LuminaThemes.cpp @@ -122,6 +122,8 @@ QStringList LTHEME::availableSystemCursors(){ //returns: [name] for each item //Save a new theme/color file bool LTHEME::saveLocalTheme(QString name, QStringList contents){ + Q_UNUSED(name); + Q_UNUSED(contents); return false; //old format - do not use!! //QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themes/"; //if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); } @@ -129,6 +131,8 @@ bool LTHEME::saveLocalTheme(QString name, QStringList contents){ } bool LTHEME::saveLocalColors(QString name, QStringList contents){ + Q_UNUSED(name); + Q_UNUSED(contents); return false; //old format - do not use!! // QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/colors/"; //if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); } @@ -182,6 +186,8 @@ QString LTHEME::currentCursor(){ //Change the current Theme/Colors/Icons bool LTHEME::setCurrentSettings(QString themepath, QString colorpath, QString iconname, QString font, QString fontsize){ + Q_UNUSED(font); + Q_UNUSED(fontsize); //QIcon::setThemeName(iconname); //Save these settings into the theme engine settings QSettings engineset("lthemeengine","lthemeengine"); -- cgit From 7a3e9e46423d999d47e19b26e910c849028599de Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 18 Oct 2017 11:58:59 -0400 Subject: Another quick checkpoint for Lumina 2 files. Nothing too spectacular yet - still in the experimental stage for the QML usage. --- src-qt5/core/libLumina/LuminaXDG.cpp | 8 ++++---- src-qt5/core/lumina-desktop-unified/LSession.cpp | 12 ++++++------ .../src-desktop/RootWindow.cpp | 21 ++++++++++++++++----- .../lumina-desktop-unified/src-desktop/RootWindow.h | 2 ++ 4 files changed, 28 insertions(+), 15 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index ab1000ab..fdf51a11 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -664,11 +664,11 @@ LFileInfo::LFileInfo(){ LFileInfo::LFileInfo(QString filepath){ //overloaded contructor this->setFile(filepath); loadExtraInfo(); -} +} LFileInfo::LFileInfo(QFileInfo info){ //overloaded contructor this->swap(info); //use the given QFileInfo without re-loading it loadExtraInfo(); -} +} //Functions for accessing the extra information // -- Return the mimetype for the file @@ -683,7 +683,7 @@ QString LFileInfo::iconfile(){ return icon; }else{ if(!mime.isEmpty()){ - QString tmp = mime; + QString tmp = mime; tmp.replace("/","-"); return tmp; }else if(this->isExecutable()){ @@ -696,7 +696,7 @@ QString LFileInfo::iconfile(){ // -- Check if this is an XDG desktop file bool LFileInfo::isDesktopFile(){ if(desk==0){ return false; } - return (!desk->filePath.isEmpty()); + return (!desk->filePath.isEmpty()); } // -- Allow access to the XDG desktop data structure diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index cc754005..426b91b4 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -104,7 +104,7 @@ void LSession::setupSession(){ splash.showScreen("user"); if(DEBUG){ qDebug() << " - Init User Files:" << timer->elapsed();} //checkUserFiles(); //adds these files to the watcher as well - + Lumina::ROOTWIN->start(); //Initialize the internal variables //DESKTOPS.clear(); @@ -116,7 +116,6 @@ void LSession::setupSession(){ if(DEBUG){ qDebug() << " - Populate App List:" << timer->elapsed();} Lumina::APPLIST->updateList(); //appmenu = new AppMenu(); - splash.showScreen("menus"); //if(DEBUG){ qDebug() << " - Init SettingsMenu:" << timer->elapsed();} //settingsmenu = new SettingsMenu(); @@ -129,12 +128,13 @@ void LSession::setupSession(){ QList scrns= QApplication::screens(); for(int i=0; iname(); - RootDesktopObject::instance()->ChangeWallpaper(scrns[i]->name(), LOS::LuminaShare()+"desktop-background.jpg"); + RootDesktopObject::instance()->ChangeWallpaper(scrns[i]->name(),QUrl::fromLocalFile(LOS::LuminaShare()+"desktop-background.jpg").toString() ); } - //Lumina::ROOTWIN->start(); Lumina::NWS->setRoot_numberOfWorkspaces(QStringList() << "one" << "two"); Lumina::NWS->setRoot_currentWorkspace(0); + if(DEBUG){ qDebug() << " - Create Desktop Context Menu"; } + /*DesktopContextMenu *cmenu = new DesktopContextMenu(Lumina::ROOTWIN); connect(cmenu, SIGNAL(showLeaveDialog()), this, SLOT(StartLogout()) ); cmenu->start();*/ @@ -228,8 +228,8 @@ void LSession::setupGlobalConnections(){ //Root window connections connect(Lumina::ROOTWIN, SIGNAL(RegisterVirtualRoot(WId)), Lumina::NWS, SLOT(RegisterVirtualRoot(WId)) ); connect(Lumina::ROOTWIN, SIGNAL(RootResized(QRect)), Lumina::NWS, SLOT(setRoot_desktopGeometry(QRect)) ); - connect(Lumina::ROOTWIN, SIGNAL(MouseMoved()), Lumina::SS, SLOT(newInputEvent()) ); - connect(Lumina::ROOTWIN, SIGNAL(startLogout()), this, SLOT(StartLogout()) ); + connect(RootDesktopObject::instance(), SIGNAL(mouseMoved()), Lumina::SS, SLOT(newInputEvent()) ); + connect(RootDesktopObject::instance(), SIGNAL(startLogout()), this, SLOT(StartLogout()) ); //Native Window Class connections connect(Lumina::NEF, SIGNAL(WindowCreated(WId)), Lumina::NWS, SLOT(NewWindowDetected(WId))); diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp index c0710bbc..2aac6f3e 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp @@ -6,7 +6,7 @@ //=========================================== #include "RootWindow.h" -RootWindow::RootWindow(){ +RootWindow::RootWindow() : QObject(){ root_win = QWindow::fromWinId( QX11Info::appRootWindow() ); // root_view = new QQuickView(root_win); //make it a child of the root window root_obj = RootDesktopObject::instance(); @@ -16,8 +16,7 @@ RootWindow::RootWindow(){ //Now setup the QQuickView root_view->setResizeMode(QQuickView::SizeRootObjectToView); root_view->engine()->rootContext()->setContextProperty("RootObject", root_obj); - root_view->setSource(QUrl("qrc:///qml/RootDesktop")); - root_view->show(); + RootDesktopObject::RegisterType(); //make sure object classes are registered with the QML subsystems } RootWindow::~RootWindow(){ @@ -25,9 +24,21 @@ RootWindow::~RootWindow(){ root_obj->deleteLater(); } +void RootWindow::start(){ + root_view->setSource(QUrl("qrc:///qml/RootDesktop")); + root_win->show(); + root_view->show(); +} + void RootWindow::syncRootSize(){ - if(root_win->width() != root_view->width() || root_win->height() != root_view->height()){ - root_view->setGeometry(0, 0, root_win->width(), root_win->height() ); + //qDebug() << "Sync Root Size:" << root_win->width() << root_win->height() << root_view->geometry(); + QList screens = QApplication::screens(); + QRect unif; + for(int i=0; igeometry()); } + if(unif.width() != root_view->width() || unif.height() != root_view->height()){ + root_view->setGeometry(0, 0, unif.width(), unif.height() ); emit RootResized(root_view->geometry()); } + root_obj->updateScreens(); + //qDebug() << " - after:" << root_view->geometry(); } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h index 1050ba21..ba489465 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.h @@ -19,6 +19,8 @@ public: RootWindow(); ~RootWindow(); + void start(); + public slots: void syncRootSize(); -- cgit From e5f8846fd775269314e5be502261284b9183205e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 18 Oct 2017 12:10:10 -0400 Subject: Make LVideoLabel thread-safe. Couple quick fixes for the Browser class in lumina-fm too (minor cleanup). --- src-qt5/core/libLumina/LVideoLabel.cpp | 31 +++++++++++++++++-------------- src-qt5/core/libLumina/LVideoLabel.h | 11 ++++++++--- 2 files changed, 25 insertions(+), 17 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp index 3b2ce468..dcc0ad58 100644 --- a/src-qt5/core/libLumina/LVideoLabel.cpp +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -1,16 +1,28 @@ #include "LVideoLabel.h" - +#include LVideoLabel::LVideoLabel(QString file, QWidget *parent) : QLabel(parent) { this->setScaledContents(true); - mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface); - thumbnail = QPixmap(); - this->setPixmap(thumbnail); + this->setPixmap(thumbnail); //blank pixmap by default entered = false; + filepath = file; + QTimer::singleShot(0, this, SLOT(initializeBackend()) ); +} + +LVideoLabel::~LVideoLabel() { + +} + +void LVideoLabel::setShrinkPixmap(bool shrink) { + this->shrink = shrink; +} + +void LVideoLabel::initializeBackend(){ + mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface); surface = new LVideoSurface(this); mediaPlayer->setVideoOutput(surface); mediaPlayer->setPlaybackRate(3); mediaPlayer->setMuted(true); - mediaPlayer->setMedia(QUrl("file://" + file)); + mediaPlayer->setMedia(QUrl::fromLocalFile(filepath)); mediaPlayer->play(); mediaPlayer->pause(); @@ -19,15 +31,6 @@ LVideoLabel::LVideoLabel(QString file, QWidget *parent) : QLabel(parent) { this->connect(this, SIGNAL(rollOver()), surface, SLOT(switchRollOver())); } -LVideoLabel::~LVideoLabel() { - mediaPlayer->deleteLater(); - delete surface; -} - -void LVideoLabel::setShrinkPixmap(bool shrink) { - this->shrink = shrink; -} - void LVideoLabel::stopVideo(QPixmap pix) { if(!entered) { emit frameReceived(pix); diff --git a/src-qt5/core/libLumina/LVideoLabel.h b/src-qt5/core/libLumina/LVideoLabel.h index fa590e5a..110e3305 100644 --- a/src-qt5/core/libLumina/LVideoLabel.h +++ b/src-qt5/core/libLumina/LVideoLabel.h @@ -1,5 +1,5 @@ -#ifndef LVIDEOLABEL_H -#define LVIDEOLABEL_H +#ifndef LVIDEOLABEL_H +#define LVIDEOLABEL_H #include #include @@ -13,21 +13,26 @@ class LVideoLabel : public QLabel { LVideoLabel(QString, QWidget* parent=NULL); ~LVideoLabel(); void setShrinkPixmap(bool); - + protected: void enterEvent(QEvent*); void leaveEvent(QEvent*); + signals: void rollOver(); void frameReceived(QPixmap); + private slots: + void initializeBackend(); void stopVideo(QPixmap); void setDuration(QMediaPlayer::MediaStatus); + private: QMediaPlayer *mediaPlayer; LVideoSurface *surface; QPixmap thumbnail; bool entered; bool shrink; + QString filepath; }; #endif -- cgit From 3a38773ce20620610e87c84c40ebfd6d2f478203 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Sat, 21 Oct 2017 17:48:29 -0400 Subject: Finished video thumbnails and roll over playback for lumina-fm and lumina-fileinfo --- src-qt5/core/libLumina/LVideoLabel.cpp | 25 +++++++++++++++++-------- src-qt5/core/libLumina/LVideoLabel.h | 11 ++++++----- src-qt5/core/libLumina/LVideoLabel.pri | 2 ++ src-qt5/core/libLumina/LVideoWidget.cpp | 28 ++++++++++++++++++++++++++++ src-qt5/core/libLumina/LVideoWidget.h | 21 +++++++++++++++++++++ 5 files changed, 74 insertions(+), 13 deletions(-) create mode 100644 src-qt5/core/libLumina/LVideoWidget.cpp create mode 100644 src-qt5/core/libLumina/LVideoWidget.h (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp index dcc0ad58..b90cff66 100644 --- a/src-qt5/core/libLumina/LVideoLabel.cpp +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -1,15 +1,17 @@ #include "LVideoLabel.h" -#include + LVideoLabel::LVideoLabel(QString file, QWidget *parent) : QLabel(parent) { - this->setScaledContents(true); - this->setPixmap(thumbnail); //blank pixmap by default + thumbnail = QPixmap(); entered = false; + shrink = true; filepath = file; + QTimer::singleShot(0, this, SLOT(initializeBackend()) ); } LVideoLabel::~LVideoLabel() { - + mediaPlayer->deleteLater(); + surface->deleteLater(); } void LVideoLabel::setShrinkPixmap(bool shrink) { @@ -22,6 +24,7 @@ void LVideoLabel::initializeBackend(){ mediaPlayer->setVideoOutput(surface); mediaPlayer->setPlaybackRate(3); mediaPlayer->setMuted(true); + mediaPlayer->setMedia(QUrl::fromLocalFile(filepath)); mediaPlayer->play(); mediaPlayer->pause(); @@ -36,10 +39,10 @@ void LVideoLabel::stopVideo(QPixmap pix) { emit frameReceived(pix); if(thumbnail.isNull()) thumbnail = pix; - this->setPixmap((shrink) ? thumbnail.scaledToHeight(64) : thumbnail); + this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); mediaPlayer->pause(); }else { - this->setPixmap((shrink) ? pix.scaledToHeight(64) : pix); + this->setPixmap(pix.scaled(this->size(),Qt::IgnoreAspectRatio)); } } @@ -50,17 +53,23 @@ void LVideoLabel::setDuration(QMediaPlayer::MediaStatus status) { } } +void LVideoLabel::resizeEvent(QResizeEvent *event) { + if(!thumbnail.isNull()) + this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); + QLabel::resizeEvent(event); +} + void LVideoLabel::enterEvent(QEvent *event) { entered=true; emit rollOver(); mediaPlayer->setPosition(0); mediaPlayer->play(); - QLabel::enterEvent(event); + QWidget::enterEvent(event); } void LVideoLabel::leaveEvent(QEvent *event) { entered=false; mediaPlayer->setPosition(mediaPlayer->duration() / 2); emit rollOver(); - QLabel::leaveEvent(event); + QWidget::leaveEvent(event); } diff --git a/src-qt5/core/libLumina/LVideoLabel.h b/src-qt5/core/libLumina/LVideoLabel.h index 110e3305..8c544b16 100644 --- a/src-qt5/core/libLumina/LVideoLabel.h +++ b/src-qt5/core/libLumina/LVideoLabel.h @@ -3,11 +3,11 @@ #include #include +#include +#include #include "LVideoSurface.h" -//class LVideoSurface; - -class LVideoLabel : public QLabel { +class LVideoLabel : public QLabel{ Q_OBJECT public: LVideoLabel(QString, QWidget* parent=NULL); @@ -17,13 +17,14 @@ class LVideoLabel : public QLabel { protected: void enterEvent(QEvent*); void leaveEvent(QEvent*); + void resizeEvent(QResizeEvent*); signals: void rollOver(); void frameReceived(QPixmap); private slots: - void initializeBackend(); + void initializeBackend(); void stopVideo(QPixmap); void setDuration(QMediaPlayer::MediaStatus); @@ -33,6 +34,6 @@ class LVideoLabel : public QLabel { QPixmap thumbnail; bool entered; bool shrink; - QString filepath; + QString filepath; }; #endif diff --git a/src-qt5/core/libLumina/LVideoLabel.pri b/src-qt5/core/libLumina/LVideoLabel.pri index 384b3aae..06395c8d 100644 --- a/src-qt5/core/libLumina/LVideoLabel.pri +++ b/src-qt5/core/libLumina/LVideoLabel.pri @@ -2,8 +2,10 @@ QT *= multimedia HEADERS *= $${PWD}/LVideoLabel.h HEADERS *= $${PWD}/LVideoSurface.h +HEADERS *= $${PWD}/LVideoWidget.h SOURCES *= $${PWD}/LVideoLabel.cpp SOURCES *= $${PWD}/LVideoSurface.cpp +SOURCES *= $${PWD}/LVideoWidget.cpp INCLUDEPATH *= ${PWD} diff --git a/src-qt5/core/libLumina/LVideoWidget.cpp b/src-qt5/core/libLumina/LVideoWidget.cpp new file mode 100644 index 00000000..14490484 --- /dev/null +++ b/src-qt5/core/libLumina/LVideoWidget.cpp @@ -0,0 +1,28 @@ +#include "LVideoWidget.h" + +LVideoWidget::LVideoWidget(QString file, QSize iconSize, QWidget *parent) : QWidget(parent) { + flag = false; + iconLabel = new LVideoLabel(file, parent); + textLabel = new QLabel(parent); + + layout = new QHBoxLayout(this); + layout->setAlignment(Qt::AlignLeft | Qt::AlignCenter); + layout->addWidget(iconLabel); + layout->addWidget(textLabel); + layout->setStretchFactor(textLabel, 1); //make sure this always occupies all extra space + + textLabel->setText(file.section("/", -1)); + iconLabel->setFixedSize(iconSize); + iconLabel->setVisible(true); + textLabel->setVisible(true); +} + +LVideoWidget::~LVideoWidget() { + delete iconLabel; + delete textLabel; + delete layout; +} + +void LVideoWidget::setIconSize(QSize iconSize) { + iconLabel->setFixedSize(iconSize); +} diff --git a/src-qt5/core/libLumina/LVideoWidget.h b/src-qt5/core/libLumina/LVideoWidget.h new file mode 100644 index 00000000..c239a697 --- /dev/null +++ b/src-qt5/core/libLumina/LVideoWidget.h @@ -0,0 +1,21 @@ +#ifndef LVIDEOWIDGET_H +#define LVIDEOWIDGET_H + +#include "LVideoLabel.h" +#include +#include + +class LVideoWidget : public QWidget { + Q_OBJECT + public: + LVideoWidget(QString, QSize, QWidget* parent=NULL); + ~LVideoWidget(); + void setIconSize(QSize); + + private: + bool flag; + LVideoLabel *iconLabel; + QLabel *textLabel; + QHBoxLayout *layout; +}; +#endif -- cgit From b4bb314391b9d363944b8de91ea2c660675fabc6 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Sat, 21 Oct 2017 19:19:28 -0400 Subject: Added some testing code for issues with directories having >10 videos --- src-qt5/core/libLumina/LVideoLabel.cpp | 34 ++++++++++++++++++++++++++++++---- src-qt5/core/libLumina/LVideoLabel.h | 1 + 2 files changed, 31 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp index b90cff66..af23330c 100644 --- a/src-qt5/core/libLumina/LVideoLabel.cpp +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -1,4 +1,5 @@ #include "LVideoLabel.h" +#include LVideoLabel::LVideoLabel(QString file, QWidget *parent) : QLabel(parent) { thumbnail = QPixmap(); @@ -27,13 +28,14 @@ void LVideoLabel::initializeBackend(){ mediaPlayer->setMedia(QUrl::fromLocalFile(filepath)); mediaPlayer->play(); - mediaPlayer->pause(); this->connect(surface, SIGNAL(frameReceived(QPixmap)), this, SLOT(stopVideo(QPixmap))); + this->connect(mediaPlayer, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(stateChanged(QMediaPlayer::State))); this->connect(mediaPlayer, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(setDuration(QMediaPlayer::MediaStatus))); this->connect(this, SIGNAL(rollOver()), surface, SLOT(switchRollOver())); } + void LVideoLabel::stopVideo(QPixmap pix) { if(!entered) { emit frameReceived(pix); @@ -46,19 +48,42 @@ void LVideoLabel::stopVideo(QPixmap pix) { } } +void LVideoLabel::stateChanged(QMediaPlayer::State state) { + //qDebug() << state; +} + void LVideoLabel::setDuration(QMediaPlayer::MediaStatus status) { - if(status == QMediaPlayer::BufferedMedia) { + //qDebug() << status; + if(status == QMediaPlayer::BufferedMedia && !entered) { //Set duration in the middle to capture the thumbnail mediaPlayer->setPosition(mediaPlayer->duration() / 2); mediaPlayer->play(); - } + }else if(status == QMediaPlayer::EndOfMedia && entered) { //Loop back to the beginning if playback started and at the end of the video + mediaPlayer->setPosition(0); + mediaPlayer->play(); + }else if(status == QMediaPlayer::InvalidMedia){ + mediaPlayer->stop(); + mediaPlayer->play(); + }/*else if(status == QMediaPlayer::LoadingMedia) { + mediaPlayer->pause(); + QTimer timer; + timer.setSingleShot(true); + timer.setInterval(300); + timer.start(); + qDebug() << "Timer Started" << timer.remainingTime(); + while(timer.isActive()) QCoreApplication::processEvents(QEventLoop::AllEvents, 5); + qDebug() << "Timer Finished" << timer.remainingTime(); + mediaPlayer->setPosition(0); + mediaPlayer->play(); + }*/ } void LVideoLabel::resizeEvent(QResizeEvent *event) { - if(!thumbnail.isNull()) + if(!thumbnail.isNull()) //Resize the current pixmap to match the new size this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); QLabel::resizeEvent(event); } +//Start playing the video from the beginning when the mouse enters the label void LVideoLabel::enterEvent(QEvent *event) { entered=true; emit rollOver(); @@ -67,6 +92,7 @@ void LVideoLabel::enterEvent(QEvent *event) { QWidget::enterEvent(event); } +//Stop the video and set the thumbnail back to the middle of the video when the mouse leaves the label void LVideoLabel::leaveEvent(QEvent *event) { entered=false; mediaPlayer->setPosition(mediaPlayer->duration() / 2); diff --git a/src-qt5/core/libLumina/LVideoLabel.h b/src-qt5/core/libLumina/LVideoLabel.h index 8c544b16..f368c1a8 100644 --- a/src-qt5/core/libLumina/LVideoLabel.h +++ b/src-qt5/core/libLumina/LVideoLabel.h @@ -27,6 +27,7 @@ class LVideoLabel : public QLabel{ void initializeBackend(); void stopVideo(QPixmap); void setDuration(QMediaPlayer::MediaStatus); + void stateChanged(QMediaPlayer::State); private: QMediaPlayer *mediaPlayer; -- cgit From 08d871eeab89f38dcd1717cd6a29dfbbcc6b79b7 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 23 Oct 2017 17:50:00 -0400 Subject: Fixed issue with setting defaults in lumina-open and cleaned up main.cpp --- src-qt5/core/lumina-open/LFileDialog.cpp | 6 +- src-qt5/core/lumina-open/main.cpp | 277 ++++++++++++++++--------------- 2 files changed, 142 insertions(+), 141 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-open/LFileDialog.cpp b/src-qt5/core/lumina-open/LFileDialog.cpp index ce7c6a6f..dbdb6362 100644 --- a/src-qt5/core/lumina-open/LFileDialog.cpp +++ b/src-qt5/core/lumina-open/LFileDialog.cpp @@ -54,9 +54,9 @@ QString LFileDialog::getDefaultApp(QString extension){ void LFileDialog::setDefaultApp(QString extension, QString appFile){ if(!extension.contains("/")){ extension = LXDG::findAppMimeForFile(appFile); } - //mime type default: set on the system itself - if(appFile.endsWith(".desktop")){ appFile = appFile.section("/",-1); } //only need the relative path - LXDG::setDefaultAppForMime(extension, appFile); + //mime type default: set on the system itself + //if(appFile.endsWith(".desktop")){ appFile = appFile.section("/",-1); } //only need the relative path + LXDG::setDefaultAppForMime(extension, appFile); } // ----------- diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp index 72d09f42..945f0d1f 100644 --- a/src-qt5/core/lumina-open/main.cpp +++ b/src-qt5/core/lumina-open/main.cpp @@ -29,6 +29,8 @@ #include #include +#define DEBUG 0 + void printUsageInfo(){ qDebug() << "lumina-open: Application launcher for the Lumina Desktop Environment"; qDebug() << "Description: Given a file (with absolute path) or URL, this utility will try to find the appropriate application with which to open the file. If the file is a *.desktop application shortcut, it will just start the application appropriately. It can also perform a few specific system operations if given special flags."; @@ -68,7 +70,7 @@ void showOSD(int argc, char **argv, QString message){ splash.setAlignment(Qt::AlignCenter); - qDebug() << "Display OSD"; + if(DEBUG) qDebug() << "Display OSD"; splash.setText(message); //Make sure it is centered on the current screen QPoint center = App.desktop()->screenGeometry(QCursor::pos()).center(); @@ -89,7 +91,7 @@ void LaunchAutoStart(){ if(cmd.contains("%")){cmd = cmd.remove("%U").remove("%u").remove("%F").remove("%f").remove("%i").remove("%c").remove("%k").simplified(); } //Now run the command if(!cmd.isEmpty()){ - qDebug() << " - Auto-Starting File:" << xdgapps[i]->filePath; + if(DEBUG) qDebug() << " - Auto-Starting File:" << xdgapps[i]->filePath; QProcess::startDetached(cmd); } } @@ -98,130 +100,130 @@ void LaunchAutoStart(){ } QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QString& path, bool showDLG=false){ - //First check to see if there is a default for this extension - QString defApp; - if(extension=="mimetype"){ + //First check to see if there is a default for this extension + QString defApp; + if(extension=="mimetype"){ //qDebug() << "inFile:" << inFile; QStringList matches = LXDG::findAppMimeForFile(inFile, true).split("::::"); //allow multiple matches - qDebug() << "Mimetype Matches:" << matches; + if(DEBUG) qDebug() << "Mimetype Matches:" << matches; for(int i=0; i 1){ - for(int i=1; i100){ vol=100; } - LOS::setAudioVolume(vol); - showOSD(argc,argv, QString(QObject::tr("Audio Volume %1%")).arg(QString::number(vol)) ); - return; - }else if(QString(argv[i]).simplified() == "-volumedown"){ - int vol = LOS::audioVolume()-5; //decrease 5% - if(vol<0){ vol=0; } - LOS::setAudioVolume(vol); - showOSD(argc,argv, QString(QObject::tr("Audio Volume %1%")).arg(QString::number(vol)) ); - return; - }else if(QString(argv[i]).simplified() == "-brightnessup"){ - int bright = LOS::ScreenBrightness(); - if(bright > 0){ //brightness control available - bright = bright+5; //increase 5% - if(bright>100){ bright = 100; } - LOS::setScreenBrightness(bright); - showOSD(argc,argv, QString(QObject::tr("Screen Brightness %1%")).arg(QString::number(bright)) ); - } - return; - }else if(QString(argv[i]).simplified() == "-brightnessdown"){ - int bright = LOS::ScreenBrightness(); - if(bright > 0){ //brightness control available - bright = bright-5; //decrease 5% - if(bright<0){ bright = 0; } - LOS::setScreenBrightness(bright); - showOSD(argc,argv, QString(QObject::tr("Screen Brightness %1%")).arg(QString::number(bright)) ); - } - return; - }else if( (QString(argv[i]).simplified() =="-action") && (argc>(i+1)) ){ - ActionID = QString(argv[i+1]); - i++; //skip the next input - }else if(QString(argv[i]).simplified()=="-terminal"){ - inFile = LXDG::findDefaultAppForMime("application/terminal"); - break; - }else{ - inFile = QString::fromLocal8Bit(argv[i]); +//Get the input file + //Make sure to load the proper system encoding first + LUtils::LoadTranslation(0,""); //bypass application modification +QString inFile, ActionID; +bool showDLG = false; //flag to bypass any default application setting +if(argc > 1){ + for(int i=1; i100){ vol=100; } +LOS::setAudioVolume(vol); +showOSD(argc,argv, QString(QObject::tr("Audio Volume %1%")).arg(QString::number(vol)) ); +return; + }else if(QString(argv[i]).simplified() == "-volumedown"){ +int vol = LOS::audioVolume()-5; //decrease 5% +if(vol<0){ vol=0; } +LOS::setAudioVolume(vol); +showOSD(argc,argv, QString(QObject::tr("Audio Volume %1%")).arg(QString::number(vol)) ); +return; + }else if(QString(argv[i]).simplified() == "-brightnessup"){ +int bright = LOS::ScreenBrightness(); +if(bright > 0){ //brightness control available + bright = bright+5; //increase 5% + if(bright>100){ bright = 100; } + LOS::setScreenBrightness(bright); + showOSD(argc,argv, QString(QObject::tr("Screen Brightness %1%")).arg(QString::number(bright)) ); +} +return; + }else if(QString(argv[i]).simplified() == "-brightnessdown"){ +int bright = LOS::ScreenBrightness(); +if(bright > 0){ //brightness control available + bright = bright-5; //decrease 5% + if(bright<0){ bright = 0; } + LOS::setScreenBrightness(bright); + showOSD(argc,argv, QString(QObject::tr("Screen Brightness %1%")).arg(QString::number(bright)) ); +} +return; + }else if( (QString(argv[i]).simplified() =="-action") && (argc>(i+1)) ){ + ActionID = QString(argv[i+1]); +i++; //skip the next input + }else if(QString(argv[i]).simplified()=="-terminal"){ + inFile = LXDG::findDefaultAppForMime("application/terminal"); + break; + }else{ + inFile = QString::fromLocal8Bit(argv[i]); break; } } @@ -268,14 +270,14 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat } switch(DF.type){ case XDGDesktop::APP: - qDebug() << "Found .desktop application:" << ActionID; + if(DEBUG) qDebug() << "Found .desktop application:" << ActionID; if(!DF.exec.isEmpty()){ cmd = DF.getDesktopExec(ActionID); - qDebug() << "Got command:" << cmd; + if(DEBUG) qDebug() << "Got command:" << cmd; if(!DF.path.isEmpty()){ path = DF.path; } - watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); + watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); }else{ - ShowErrorDialog( argc, argv, QString(QObject::tr("Application shortcut is missing the launching information (malformed shortcut): %1")).arg(inFile) ); + ShowErrorDialog( argc, argv, QString(QObject::tr("Application shortcut is missing the launching information (malformed shortcut): %1")).arg(inFile) ); } break; case XDGDesktop::LINK: @@ -284,11 +286,11 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat inFile = DF.url; cmd.clear(); extension = inFile.section(":",0,0); - if(extension=="file"){ extension = "http"; } //local file URL - Make sure we use the default browser for a LINK type + if(extension=="file"){ extension = "http"; } //local file URL - Make sure we use the default browser for a LINK type extension.prepend("x-scheme-handler/"); - watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); + watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); }else{ - ShowErrorDialog( argc, argv, QString(QObject::tr("URL shortcut is missing the URL: %1")).arg(inFile) ); + ShowErrorDialog( argc, argv, QString(QObject::tr("URL shortcut is missing the URL: %1")).arg(inFile) ); } break; case XDGDesktop::DIR: @@ -297,14 +299,14 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat inFile = DF.path; cmd.clear(); extension = "inode/directory"; - watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); + watch = DF.startupNotify || !DF.filePath.contains("/xdg/autostart/"); }else{ - ShowErrorDialog( argc, argv, QString(QObject::tr("Directory shortcut is missing the path to the directory: %1")).arg(inFile) ); + ShowErrorDialog( argc, argv, QString(QObject::tr("Directory shortcut is missing the path to the directory: %1")).arg(inFile) ); } break; default: - qDebug() << DF.type << DF.name << DF.icon << DF.exec; - ShowErrorDialog( argc, argv, QString(QObject::tr("Unknown type of shortcut : %1")).arg(inFile) ); + if(DEBUG) qDebug() << DF.type << DF.name << DF.icon << DF.exec; + ShowErrorDialog( argc, argv, QString(QObject::tr("Unknown type of shortcut : %1")).arg(inFile) ); } } if(cmd.isEmpty()){ @@ -344,7 +346,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat cmd.append(" \""+inFile+"\""); } } - qDebug() << "Found Command:" << cmd << "Extension:" << extension; + if(DEBUG) qDebug() << "Found Command:" << cmd << "Extension:" << extension; //Clean up any leftover "Exec" field codes (should have already been replaced earlier) if(cmd.contains("%")){cmd = cmd.remove("%U").remove("%u").remove("%F").remove("%f").remove("%i").remove("%c").remove("%k").simplified(); } binary = cmd; //pass this string to the calling function @@ -370,7 +372,7 @@ int main(int argc, char **argv){ QMessageBox::warning(0, QObject::tr("Binary Missing"), QString(QObject::tr("Could not find \"%1\". Please ensure it is installed first.")).arg(bin)+"\n\n"+cmd); return 1; } - qDebug() << "[lumina-open] Running Cmd:" << cmd; + if(DEBUG) qDebug() << "[lumina-open] Running Cmd:" << cmd; int retcode = 0; //Provide an override file for never watching running processes. if(watch){ watch = !QFile::exists( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch" ); } @@ -391,12 +393,12 @@ int main(int argc, char **argv){ }else{ QProcess *p = new QProcess(); p->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); - if(!path.isEmpty() && QFile::exists(path)){ + if(!path.isEmpty() && QFile::exists(path)){ //qDebug() << " - Setting working path:" << path; - p->setWorkingDirectory(path); + p->setWorkingDirectory(path); } p->start(cmd); - + //Now check up on it once every minute until it is finished while(!p->waitForFinished(60000)){ //qDebug() << "[lumina-open] process check:" << p->state(); @@ -410,19 +412,18 @@ int main(int argc, char **argv){ //qDebug() << "[lumina-open] Finished Cmd:" << cmd << retcode << p->exitStatus(); if( QFile::exists("/tmp/.luminastopping") ){ watch = false; } //closing down session - ignore "crashes" (app could have been killed during cleanup) if( (retcode < 0) && watch){ //-1 is used internally for crashed processes - most apps return >=0 - qDebug() << "[lumina-open] Application Error:" << retcode; - //Setup the application - QApplication App(argc, argv); - App.setAttribute(Qt::AA_UseHighDpiPixmaps); - LuminaThemeEngine theme(&App); - LUtils::LoadTranslation(&App,"lumina-open"); + //Setup the application + QApplication App(argc, argv); + App.setAttribute(Qt::AA_UseHighDpiPixmaps); + LuminaThemeEngine theme(&App); + LUtils::LoadTranslation(&App,"lumina-open"); //App.setApplicationName("LuminaOpen"); - QMessageBox dlg(QMessageBox::Critical, QObject::tr("Application Error"), QObject::tr("The following application experienced an error and needed to close:")+"\n\n"+cmd ); - dlg.setWindowFlags(Qt::Window); - if(!log.isEmpty()){ dlg.setDetailedText(log); } - dlg.exec(); - } + QMessageBox dlg(QMessageBox::Critical, QObject::tr("Application Error"), QObject::tr("The following application experienced an error and needed to close:")+"\n\n"+cmd ); + dlg.setWindowFlags(Qt::Window); + if(!log.isEmpty()){ dlg.setDetailedText(log); } + dlg.exec(); + } } return retcode; } -- cgit From 50cda0d1b7c6061cccb89389f44f9173026a678b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 25 Oct 2017 12:11:53 -0400 Subject: Re-arrange the 2.0 desktop sources (QML + associated C++ files). Also another checkpoint commit with some of the QML desktop stuff (have a working context menu, wallpapers not working yet though) --- src-qt5/core/lumina-desktop-unified/LSession.cpp | 1 + .../src-desktop/RootWindow.cpp | 2 +- .../lumina-desktop-unified/src-desktop/desktop.pri | 5 +- .../src-desktop/src-cpp/RootDesktopObject.cpp | 77 ++++++++++++++++++++++ .../src-desktop/src-cpp/RootDesktopObject.h | 54 +++++++++++++++ .../src-desktop/src-cpp/ScreenObject.cpp | 31 +++++++++ .../src-desktop/src-cpp/ScreenObject.h | 48 ++++++++++++++ .../src-desktop/src-cpp/src-cpp.pri | 8 +++ .../src-desktop/src-qml/ContextMenu.qml | 36 ++++++++++ .../src-desktop/src-qml/RootDesktop.qml | 57 ++++++++++++++++ .../src-desktop/src-qml/WallpaperImage.qml | 25 +++++++ .../src-desktop/src-qml/src-qml.pri | 7 ++ .../src-desktop/src-qml/src-qml.qrc | 7 ++ 13 files changed, 356 insertions(+), 2 deletions(-) create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.h create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/src-cpp.pri create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri create mode 100644 src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index 426b91b4..e1251c01 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -230,6 +230,7 @@ void LSession::setupGlobalConnections(){ connect(Lumina::ROOTWIN, SIGNAL(RootResized(QRect)), Lumina::NWS, SLOT(setRoot_desktopGeometry(QRect)) ); connect(RootDesktopObject::instance(), SIGNAL(mouseMoved()), Lumina::SS, SLOT(newInputEvent()) ); connect(RootDesktopObject::instance(), SIGNAL(startLogout()), this, SLOT(StartLogout()) ); + connect(RootDesktopObject::instance(), SIGNAL(lockScreen()), Lumina::SS, SLOT(LockScreenNow()) ); //Native Window Class connections connect(Lumina::NEF, SIGNAL(WindowCreated(WId)), Lumina::NWS, SLOT(NewWindowDetected(WId))); diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp index 2aac6f3e..0cfa4e6b 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/RootWindow.cpp @@ -25,7 +25,7 @@ RootWindow::~RootWindow(){ } void RootWindow::start(){ - root_view->setSource(QUrl("qrc:///qml/RootDesktop")); + root_view->setSource(QUrl("qrc:///qml/RootDesktop.qml")); root_win->show(); root_view->show(); } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri b/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri index 25aa02b7..e4c4faeb 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/desktop.pri @@ -1,3 +1,5 @@ +QT *= gui widgets qml quick + SOURCES *= $${PWD}/RootWindow.cpp HEADERS *= $${PWD}/RootWindow.h @@ -5,4 +7,5 @@ HEADERS *= $${PWD}/RootWindow.h #update the includepath so we can just #include as needed without paths INCLUDEPATH *= $${PWD} -include(../../../src-cpp/Desktop.pri) +include($${PWD}/src-cpp/src-cpp.pri) +include($${PWD}/src-qml/src-qml.pri) diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp new file mode 100644 index 00000000..9842712e --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp @@ -0,0 +1,77 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "RootDesktopObject.h" +#include +#include +#include + +#include + +// === PUBLIC === +RootDesktopObject::RootDesktopObject(QObject *parent) : QObject(parent){ + updateScreens(); //make sure the internal list is updated right away +} + +RootDesktopObject::~RootDesktopObject(){ + +} + +void RootDesktopObject::RegisterType(){ + qmlRegisterType("Lumina.Backend.RootDesktopObject", 2, 0, "RootDesktopObject"); + //Also register any types that are needed by this class + ScreenObject::RegisterType(); +} + +RootDesktopObject* RootDesktopObject::instance(){ + static RootDesktopObject* r_obj = new RootDesktopObject(); + return r_obj; +} + +//QML Read Functions +QList RootDesktopObject::screens(){ + return s_objects; +} + +void RootDesktopObject::logout(){ + emit startLogout(); +} + +void RootDesktopObject::lockscreen(){ + emit lockScreen(); +} + +void RootDesktopObject::mousePositionChanged(){ + emit mouseMoved(); +} + +// === PUBLIC SLOTS === +void RootDesktopObject::updateScreens(){ + QList scrns = QApplication::screens(); + QList tmp; //copy of the internal array initially + for(int i=0; iname()==scrns[i]->name()){ found = true; tmp << s_objects.takeAt(j); } + } + if(!found){ tmp << new ScreenObject(scrns[i], this); } + } + //Delete any leftover objects + for(int i=0; ideleteLater(); } + s_objects = tmp; + emit screensChanged(); + for(int i=0; iemit geomChanged(); + } +} + +void RootDesktopObject::ChangeWallpaper(QString screen, QString value){ + for(int i=0; iname()==screen){ s_objects[i]->setBackground(value); break; } + } +} + +// === PRIVATE === diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h new file mode 100644 index 00000000..dd7c7ab3 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h @@ -0,0 +1,54 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This is the base C++ object that is used to pass information to the QML "RootDesktop" object +//=========================================== +#ifndef _LUMINA_DESKTOP_QML_BACKEND_ROOT_DESKTOP_OBJECT_H +#define _LUMINA_DESKTOP_QML_BACKEND_ROOT_DESKTOP_OBJECT_H +#include +#include + +#include "ScreenObject.h" + +class RootDesktopObject : public QObject{ + Q_OBJECT + //Define all the QML Properties here (interface between QML and the C++ methods below) + Q_PROPERTY( QList screens READ screens NOTIFY screensChanged) + +public: + //main contructor/destructor + RootDesktopObject(QObject *parent = 0); + ~RootDesktopObject(); + + static void RegisterType(); + + //primary interface to fetch the current instance of the class (so only one is running at any given time) + static RootDesktopObject* instance(); + + //QML Read Functions + QList screens(); + + //QML Access Functions + Q_INVOKABLE void logout(); + Q_INVOKABLE void lockscreen(); + Q_INVOKABLE void mousePositionChanged(); +private: + QList s_objects; + +public slots: + void updateScreens(); //rescan/update screen objects + void ChangeWallpaper(QString screen, QString); + +private slots: + +signals: + void screensChanged(); + void startLogout(); + void mouseMoved(); + void lockScreen(); + +}; +#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp new file mode 100644 index 00000000..4c1d6189 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp @@ -0,0 +1,31 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "ScreenObject.h" +#include +#include + +ScreenObject::ScreenObject(QScreen *scrn, QObject *parent) : QObject(parent){ + bg_screen = scrn; +} + +void ScreenObject::RegisterType(){ + qmlRegisterType("Lumina.Backend.ScreenObject",2,0, "ScreenObject"); +} + +QString ScreenObject::name(){ return bg_screen->name(); } +QString ScreenObject::background(){ qDebug() << "Got Background:" << bg_screen->name() << bg << bg_screen->geometry(); return bg; } +int ScreenObject::x(){ return bg_screen->geometry().x(); } +int ScreenObject::y(){ return bg_screen->geometry().y(); } +int ScreenObject::width(){ return bg_screen->geometry().width(); } +int ScreenObject::height(){ return bg_screen->geometry().height(); } + +void ScreenObject::setBackground(QString fileOrColor){ + if(bg!=fileOrColor){ + bg = fileOrColor; + emit backgroundChanged(); + } +} diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.h new file mode 100644 index 00000000..8076f1ae --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.h @@ -0,0 +1,48 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This is the base C++ object that is used to pass Screen/Wallpaper info to the QML classes +//=========================================== +#ifndef _LUMINA_DESKTOP_SCREEN_DESKTOP_OBJECT_H +#define _LUMINA_DESKTOP_SCREEN_DESKTOP_OBJECT_H +#include +#include +#include + +class ScreenObject : public QObject { + Q_OBJECT + Q_PROPERTY( QString name READ name ) + Q_PROPERTY( QString background READ background NOTIFY backgroundChanged) + Q_PROPERTY( int x READ x NOTIFY geomChanged) + Q_PROPERTY( int y READ y NOTIFY geomChanged) + Q_PROPERTY( int width READ width NOTIFY geomChanged) + Q_PROPERTY( int height READ height NOTIFY geomChanged) + +private: + QScreen *bg_screen; + QString bg; + +public: + ScreenObject(QScreen *scrn = 0, QObject *parent = 0); + + static void RegisterType(); + + Q_INVOKABLE QString name(); + Q_INVOKABLE QString background(); + Q_INVOKABLE int x(); + Q_INVOKABLE int y(); + Q_INVOKABLE int width(); + Q_INVOKABLE int height(); + +public slots: + void setBackground(QString fileOrColor); + +signals: + void backgroundChanged(); + void geomChanged(); +}; + +#endif diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/src-cpp.pri b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/src-cpp.pri new file mode 100644 index 00000000..33b699da --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/src-cpp.pri @@ -0,0 +1,8 @@ +SOURCES *= $${PWD}/RootDesktopObject.cpp \ + $${PWD}/ScreenObject.cpp + +HEADERS *= $${PWD}/RootDesktopObject.h \ + $${PWD}/ScreenObject.h + +INCLUDEPATH *= $${PWD} + diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml new file mode 100644 index 00000000..e5bac0b5 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml @@ -0,0 +1,36 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +import QtQuick 2.2 +import QtQuick.Window 2.2 +import QtQuick.Controls 2.0 + +import Lumina.Backend.RootDesktopObject 2.0 + +Menu { + id: contextMenu + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + MenuItem { + text: "Lock Screen" + onTriggered: { + RootObject.lockscreen() + } + } + + MenuItem { + text: "Logout" + //iconName: "system-log-out" + indicator: Image{ + asynchronous: true + //autoTransform: true + //source: "image://theme/system-logout" + source: "file:///usr/local/share/icons/material-design-light/scalable/actions/system-log-out.svg" + } + onTriggered: { + RootObject.logout() + } + } + } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml new file mode 100644 index 00000000..a1a9164f --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml @@ -0,0 +1,57 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This is the base QML script the launches/controls the desktop interface itself +//=========================================== +// NOTE: This needs to be paired/used with the corresponding C++ class: RootDesktopObject +// Which should be added as the "RootObject" context property to the QML engine +//------------------ +// Example Code: +// RootDesktopObject *rootobj = new RootDesktopObject(); +// QQuickView *root = new QQuickView(); +// root->setResizeMode(QQuickView::SizeRootObjectToView); +// root->engine()->rootContext()->setContextProperty("RootObject", rootobj); +//=========================================== +import QtQuick 2.2 +import QtQuick.Window 2.2 +import QtQuick.Controls 2.0 + +import "." as QML + +import Lumina.Backend.RootDesktopObject 2.0 +import Lumina.Backend.ScreenObject 2.0 + +Rectangle { + id: rootCanvas + color: "black" + + //Setup the right-click context menu + MouseArea { + anchors.fill: rootCanvas + acceptedButtons: Qt.RightButton + onClicked: { + contextMenu.x = mouseX + contextMenu.y = mouseY + contextMenu.open() + } + onPositionChanged: { + RootObject.mousePositionChanged() + } + } + + //Create the context menu itself + QML.ContextMenu { id: contextMenu } + + //Setup the wallpapers + Repeater{ + model: RootObject.screens + QML.WallpaperImage{ + //console.log( modelData.name() ) + object: modelData + z: 0+index + } + } +} diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml new file mode 100644 index 00000000..4d39b0b8 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml @@ -0,0 +1,25 @@ +//=========================================== +// Lumina-desktop source code +// Copyright (c) 2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +import QtQuick 2.2 +import QtQuick.Window 2.2 +import QtQuick.Controls 2.0 + +import Lumina.Backend.ScreenObject 2.0 + +AnimatedImage { + //C++ backend object + property ScreenObject object + + //Normal geometries/placements + asynchronous: true + clip: true + source: object.background + x: object.x + y: object.y + width: object.width + height: object.height + } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri new file mode 100644 index 00000000..99905253 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri @@ -0,0 +1,7 @@ +#Show the QML files to lupdate for translation purposes - not for the actual build +lupdate_only{ + SOURCES *= $${PWD}/RootDesktop.qml \ + $${PWD}/ContextMenu.qml +} + +RESOURCES *= $${PWD}/src-qml.qrc diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc new file mode 100644 index 00000000..ebdcc606 --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.qrc @@ -0,0 +1,7 @@ + + + RootDesktop.qml + ContextMenu.qml + WallpaperImage.qml + + -- cgit From ffa97c5088b2dc88ca38044774813549468969ea Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 25 Oct 2017 15:42:46 -0400 Subject: Speed up some of the desktop init procedures again. Got the "init" time from ~4.2 seconds to ~0.6 seconds on my laptop. --- src-qt5/core/lumina-desktop/LSession.cpp | 27 +++++++++++++++---------- src-qt5/core/lumina-desktop/LXcbEventFilter.cpp | 18 ++++++++--------- src-qt5/core/lumina-desktop/WMProcess.cpp | 6 +++--- 3 files changed, 28 insertions(+), 23 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index fb24117d..6fceff1b 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -98,7 +98,7 @@ void LSession::setupSession(){ qDebug() << "Initializing Session"; if(QFile::exists("/tmp/.luminastopping")){ QFile::remove("/tmp/.luminastopping"); } QTime* timer = 0; - //if(DEBUG){ timer = new QTime(); timer->start(); qDebug() << " - Init srand:" << timer->elapsed();} + if(DEBUG){ timer = new QTime(); timer->start(); qDebug() << " - Init srand:" << timer->elapsed();} //Setup the QSettings default paths splash.showScreen("settings"); @@ -118,8 +118,8 @@ void LSession::setupSession(){ } //use the system settings //Setup the user's lumina settings directory as necessary - splash.showScreen("user"); - if(DEBUG){ qDebug() << " - Init User Files:" << timer->elapsed();} + //splash.showScreen("user"); + //if(DEBUG){ qDebug() << " - Init User Files:" << timer->elapsed();} //checkUserFiles(); //adds these files to the watcher as well //Initialize the internal variables @@ -147,11 +147,12 @@ void LSession::setupSession(){ if(DEBUG){ qDebug() << " - Init Desktops:" << timer->elapsed();} desktopFiles = QDir(QDir::homePath()+"/Desktop").entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs, QDir::Name | QDir::IgnoreCase | QDir::DirsFirst); updateDesktops(); - for(int i=0; i<6; i++){ LSession::processEvents(); } //Run through this a few times so the interface systems get up and running + //if(DEBUG){ qDebug() << " - Process Events (6x):" << timer->elapsed();} + //for(int i=0; i<6; i++){ LSession::processEvents(); } //Run through this a few times so the interface systems get up and running //Now setup the system watcher for changes splash.showScreen("final"); - qDebug() << " - Initialize file system watcher"; + //qDebug() << " - Initialize file system watcher"; if(DEBUG){ qDebug() << " - Init QFileSystemWatcher:" << timer->elapsed();} watcher = new QFileSystemWatcher(this); QString confdir = sessionsettings->fileName().section("/",0,-2); @@ -171,14 +172,18 @@ void LSession::setupSession(){ connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherChange(QString)) ); connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(watcherChange(QString)) ); connect(this, SIGNAL(aboutToQuit()), this, SLOT(SessionEnding()) ); - if(DEBUG){ qDebug() << " - Init Finished:" << timer->elapsed(); delete timer;} - for(int i=0; i<4; i++){ LSession::processEvents(); } //Again, just a few event loops here so thing can settle before we close the splash screen + //if(DEBUG){ qDebug() << " - Process Events (4x):" << timer->elapsed();} + //for(int i=0; i<4; i++){ LSession::processEvents(); } //Again, just a few event loops here so thing can settle before we close the splash screen + if(DEBUG){ qDebug() << " - Launch Startup Apps:" << timer->elapsed();} //launchStartupApps(); QTimer::singleShot(500, this, SLOT(launchStartupApps()) ); - splash.hide(); - LSession::processEvents(); + //if(DEBUG){ qDebug() << " - Hide Splashscreen:" << timer->elapsed();} + //splash.hide(); + //LSession::processEvents(); + if(DEBUG){ qDebug() << " - Close Splashscreen:" << timer->elapsed();} splash.close(); - LSession::processEvents(); + //LSession::processEvents(); + if(DEBUG){ qDebug() << " - Init Finished:" << timer->elapsed(); delete timer;} } void LSession::CleanupSession(){ @@ -303,7 +308,7 @@ void LSession::launchStartupApps(){ QString sfile = sessionsettings->value("audiofiles/login", LOS::LuminaShare()+"Login.ogg").toString(); playAudioFile(sfile); } - qDebug() << "[DESKTOP INIT FINISHED]"; + //qDebug() << "[DESKTOP INIT FINISHED]"; } void LSession::StartLogout(){ diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp index ca7fb38d..038872ff 100644 --- a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp +++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp @@ -52,8 +52,8 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag session->emit WorkspaceChanged(); }else if( SysNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){ //Update the status/list of all running windows - session->WindowPropertyEvent(); - + session->WindowPropertyEvent(); + //window-specific property change }else if( WinNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){ //Ping only that window @@ -61,7 +61,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag session->WindowPropertyEvent(); } break; -//============================== +//============================== case XCB_CLIENT_MESSAGE: //qDebug() << "Client Message Event"; //qDebug() << " - Root Window:" << QX11Info::appRootWindow(); @@ -72,7 +72,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag session->SysTrayDockRequest( ((xcb_client_message_event_t*)ev)->data.data32[2] ); } //Ignore the System Tray messages at the moment (let the WM handle it) - + //window-specific property changes /*}else if( ((xcb_client_message_event_t*)ev)->type == session->XCB->EWMH._NET_WM_STATE ){ if( session->XCB->WindowIsMaximized( ((xcb_client_message_event_t*)ev)->window ) ){ @@ -86,22 +86,22 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag session->WindowPropertyEvent(); } break; -//============================== +//============================== case XCB_DESTROY_NOTIFY: //qDebug() << "Window Closed Event"; session->WindowClosedEvent( ( (xcb_destroy_notify_event_t*)ev )->window ); break; -//============================== +//============================== case XCB_CONFIGURE_NOTIFY: //qDebug() << "Configure Notify Event"; session->WindowConfigureEvent( ((xcb_configure_notify_event_t*)ev)->window ); break; -//============================== +//============================== case XCB_SELECTION_CLEAR: //qDebug() << "Selection Clear Event"; - session->WindowSelectionClearEvent( ((xcb_selection_clear_event_t*)ev)->owner ); + session->WindowSelectionClearEvent( ((xcb_selection_clear_event_t*)ev)->owner ); break; -//============================== +//============================== default: if(TrayDmgFlag!=0){ //if( (ev->response_type & ~0x80)==TrayDmgFlag){ diff --git a/src-qt5/core/lumina-desktop/WMProcess.cpp b/src-qt5/core/lumina-desktop/WMProcess.cpp index aa01b730..0687c1fe 100644 --- a/src-qt5/core/lumina-desktop/WMProcess.cpp +++ b/src-qt5/core/lumina-desktop/WMProcess.cpp @@ -30,7 +30,7 @@ void WMProcess::startWM(){ if(!isRunning()){this->start(cmd); } /*if(ssaver->state() == QProcess::NotRunning \ && LSession::handle()->sessionSettings()->value("WindowManager", "fluxbox").toString() != "lumina-wm"){ - ssaver->start("xscreensaver -no-splash"); + ssaver->start("xscreensaver -no-splash"); }*/ } @@ -52,8 +52,8 @@ void WMProcess::restartWM(){ inShutdown = true; this->kill(); if(!this->waitForFinished(5000) ){ this->terminate(); }; - inShutdown = false; - } + inShutdown = false; + } this->startWM(); } -- cgit From 76eb44f51faee92476ed509b700be9bc30be08a7 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 25 Oct 2017 17:09:02 -0400 Subject: Fixed image previews with video thumbnails --- src-qt5/core/libLumina/LVideoLabel.cpp | 34 +++++++++++++++++++++------------ src-qt5/core/libLumina/LVideoLabel.h | 5 +++-- src-qt5/core/libLumina/LVideoWidget.cpp | 8 ++++++++ src-qt5/core/libLumina/LVideoWidget.h | 2 ++ 4 files changed, 35 insertions(+), 14 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp index af23330c..bc70a292 100644 --- a/src-qt5/core/libLumina/LVideoLabel.cpp +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -1,10 +1,11 @@ #include "LVideoLabel.h" +#include #include LVideoLabel::LVideoLabel(QString file, QWidget *parent) : QLabel(parent) { thumbnail = QPixmap(); entered = false; - shrink = true; + icons = true; filepath = file; QTimer::singleShot(0, this, SLOT(initializeBackend()) ); @@ -15,10 +16,6 @@ LVideoLabel::~LVideoLabel() { surface->deleteLater(); } -void LVideoLabel::setShrinkPixmap(bool shrink) { - this->shrink = shrink; -} - void LVideoLabel::initializeBackend(){ mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface); surface = new LVideoSurface(this); @@ -35,6 +32,15 @@ void LVideoLabel::initializeBackend(){ this->connect(this, SIGNAL(rollOver()), surface, SLOT(switchRollOver())); } +void LVideoLabel::enableIcons() { + this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); + icons = true; +} + +void LVideoLabel::disableIcons() { + this->setPixmap(LXDG::findIcon("unknown", "").pixmap(this->size())); + icons = false; +} void LVideoLabel::stopVideo(QPixmap pix) { if(!entered) { @@ -85,17 +91,21 @@ void LVideoLabel::resizeEvent(QResizeEvent *event) { //Start playing the video from the beginning when the mouse enters the label void LVideoLabel::enterEvent(QEvent *event) { - entered=true; - emit rollOver(); - mediaPlayer->setPosition(0); - mediaPlayer->play(); + if(icons) { + entered=true; + emit rollOver(); + mediaPlayer->setPosition(0); + mediaPlayer->play(); + } QWidget::enterEvent(event); } //Stop the video and set the thumbnail back to the middle of the video when the mouse leaves the label void LVideoLabel::leaveEvent(QEvent *event) { - entered=false; - mediaPlayer->setPosition(mediaPlayer->duration() / 2); - emit rollOver(); + if(icons) { + entered=false; + mediaPlayer->setPosition(mediaPlayer->duration() / 2); + emit rollOver(); + } QWidget::leaveEvent(event); } diff --git a/src-qt5/core/libLumina/LVideoLabel.h b/src-qt5/core/libLumina/LVideoLabel.h index f368c1a8..3c6b304c 100644 --- a/src-qt5/core/libLumina/LVideoLabel.h +++ b/src-qt5/core/libLumina/LVideoLabel.h @@ -12,7 +12,8 @@ class LVideoLabel : public QLabel{ public: LVideoLabel(QString, QWidget* parent=NULL); ~LVideoLabel(); - void setShrinkPixmap(bool); + void enableIcons(); + void disableIcons(); protected: void enterEvent(QEvent*); @@ -34,7 +35,7 @@ class LVideoLabel : public QLabel{ LVideoSurface *surface; QPixmap thumbnail; bool entered; - bool shrink; + bool icons; QString filepath; }; #endif diff --git a/src-qt5/core/libLumina/LVideoWidget.cpp b/src-qt5/core/libLumina/LVideoWidget.cpp index 14490484..b9660b10 100644 --- a/src-qt5/core/libLumina/LVideoWidget.cpp +++ b/src-qt5/core/libLumina/LVideoWidget.cpp @@ -26,3 +26,11 @@ LVideoWidget::~LVideoWidget() { void LVideoWidget::setIconSize(QSize iconSize) { iconLabel->setFixedSize(iconSize); } + +void LVideoWidget::enableIcons() { + iconLabel->enableIcons(); +} + +void LVideoWidget::disableIcons() { + iconLabel->disableIcons(); +} diff --git a/src-qt5/core/libLumina/LVideoWidget.h b/src-qt5/core/libLumina/LVideoWidget.h index c239a697..6743acb6 100644 --- a/src-qt5/core/libLumina/LVideoWidget.h +++ b/src-qt5/core/libLumina/LVideoWidget.h @@ -11,6 +11,8 @@ class LVideoWidget : public QWidget { LVideoWidget(QString, QSize, QWidget* parent=NULL); ~LVideoWidget(); void setIconSize(QSize); + void disableIcons(); + void enableIcons(); private: bool flag; -- cgit From 1e4bb99764f6012260adb4192604a392bd62bf0a Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 25 Oct 2017 18:23:38 -0400 Subject: Fixed issues with previews and LVideoWidget sizing --- src-qt5/core/libLumina/LVideoLabel.cpp | 23 ++++++++++++++++------- src-qt5/core/libLumina/LVideoLabel.h | 3 ++- src-qt5/core/libLumina/LVideoWidget.cpp | 12 +++++++----- src-qt5/core/libLumina/LVideoWidget.h | 3 +-- 4 files changed, 26 insertions(+), 15 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp index bc70a292..bddb1cba 100644 --- a/src-qt5/core/libLumina/LVideoLabel.cpp +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -2,11 +2,12 @@ #include #include -LVideoLabel::LVideoLabel(QString file, QWidget *parent) : QLabel(parent) { +LVideoLabel::LVideoLabel(QString file, bool icons, QWidget *parent) : QLabel(parent) { thumbnail = QPixmap(); entered = false; - icons = true; + this->icons = icons; filepath = file; + defaultThumbnail = LXDG::findIcon("unknown", "").pixmap(256,256); QTimer::singleShot(0, this, SLOT(initializeBackend()) ); } @@ -23,6 +24,7 @@ void LVideoLabel::initializeBackend(){ mediaPlayer->setPlaybackRate(3); mediaPlayer->setMuted(true); + this->setPixmap(defaultThumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); mediaPlayer->setMedia(QUrl::fromLocalFile(filepath)); mediaPlayer->play(); @@ -38,7 +40,7 @@ void LVideoLabel::enableIcons() { } void LVideoLabel::disableIcons() { - this->setPixmap(LXDG::findIcon("unknown", "").pixmap(this->size())); + this->setPixmap(defaultThumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); icons = false; } @@ -47,10 +49,12 @@ void LVideoLabel::stopVideo(QPixmap pix) { emit frameReceived(pix); if(thumbnail.isNull()) thumbnail = pix; - this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); + if(icons) + this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); mediaPlayer->pause(); }else { - this->setPixmap(pix.scaled(this->size(),Qt::IgnoreAspectRatio)); + if(icons) + this->setPixmap(pix.scaled(this->size(),Qt::IgnoreAspectRatio)); } } @@ -84,8 +88,13 @@ void LVideoLabel::setDuration(QMediaPlayer::MediaStatus status) { } void LVideoLabel::resizeEvent(QResizeEvent *event) { - if(!thumbnail.isNull()) //Resize the current pixmap to match the new size - this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); + //Resize the current pixmap to match the new size + if(!thumbnail.isNull()){ + if(icons) + this->setPixmap(thumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); + else + this->setPixmap(defaultThumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); + } QLabel::resizeEvent(event); } diff --git a/src-qt5/core/libLumina/LVideoLabel.h b/src-qt5/core/libLumina/LVideoLabel.h index 3c6b304c..56defb6a 100644 --- a/src-qt5/core/libLumina/LVideoLabel.h +++ b/src-qt5/core/libLumina/LVideoLabel.h @@ -10,7 +10,7 @@ class LVideoLabel : public QLabel{ Q_OBJECT public: - LVideoLabel(QString, QWidget* parent=NULL); + LVideoLabel(QString, bool, QWidget* parent=NULL); ~LVideoLabel(); void enableIcons(); void disableIcons(); @@ -34,6 +34,7 @@ class LVideoLabel : public QLabel{ QMediaPlayer *mediaPlayer; LVideoSurface *surface; QPixmap thumbnail; + QPixmap defaultThumbnail; bool entered; bool icons; QString filepath; diff --git a/src-qt5/core/libLumina/LVideoWidget.cpp b/src-qt5/core/libLumina/LVideoWidget.cpp index b9660b10..f1f74414 100644 --- a/src-qt5/core/libLumina/LVideoWidget.cpp +++ b/src-qt5/core/libLumina/LVideoWidget.cpp @@ -1,20 +1,22 @@ #include "LVideoWidget.h" -LVideoWidget::LVideoWidget(QString file, QSize iconSize, QWidget *parent) : QWidget(parent) { - flag = false; - iconLabel = new LVideoLabel(file, parent); +LVideoWidget::LVideoWidget(QString file, QSize iconSize, bool icons, QWidget *parent) : QWidget(parent) { + iconLabel = new LVideoLabel(file, icons, parent); textLabel = new QLabel(parent); layout = new QHBoxLayout(this); layout->setAlignment(Qt::AlignLeft | Qt::AlignCenter); - layout->addWidget(iconLabel); - layout->addWidget(textLabel); + layout->setContentsMargins(5,5,5,5); layout->setStretchFactor(textLabel, 1); //make sure this always occupies all extra space textLabel->setText(file.section("/", -1)); + iconLabel->setGeometry(QRect(QPoint(0,0), iconSize)); iconLabel->setFixedSize(iconSize); iconLabel->setVisible(true); textLabel->setVisible(true); + + layout->addWidget(iconLabel); + layout->addWidget(textLabel); } LVideoWidget::~LVideoWidget() { diff --git a/src-qt5/core/libLumina/LVideoWidget.h b/src-qt5/core/libLumina/LVideoWidget.h index 6743acb6..610fd9e5 100644 --- a/src-qt5/core/libLumina/LVideoWidget.h +++ b/src-qt5/core/libLumina/LVideoWidget.h @@ -8,14 +8,13 @@ class LVideoWidget : public QWidget { Q_OBJECT public: - LVideoWidget(QString, QSize, QWidget* parent=NULL); + LVideoWidget(QString, QSize, bool icons, QWidget* parent=NULL); ~LVideoWidget(); void setIconSize(QSize); void disableIcons(); void enableIcons(); private: - bool flag; LVideoLabel *iconLabel; QLabel *textLabel; QHBoxLayout *layout; -- cgit From 5b5e79737f38b7eee6ced0cd08d7cdd437c0e708 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 25 Oct 2017 19:01:17 -0400 Subject: Added the QML Video screensaver --- .../extrafiles/screensavers/Video.json | 25 +++++++++++ .../extrafiles/screensavers/qml_scripts/Video.qml | 50 ++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Video.json create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Video.json b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Video.json new file mode 100644 index 00000000..2fa6e6da --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/Video.json @@ -0,0 +1,25 @@ +{ + "name" : { + "default" : "Video" + }, + "description" : { + "default" : "Play a single video or a list of videos in a loop" + }, + "author" : { + "name" : "Zackary Welch", + "email" : "zwelch@ixsystems.com", + "website" : "https://github.com/ZackaryWelch", + "company" : "iXsystems", + "company_website" : "http://ixsystems.com" + }, + "meta" : { + "license" : "3-clause BSD", + "license_url" : "https://github.com/trueos/lumina/blob/master/LICENSE", + "copyright" : "Copyright (c) 2017, Ken Moore (ken@ixsystems.com)", + "date_created" : "20171025", + "version" : "1.0" + }, + "qml" : { + "exec" : "qml_scripts/Video.qml" + } +} diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml new file mode 100644 index 00000000..e7d0626d --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml @@ -0,0 +1,50 @@ +import QtQuick 2.0 +import QtMultimedia 5.7 +import QtQuick.Window 2.2 +import Qt.labs.folderlistmodel 2.1 + +Rectangle { + //width: Screen.width + //height: Screen.height + width: 800 + height: 600 + color: "black" + + FolderListModel { + id: folderModel + folder: "/usr/local/videos" + } + + Repeater { + model: folderModel + Component { + Item { + Component.onCompleted: { playlist.addItem(fileURL) } + } + } + } + + Playlist { + id: playlist + playbackMode: Playlist.Random + PlaylistItem { source: "/" } + onError: { console.log("ERROR") } + } + + MediaPlayer { + id: player + autoPlay: true + playlist: playlist + } + + VideoOutput { + id: videoOutput + source: player + anchors.fill: parent + } + + Component.onCompleted: { + playlist.shuffle() + console.log(playlist.itemCount) + } +} -- cgit From 76f587abe521794a71604532224b9cf7103ae50e Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 25 Oct 2017 19:02:16 -0400 Subject: Removed debug outputs --- src-qt5/core/libLumina/LVideoSurface.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoSurface.cpp b/src-qt5/core/libLumina/LVideoSurface.cpp index e3e87667..3aaa81f0 100644 --- a/src-qt5/core/libLumina/LVideoSurface.cpp +++ b/src-qt5/core/libLumina/LVideoSurface.cpp @@ -7,17 +7,17 @@ LVideoSurface::LVideoSurface(QObject *parent) : QAbstractVideoSurface(parent) { } bool LVideoSurface::present(const QVideoFrame &frame) { - //qDebug() << surfaceFormat().pixelFormat() << frame.pixelFormat() << surfaceFormat().frameSize() << frame.size(); + //qDebug() << surfaceFormat().frameSize() << frame.size(); if(!frameImage.isNull() && !entered) { emit frameReceived(frameImage); return true; } if(frame.isValid()) { - //qDebug() << "Recording Frame" << frame.pixelFormat(); + //qDebug() << "Recording Frame"; + //qDebug() << surfaceFormat().frameSize() << frame.size(); QVideoFrame icon(frame); icon.map(QAbstractVideoBuffer::ReadOnly); - //qDebug() << icon.width() << icon.height(); QImage img(icon.bits(), icon.width(), icon.height(), icon.bytesPerLine(), QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat())); if((frameImage.isNull() && !entered) or entered) @@ -48,10 +48,13 @@ bool LVideoSurface::start(const QVideoSurfaceFormat &format) { const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); const QSize size = format.frameSize(); - if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) { + //QVideoSurfaceFormat newFormat = format; + //Shrink the frames passed through the format to a smaller, thumbnail appropriate size and increase the frame rate + //newFormat.setFrameSize(258,258); + //newFormat.setFrameRate(90); + + if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) QAbstractVideoSurface::start(format); - return true; - } else { - return false; - } + + return (imageFormat != QImage::Format_Invalid && !size.isEmpty()); } -- cgit From a821ac6d6bd60dbbfffd7661ecbaa2d9e4c26338 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 25 Oct 2017 20:18:13 -0400 Subject: Started incorporating the Grav screensaver to QML --- .../extrafiles/screensavers/qml_scripts/Grav.qml | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml new file mode 100644 index 00000000..d5245c9b --- /dev/null +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml @@ -0,0 +1,106 @@ +import QtQuick 2.7 +import QtGraphicalEffects 1.0 + +Rectangle { + id : canvas + anchors.fill: parent + width: 800 + height: 600 + color: "black" + + //Between 5 and 15 planets, read from settings + property var planets: Math.round(( Math.random() * 10 ) + 5 ) + + //Create planets + Repeater { + model: planets + + Rectangle { + id : index + parent: canvas + + //Place the planet randomly on the canvas, but not too close to the edge + x: Math.round(Math.random()*canvas.width) + + //Check to make sure the planets are not too close to the sun (outside a 50px radius) + //while( Math.round(Math.random()*canvas.width) < (width/2 + 50) or Math.round(Math.random()*canvas.width) > (width/2 - 50)) + + y: Math.round(Math.random()*canvas.height) + + + //Create the orbit animation + + //Planet size between 14 and 32 pixels + width: Math.round(1.75 * (((Math.random() * 10) + 8 ))) + height: width + + //Make each rectangle look circular + radius: width / 2 + + //Give each planet a random color, semi-transparent + color: Qt.rgba(Math.random(), Math.random(), Math.random(), 0.5) + } + } + + //Create the star + Rectangle{ + id: star + parent: canvas + + //Centers in star in the center of the canvas + x: Math.round(canvas.width / 2) + y: Math.round(canvas.height / 2) + + width: 60 + height: width + + //Create the wobble animation + SequentialAnimation on height { + loops: Animation.Infinite + PropertyAnimation { duration: 2000; to: 90 } + PropertyAnimation { duration: 2000; to: 60 } + } + + SequentialAnimation on width { + loops: Animation.Infinite + PropertyAnimation { duration: 2000; to: 90 } + PropertyAnimation { duration: 2000; to: 60 } + } + + //border.width: 4 + //border.color: "blue" + color: "black" + radius: width / 2 + + //Creates a radial gradient to make the star look cool + RadialGradient { + anchors.fill: parent + gradient: Gradient { + GradientStop { position:0 ;color: Qt.rgba(0,0,0,0)} + GradientStop { position:0.18 ;color: Qt.rgba(0,0,0,0)} + GradientStop { position:0.2 ;color: Qt.rgba(0.32,0.47,0.30,0.13)} + GradientStop { position:0.3 ;color: Qt.rgba(0.62,0.92,0.58,0.25)} + GradientStop { position:0.4 ;color: Qt.rgba(1.00,0.93,0.59,0.51)} + GradientStop { position:0.5 ;color: Qt.rgba(0,0,0,0)} + } + } + + } + + /*Motion timer + Timer { + interval: 1 + repeat: true + running: true + property bool starting: true + + onTriggered: { + if(starting) { interval = 3010; starting = false; } + + } + }*/ + + Component.onCompleted: { + //console.log(Math.random()) + } +} -- cgit From 9c5f154c2e8cc1ad388732a0bc3ee9bb42f296c6 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 26 Oct 2017 18:30:51 -0400 Subject: Fix a few places where /net/ files are still checked for existance (pauses/delays the session init) --- src-qt5/core/libLumina/LuminaXDG.cpp | 5 +++-- src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp | 6 +++--- .../desktop-plugins/applauncher/AppLauncherPlugin.cpp | 2 +- .../panel-plugins/systemstart/LStartButton.cpp | 2 +- .../panel-plugins/systemstart/StartMenu.cpp | 18 ++++++++++-------- .../panel-plugins/systemstart/StartMenu.h | 4 ++-- 6 files changed, 20 insertions(+), 17 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index fdf51a11..53b59165 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -631,7 +631,7 @@ void XDGDesktopList::populateMenu(QMenu *topmenu, bool byCategory){ void LFileInfo::loadExtraInfo(){ desk = 0; //Now load the extra information - if(this->isDir()){ + if( this->suffix().isEmpty() && (this->absoluteFilePath().startsWith("/net/") || this->isDir()) ){ mime = "inode/directory"; //Special directory icons QString name = this->fileName().toLower(); @@ -644,6 +644,7 @@ void LFileInfo::loadExtraInfo(){ else if(name=="downloads"){ icon = "folder-downloads"; } else if(name=="documents"){ icon = "folder-documents"; } else if(name=="images" || name=="pictures"){ icon = "folder-image"; } + else if(this->absoluteFilePath().startsWith("/net/")){ icon = "folder-shared"; } else if( !this->isReadable() ){ icon = "folder-locked"; } }else if( this->suffix()=="desktop"){ mime = "application/x-desktop"; @@ -730,7 +731,7 @@ bool LXDG::checkExec(QString exec){ else{ QStringList paths = QString(getenv("PATH")).split(":"); for(int i=0; isetAttribute(Qt::WA_TranslucentBackground); //this->setAttribute(Qt::WA_NoSystemBackground); this->setAutoFillBackground(false); - this->setStyleSheet("QWidget#LuminaDesktopPluginSpace{ border: none; background: transparent; }"); + this->setStyleSheet("QWidget#LuminaDesktopPluginSpace{ border: none; background: transparent; }"); this->setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); this->setAcceptDrops(true); this->setContextMenuPolicy(Qt::NoContextMenu); @@ -34,7 +34,7 @@ LDesktopPluginSpace::LDesktopPluginSpace() : QWidget(){ } LDesktopPluginSpace::~LDesktopPluginSpace(){ - + } void LDesktopPluginSpace::LoadItems(QStringList plugs, QStringList files){ @@ -76,7 +76,7 @@ void LDesktopPluginSpace::setBackground(QPixmap pix){ void LDesktopPluginSpace::setDesktopArea(QRect area){ //qDebug() << "Setting Desktop Plugin Area:" << area; desktopRect = area; - + } // =================== diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp index 0258d561..533b5997 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/applauncher/AppLauncherPlugin.cpp @@ -44,7 +44,7 @@ void AppLauncherPlugin::loadButton(){ QFileInfo info(path); this->contextMenu()->clear(); //qDebug() << "Default Application Launcher:" << def << path; - bool ok = QFile::exists(path); + bool ok = info.canonicalPath().startsWith("/net/") || QFile::exists(path); if(!ok){ emit RemovePlugin(this->ID()); return;} icosize = this->height()-4 - 2.2*button->fontMetrics().height(); button->setFixedSize( this->width()-4, this->height()-4); diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index f44add77..bbcd096c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -28,7 +28,7 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon menu->setContents(startmenu); QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0,0)).toSize(); if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value - + button->setMenu(menu); connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index e8df8390..c99e2b4b 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -138,7 +138,7 @@ void StartMenu::UpdateMenu(bool forceall){ } void StartMenu::ReLoadQuickLaunch(){ - emit UpdateQuickLaunch( LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList() ); + emit UpdateQuickLaunch( LSession::handle()->sessionSettings()->value("QuicklaunchApps",QStringList()).toStringList() ); } void StartMenu::UpdateQuickLaunch(QString path, bool keep){ @@ -431,7 +431,9 @@ void StartMenu::UpdateFavs(){ tmp.sort(); //Sort alphabetically by name (dirs/files) for(int i=0; i1){ ui->frame_wkspace->setVisible(true); int cur = LSession::handle()->XCB->CurrentWorkspace(); - ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); + ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); }else{ ui->frame_wkspace->setVisible(false); } @@ -635,14 +637,14 @@ void StartMenu::on_tool_mute_audio_clicked(){ ui->slider_volume->setValue(0); } } - + //Screen Brightness void StartMenu::on_slider_bright_valueChanged(int val){ ui->label_bright->setText(QString::number(val)+"%"); LOS::setScreenBrightness(val); } - + //Workspace void StartMenu::on_tool_set_nextwkspace_clicked(){ int cur = LSession::handle()->XCB->CurrentWorkspace(); @@ -663,10 +665,10 @@ void StartMenu::on_tool_set_prevwkspace_clicked(){ if(cur<0){ cur = tot-1; } //back to end //qDebug() << " - New Current:" << cur; LSession::handle()->XCB->SetCurrentWorkspace(cur); - ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); + ui->label_wkspace->setText( QString(tr("Workspace %1/%2")).arg(QString::number(cur+1), QString::number(tot)) ); } - + //Locale void StartMenu::on_combo_locale_currentIndexChanged(int){ //Get the currently selected Locale @@ -677,7 +679,7 @@ void StartMenu::on_combo_locale_currentIndexChanged(int){ LSession::handle()->switchLocale(locale); } - + //Search void StartMenu::on_line_search_textEdited(QString){ if(searchTimer->isActive()){ searchTimer->stop(); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h index 8ab04d94..e2dbb273 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h @@ -34,13 +34,13 @@ private: Ui::StartMenu *ui; QStringList favs; QString CCat, CSearch, topsearch; //current category/search - QTimer *searchTimer; + QTimer *searchTimer; //Simple utility functions //void deleteChildren(QWidget *obj); //recursive function void ClearScrollArea(QScrollArea *area); void SortScrollArea(QScrollArea *area); - void do_search(QString search, bool force); + void do_search(QString search, bool force); bool promptAboutUpdates(bool &skip); -- cgit From 3fd42c40cfda85fa90c19add4e07ec1ca1c312cb Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 27 Oct 2017 08:08:39 -0400 Subject: Add the ability to use a "directory" as the target for desktop wallpapers. Will automatically open that directory and randomly pick an image from from within it for the wallpaper. --- src-qt5/core/lumina-desktop/LDesktop.cpp | 65 ++++++++++++++-------- .../core/lumina-desktop/LDesktopPluginSpace.cpp | 12 ++-- .../applauncher/AppLauncherPlugin.cpp | 3 +- 3 files changed, 50 insertions(+), 30 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index f9ea1534..1fc6b11b 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -341,7 +341,7 @@ void LDesktop::UpdateMenu(bool fast){ void LDesktop::UpdateWinMenu(){ winMenu->clear(); //Get the current list of windows - QList wins = LSession::handle()->XCB->WindowList(); + QList wins = LSession::handle()->XCB->WindowList(); //Now add them to the menu for(int i=0; iXCB->ActivateWindow( act->data().toString().toULong() ); + LSession::handle()->XCB->ActivateWindow( act->data().toString().toULong() ); } void LDesktop::UpdateDesktop(){ @@ -393,7 +393,7 @@ void LDesktop::UpdateDesktop(){ if(settings->value(DPREFIX+"generateMediaIcons",true).toBool()){ QDir media("/media"); QStringList mediadirs = media.entryList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::Name); - for(int i=0; ivalue(DPREFIX+"pluginlist", QStringList()).toStringList(); - if(plugs.contains(ID)){ - plugs.removeAll(ID); + if(plugs.contains(ID)){ + plugs.removeAll(ID); issyncing=true; //don't let the change cause a refresh settings->setValue(DPREFIX+"pluginlist", plugs); settings->sync(); @@ -437,7 +437,7 @@ void LDesktop::DecreaseDesktopPluginIcons(){ settings->setValue(DPREFIX+"GridSize",cur); settings->sync(); QTimer::singleShot(200, this, SLOT(UnlockSettings()) ); - bgDesktop->SetIconSize(cur); + bgDesktop->SetIconSize(cur); } void LDesktop::UpdatePanels(){ @@ -484,18 +484,18 @@ void LDesktop::UpdateDesktopPluginArea(){ QRegion shifted = visReg; QString loc = settings->value(PANELS[i]->prefix()+"location","top").toString().toLower(); int vis = PANELS[i]->visibleWidth(); - if(loc=="top"){ + if(loc=="top"){ if(!shifted.contains(QRect(rawRect.x(), rawRect.y(), rawRect.width(), vis))){ continue; } - shifted.translate(0, (rawRect.top()+vis)-shifted.boundingRect().top() ); + shifted.translate(0, (rawRect.top()+vis)-shifted.boundingRect().top() ); }else if(loc=="bottom"){ - if(!shifted.contains(QRect(rawRect.x(), rawRect.bottom()-vis, rawRect.width(), vis))){ continue; } - shifted.translate(0, (rawRect.bottom()-vis)-shifted.boundingRect().bottom()); - }else if(loc=="left"){ + if(!shifted.contains(QRect(rawRect.x(), rawRect.bottom()-vis, rawRect.width(), vis))){ continue; } + shifted.translate(0, (rawRect.bottom()-vis)-shifted.boundingRect().bottom()); + }else if(loc=="left"){ if( !shifted.contains(QRect(rawRect.x(), rawRect.y(), vis,rawRect.height())) ){ continue; } - shifted.translate((rawRect.left()+vis)-shifted.boundingRect().left() ,0); + shifted.translate((rawRect.left()+vis)-shifted.boundingRect().left() ,0); }else{ //right if(!shifted.contains(QRect(rawRect.right()-vis, rawRect.y(), vis,rawRect.height())) ){ continue; } - shifted.translate((rawRect.right()-vis)-shifted.boundingRect().right(),0); + shifted.translate((rawRect.right()-vis)-shifted.boundingRect().right(),0); } visReg = visReg.intersected( shifted ); } @@ -535,7 +535,7 @@ void LDesktop::UpdateBackground(){ //Get the list of background(s) to show QStringList bgL = settings->value(DPREFIX+"background/filelist-workspace-"+QString::number( LSession::handle()->XCB->CurrentWorkspace()), QStringList()).toStringList(); if(bgL.isEmpty()){ bgL = settings->value(DPREFIX+"background/filelist", QStringList()).toStringList(); } - + //qDebug() << " - List:" << bgL << CBG; //Remove any invalid files for(int i=0; i= bgL.length()-1){ index = 0; } //if invalid or last item in the list - go to first - else{ index++; } //go to next + QString bgFile; + while(bgFile.isEmpty() || QFileInfo(bgFile).isDir()){ + QString prefix; + if(!bgFile.isEmpty()){ + //Got a directory - update the list of files and re-randomize the selection + QStringList imgs = LUtils::imageExtensions(); + for(int i=0; i= bgL.length()-1){ index = 0; } //if invalid or last item in the list - go to first + else{ index++; } //go to next + } + bgFile = prefix+bgL[index]; } - QString bgFile = bgL[index]; //Save this file as the current background CBG = bgFile; //qDebug() << " - Set Background to:" << CBG << index << bgL; @@ -570,7 +589,7 @@ void LDesktop::UpdateBackground(){ bgDesktop->setBackground(backPix); //Now reset the timer for the next change (if appropriate) if(bgtimer->isActive()){ bgtimer->stop(); } - if(bgL.length() > 1){ + if(bgL.length()>1 || oldBGL.length()>1){ //get the length of the timer (in minutes) int min = settings->value(DPREFIX+"background/minutesToChange",5).toInt(); //restart the internal timer @@ -633,9 +652,9 @@ void LDesktop::NewDesktopFile(QString name){ QDir desktop(QDir::homePath()); if(desktop.exists(tr("Desktop"))){ desktop.cd(tr("Desktop")); } //translated folder else{ desktop.cd("Desktop"); } //default/english folder - if(!desktop.exists(name)){ + if(!desktop.exists(name)){ QFile file(desktop.absoluteFilePath(name)); - if(file.open(QIODevice::WriteOnly) ){ file.close(); } + if(file.open(QIODevice::WriteOnly) ){ file.close(); } } } } diff --git a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp index 025c067a..9e964f5d 100644 --- a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp +++ b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp @@ -222,7 +222,7 @@ QRect LDesktopPluginSpace::findOpenSpot(int gridwidth, int gridheight, int start //else{ row++; } } if(!found){ col++; row=0; } //go to the next column - } + } }else if(reversed && (startRow>0 || startCol>0) ){ //Arrange Left->Right (work backwards) while(row>=0 && !found){ @@ -242,7 +242,7 @@ QRect LDesktopPluginSpace::findOpenSpot(int gridwidth, int gridheight, int start //else{ col++; } } if(!found){ row--; col=colCount-gridwidth;} //go to the previous row - } + } }else{ //Arrange Left->Right while(row<(rowCount-gridheight) && !found){ @@ -296,8 +296,8 @@ void LDesktopPluginSpace::reloadPlugins(bool ForceIconUpdate ){ QStringList plugs = plugins; QStringList items = deskitems; for(int i=0; iwhatsThis().startsWith("applauncher") && ForceIconUpdate){ + + if( ITEMS[i]->whatsThis().startsWith("applauncher") && ForceIconUpdate){ //Change the size of the existing plugin - preserving the location if possible /*QRect geom = ITEMS[i]->loadPluginGeometry(); //pixel coords if(!geom.isNull()){ @@ -306,14 +306,14 @@ void LDesktopPluginSpace::reloadPlugins(bool ForceIconUpdate ){ ITEMS[i]->savePluginGeometry( gridToGeom(geom)); //save it back in pixel coords }*/ //Now remove the plugin for the moment - run it through the re-creation routine below - ITEMS.takeAt(i)->deleteLater(); + ITEMS.takeAt(i)->deleteLater(); i--; } else if(plugs.contains(ITEMS[i]->whatsThis())){ plugs.removeAll(ITEMS[i]->whatsThis()); } else if(items.contains(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50))){ items.removeAll(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50)); } else{ ITEMS[i]->removeSettings(true); ITEMS.takeAt(i)->deleteLater(); i--; } //this is considered a permanent removal (cleans settings) } - + //Now create any new items //First load the plugins (almost always have fixed locations) for(int i=0; icontextMenu()->clear(); //qDebug() << "Default Application Launcher:" << def << path; - bool ok = info.canonicalPath().startsWith("/net/") || QFile::exists(path); + bool ok = info.canonicalPath().startsWith("/net/"); + if(!ok){ ok = QFile::exists(path); } //do it this way to ensure the file existance check never runs for /net/ files if(!ok){ emit RemovePlugin(this->ID()); return;} icosize = this->height()-4 - 2.2*button->fontMetrics().height(); button->setFixedSize( this->width()-4, this->height()-4); -- cgit From f8b26186ce5b6a018d2c833188fb1e9ee7f902d5 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 27 Oct 2017 09:24:11 -0400 Subject: Ensure that "Exec" and "TryExec" strings with quotes are handled properly. --- src-qt5/core/libLumina/LUtils.cpp | 3 +++ src-qt5/core/libLumina/LuminaXDG.cpp | 5 ++++- src-qt5/core/lumina-open/main.cpp | 5 ++--- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index 820b55e8..65c6ac96 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -121,6 +121,9 @@ bool LUtils::writeFile(QString filepath, QStringList contents, bool overwrite){ } bool LUtils::isValidBinary(QString& bin){ + //Trim off any quotes + if(bin.startsWith("\"") && bin.endsWith("\"")){ bin.chop(1); bin = bin.remove(0,1); } + //Now look for relative/absolute path if(!bin.startsWith("/")){ //Relative path: search for it on the current "PATH" settings QStringList paths = QString(qgetenv("PATH")).split(":"); diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 53b59165..aaca7bb1 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -72,6 +72,7 @@ void XDGDesktop::sync(){ QString loc = var.section("[",1,1).section("]",0,0).simplified(); // localization var = var.section("[",0,0).simplified(); //remove the localization QString val = line.section("=",1,50).simplified(); + if( val.count("\"")==2 && val.startsWith("\"") && val.endsWith("\"")){ val.chop(1); val = val.remove(0,1); } //remove the starting/ending quotes //------------------- if(var=="Name"){ if(insection){ @@ -727,6 +728,8 @@ bool LFileInfo::isAVFile(){ //==== LXDG Functions ==== bool LXDG::checkExec(QString exec){ //Return true(good) or false(bad) + //Check for quotes around the exec, and remove them as needed + if(exec.startsWith("\"") && exec.count("\"")>=2){ exec = exec.section("\"",1,1); } if(exec.startsWith("/")){ return QFile::exists(exec); } else{ QStringList paths = QString(getenv("PATH")).split(":"); @@ -748,7 +751,7 @@ QStringList LXDG::systemApplicationDirs(){ for(int i=0; i #include -#define DEBUG 0 +#define DEBUG 1 void printUsageInfo(){ qDebug() << "lumina-open: Application launcher for the Lumina Desktop Environment"; @@ -369,7 +369,7 @@ int main(int argc, char **argv){ QString bin = cmd.section(" ",0,0); if( !LUtils::isValidBinary(bin) ){ //invalid binary for some reason - open a dialog to warn the user instead - QMessageBox::warning(0, QObject::tr("Binary Missing"), QString(QObject::tr("Could not find \"%1\". Please ensure it is installed first.")).arg(bin)+"\n\n"+cmd); + ShowErrorDialog(argc,argv, QString(QObject::tr("Could not find \"%1\". Please ensure it is installed first.")).arg(bin)+"\n\n"+cmd); return 1; } if(DEBUG) qDebug() << "[lumina-open] Running Cmd:" << cmd; @@ -416,7 +416,6 @@ int main(int argc, char **argv){ //Setup the application QApplication App(argc, argv); App.setAttribute(Qt::AA_UseHighDpiPixmaps); - LuminaThemeEngine theme(&App); LUtils::LoadTranslation(&App,"lumina-open"); //App.setApplicationName("LuminaOpen"); QMessageBox dlg(QMessageBox::Critical, QObject::tr("Application Error"), QObject::tr("The following application experienced an error and needed to close:")+"\n\n"+cmd ); -- cgit From 73e0138c0047e8aee30233d1d15d9dfaf8831397 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 27 Oct 2017 09:27:46 -0400 Subject: Fix a couple theme engine holdovers in lumina-open, and turn off debugging again. --- src-qt5/core/lumina-open/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp index 7b6cb2ad..2b9e9184 100644 --- a/src-qt5/core/lumina-open/main.cpp +++ b/src-qt5/core/lumina-open/main.cpp @@ -29,7 +29,7 @@ #include #include -#define DEBUG 1 +#define DEBUG 0 void printUsageInfo(){ qDebug() << "lumina-open: Application launcher for the Lumina Desktop Environment"; @@ -50,7 +50,6 @@ void ShowErrorDialog(int argc, char **argv, QString message){ //Setup the application QApplication App(argc, argv); App.setAttribute(Qt::AA_UseHighDpiPixmaps); - LuminaThemeEngine theme(&App); LUtils::LoadTranslation(&App,"lumina-open"); QMessageBox dlg(QMessageBox::Critical, QObject::tr("File Error"), message ); dlg.exec(); @@ -141,7 +140,6 @@ QString cmdFromUser(int argc, char **argv, QString inFile, QString extension, QS LTHEME::LoadCustomEnvSettings(); QApplication App(argc, argv); App.setAttribute(Qt::AA_UseHighDpiPixmaps); - LuminaThemeEngine theme(&App); LUtils::LoadTranslation(&App,"lumina-open"); LFileDialog w; -- cgit From 7b1a48e82702d2c19c2e1cf30b64da8628783f04 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 31 Oct 2017 09:00:24 -0400 Subject: Add an upgrade path for moving theme settings from the old format to the new theme engine. Also turn on the mouse cursor "loading" image again when launching an external process (for 3 seconds) --- src-qt5/core/libLumina/ExternalProcess.h | 4 ++-- src-qt5/core/libLumina/LDesktopUtils.cpp | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/ExternalProcess.h b/src-qt5/core/libLumina/ExternalProcess.h index b1e56af8..ce8ff6f5 100644 --- a/src-qt5/core/libLumina/ExternalProcess.h +++ b/src-qt5/core/libLumina/ExternalProcess.h @@ -31,7 +31,7 @@ private slots: void processStarting(){ if(!cursorRestored){ QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); - QTimer::singleShot(15000, this, SLOT(resetCursor()) ); + QTimer::singleShot(3000, this, SLOT(resetCursor()) ); } } void processFinished(){ @@ -62,7 +62,7 @@ public: }*/ } - static void launch(QString program, QStringList args = QStringList(), bool manageCursors = false){ + static void launch(QString program, QStringList args = QStringList(), bool manageCursors = true){ //Quick launch of a process with logging disabled and automatic cleanup ExternalProcess *tmp = new ExternalProcess("", manageCursors); if(args.isEmpty()){ tmp->start(program); } diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index c65f6faf..db913e1b 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -505,6 +505,40 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ } LUtils::writeFile(dset, DS, true); } + if(oldversion<1003004){ + //Lumina 1.3.4 - Migrate theme settings from old format to the new theme engine format + QString themefile = QString(getenv("XDG_CONFIG_HOME"))+"/lthemeengine/lthemeengine.conf"; + if(!QFile::exists(themefile)){ + //Need to migrate theme settings from the old location to the new one + QSettings newtheme(themefile); + QStringList oldtheme = LUtils::readFile( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg" ); + //Find the system install location for the theme engine for use later + QString enginedir = LOS::LuminaShare()+"/../lthemeengine/"; + //Find/match the icon theme + QString tmp = oldtheme.filter("ICONTHEME=").join("\n").section("=",1,-1).section("\n",0,0).simplified(); + if(tmp.isEmpty()){ tmp = "material-design-light"; } //unknown Icon theme - use the default "light" version + newtheme.setValue("Appearance/icon_theme",tmp); + //Quick detect/adjust of the tone of the color theme based on the icons/colors (no 1-to-1 color theme matching between systems) + bool isdarktheme = tmp.contains("dark"); + isdarktheme = isdarktheme || oldtheme.filter("COLORFILE=").join("\n").section("=",1,-1).section("\n",0,0).contains("DarkGlass"); + //Quick adjust for the material-design icon theme to make it match the current dark/light theme + if(tmp.contains("material-design")){ + newtheme.setValue("Appearance/icon_theme", QString("material-design-")+ (isdarktheme ? "dark" : "light") ); + } + if(isdarktheme){ + newtheme.setValue("Appearance/custom_palette", true); + newtheme.setValue("Appearance/color_scheme_path", enginedir+"colors/darker.conf"); + newtheme.setValue("Interface/desktop_stylesheets", QStringList() << enginedir+"desktop_qss/DarkGlass.qss"); + }else{ + newtheme.setValue("Appearance/custom_palette", true); + newtheme.setValue("Appearance/color_scheme_path", enginedir+"colors/airy.conf"); + newtheme.setValue("Interface/desktop_stylesheets", QStringList() << enginedir+"desktop_qss/Glass.qss"); + } + newtheme.setValue("Appearance/style", "Fusion"); + newtheme.setValue("Interface/stylesheets", QStringList() << enginedir+"qss/tooltip-simple.qss" << enginedir+"qss/scrollbar-simple.qss" << enginedir+"qss/sliders-simple.qss"); + newtheme.sync(); //flush this to file right now + } //end check for theme file existance + } //Check the fluxbox configuration files dset = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/"; -- cgit From 4d27f401cdef77b5f2e162615ade2b92a57ae68f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 31 Oct 2017 09:28:48 -0400 Subject: Finish up the theme engine migration path (works fine now - after some testing). Also some random whitespace cleanup --- src-qt5/core/libLumina/LDesktopUtils.cpp | 5 ++++- src-qt5/core/libLumina/LuminaOS.h | 14 +++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index db913e1b..f1b3de17 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -509,8 +509,11 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ //Lumina 1.3.4 - Migrate theme settings from old format to the new theme engine format QString themefile = QString(getenv("XDG_CONFIG_HOME"))+"/lthemeengine/lthemeengine.conf"; if(!QFile::exists(themefile)){ + QDir dir; + dir.mkpath(themefile.section("/",0,-2)); //make sure the main directory exists first //Need to migrate theme settings from the old location to the new one - QSettings newtheme(themefile); + QSettings newtheme(themefile, QSettings::NativeFormat); + qDebug() << "Migrating Theme settings:" << newtheme.fileName(); QStringList oldtheme = LUtils::readFile( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg" ); //Find the system install location for the theme engine for use later QString enginedir = LOS::LuminaShare()+"/../lthemeengine/"; diff --git a/src-qt5/core/libLumina/LuminaOS.h b/src-qt5/core/libLumina/LuminaOS.h index e7a72129..98137816 100644 --- a/src-qt5/core/libLumina/LuminaOS.h +++ b/src-qt5/core/libLumina/LuminaOS.h @@ -5,8 +5,8 @@ // See the LICENSE file for full details //=========================================== // This is the main interface for any OS-specific system calls -// To port Lumina to a different operating system, just create a file -// called "LuminaOS-.cpp", and use that file in +// To port Lumina to a different operating system, just create a file +// called "LuminaOS-.cpp", and use that file in // the project (libLumina.pro) instead of LuminaOS-FreeBSD.cpp //=========================================== #ifndef _LUMINA_LIBRARY_OS_H @@ -23,7 +23,7 @@ class LOS{ public: //Return the name of the OS being used - static QString OSName(); + static QString OSName(); //OS-specific prefix(s) static QString LuminaShare(); //Install dir for Lumina share files @@ -34,7 +34,7 @@ public: static QString ControlPanelShortcut(); static QString AppStoreShortcut(); - //OS-specific RSS feeds + //OS-specific RSS feeds static QStringList RSSFeeds(); //Return Format: QStringList[ :::: ]; //Scan for mounted external devices @@ -81,13 +81,13 @@ public: static bool batteryIsCharging(); //Battery Time Remaining static int batterySecondsLeft(); //Returns: estimated number of seconds remaining - + //Get the checksum for a file static QStringList Checksums(QStringList filepaths); //Return: checksum of each input file (same order) - + //Get the filesystem capacity static QString FileSystemCapacity(QString dir) ; //Return: percentage capacity as give by the df command - + //System CPU Information static QStringList CPUTemperatures(); //Returns: List containing the temperature of any CPU's ("50C" for example) static int CPUUsagePercent(); //Returns: Overall percentage of the amount of CPU cycles in use (-1 for errors) -- cgit From 91134ecb1e450464acf6e9b99b17fdec26452d76 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 31 Oct 2017 09:55:21 -0400 Subject: Ensure the mouse cursor "busy" icon is used for 3 seconds when launching an external process. --- src-qt5/core/libLumina/ExternalProcess.h | 7 ++++++- src-qt5/core/lumina-desktop/LSession.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/ExternalProcess.h b/src-qt5/core/libLumina/ExternalProcess.h index ce8ff6f5..2a6f4949 100644 --- a/src-qt5/core/libLumina/ExternalProcess.h +++ b/src-qt5/core/libLumina/ExternalProcess.h @@ -15,6 +15,7 @@ #include #include #include +#include class ExternalProcess : public QProcess{ Q_OBJECT @@ -23,18 +24,21 @@ private: private slots: void resetCursor(){ + //qDebug() << "External Process: Reset Mouse Cursor =" << !cursorRestored; if(!cursorRestored){ QApplication::restoreOverrideCursor(); cursorRestored = true; } } void processStarting(){ + //qDebug() << "Starting External Process: Mouse Notification =" << !cursorRestored; if(!cursorRestored){ - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + QApplication::setOverrideCursor( QCursor(Qt::BusyCursor) ); QTimer::singleShot(3000, this, SLOT(resetCursor()) ); } } void processFinished(){ + //qDebug() << "External Process Finished: Reset Mouse Cursor =" << !cursorRestored; if(!cursorRestored){ QApplication::restoreOverrideCursor(); cursorRestored = true; @@ -53,6 +57,7 @@ public: this->setStandardOutputFile(logfile); } //Setup the connection for automatic cleanup + connect(this, SIGNAL(started()), this, SLOT(processStarting()) ); connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(processFinished()) ); } diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 6fceff1b..dab30f01 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -294,7 +294,7 @@ void LSession::launchStartupApps(){ qDebug() << " - - Screen Brightness:" << QString::number(tmp)+"%"; } //QProcess::startDetached("nice lumina-open -autostart-apps"); - ExternalProcess::launch("nice lumina-open -autostart-apps"); + ExternalProcess::launch("lumina-open", QStringList() << "-autostart-apps", false); //Re-load the screen brightness and volume settings from the previous session // Wait until after the XDG-autostart functions, since the audio system might be started that way @@ -589,7 +589,7 @@ void LSession::SessionEnding(){ //=============== void LSession::LaunchApplication(QString cmd){ //LSession::setOverrideCursor(QCursor(Qt::BusyCursor)); - ExternalProcess::launch(cmd); + ExternalProcess::launch(cmd, QStringList(), true); //QProcess::startDetached(cmd); } @@ -690,7 +690,7 @@ void LSession::WindowPropertyEvent(){ if(RunningApps.length() < newapps.length()){ //New Window found //qDebug() << "New window found"; - LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (new window opened?) + //LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (new window opened?) //Perform sanity checks on any new window geometries for(int i=0; i Date: Tue, 31 Oct 2017 10:10:51 -0400 Subject: fix for XDG processing --- src-qt5/core/libLumina/LUtils.cpp | 1 + src-qt5/core/libLumina/LuminaXDG.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index 65c6ac96..3d3c878a 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -123,6 +123,7 @@ bool LUtils::writeFile(QString filepath, QStringList contents, bool overwrite){ bool LUtils::isValidBinary(QString& bin){ //Trim off any quotes if(bin.startsWith("\"") && bin.endsWith("\"")){ bin.chop(1); bin = bin.remove(0,1); } + if(bin.startsWith("\'") && bin.endsWith("\'")){ bin.chop(1); bin = bin.remove(0,1); } //Now look for relative/absolute path if(!bin.startsWith("/")){ //Relative path: search for it on the current "PATH" settings diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index aaca7bb1..492a296c 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -729,7 +729,8 @@ bool LFileInfo::isAVFile(){ bool LXDG::checkExec(QString exec){ //Return true(good) or false(bad) //Check for quotes around the exec, and remove them as needed - if(exec.startsWith("\"") && exec.count("\"")>=2){ exec = exec.section("\"",1,1); } + if(exec.startsWith("\"") && exec.count("\"")>=2){ exec = exec.section("\"",1,1).simplified(); } + if(exec.startsWith("\'") && exec.count("\'")>=2){ exec = exec.section("\'",1,1).simplified(); } if(exec.startsWith("/")){ return QFile::exists(exec); } else{ QStringList paths = QString(getenv("PATH")).split(":"); -- cgit From 60de7e7db69e2afcf5269bcba3a96fc61baeb325 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 31 Oct 2017 10:31:56 -0400 Subject: Add a quick verify/modify of the directory used for the Lumina wallpapers. Try to adjust the old path to the new one automatically. --- src-qt5/core/lumina-desktop/LDesktop.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 1fc6b11b..71b10bd5 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -539,7 +539,16 @@ void LDesktop::UpdateBackground(){ //qDebug() << " - List:" << bgL << CBG; //Remove any invalid files for(int i=0; i Date: Tue, 31 Oct 2017 10:32:23 -0400 Subject: remove wallpapers from Project --- src-qt5/core/lumina-desktop/lumina-desktop.pro | 11 ----------- .../wallpapers/Lumina_Wispy_blue-grey-zoom.jpg | Bin 6269314 -> 0 bytes .../wallpapers/Lumina_Wispy_blue-grey.jpg | Bin 6508360 -> 0 bytes .../lumina-desktop/wallpapers/Lumina_Wispy_gold.jpg | Bin 2523711 -> 0 bytes .../lumina-desktop/wallpapers/Lumina_Wispy_green.jpg | Bin 1286362 -> 0 bytes .../wallpapers/Lumina_Wispy_grey-blue-zoom.jpg | Bin 563037 -> 0 bytes .../wallpapers/Lumina_Wispy_grey-blue.jpg | Bin 361771 -> 0 bytes .../lumina-desktop/wallpapers/Lumina_Wispy_purple.jpg | Bin 926969 -> 0 bytes .../lumina-desktop/wallpapers/Lumina_Wispy_red.jpg | Bin 1141515 -> 0 bytes 9 files changed, 11 deletions(-) delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey.jpg delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_gold.jpg delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_green.jpg delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue.jpg delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_purple.jpg delete mode 100644 src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_red.jpg (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index d4e57c5c..2c944a11 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -77,17 +77,6 @@ fluxconf.files = fluxboxconf/fluxbox-init-rc \ fluxboxconf/fluxbox-keys fluxconf.path = $${L_SHAREDIR}/lumina-desktop/ -wallpapers.files = wallpapers/Lumina_Wispy_gold.jpg \ - wallpapers/Lumina_Wispy_green.jpg \ - wallpapers/Lumina_Wispy_purple.jpg \ - wallpapers/Lumina_Wispy_red.jpg \ - wallpapers/Lumina_Wispy_blue-grey.jpg \ - wallpapers/Lumina_Wispy_blue-grey-zoom.jpg \ - wallpapers/Lumina_Wispy_grey-blue.jpg \ - wallpapers/Lumina_Wispy_grey-blue-zoom.jpg -wallpapers.path = $${L_SHAREDIR}/wallpapers/Lumina-DE - - defaults.files = defaults/luminaDesktop.conf \ defaults/compton.conf \ audiofiles/Logout.ogg \ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg deleted file mode 100644 index 481ca438..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey-zoom.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey.jpg deleted file mode 100644 index 9da67596..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_blue-grey.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_gold.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_gold.jpg deleted file mode 100644 index cba03cee..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_gold.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_green.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_green.jpg deleted file mode 100644 index 80b0d3e3..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_green.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg deleted file mode 100644 index 4f753ed5..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue-zoom.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue.jpg deleted file mode 100644 index c214cd78..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_grey-blue.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_purple.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_purple.jpg deleted file mode 100644 index e4c3d7a8..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_purple.jpg and /dev/null differ diff --git a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_red.jpg b/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_red.jpg deleted file mode 100644 index a092f636..00000000 Binary files a/src-qt5/core/lumina-desktop/wallpapers/Lumina_Wispy_red.jpg and /dev/null differ -- cgit From fa667a0c5a942a14fde891a9ef09254f005d1d67 Mon Sep 17 00:00:00 2001 From: q5sys Date: Tue, 31 Oct 2017 13:41:25 -0400 Subject: add bool to battery sound alert --- src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp | 5 ++++- src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp index cae73d13..7a6b0e7c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp @@ -20,6 +20,7 @@ LBattery::LBattery(QWidget *parent, QString id, bool horizontal) : LPPlugin(pare connect(timer,SIGNAL(timeout()), this, SLOT(updateBattery()) ); timer->start(); QTimer::singleShot(0,this,SLOT(OrientationChange()) ); //update the sizing/icon + sessionsettings = new QSettings("lumina-desktop", "sessionsettings"); } LBattery::~LBattery(){ @@ -78,7 +79,8 @@ void LBattery::updateBattery(bool force){ } if(iconsessionSettings()->value("audiofiles/batterylow", LOS::LuminaShare()+"low-battery.ogg").toString(); + bool playaudio = sessionsettings->value("PlayBatteryLowAudio",true).toBool(); + if( playaudio ){ QString sfile = LSession::handle()->sessionSettings()->value("audiofiles/batterylow", LOS::LuminaShare()+"low-battery.ogg").toString(); LSession::handle()->playAudioFile(sfile); } @@ -95,6 +97,7 @@ void LBattery::updateBattery(bool force){ else{ tt = QString( tr("%1 % (%2 Remaining)") ).arg(QString::number(charge), getRemainingTime() ); } label->setToolTip(tt); } +} QString LBattery::getRemainingTime(){ int secs = LOS::batterySecondsLeft(); diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h index d14cfc53..3c23be1c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.h @@ -30,6 +30,7 @@ private: QTimer *timer; QLabel *label; int iconOld; + QSettings *sessionsettings; private slots: void updateBattery(bool force = false); -- cgit From b38e7a9ff3343c9e2bcaec07f5e495f901e15553 Mon Sep 17 00:00:00 2001 From: q5sys Date: Tue, 31 Oct 2017 16:43:23 -0400 Subject: update LSingleApplication to use getuid instead of getlogin --- src-qt5/core/libLumina/LuminaSingleApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaSingleApplication.cpp b/src-qt5/core/libLumina/LuminaSingleApplication.cpp index 6811d147..5d276805 100644 --- a/src-qt5/core/libLumina/LuminaSingleApplication.cpp +++ b/src-qt5/core/libLumina/LuminaSingleApplication.cpp @@ -19,7 +19,7 @@ LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname) if(appname!="lumina-desktop"){ cTrans = LUtils::LoadTranslation(this, appname); }//save the translator for later //Initialize a couple convenience internal variables cfile = QDir::tempPath()+"/.LSingleApp-%1-%2-%3"; - QString username = QString(getlogin()); + QString username = QString(getuid()); //For locking the process use the official process name - not the user input (no masking) appname = this->applicationName(); cfile = cfile.arg( username, appname, QString::number(QX11Info::appScreen()) ); -- cgit From a65d083fc98e36d3dd4b58052f73f44ce029b2ae Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 1 Nov 2017 12:46:48 -0400 Subject: Fix up some whitespace in luminaxdg.cpp --- src-qt5/core/libLumina/LuminaXDG.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 492a296c..cf9e0af2 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -896,7 +896,7 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){ fall << getChildIconDirs(paths[i]+"hicolor"); //XDG fallback (apps add to this) } //Now load all the icon theme dependencies in order (Theme1 -> Theme2 -> Theme3 -> Fallback) - + //fall << LOS::AppPrefix()+"share/pixmaps"; //always use this as well as a final fallback QDir::setSearchPaths("icontheme", theme); QDir::setSearchPaths("default", oxy); @@ -931,7 +931,7 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){ //simple PNG image - load directly into the QIcon structure ico.addFile(srch[i]+":"+iconName+".png"); } - + } //If still no icon found, look for any image format in the "pixmaps" directory if(ico.isNull()){ @@ -951,13 +951,13 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){ break; } } - + } } //Use the fallback icon if necessary if(ico.isNull() ){ if(!fallback.isEmpty()){ ico = LXDG::findIcon(fallback,""); } - else if(iconName.contains("-x-") && !iconName.endsWith("-x-generic")){ + else if(iconName.contains("-x-") && !iconName.endsWith("-x-generic")){ //mimetype - try to use the generic type icon ico = LXDG::findIcon(iconName.section("-x-",0,0)+"-x-generic", ""); } @@ -974,7 +974,7 @@ QStringList LXDG::getChildIconDirs(QString parent){ QDir D(parent); QStringList out; QStringList dirs = D.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); - if(!dirs.isEmpty() && (dirs.contains("32x32") || dirs.contains("scalable")) ){ + if(!dirs.isEmpty() && (dirs.contains("32x32") || dirs.contains("scalable")) ){ //Need to sort these directories by image size //qDebug() << " - Parent:" << parent << "Dirs:" << dirs; for(int i=0; i. will still be caught) @@ -1067,7 +1067,7 @@ while(mimes.isEmpty()){ } } //Look for globs at the start of the filename - if(mimes.isEmpty()){ + if(mimes.isEmpty()){ mimes = mimefull.filter(":"+filename.left(2)); //look for the first 2 characters initially //Note: This initial filter will only work if the wildcard (*) is not within the first 2 characters of the pattern //Now ensure that the filter was accurate -- cgit From e0c84c93d82e19b0aad62e65458fa21b1ae639f2 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 2 Nov 2017 10:45:01 -0400 Subject: Add parsing of the "/media" directory on FreeBSD to the External Device Paths LOS function. --- src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index b9346565..a1c82fc9 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -27,12 +27,12 @@ QString LOS::SysPrefix(){ return "/usr/"; } //Prefix for system QString LOS::ControlPanelShortcut(){ return "/usr/local/share/applications/pccontrol.desktop"; } //system control panel QString LOS::AppStoreShortcut(){ return "/usr/local/share/applications/appcafe.desktop"; } //graphical app/pkg manager //OS-specific RSS feeds (Format: QStringList[ :::: ]; ) -QStringList LOS::RSSFeeds(){ +QStringList LOS::RSSFeeds(){ QStringList feeds; feeds << "FreeBSD News Feed::::https://www.freebsd.org/news/rss.xml"; feeds << "TrueOS News Feed::::http://www.trueos.org/?feed=rss2"; return feeds; - } + } // ==== ExternalDevicePaths() ==== QStringList LOS::ExternalDevicePaths(){ @@ -59,6 +59,23 @@ QStringList LOS::ExternalDevicePaths(){ i--; } } + //Also add info about anything in the "/media" directory + QDir media("/media"); + QFileInfoList list = media.entryInfoList(QDir::NoDotAndDotDot, QDir::Type | QDir::Name); + for(int i=0; i Date: Thu, 2 Nov 2017 11:07:43 -0400 Subject: Finish up the /media parsing for LuminaOS-FreeBSD --- src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index a1c82fc9..6ff144d5 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -61,8 +61,10 @@ QStringList LOS::ExternalDevicePaths(){ } //Also add info about anything in the "/media" directory QDir media("/media"); - QFileInfoList list = media.entryInfoList(QDir::NoDotAndDotDot, QDir::Type | QDir::Name); + QFileInfoList list = media.entryInfoList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot, QDir::Type | QDir::Name); + //qDebug() << "Media files found:" << list.length(); for(int i=0; i Date: Thu, 2 Nov 2017 11:24:14 -0400 Subject: A bit more cleanup on the external device reporting/usage. --- src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index 6ff144d5..29a58ec9 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -66,7 +66,7 @@ QStringList LOS::ExternalDevicePaths(){ for(int i=0; i Date: Fri, 3 Nov 2017 11:56:31 -0400 Subject: fix start menu width --- src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index bbcd096c..a4f6adfb 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -26,7 +26,8 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); menu->setContents(startmenu); - QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0,0)).toSize(); + QRect screenSize = QApplication::desktop()->availableGeometry(this); + QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(screenSize.width() * 0.2, screenSize.height() * 0.2)).toSize(); if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value button->setMenu(menu); -- cgit From 71a14c01a314f96f4e1479873d3763c58c84302c Mon Sep 17 00:00:00 2001 From: q5sys Date: Fri, 3 Nov 2017 12:34:18 -0400 Subject: fix height for start menu --- src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index a4f6adfb..30e82c47 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -27,7 +27,7 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); menu->setContents(startmenu); QRect screenSize = QApplication::desktop()->availableGeometry(this); - QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(screenSize.width() * 0.2, screenSize.height() * 0.2)).toSize(); + QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(screenSize.width() * 0.2, screenSize.height())).toSize(); if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value button->setMenu(menu); -- cgit From 2399e46bd8d75595082518ceb0ef344d9e1cd768 Mon Sep 17 00:00:00 2001 From: a-stjohn <32651598+a-stjohn@users.noreply.github.com> Date: Fri, 3 Nov 2017 18:02:33 -0400 Subject: Fixed a simple typo. --- src-qt5/core/lumina-open/lumina-open.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-open/lumina-open.1 b/src-qt5/core/lumina-open/lumina-open.1 index e8c555ee..cb671da3 100644 --- a/src-qt5/core/lumina-open/lumina-open.1 +++ b/src-qt5/core/lumina-open/lumina-open.1 @@ -19,7 +19,7 @@ .Sh DESCRIPTION Given a file with an absolute pathway or URL, the .Nm -utility finds the appropriate application which which to open the +utility finds the appropriate application with which to open the file. If the file is a *.desktop application shortcut, .Nm starts the application automatically. Using the appropriate flags -- cgit From 6051df8adb6044ee53061174feca5ead91a3be13 Mon Sep 17 00:00:00 2001 From: ahto Date: Sat, 4 Nov 2017 23:10:25 +0200 Subject: modified: src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts --- .../core/lumina-desktop/i18n/lumina-desktop_et.ts | 419 +++++++++++---------- 1 file changed, 210 insertions(+), 209 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts index ef19e5a0..456d5aff 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts @@ -40,47 +40,47 @@ Launch %1 - Käivita %1 + Käivita %1 Open - Ava + Ava Open With - + Ava Kasutades View Properties - + Vaata Omadusi File Operations - + Failioperatsioonid Rename - + Nimeta Ümber Copy - Kopeeri + Kopeeri Cut - Lõika + Lõika Delete - Kustuta + Kustuta @@ -95,7 +95,7 @@ New Filename - + Uus Failinimi @@ -103,12 +103,12 @@ Desktop - Töölaud + Töölaud Manage Applications - + Halda Rakendusi @@ -196,47 +196,47 @@ Starting the Lumina Desktop... - + Lumina Töölaua käivitumine... Version %1 - + Versioon %1 This desktop is powered by coffee, coffee, and more coffee. - + Töölaua valmimist on toetanud kohvi, kohvi ja veel rohkem kohvi. Keep up with desktop news! - + Pea silm peal töölaua uudistel! There is a full handbook of information about the desktop available online. - + Võrgus on Töölaua kohta olemas täiemahuline käsiraamat (ingl.k) Want to change the interface? Everything is customizable in the desktop configuration! - + Soovid muuta kasutajaliidest? Kõik töölaua konfiguratsioonis on muudetav! Lumina can easily reproduce the interface from most other desktop environments. - + Lumina võimaldab kergesti taasluua kasutajaliideseid enamikest muudest töölauakeskkondadest This desktop is generously sponsored by iXsystems - + Selle töölaua valmimist on heldelt toetanud iXsystems I have never been hurt by what I have not said - + Mulle ei ole kunagi haiget teenud ütlemata jäänud asjad @@ -246,22 +246,22 @@ Everything has its beauty but not everyone sees it. - + Kõigel on oma ilu kuid mitte kõik ei oska seda näha Before God we are all equally wise - and equally foolish. - + Jumala ees oleme kõik võrdselt targad - ja võrdselt lollid. We cannot do everything at once, but we can do something at once. - + Me ei saa teha kõike ühekorraga, kuid me saame teha midagi kohe. One with the law is a majority. - + @@ -271,217 +271,218 @@ You can't know too much, but you can say too much. - + Sa ei saa kunagi teada liiga palju, kuid saad öelda. Duty is not collective; it is personal. - + Kohusetunne ei ole kollektiivne, see on isiklik Any society that would give up a little liberty to gain a little security will deserve neither and lose both. - + Ühiskond, mis annab ära veidikene vabadust et lisada veidikene turvalisust, ei vääri kumbagi ning kaotab mõlemad. Never trust a computer you can’t throw out a window. - + Ära kunagi usalda kompuutrit, mida ei ole võimalik aknast välja visata. Study the past if you would define the future. - + Tuleviku ennustamiseks õpi minevikku. The way to get started is to quit talking and begin doing. - + Meetod alustamiseks: lõpeta seletamine ja hakka tegema. Ask and it will be given to you; search, and you will find; knock and the door will be opened for you. - + Küsi, ja sulle antakse; Otsi, ning sa leiad; Koputa, ning uks avatakse sulle. Start where you are. Use what you have. Do what you can. - + Alusta, sealt kus sa oled. Kasuta, mis sul on. Tee, mis saad. A person who never made a mistake never tried anything new. - + Inimene, kes kunagi pole eksinud, ei ole kunagi proovinud teha midagi uut. It does not matter how slowly you go as long as you do not stop. - + Pole oluline kui aeglaselt sa kulged, kuni sa ei peatu. Do what you can, where you are, with what you have. - + Tee mis saad, kus parajasti oled, mis käepärast on. Remember no one can make you feel inferior without your consent. - + Pea meeles et mitte keegi ei saa sind panna tundma alaväärtuslikuna ilma su enda nõusolekuta It’s not the years in your life that count. It’s the life in your years. - + Olulised pole elatud aastad. Oluline on elada igas aastas. Either write something worth reading or do something worth writing. - + Kirjuta midagi väärt lugemist või tee midagi väärt kirjutamist. The only way to do great work is to love what you do. - + Ainus valem heaks tööks on armastada seda. Political correctness is tyranny with manners. - + Poliitkorrektsus on kommetega türannia. Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - + Ainult kaks asja on lõputud. Universum ja inimese lollus. Ma ei ole kusjuures esimeses kindel. + I find that the harder I work, the more luck I seem to have. - + Olen avastanud et mida rohkem ma tööd raban, seda rohkem õnne näib mul olevat. Do, or do not. There is no 'try'. - + Tee, või ära tee. Lihtsalt proovimine ei ole variant. A mathematician is a device for turning coffee into theorems. - + Matemaatik on seade, mis muudab kohvi teoreemideks. Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. - + Head inimesed ei vaja seadusi käitumaks vastutustundlikult, sellal kui halvad inimesed leiavad tee seadustest möödahiilimiseks. Black holes are where God divided by zero. - + Mustad augud Universumis on kohad, kus Jumal jagas nulliga. It's kind of fun to do the impossible. - + On omamoodi lõbus saata korda võimatut. Knowledge speaks, but wisdom listens. - + Teadmised räägivad, tarkus kuulab. A witty saying proves nothing. - + Kaval ütlus ei tõesta midagi. Success usually comes to those who are too busy to be looking for it. - + Edu tuleb tavaliselt nende juurde, kel on liiga kiire, selleks et seda otsida. Well-timed silence hath more eloquence than speech. - + Hästiajastatud vaikus on väljendusrikkam kui kõne I have never let my schooling interfere with my education. - + Ma ei ole kunagi lasknud koolil segada enda harimist. The best way to predict the future is to invent it. - + Parim meetod tuleviku ennustamiseks on see leiutada Well done is better than well said. - + Hästitehtu on parem kui hästiöeldu. Sometimes it is not enough that we do our best; we must do what is required. - + Vahel ei piisa meie parimast; Peame tegema seda, mis on vaja. The truth is more important than the facts. - + Tõde on olulisem kui faktid. Better to remain silent and be thought a fool than to speak out and remove all doubt. - + Parem olla vait ja lasta endast mõelda kui lollist kui teha suu lahti ja eemaldada kõik kahtlused. Initializing Session … - + Seansi käivitumine... Loading System Settings … - + Süsteemi Seadete laadimine... Loading User Preferences … - + Kasutajaeelistuste laadimine... Preparing System Tray … - + Süsteemi tööriba ettevalimistamine... Starting Window Manager … - + Aknahalduri käivitumine... Detecting Applications … - + Olemasolevate programmide tuvastamine... Preparing Menus … - + Kasutajamenüüde ettevalmistamine... Preparing Workspace … - + Töölaua ettevalmistamine... Finalizing … - + Viimased liigutused... Starting App: %1 - + Käivitan rakenduse: %1 @@ -527,7 +528,7 @@ Go Back - Mine tagasi + Mine tagasi @@ -547,12 +548,12 @@ Remove from Quicklaunch - + Eemalda Kiirkäivitusest Add to Quicklaunch - + Lisa Kiirkäivitusse @@ -560,7 +561,7 @@ Error parsing script output: %1 - + Viga skripti väljundi töötlemisel: %1 @@ -573,92 +574,92 @@ Applications - Rakendused + Rakendused Browse Files - + Install Applications - Paigalda rakendusi + Paigalda rakendusi Control Panel - Juhtpaneel + Juhtpaneel Multimedia - Multimeedia + Multimeedia Development - Arendus + Arendustarkvara Education - Haridus + Haridus Games - Mängud + Mängud Graphics - Graafika + Graafika Network - Võrk + Võrk Office - Kontor + Kontor Science - Teadus + Teadus Settings - Sätted + Sätted System - Süsteem + Süsteem Utility - Tööriistad + Tööriistad Wine - Wine + Wine Unsorted - Sortimata + Sortimata Leave - + Lahku @@ -679,12 +680,12 @@ Time Zone (%1) - + Ajavöönd (%1) Use System Time - + Kasuta süsteemiaega @@ -692,32 +693,32 @@ Modify Item - + Muuda Start Moving Item - + Alusta liigutamist Start Resizing Item - + Alusta suuruse muutmist Increase Item Sizes - + Suurenda mõõte Decrease Item Sizes - + Vähenda mõõte Remove Item - + Eemalda @@ -773,24 +774,24 @@ Desktop Actions - + Töölauategevused New Folder - + Uus Kaust New File - + Uus Fail Paste - + Aseta @@ -810,24 +811,24 @@ Lock Session - + Lukusta sessioon Browse Files - + Sirvi Faile Leave - + Lahku Desktop - Töölaud + Töölaud @@ -835,7 +836,7 @@ Workspace 1 - + Tööruum 1 @@ -848,8 +849,8 @@ LQuickLaunchButton - Remove from Quicklaunch - + Remove from QuickLaunch + Eemalda Kiirkäivitusest @@ -858,7 +859,7 @@ Desktop - Töölaud + Töölaud @@ -879,7 +880,7 @@ Volume - + Helitugevus @@ -954,17 +955,17 @@ Show All Windows - + Näita kõiki aknaid Minimize All Windows - + Minimeeri kõik aknad Close All Windows - + Sulge kõik aknad @@ -1005,7 +1006,7 @@ Disk I/O - + Ketta I/O @@ -1028,37 +1029,37 @@ Name: - Nimi: + Nimi: Invalid Note Name: Try Again - + Vigane märkmenimi: Proovi uuesti Select a Note Name - + Vali märkmenimi Open Text File - + Ava tekstifail Create a Note - + Loo märge Rename Note - + Nimeta märge ümber Delete Note - + Kustuta märge @@ -1066,57 +1067,57 @@ Form - Vorm + Vorm Clear Playlist - Tühjenda esitusloend + Tühjenda esitusloend Shuffle Playlist - Sega loendi järjekord + Sega loendi järjekord Add Files - Lisa faile + Lisa faile Add Directory - Lisa kaust + Lisa kaust Add URL - Lisa URL + Lisa URL Multimedia Files - Multimeediafailid + Multimeediafailid Select Multimedia Files - Vali multimeediafailid + Vali multimeediafailid Select Multimedia Directory - Vali multimeedia kaust + Vali multimeedia kaust Enter a valid URL for a multimedia file or stream: - Sisesta multimeediafaili või -voo URL + Sisesta multimeediafaili või -voo URL Multimedia URL - Multimeedia URL + Multimeedia URL @@ -1182,155 +1183,155 @@ Form - Vorm + Vorm View Options - + Vaata valikuid Open Website - + Ava veebileht More - + Rohkem Back to Feeds - + Tagasi voo juurde Feed Information - + Voo informatsioon Remove Feed - + Eemalda voog New Feed Subscription - + Uuele voole registreerumine RSS URL - + RSS URL aadress Load a preset RSS Feed - + Lae eelseadistatud RSS voog Add to Feeds - + Lisa voogudele Feed Reader Settings - + Uudisvoogude lugeja seaded Manual Sync Only - + Ainult käsitsi sünkroniseerimine Some RSS feeds may request custom update intervals instead of using this setting - + Mõned uudisvood võivad nõuda erinevaid uuendusintervalle, selle seade kasutamise asemel. Default Sync Interval - + Vaikimisi sünkroniseerimise intervall Hour(s) - + Tundides Minutes - + Minutites Save Settings - + Salvesta seaded Add RSS Feed - + Lisa uudisvoog View Feed Details - + Vaata uudisvoo detaile Settings - Sätted + Sätted Update Feeds Now - + Uuenda uudisvooge Lumina Desktop RSS - + Lumina Töölaua RSS Feed URL: %1 - + Uudisvoo URL: %1 Title: %1 - + Pealkiri: %1 Description: %1 - + Kirjeldus: %1 Website: %1 - + Veebileht: %1 Last Build Date: %1 - + Viimane koostamise aeg: %1 Last Sync: %1 - + Viimane sünkr.: %1 Next Sync: %1 - + Järgmine sünkr.: %1 @@ -1343,22 +1344,22 @@ Preferences - + Eelistus Wallpaper - + Taustapilt Display - + Ekraan All Desktop Settings - + Kõik ekraaniseaded @@ -1376,42 +1377,42 @@ Form - Vorm + Vorm Type to search - + Trüki millegi otsimiseks Browse Files - + Sirvi faile Browse Applications - + Sirvi programme Control Panel - Juhtpaneel + Juhtpaneel Leave - + Lahku Manage Applications - + Halda programme Show Categories - + Näita kategooriaid @@ -1421,32 +1422,32 @@ Suspend - Arvuti peatamine + Arvuti unerežiim Restart - Taaskäivita + Taaskäivita Power Off - + Lülita välja Log Out - Logi välja + Logi välja Preferences - + Eelistused (System Performing Updates) - + (Süsteem paigaldab uuendusi) @@ -1456,49 +1457,49 @@ Apply Updates? - + Alusta uuenduste paigaldamist? You have system updates waiting to be applied! Do you wish to install them now? - + Sul on ootel süsteemiuuendused. Kas soovid neid nüüd paigaldada? Yes - + Jah No - + Ei Cancel - Loobu + Loobu %1% (Plugged In) - + %1% (ühendatud) %1% (%2 Estimated) - + %1% (%2 hinnanguliselt) %1% Remaining - + %1% jäänud Workspace %1/%2 - Tööruum %1/%2 + Tööruum %1/%2 @@ -1521,7 +1522,7 @@ Power Off - + Lülita välja @@ -1542,22 +1543,22 @@ Apply Updates? - + Paigalda uuendused? You have system updates waiting to be applied! Do you wish to install them now? - + Sul on ootel süsteemiuuendused! Kas soovid neid kohe lasta paigaldada? Yes - + Jah No - + Ei @@ -1588,7 +1589,7 @@ UserWidget - UserWidget + Kasutajavidin @@ -1769,67 +1770,67 @@ Multimedia - Multimeedia + Multimeedia Development - Arendus + Arendus Education - Haridus + Haridus Games - Mängud + Mängud Graphics - Graafika + Graafika Network - Võrk + Võrk Office - Kontor + Kontor Science - Teadus + Teadus Settings - Sätted + Sätted System - Süsteem + Süsteem Utility - Tööriistad + Tööriistad Wine - Wine + Wine Unsorted - Sortimata + Sortimata -- cgit From 7b2df8beebd480dca920534a4560c1f3cce9188c Mon Sep 17 00:00:00 2001 From: ahto Date: Mon, 6 Nov 2017 20:18:55 +0200 Subject: modified: src-qt5/core/lumina-info/i18n/lumina-info_et.ts modified: src-qt5/core/lumina-open/i18n/lumina-open_et.ts modified: src-qt5/experimental/lumina-terminal/i18n/l-terminal_et.ts --- src-qt5/core/lumina-info/i18n/lumina-info_et.ts | 32 ++++++++++++------------- src-qt5/core/lumina-open/i18n/lumina-open_et.ts | 32 ++++++++++++------------- 2 files changed, 32 insertions(+), 32 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts index 90c031e5..a6280c94 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts @@ -21,12 +21,12 @@ Lumina Website - + Lumina veebileht Bug Reports - + Puukidest teadaandmine @@ -46,7 +46,7 @@ Ask the Community - + Küsi kommuunilt @@ -99,67 +99,67 @@ Multimedia - + Multimeedia Development - + Arendustegevus Education - + Haridus Games - + Mängud Graphics - + Graafika Network - + Võrk Office - + Kontor Science - + Teadus Settings - + Sätted System - + Süsteem Utility - + Tööriistad Wine - + Wine Unsorted - + Sorteerimata diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_et.ts b/src-qt5/core/lumina-open/i18n/lumina-open_et.ts index df9c029b..ee6afe8b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_et.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_et.ts @@ -166,7 +166,7 @@ Application entry is invalid: %1 - + Rakenduse %1 kirje on vigane. @@ -191,12 +191,12 @@ Binary Missing - + Binaarfail puudub Could not find "%1". Please ensure it is installed first. - + Ei leidnud "%1" . Palun veendu et see on paigaldatud. @@ -214,67 +214,67 @@ Multimedia - Multimeedia + Multimeedia Development - Arendus + Arendus Education - Haridus + Haridus Games - + Mängud Graphics - Graafika + Graafika Network - Võrk + Võrk Office - Kontor + Kontor Science - Teadus + Teadus Settings - Sätted + Sätted System - Süsteem + Süsteem Utility - + Tööriistad Wine - + Wine Unsorted - + Sorteerimata -- cgit From 5d7b8a4c02051fb20a464bdca0536fb6f2bd509d Mon Sep 17 00:00:00 2001 From: ahto Date: Mon, 6 Nov 2017 20:22:33 +0200 Subject: modified: src-qt5/core/lumina-info/i18n/lumina-info_et.ts --- src-qt5/core/lumina-info/i18n/lumina-info_et.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts index a6280c94..09142c95 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts @@ -16,7 +16,7 @@ Source Repository - + Lähtekoodi repositoorium @@ -26,7 +26,7 @@ Bug Reports - Puukidest teadaandmine + Puukide raporteerimine -- cgit From aae93096bccb55ab9e60621f559e5116b9403a5f Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Wed, 8 Nov 2017 19:27:45 -0500 Subject: Finished Grav screensaver in QML --- .../extrafiles/screensavers/qml_scripts/Grav.qml | 117 ++++++++++++--------- 1 file changed, 67 insertions(+), 50 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml index d5245c9b..7a3c33cd 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml @@ -8,38 +8,74 @@ Rectangle { height: 600 color: "black" + //TODO Add orbital trails option + //Between 5 and 15 planets, read from settings - property var planets: Math.round(( Math.random() * 10 ) + 5 ) + property int planets: Math.round(( Math.random() * 10 ) + 5 ) + property int cx: Math.round(width/2) + property int cy: Math.round(height/2) //Create planets Repeater { - model: planets - - Rectangle { - id : index - parent: canvas - - //Place the planet randomly on the canvas, but not too close to the edge - x: Math.round(Math.random()*canvas.width) - - //Check to make sure the planets are not too close to the sun (outside a 50px radius) - //while( Math.round(Math.random()*canvas.width) < (width/2 + 50) or Math.round(Math.random()*canvas.width) > (width/2 - 50)) - - y: Math.round(Math.random()*canvas.height) - - - //Create the orbit animation - - //Planet size between 14 and 32 pixels - width: Math.round(1.75 * (((Math.random() * 10) + 8 ))) - height: width - - //Make each rectangle look circular - radius: width / 2 - - //Give each planet a random color, semi-transparent - color: Qt.rgba(Math.random(), Math.random(), Math.random(), 0.5) - } + id: planetRepeater + model: planets + + Rectangle { + id : index + parent: canvas + + //Creates random distance for elipse + property double c: Math.random() * 250 + property double b: Math.random() * 150 + c + property double a: Math.sqrt(b*b+c*c) + //Random angle of rotation + property double th: Math.random() * Math.PI + + //Calculates starting position + x: Math.round(cx + a * Math.cos(th)) + y: Math.round(cy + b * Math.sin(th)) + + //Planet size between 14 and 32 pixels + width: Math.round(1.75 * (((Math.random() * 10) + 8 ))) + height: width + + //Make each rectangle look circular + radius: width / 2 + + //Give each planet a random color, semi-transparent + color: Qt.rgba(Math.random(), Math.random(), Math.random(), 0.5) + + Timer { + //Each planet updates between 1ms and 51ms (smaller times=faster) + interval: Math.round(Math.random() * 50 ) + 1 + repeat: true + running: true + property bool starting: true + property int time: 0 + + onTriggered: { + //Move a planet 80 pixels away from the sun if the planet is too close + if(starting) { + if(x > cx && Math.abs(cx-x) < 80) { + x+=80 + }else if(x < cx && Math.abs(cx-x) < 80) { + x-=80 + } + + if(y > cy && Math.abs(cy-y) < 80) { + y+=80 + }else if(y < cy && Math.abs(cy-y) < 80) { + y-=80 + } + starting = false; + } + //Parametric equation that calculates the position of the general ellipse. Completes a loop ever 314 cycles. Credit to + x = cx+a*Math.cos(2*Math.PI*(time/314.0))*Math.cos(th) - b*Math.sin(2*Math.PI*(time/314.0))*Math.sin(th) + y = cy+a*Math.cos(2*Math.PI*(time/314.0))*Math.sin(th) + b*Math.sin(2*Math.PI*(time/314.0))*Math.cos(th) + time++; + } + } + } } //Create the star @@ -47,9 +83,9 @@ Rectangle { id: star parent: canvas - //Centers in star in the center of the canvas - x: Math.round(canvas.width / 2) - y: Math.round(canvas.height / 2) + //Centers in star in the center of the canvas, with an offset to center the animation + x: cx - 30 + y: cy - 30 width: 60 height: width @@ -67,8 +103,6 @@ Rectangle { PropertyAnimation { duration: 2000; to: 60 } } - //border.width: 4 - //border.color: "blue" color: "black" radius: width / 2 @@ -86,21 +120,4 @@ Rectangle { } } - - /*Motion timer - Timer { - interval: 1 - repeat: true - running: true - property bool starting: true - - onTriggered: { - if(starting) { interval = 3010; starting = false; } - - } - }*/ - - Component.onCompleted: { - //console.log(Math.random()) - } } -- cgit From 556ff459148d03ebd85fa3db770e8819ad770b2d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 13 Nov 2017 15:33:07 -0500 Subject: Add a special rule for Ubuntu Linux: IncludePath for the poppler files is different - add it automatically. --- src-qt5/core/README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core') diff --git a/src-qt5/core/README.md b/src-qt5/core/README.md index 6a17d900..6ed23f78 100644 --- a/src-qt5/core/README.md +++ b/src-qt5/core/README.md @@ -27,6 +27,7 @@ Other Files that get installed if "core" is built directly: * svg * widgets * x11extras + * NOTE: Qt5 platform theme and developer libraries are also required to build the Lumina theme engine plugin ("qtbase5-*" on Ubuntu 17.10) 2. X11 Libraries * libXdamage 3. XCB Libraries -- cgit From 79df03631348f217c5739fc097c3b7ee53df499c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 14 Nov 2017 14:17:27 -0500 Subject: Fix up some initial startmenu sizing. --- src-qt5/core/libLumina/ResizeMenu.cpp | 18 ++++++++++++++---- src-qt5/core/libLumina/ResizeMenu.h | 5 +++-- .../panel-plugins/systemstart/LStartButton.cpp | 6 +++--- .../panel-plugins/systemstart/StartMenu.cpp | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/ResizeMenu.cpp b/src-qt5/core/libLumina/ResizeMenu.cpp index 9f291134..cf5b124d 100644 --- a/src-qt5/core/libLumina/ResizeMenu.cpp +++ b/src-qt5/core/libLumina/ResizeMenu.cpp @@ -5,6 +5,7 @@ // See the LICENSE file for full details //=========================================== #include "ResizeMenu.h" +#include // ======================= // RESIZEMENU CLASS @@ -21,7 +22,7 @@ ResizeMenu::ResizeMenu(QWidget *parent) : QMenu(parent){ } ResizeMenu::~ResizeMenu(){ - + } void ResizeMenu::setContents(QWidget *con){ @@ -30,6 +31,15 @@ void ResizeMenu::setContents(QWidget *con){ this->addAction(cAct); contents = con; //save for later contents->setCursor(Qt::ArrowCursor); + resyncSize(); +} + +void ResizeMenu::resyncSize(){ + if(contents==0){ return; } + qDebug() << "Resync Size:" << this->size() << contents->size(); + this->resize(contents->size()); + qDebug() << " - after menu resize:" << this->size() << contents->size(); + emit MenuResized(this->size()); } void ResizeMenu::mouseMoveEvent(QMouseEvent *ev){ @@ -46,21 +56,21 @@ void ResizeMenu::mouseMoveEvent(QMouseEvent *ev){ this->setGeometry(geom); if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));} handled = true; - break; + break; case BOTTOM: if(gpos.y() <= geom.top()+1){ break; } geom.setBottom( gpos.y()); this->setGeometry(geom); if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));} handled = true; - break; + break; case LEFT: if(gpos.x() >= geom.right()-1){ break; } geom.setLeft(gpos.x()); this->setGeometry(geom); if(contents!=0){ contents->setFixedSize(QSize(geom.width()-2, geom.height()-2));} handled = true; - break; + break; case RIGHT: if(gpos.x() <= geom.left()+1){ break; } geom.setRight(gpos.x()); diff --git a/src-qt5/core/libLumina/ResizeMenu.h b/src-qt5/core/libLumina/ResizeMenu.h index ed909da3..029d2716 100644 --- a/src-qt5/core/libLumina/ResizeMenu.h +++ b/src-qt5/core/libLumina/ResizeMenu.h @@ -17,7 +17,7 @@ #include //Special subclass for a menu which the user can grab the edges and resize as necessary -// Note: Make sure that you don't set 0pixel contents margins on this menu +// Note: Make sure that you don't set 0pixel contents margins on this menu // - it needs at least 1 pixel margins for the user to be able to grab it class ResizeMenu : public QMenu{ Q_OBJECT @@ -26,13 +26,14 @@ public: virtual ~ResizeMenu(); void setContents(QWidget *con); + void resyncSize(); private: enum SideFlag{NONE, TOP, BOTTOM, LEFT, RIGHT}; SideFlag resizeSide; QWidget *contents; QWidgetAction *cAct; - + private slots: void clearFlags(){ resizeSide=NONE; diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index 30e82c47..562122ae 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -25,10 +25,10 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon startmenu = new StartMenu(this); connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); - menu->setContents(startmenu); - QRect screenSize = QApplication::desktop()->availableGeometry(this); - QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(screenSize.width() * 0.2, screenSize.height())).toSize(); + //QRect screenSize = QApplication::desktop()->availableGeometry(this); + QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0, 0)).toSize(); if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value + menu->setContents(startmenu); button->setMenu(menu); connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index c99e2b4b..beaa5d92 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -63,7 +63,7 @@ void StartMenu::UpdateAll(){ ui->tool_restart->setIcon(LXDG::findIcon("system-reboot","")); ui->tool_shutdown->setIcon(LXDG::findIcon("system-shutdown","")); ui->tool_suspend->setIcon(LXDG::findIcon("system-suspend","")); - + //Update Visibility of system/session/OS options // -- Control Panel QString tmp = LOS::ControlPanelShortcut(); -- cgit From b2eb3023b7f9a922011a1120060cadf0fd19127f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 14 Nov 2017 15:53:30 -0500 Subject: A few tweaks for teh LVideoLabel - trying to get it loading a bit more reliably. Also disable the LVideoLabel from being used at the moment in lumina-fm - needs a bit more work before we turn this on for everybody. --- src-qt5/core/libLumina/LVideoLabel.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LVideoLabel.cpp b/src-qt5/core/libLumina/LVideoLabel.cpp index bddb1cba..93e95afd 100644 --- a/src-qt5/core/libLumina/LVideoLabel.cpp +++ b/src-qt5/core/libLumina/LVideoLabel.cpp @@ -1,15 +1,15 @@ #include "LVideoLabel.h" #include #include +#include LVideoLabel::LVideoLabel(QString file, bool icons, QWidget *parent) : QLabel(parent) { thumbnail = QPixmap(); entered = false; this->icons = icons; filepath = file; - defaultThumbnail = LXDG::findIcon("unknown", "").pixmap(256,256); - - QTimer::singleShot(0, this, SLOT(initializeBackend()) ); + defaultThumbnail = LXDG::findIcon("media-playback-start", "").pixmap(256,256); + QTimer::singleShot(qrand()%10, this, SLOT(initializeBackend()) ); } LVideoLabel::~LVideoLabel() { @@ -23,15 +23,17 @@ void LVideoLabel::initializeBackend(){ mediaPlayer->setVideoOutput(surface); mediaPlayer->setPlaybackRate(3); mediaPlayer->setMuted(true); - + this->setPixmap(defaultThumbnail.scaled(this->size(),Qt::IgnoreAspectRatio)); mediaPlayer->setMedia(QUrl::fromLocalFile(filepath)); - mediaPlayer->play(); this->connect(surface, SIGNAL(frameReceived(QPixmap)), this, SLOT(stopVideo(QPixmap))); this->connect(mediaPlayer, SIGNAL(stateChanged(QMediaPlayer::State)), this, SLOT(stateChanged(QMediaPlayer::State))); this->connect(mediaPlayer, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(setDuration(QMediaPlayer::MediaStatus))); this->connect(this, SIGNAL(rollOver()), surface, SLOT(switchRollOver())); + + //QTimer::singleShot( qrand()%100,mediaPlayer, SLOT(play()) ); + //mediaPlayer->play(); } void LVideoLabel::enableIcons() { @@ -72,7 +74,7 @@ void LVideoLabel::setDuration(QMediaPlayer::MediaStatus status) { mediaPlayer->play(); }else if(status == QMediaPlayer::InvalidMedia){ mediaPlayer->stop(); - mediaPlayer->play(); + QTimer::singleShot(qrand()%100, mediaPlayer, SLOT(play())); //mediaPlayer->play(); }/*else if(status == QMediaPlayer::LoadingMedia) { mediaPlayer->pause(); QTimer timer; -- cgit From 74aee7244060e588031735eabae05c47efde48aa Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 15 Nov 2017 08:30:47 -0500 Subject: Split the LFileInfo class into it's own files. --- src-qt5/core/libLumina/LFileInfo.cpp | 109 +++++++++++++++++++++ src-qt5/core/libLumina/LFileInfo.h | 51 ++++++++++ src-qt5/core/libLumina/LuminaXDG.cpp | 4 +- src-qt5/core/libLumina/LuminaXDG.h | 4 +- src-qt5/core/libLumina/LuminaXDG.pri | 8 +- .../core/lumina-desktop-unified/global-includes.h | 1 + src-qt5/core/lumina-desktop/Globals.h | 1 + 7 files changed, 171 insertions(+), 7 deletions(-) create mode 100644 src-qt5/core/libLumina/LFileInfo.cpp create mode 100644 src-qt5/core/libLumina/LFileInfo.h (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LFileInfo.cpp b/src-qt5/core/libLumina/LFileInfo.cpp new file mode 100644 index 00000000..f7a7fbe3 --- /dev/null +++ b/src-qt5/core/libLumina/LFileInfo.cpp @@ -0,0 +1,109 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2013-2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "LFileInfo.h" +#include + +LFileInfo::LFileInfo() : QFileInfo(){ + desk = 0; +} + +LFileInfo::LFileInfo(QString filepath) : QFileInfo(){ //overloaded contructor + this->setFile(filepath); + loadExtraInfo(); +} + +LFileInfo::LFileInfo(QFileInfo info) : QFileInfo(){ //overloaded contructor + this->swap(info); //use the given QFileInfo without re-loading it + loadExtraInfo(); +} +LFileInfo::~LFileInfo(){ + if(desk!=0){ desk->deleteLater(); } +} + +//Need some extra information not usually available by a QFileInfo +void LFileInfo::loadExtraInfo(){ + if(desk!=0){ desk->deleteLater(); } + desk = 0; + //Now load the extra information + if(this->absoluteFilePath().startsWith("/net/") || this->isDir() ){ + mime = "inode/directory"; + //Special directory icons + QString name = this->fileName().toLower(); + if(name=="desktop"){ icon = "user-desktop"; } + else if(name=="tmp"){ icon = "folder-temp"; } + else if(name=="video" || name=="videos"){ icon = "folder-video"; } + else if(name=="music" || name=="audio"){ icon = "folder-sound"; } + else if(name=="projects" || name=="devel"){ icon = "folder-development"; } + else if(name=="notes"){ icon = "folder-txt"; } + else if(name=="downloads"){ icon = "folder-downloads"; } + else if(name=="documents"){ icon = "folder-documents"; } + else if(name=="images" || name=="pictures"){ icon = "folder-image"; } + else if(this->absoluteFilePath().startsWith("/net/")){ icon = "folder-shared"; } + else if( !this->isReadable() ){ icon = "folder-locked"; } + }else if( this->suffix()=="desktop"){ + mime = "application/x-desktop"; + icon = "application-x-desktop"; //default value + desk = new XDGDesktop(this->absoluteFilePath(), 0); + if(desk->type!=XDGDesktop::BAD){ + //use the specific desktop file info (if possible) + if(!desk->icon.isEmpty()){ icon = desk->icon; } + } + }else{ + //Generic file, just determine the mimetype + mime = LXDG::findAppMimeForFile(this->fileName()); + } +} + +//Functions for accessing the extra information +// -- Return the mimetype for the file +QString LFileInfo::mimetype(){ + if(mime=="inode/directory"){ return ""; } + else{ return mime; } +} + +// -- Return the icon to use for this file +QString LFileInfo::iconfile(){ + if(!icon.isEmpty()){ + return icon; + }else if(!mime.isEmpty()){ + QString tmp = mime; + tmp.replace("/","-"); + return tmp; + }else if(this->isExecutable()){ + return "application-x-executable"; + } + return ""; //Fall back to nothing +} + +// -- Check if this is an XDG desktop file +bool LFileInfo::isDesktopFile(){ + if(desk==0){ return false; } + return (!desk->filePath.isEmpty()); +} + +// -- Allow access to the XDG desktop data structure +XDGDesktop* LFileInfo::XDG(){ + return desk; +} + +// -- Check if this is a readable video file (for thumbnail support) +bool LFileInfo::isVideo(){ + if(!mime.startsWith("video/")){ return false; } + //Check the hardcoded list of known supported video formats to see if the thumbnail can be generated + return ( !LUtils::videoExtensions().filter(this->suffix().toLower()).isEmpty() ); +} + +// -- Check if this is a readable image file +bool LFileInfo::isImage(){ + if(!mime.startsWith("image/")){ return false; } //quick return for non-image files + //Check the Qt subsystems to see if this image file can be read + return ( !LUtils::imageExtensions().filter(this->suffix().toLower()).isEmpty() ); +} + +bool LFileInfo::isAVFile(){ + return (mime.startsWith("audio/") || mime.startsWith("video/") ); +} diff --git a/src-qt5/core/libLumina/LFileInfo.h b/src-qt5/core/libLumina/LFileInfo.h new file mode 100644 index 00000000..4fbf6353 --- /dev/null +++ b/src-qt5/core/libLumina/LFileInfo.h @@ -0,0 +1,51 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2013-2017, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// File Information simplification class (combine QFileInfo with XDGDesktop) +// Need some extra information not usually available by a QFileInfo +// ======================== +#ifndef _LUMINA_LIBRARY_FILE_INFO_H +#define _LUMINA_LIBRARY_FILE_INFO_H + +#include +#include +#include + +class LFileInfo : public QFileInfo{ +private: + QString mime, icon; + XDGDesktop *desk; + + void loadExtraInfo(); + +public: + //Couple overloaded contructors + LFileInfo(); + LFileInfo(QString filepath); + LFileInfo(QFileInfo info); + ~LFileInfo(); + + //Functions for accessing the extra information + // -- Return the mimetype for the file + QString mimetype(); + + // -- Return the icon file to use for this file + QString iconfile(); //Note: This string is auto-formatted for use in the LXDG::findIcon() routine. + + // -- Check if this is an XDG desktop file + bool isDesktopFile(); + + // -- Allow access to the internal XDG desktop data structure + XDGDesktop* XDG(); + + //Other file type identification routines + bool isImage(); //Is a readable image file (for thumbnail support) + bool isVideo(); //Is a readable video file (for thumbnail support) + bool isAVFile(); //Is an audio/video file +}; +typedef QList LFileInfoList; + +#endif diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index cf9e0af2..1991a82d 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -629,7 +629,7 @@ void XDGDesktopList::populateMenu(QMenu *topmenu, bool byCategory){ //==== LFileInfo Functions ==== //Need some extra information not usually available by a QFileInfo -void LFileInfo::loadExtraInfo(){ +/*void LFileInfo::loadExtraInfo(){ desk = 0; //Now load the extra information if( this->suffix().isEmpty() && (this->absoluteFilePath().startsWith("/net/") || this->isDir()) ){ @@ -722,7 +722,7 @@ bool LFileInfo::isImage(){ bool LFileInfo::isAVFile(){ return (mime.startsWith("audio/") || mime.startsWith("video/") ); -} +}*/ //==== LXDG Functions ==== diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index 0f7e7c48..066f0462 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -128,7 +128,7 @@ signals: // File Information simplification class (combine QFileInfo with XDGDesktop) // Need some extra information not usually available by a QFileInfo // ======================== -class LFileInfo : public QFileInfo{ +/*class LFileInfo : public QFileInfo{ private: QString mime, icon; XDGDesktop *desk; @@ -162,7 +162,7 @@ public: bool isVideo(); //Is a readable video file (for thumbnail support) bool isAVFile(); //Is an audio/video file }; -typedef QList LFileInfoList; +typedef QList LFileInfoList;*/ // ================================ // Collection of FreeDesktop standards interaction routines diff --git a/src-qt5/core/libLumina/LuminaXDG.pri b/src-qt5/core/libLumina/LuminaXDG.pri index 6f3a2b7c..1a8a8368 100644 --- a/src-qt5/core/libLumina/LuminaXDG.pri +++ b/src-qt5/core/libLumina/LuminaXDG.pri @@ -1,10 +1,12 @@ QT *= multimedia svg #LUtils Files -SOURCES *= $${PWD}/LuminaXDG.cpp -HEADERS *= $${PWD}/LuminaXDG.h +SOURCES *= $${PWD}/LuminaXDG.cpp \ + $${PWD}/LFileInfo.cpp +HEADERS *= $${PWD}/LuminaXDG.h \ + $${PWD}/LFileInfo.h -INCLUDEPATH *= ${PWD} +INCLUDEPATH *= $${PWD} #include LUtils and LuminaOS include(LUtils.pri) diff --git a/src-qt5/core/lumina-desktop-unified/global-includes.h b/src-qt5/core/lumina-desktop-unified/global-includes.h index 91604362..40987ad4 100644 --- a/src-qt5/core/lumina-desktop-unified/global-includes.h +++ b/src-qt5/core/lumina-desktop-unified/global-includes.h @@ -78,6 +78,7 @@ #include #include #include +#include //Setup any global defines (no classes or global objects: use "global-objects.h" for that) diff --git a/src-qt5/core/lumina-desktop/Globals.h b/src-qt5/core/lumina-desktop/Globals.h index 15e7a4b6..43ea3a87 100644 --- a/src-qt5/core/lumina-desktop/Globals.h +++ b/src-qt5/core/lumina-desktop/Globals.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include -- cgit From c6a6230889e629535ec48e02b64feb0dbea31782 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 15 Nov 2017 09:14:18 -0500 Subject: Expose the "directory" saving option within lumina-config for wallpapers now. --- src-qt5/core/libLumina/LFileInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LFileInfo.cpp b/src-qt5/core/libLumina/LFileInfo.cpp index f7a7fbe3..5f368ad5 100644 --- a/src-qt5/core/libLumina/LFileInfo.cpp +++ b/src-qt5/core/libLumina/LFileInfo.cpp @@ -42,7 +42,7 @@ void LFileInfo::loadExtraInfo(){ else if(name=="downloads"){ icon = "folder-downloads"; } else if(name=="documents"){ icon = "folder-documents"; } else if(name=="images" || name=="pictures"){ icon = "folder-image"; } - else if(this->absoluteFilePath().startsWith("/net/")){ icon = "folder-shared"; } + else if(this->absoluteFilePath().startsWith("/net/")){ icon = "folder-remote"; } else if( !this->isReadable() ){ icon = "folder-locked"; } }else if( this->suffix()=="desktop"){ mime = "application/x-desktop"; -- cgit From fedae78e9b525bf1122170c1d009b8f79a45804c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 15 Nov 2017 09:26:49 -0500 Subject: Finish cleaning up the new LFileInfo class/file. --- src-qt5/core/libLumina/LFileInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LFileInfo.cpp b/src-qt5/core/libLumina/LFileInfo.cpp index 5f368ad5..e54ce5cc 100644 --- a/src-qt5/core/libLumina/LFileInfo.cpp +++ b/src-qt5/core/libLumina/LFileInfo.cpp @@ -12,11 +12,13 @@ LFileInfo::LFileInfo() : QFileInfo(){ } LFileInfo::LFileInfo(QString filepath) : QFileInfo(){ //overloaded contructor + desk = 0; this->setFile(filepath); loadExtraInfo(); } LFileInfo::LFileInfo(QFileInfo info) : QFileInfo(){ //overloaded contructor + desk = 0; this->swap(info); //use the given QFileInfo without re-loading it loadExtraInfo(); } -- cgit From 8d54d01f09760c78d649baed0b88aa0f80069de7 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 15 Nov 2017 14:38:01 -0500 Subject: Add a bunch of ZFS information routines to LFileInfo. Also utilize this ZFS info in lumina-fileinfo (if appropriate) --- src-qt5/core/libLumina/LFileInfo.cpp | 73 ++++++++++++++++++++++++++++++++++++ src-qt5/core/libLumina/LFileInfo.h | 13 ++++++- 2 files changed, 85 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LFileInfo.cpp b/src-qt5/core/libLumina/LFileInfo.cpp index e54ce5cc..e7d2b71a 100644 --- a/src-qt5/core/libLumina/LFileInfo.cpp +++ b/src-qt5/core/libLumina/LFileInfo.cpp @@ -60,6 +60,31 @@ void LFileInfo::loadExtraInfo(){ } } +bool LFileInfo::zfsAvailable(){ + static unsigned int avail = 2; + if(avail == 2){ avail = (LUtils::isValidBinary("zfs") ? 0 : 1); } + return (avail == 0); +} + +void LFileInfo::getZfsDataset(){ + if(zfs_ds.isEmpty()){ + //First run - need to probe the current directory + bool ok = false; + //Use the "atime" property for this check - been around since the earliest versions of ZFS and should take no time to probe + QString out = LUtils::runCommand(ok, "zfs", QStringList() << "get" << "-H" << "atime" << this->canonicalFilePath() ); + if(!ok){ zfs_ds = "."; } //just something that is not empty - but is clearly not a valid dataset + else{ zfs_ds = out.section("\n",0,0).section("\t",0,0).simplified(); } + //qDebug() << "Found Dataset:" << zfs_ds << out << ok; + } +} + +bool LFileInfo::goodZfsDataset(){ + if(!zfsAvailable()){ return false; } + getZfsDataset(); //ensure this field is populated + if(zfs_ds=="." || zfs_ds.isEmpty()){ return false; } + return true; +} + //Functions for accessing the extra information // -- Return the mimetype for the file QString LFileInfo::mimetype(){ @@ -109,3 +134,51 @@ bool LFileInfo::isImage(){ bool LFileInfo::isAVFile(){ return (mime.startsWith("audio/") || mime.startsWith("video/") ); } + +bool LFileInfo::isZfsDataset(){ + if(!goodZfsDataset()){ return false; } + return ( ("/"+zfs_ds.section("/",1,-1)) == this->canonicalFilePath()); +} + +QString LFileInfo::zfsPool(){ + if(!goodZfsDataset()){ return ""; } + return zfs_ds.section("/",0,0); +} + +QStringList LFileInfo::zfsSnapshots(){ + if(!goodZfsDataset()){ return QStringList(); } + QString relpath = this->canonicalFilePath().remove(0, QString("/"+zfs_ds.section("/",1,-1)).length() ); + //qDebug() << "Got Relative path:" << zfs_ds << this->canonicalFilePath() << relpath; + QDir dir("/"+zfs_ds.section("/",1,-1)+"/.zfs/snapshot/"); + QStringList snaps = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Time); + for(int i=0; i LFileInfoList; -- cgit From 31e8c393ea88c99f43817bb91d35355015597e4b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 16 Nov 2017 13:19:48 -0500 Subject: Another attempt to fix the Repeater of objects issue in Lumina 2. --- .../src-desktop/src-cpp/RootDesktopObject.cpp | 7 +++++++ .../lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h | 1 + .../lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp | 2 +- .../lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml | 2 +- .../lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml | 3 ++- 5 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp index 9842712e..ee15c9c2 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp @@ -36,6 +36,13 @@ QList RootDesktopObject::screens(){ return s_objects; } +ScreenObject* RootDesktopObject::screen(QString id){ + for(int i=0; iname()==id){ return s_objects[i]; } + } + return 0; +} + void RootDesktopObject::logout(){ emit startLogout(); } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h index dd7c7ab3..786d90e2 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h @@ -30,6 +30,7 @@ public: //QML Read Functions QList screens(); + Q_INVOKABLE ScreenObject* screen(QString id); //QML Access Functions Q_INVOKABLE void logout(); diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp index 4c1d6189..7b84882e 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp @@ -16,7 +16,7 @@ void ScreenObject::RegisterType(){ qmlRegisterType("Lumina.Backend.ScreenObject",2,0, "ScreenObject"); } -QString ScreenObject::name(){ return bg_screen->name(); } +QString ScreenObject::name(){ return bg_screen->name().replace("-","_"); } QString ScreenObject::background(){ qDebug() << "Got Background:" << bg_screen->name() << bg << bg_screen->geometry(); return bg; } int ScreenObject::x(){ return bg_screen->geometry().x(); } int ScreenObject::y(){ return bg_screen->geometry().y(); } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml index a1a9164f..6b341fee 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml @@ -50,7 +50,7 @@ Rectangle { model: RootObject.screens QML.WallpaperImage{ //console.log( modelData.name() ) - object: modelData + screen_id: modelData.name() z: 0+index } } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml index 4d39b0b8..97357617 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml @@ -12,7 +12,8 @@ import Lumina.Backend.ScreenObject 2.0 AnimatedImage { //C++ backend object - property ScreenObject object + property text screen_id + property ScreenObject object: RootObject.screen(screen_id) //Normal geometries/placements asynchronous: true -- cgit From d626a9ab0dd8d9ca8c4d6c69a6693acebb8e1f1a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 16 Nov 2017 15:16:02 -0500 Subject: Get the Iteration over objects working for Lumina 2 (wallpapers). QML Note: The "Repeater" class cannot iterate over objects, just items. To work around this, provide a QStringList instead of a QList, and implement a callback function to return the Object* based on the String ID. --- .../src-desktop/src-cpp/RootDesktopObject.cpp | 8 ++++++-- .../src-desktop/src-cpp/RootDesktopObject.h | 4 ++-- .../lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp | 2 +- .../lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml | 2 +- .../lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml | 9 ++++----- .../src-desktop/src-qml/WallpaperImage.qml | 4 ++-- .../core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri | 3 ++- src-qt5/core/lumina-desktop/lumina-desktop.pro | 2 +- 8 files changed, 19 insertions(+), 15 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp index ee15c9c2..60cf56c3 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.cpp @@ -32,11 +32,15 @@ RootDesktopObject* RootDesktopObject::instance(){ } //QML Read Functions -QList RootDesktopObject::screens(){ - return s_objects; +QStringList RootDesktopObject::screens(){ + qDebug() << "Request Screens:" << s_objects.length(); + QStringList names; + for(int i=0; iname(); } + return names; } ScreenObject* RootDesktopObject::screen(QString id){ + qDebug() << "Got Screen Request:" << id; for(int i=0; iname()==id){ return s_objects[i]; } } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h index 786d90e2..ba586701 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/RootDesktopObject.h @@ -16,7 +16,7 @@ class RootDesktopObject : public QObject{ Q_OBJECT //Define all the QML Properties here (interface between QML and the C++ methods below) - Q_PROPERTY( QList screens READ screens NOTIFY screensChanged) + Q_PROPERTY( QStringList screens READ screens NOTIFY screensChanged) public: //main contructor/destructor @@ -29,7 +29,7 @@ public: static RootDesktopObject* instance(); //QML Read Functions - QList screens(); + QStringList screens(); Q_INVOKABLE ScreenObject* screen(QString id); //QML Access Functions diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp index 7b84882e..4c1d6189 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-cpp/ScreenObject.cpp @@ -16,7 +16,7 @@ void ScreenObject::RegisterType(){ qmlRegisterType("Lumina.Backend.ScreenObject",2,0, "ScreenObject"); } -QString ScreenObject::name(){ return bg_screen->name().replace("-","_"); } +QString ScreenObject::name(){ return bg_screen->name(); } QString ScreenObject::background(){ qDebug() << "Got Background:" << bg_screen->name() << bg << bg_screen->geometry(); return bg; } int ScreenObject::x(){ return bg_screen->geometry().x(); } int ScreenObject::y(){ return bg_screen->geometry().y(); } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml index e5bac0b5..7360d81f 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml @@ -6,7 +6,7 @@ //=========================================== import QtQuick 2.2 import QtQuick.Window 2.2 -import QtQuick.Controls 2.0 +import QtQuick.Controls 1 import Lumina.Backend.RootDesktopObject 2.0 diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml index 6b341fee..9db05c45 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml @@ -17,7 +17,7 @@ //=========================================== import QtQuick 2.2 import QtQuick.Window 2.2 -import QtQuick.Controls 2.0 +import QtQuick.Controls 1 import "." as QML @@ -29,7 +29,7 @@ Rectangle { color: "black" //Setup the right-click context menu - MouseArea { + /*MouseArea { anchors.fill: rootCanvas acceptedButtons: Qt.RightButton onClicked: { @@ -43,14 +43,13 @@ Rectangle { } //Create the context menu itself - QML.ContextMenu { id: contextMenu } + QML.ContextMenu { id: contextMenu }*/ //Setup the wallpapers Repeater{ model: RootObject.screens QML.WallpaperImage{ - //console.log( modelData.name() ) - screen_id: modelData.name() + screen_id: modelData z: 0+index } } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml index 97357617..1b44963f 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/WallpaperImage.qml @@ -6,13 +6,13 @@ //=========================================== import QtQuick 2.2 import QtQuick.Window 2.2 -import QtQuick.Controls 2.0 +import QtQuick.Controls 1 import Lumina.Backend.ScreenObject 2.0 AnimatedImage { //C++ backend object - property text screen_id + property string screen_id property ScreenObject object: RootObject.screen(screen_id) //Normal geometries/placements diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri index 99905253..fed18e02 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/src-qml.pri @@ -1,7 +1,8 @@ #Show the QML files to lupdate for translation purposes - not for the actual build lupdate_only{ SOURCES *= $${PWD}/RootDesktop.qml \ - $${PWD}/ContextMenu.qml + $${PWD}/ContextMenu.qml \ + $${PWD}/WallpaperImage.qml } RESOURCES *= $${PWD}/src-qml.qrc diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 2c944a11..f7fead13 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -175,7 +175,7 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO manpage.path=$${L_MANDIR}/man8/ manpage.extra="$${MAN_ZIP} lumina-desktop.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/lumina-desktop.8.gz" -INSTALLS += target desktop icons wallpapers defaults conf fluxconf manpage +INSTALLS += target desktop icons defaults conf fluxconf manpage WITH_I18N{ INSTALLS += dotrans -- cgit From 60559aa7165835d15e87480b3db6774f77f7a081 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 16 Nov 2017 16:15:29 -0500 Subject: Get more of the new QML interface working for Lumina 2. * simple context menu is now functional (lock/logout) * Screensaver is now working again (default setting was wrong) * Unlock functionality is working again (using the more secure temporary file method) --- src-qt5/core/lumina-checkpass/main.c | 2 ++ .../lumina-desktop-unified/defaults/desktop/screensaver.conf | 4 ++-- .../lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml | 6 +++--- .../lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml | 9 +++++---- .../lumina-desktop-unified/src-screensaver/LLockScreen.cpp | 10 +++++++--- .../lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-checkpass/main.c b/src-qt5/core/lumina-checkpass/main.c index 2f54c8e6..70caf396 100644 --- a/src-qt5/core/lumina-checkpass/main.c +++ b/src-qt5/core/lumina-checkpass/main.c @@ -64,6 +64,8 @@ int main(int argc, char** argv){ fclose(fp); } if(pass == 0){ puts("Could not read password!!"); return 1; } //error in reading password + //puts("Read Password:"); + //puts(pass); //Validate current user (make sure current UID matches the logged-in user, char* cUser = getlogin(); struct passwd *pwd = 0; diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf index 89f4e488..b4bfec59 100644 --- a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf @@ -1,3 +1,3 @@ [General] -default_plugin="fireflies" -plugin_VGA-0="fireflies" +default_plugin="random" +plugin_VGA-0="random" diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml index 7360d81f..ad584f76 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml @@ -12,7 +12,7 @@ import Lumina.Backend.RootDesktopObject 2.0 Menu { id: contextMenu - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + //closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside MenuItem { text: "Lock Screen" onTriggered: { @@ -23,12 +23,12 @@ Menu { MenuItem { text: "Logout" //iconName: "system-log-out" - indicator: Image{ + /*indicator: Image{ asynchronous: true //autoTransform: true //source: "image://theme/system-logout" source: "file:///usr/local/share/icons/material-design-light/scalable/actions/system-log-out.svg" - } + }*/ onTriggered: { RootObject.logout() } diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml index 9db05c45..e0381e23 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/RootDesktop.qml @@ -29,13 +29,14 @@ Rectangle { color: "black" //Setup the right-click context menu - /*MouseArea { + MouseArea { anchors.fill: rootCanvas acceptedButtons: Qt.RightButton onClicked: { - contextMenu.x = mouseX + /*contextMenu.x = mouseX contextMenu.y = mouseY - contextMenu.open() + contextMenu.open() */ + contextMenu.popup() } onPositionChanged: { RootObject.mousePositionChanged() @@ -43,7 +44,7 @@ Rectangle { } //Create the context menu itself - QML.ContextMenu { id: contextMenu }*/ + QML.ContextMenu { id: contextMenu } //Setup the wallpapers Repeater{ diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp index b791ffd2..95b70e54 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp @@ -83,10 +83,14 @@ void LLockScreen::TryUnlock(){ bool ok = false; if( TF->open() ){ QTextStream in(TF); - in << pass; - in.flush(); //make sure we push it to the file **right now** since we need to keep the file open - ok = (LUtils::runCmd("lumina-checkpass", QStringList() << "-f" << TF->fileName() ) == 0); + in << pass.toUtf8()+"\0"; //make sure it is null-terminated + //in.flush(); //make sure we push it to the file **right now** since we need to keep the file open TF->close(); + //qDebug() << "Trying to unlock session:" << TF->fileName() << LUtils::readFile(TF->fileName()); + //qDebug() << "UserName:" << getlogin(); + LUtils::runCommand(ok, "lumina-checkpass",QStringList() << "-f" << TF->fileName() ); + //ok = (LUtils::runCmd("lumina-checkpass", QStringList() << "-f" << TF->fileName() ) == 0); + //TF->close(); } delete TF; if(ok){ diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp index 122307b3..7c098887 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp @@ -7,7 +7,7 @@ #include "SSBaseWidget.h" -#define DEBUG 1 +#define DEBUG 0 // ======== // PUBLIC -- cgit From f741ebb9536522a12ce63a9e6f93aaf44905531a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 16 Nov 2017 16:49:55 -0500 Subject: Minor cleanup. Get icons working on the context menu. --- .../lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml | 10 ++-------- .../lumina-desktop-unified/src-screensaver/LLockScreen.cpp | 5 +---- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml index ad584f76..4ab8e156 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-qml/ContextMenu.qml @@ -12,9 +12,9 @@ import Lumina.Backend.RootDesktopObject 2.0 Menu { id: contextMenu - //closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside MenuItem { text: "Lock Screen" + iconName: "system-lock-screen" onTriggered: { RootObject.lockscreen() } @@ -22,13 +22,7 @@ Menu { MenuItem { text: "Logout" - //iconName: "system-log-out" - /*indicator: Image{ - asynchronous: true - //autoTransform: true - //source: "image://theme/system-logout" - source: "file:///usr/local/share/icons/material-design-light/scalable/actions/system-log-out.svg" - }*/ + iconName: "system-log-out" onTriggered: { RootObject.logout() } diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp index 95b70e54..2cfd0f4a 100644 --- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp @@ -84,15 +84,12 @@ void LLockScreen::TryUnlock(){ if( TF->open() ){ QTextStream in(TF); in << pass.toUtf8()+"\0"; //make sure it is null-terminated - //in.flush(); //make sure we push it to the file **right now** since we need to keep the file open TF->close(); //qDebug() << "Trying to unlock session:" << TF->fileName() << LUtils::readFile(TF->fileName()); //qDebug() << "UserName:" << getlogin(); LUtils::runCommand(ok, "lumina-checkpass",QStringList() << "-f" << TF->fileName() ); - //ok = (LUtils::runCmd("lumina-checkpass", QStringList() << "-f" << TF->fileName() ) == 0); - //TF->close(); } - delete TF; + delete TF; //ensure the temporary file is removed **right now** for security purposes if(ok){ emit ScreenUnlocked(); this->setEnabled(true); -- cgit From 5312b9161aa82ec8139c73b5f7dddd269120f15d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 17 Nov 2017 07:28:08 -0500 Subject: Fix up the visibility of the archive options in lumina-fm. Also fix the OpenWith launching of applications. --- src-qt5/core/libLumina/LuminaXDG.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 1991a82d..b4954a26 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -237,8 +237,9 @@ QString XDGDesktop::generateExec(QStringList inputfiles, QString ActionID){ //Does the app need the input files in URL or File syntax? bool URLsyntax = (exec.contains("%u") || exec.contains("%U")); //Adjust the input file formats as needed + //qDebug() << "Got inputfiles:" << inputfiles << URLsyntax; for(int i=0; i Date: Fri, 17 Nov 2017 07:37:03 -0500 Subject: Fix a missing quote within the estonian translation file --- src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts index 456d5aff..c6d03883 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts @@ -261,7 +261,7 @@ One with the law is a majority. - -- cgit From d8e810477c9a11042deb0638b5d0c942f9ca2545 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 17 Nov 2017 08:52:59 -0500 Subject: Fix the pkg-plist for lumina-core. Wallpaper files are installed by the lumina-themes package now. Also remove the old "color" files (pre-theme-engine) --- src-qt5/core/core.pro | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/core.pro b/src-qt5/core/core.pro index 0f635960..1ae58167 100644 --- a/src-qt5/core/core.pro +++ b/src-qt5/core/core.pro @@ -17,9 +17,9 @@ SUBDIRS+= lumina-desktop \ scripts.path = $${L_SHAREDIR}/lumina-desktop/menu-scripts scripts.files = menu-scripts/* -#Color themes -colors.path=$${L_SHAREDIR}/lumina-desktop/colors -colors.files=colors/*.qss.colors +#Color themes (pre-theme-engine files - not used any more) +#colors.path=$${L_SHAREDIR}/lumina-desktop/colors +#colors.files=colors/*.qss.colors #Theme templates themes.path=$${L_SHAREDIR}/lumina-desktop/themes/ @@ -33,4 +33,4 @@ themes.files=themes/*.qss.template globs.path=$${L_SHAREDIR}/lumina-desktop globs.files=xtrafiles/globs2 -INSTALLS+=scripts colors themes globs +INSTALLS+=scripts themes globs -- cgit From 36f7dae7d983ab89532fb6613e75cf4491065e66 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 17 Nov 2017 12:34:27 -0500 Subject: Get rid of the updates available dialog/prompt in Lumina. Replace it with an extra "reboot w/ updates" button in both the start menu and the system logout window. --- src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 51 +++++++++------- src-qt5/core/lumina-desktop/SystemWindow.cpp | 34 +++++++---- src-qt5/core/lumina-desktop/SystemWindow.h | 11 ++-- src-qt5/core/lumina-desktop/SystemWindow.ui | 69 +++++++++++++++++++++- .../panel-plugins/systemstart/StartMenu.cpp | 22 +++++-- .../panel-plugins/systemstart/StartMenu.h | 11 ++-- .../panel-plugins/systemstart/StartMenu.ui | 45 ++++++++++---- 7 files changed, 179 insertions(+), 64 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index 29a58ec9..4c801112 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -85,7 +85,7 @@ QStringList LOS::ExternalDevicePaths(){ int LOS::ScreenBrightness(){ //First run a quick check to ensure this is not a VirtualBox VM (no brightness control) static int goodsys = -1; //This will not change over time - only check/set once - if(goodsys<0){ + if(goodsys<0){ //Make sure we are not running in VirtualBox (does not work in a VM) QStringList info = LUtils::getCmdOutput("pciconf -lv"); if( info.filter("VirtualBox", Qt::CaseInsensitive).isEmpty() ){ goodsys = 1; } @@ -103,8 +103,8 @@ int LOS::ScreenBrightness(){ } } //If it gets to this point, then we have a valid (but new) installation - if(screenbrightness<0){ screenbrightness = 100; } //default value for systems - return screenbrightness; + if(screenbrightness<0){ screenbrightness = 100; } //default value for systems + return screenbrightness; } //Set screen brightness @@ -149,10 +149,10 @@ int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1 if(out < 0){ //First time session check: Load the last setting for this user QString info = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume").join(""); - if(!info.isEmpty()){ - out = info.simplified().toInt(); + if(!info.isEmpty()){ + out = info.simplified().toInt(); audiovolume = out; //reset this internal flag - return out; + return out; } } bool remoteSession = !QString(getenv("PICO_CLIENT_LOGIN")).isEmpty(); @@ -173,7 +173,7 @@ int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1 //Volume changed by other utility: adjust the saved value as well LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume", QStringList() << QString::number(out), true); } - audiovolume = out; + audiovolume = out; } } return out; @@ -222,7 +222,7 @@ void LOS::changeAudioVolume(int percentdiff){ //Run Command LUtils::runCmd("mixer vol "+QString::number(L)+":"+QString::number(R)); } - } + } } //Check if a graphical audio mixer is installed @@ -260,24 +260,31 @@ void LOS::systemShutdown(bool skipupdates){ //start poweroff sequence //System Restart void LOS::systemRestart(bool skipupdates){ //start reboot sequence - if(skipupdates){QProcess::startDetached("shutdown -ro now"); } - else{ QProcess::startDetached("shutdown -r now"); } + bool activeupdates = !LUtils::readFile("/etc/defaults/vendor.conf").filter("trueos_active_update=\"YES\"").isEmpty(); + if(skipupdates){ + QProcess::startDetached("shutdown -ro now"); + }else{ + if(activeupdates && LUtils::isValidBinary("pc-updatemanager") && LOS::systemPendingUpdates().isEmpty()){ QProcess::startDetached("pc-updatemanager startupdate"); } + else{ QProcess::startDetached("shutdown -r now"); } + } } //Check for suspend support bool LOS::systemCanSuspend(){ - //This will only function on TrueOS - //(permissions issues on standard FreeBSD unless setup a special way) - bool ok = QFile::exists("/usr/local/bin/pc-sysconfig"); + QString state = LUtils::getCmdOutput("sysctl hw.acpi.suspend_state").join("").simplified(); + bool ok = LUtils::getCmdOutput("sysctl hw.acpi.supported_sleep_state").join("").split(" ",QString::SkipEmptyParts).contains(state); + /*bool ok = QFile::exists("/usr/local/bin/pc-sysconfig"); if(ok){ ok = LUtils::getCmdOutput("pc-sysconfig systemcansuspend").join("").toLower().contains("true"); - } + }*/ return ok; } //Put the system into the suspend state void LOS::systemSuspend(){ - QProcess::startDetached("pc-sysconfig suspendsystem"); + QString state = LUtils::getCmdOutput("sysctl hw.acpi.suspend_state").join("").simplified(); + //QProcess::startDetached("pc-sysconfig suspendsystem"); + QProcess::startDetached("acpiconf", QStringList() << "-s" << state ); } //Battery Availability @@ -289,8 +296,8 @@ bool LOS::hasBattery(){ //Battery Charge Level int LOS::batteryCharge(){ //Returns: percent charge (0-100), anything outside that range is counted as an error int charge = LUtils::getCmdOutput("apm -l").join("").toInt(); - if(charge > 100){ charge = -1; } //invalid charge - return charge; + if(charge > 100){ charge = -1; } //invalid charge + return charge; } //Battery Charging State @@ -328,11 +335,11 @@ QString LOS::FileSystemCapacity(QString dir) { //Return: percentage capacity as QStringList LOS::CPUTemperatures(){ //Returns: List containing the temperature of any CPU's ("50C" for example) static QStringList vars = QStringList(); QStringList temps; - if(vars.isEmpty()){ + if(vars.isEmpty()){ temps = LUtils::getCmdOutput("sysctl -i dev.cpu").filter(".temperature:"); //try direct readings first if(temps.isEmpty()){ temps = LUtils::getCmdOutput("sysctl -i hw.acpi").filter(".temperature:"); } // then try acpi values }else{ temps = LUtils::getCmdOutput("sysctl "+vars.join(" ")); vars.clear(); } - + temps.sort(); for(int i=0; i2 && labs.length()>2){ out << fmt.arg(data[0], data[1]+" "+labs[1], data[2]+" "+labs[2]); } } } - + return out; } diff --git a/src-qt5/core/lumina-desktop/SystemWindow.cpp b/src-qt5/core/lumina-desktop/SystemWindow.cpp index c709bb2a..dbcec2a2 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.cpp +++ b/src-qt5/core/lumina-desktop/SystemWindow.cpp @@ -29,6 +29,7 @@ SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){ connect(ui->tool_suspend, SIGNAL(clicked()), this, SLOT(sysSuspend()) ); connect(ui->push_cancel, SIGNAL(clicked()), this, SLOT(sysCancel()) ); connect(ui->push_lock, SIGNAL(clicked()), this, SLOT(sysLock()) ); + connect(ui->tool_restart_updates, SIGNAL(clicked()), this, SLOT(sysUpdate()) ); //Disable buttons if necessary updateWindow(); ui->tool_suspend->setVisible(LOS::systemCanSuspend()); //does not change with time - just do a single check @@ -46,6 +47,7 @@ void SystemWindow::updateWindow(){ bool ok = LOS::userHasShutdownAccess(); ui->tool_restart->setEnabled(ok); ui->tool_shutdown->setEnabled(ok); + ui->frame_update->setVisible( !LOS::systemPendingUpdates().isEmpty() ); //Center this window on the current screen QPoint center = QApplication::desktop()->screenGeometry(QCursor::pos()).center(); //get the center of the current screen this->move(center.x() - this->width()/2, center.y() - this->height()/2); @@ -74,21 +76,29 @@ void SystemWindow::sysLogout(){ LSession::processEvents(); QTimer::singleShot(0, LSession::handle(), SLOT(StartLogout()) ); } - + void SystemWindow::sysRestart(){ - bool skip = false; - if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled - this->close(); - LSession::processEvents(); - LSession::handle()->StartReboot(skip); + //bool skip = false; + //if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled + //this->close(); + //LSession::processEvents(); + LSession::handle()->StartReboot(true); +} + +void SystemWindow::sysUpdate(){ + //bool skip = false; + //if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled + //this->close(); + //LSession::processEvents(); + LSession::handle()->StartReboot(false); } - + void SystemWindow::sysShutdown(){ - bool skip = false; - if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled - this->close(); - LSession::processEvents(); - LSession::handle()->StartShutdown(skip); + //bool skip = false; + //if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled + //this->close(); + //LSession::processEvents(); + LSession::handle()->StartShutdown(); } void SystemWindow::sysSuspend(){ diff --git a/src-qt5/core/lumina-desktop/SystemWindow.h b/src-qt5/core/lumina-desktop/SystemWindow.h index bbef36a3..ad67c7e4 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.h +++ b/src-qt5/core/lumina-desktop/SystemWindow.h @@ -5,9 +5,6 @@ #include "ui_SystemWindow.h" - - - namespace Ui{ class SystemWindow; }; @@ -29,17 +26,17 @@ private: private slots: void sysLogout(); - + void sysRestart(); - + void sysUpdate(); void sysShutdown(); - + void sysSuspend(); void sysCancel(){ this->close(); } - + void sysLock(); }; diff --git a/src-qt5/core/lumina-desktop/SystemWindow.ui b/src-qt5/core/lumina-desktop/SystemWindow.ui index 49beb0d9..6108815b 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.ui +++ b/src-qt5/core/lumina-desktop/SystemWindow.ui @@ -6,8 +6,8 @@ 0 0 - 289 - 135 + 458 + 306 @@ -99,6 +99,71 @@ + + + + QFrame{ background-color: rgba(150,150,0,50); } + + + QFrame::StyledPanel + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Update Now + + + + 32 + 32 + + + + Qt::ToolButtonTextUnderIcon + + + + + + + + 0 + 0 + + + + Updates ready to install + + + Qt::AlignCenter + + + true + + + + + + diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index beaa5d92..272bf0fa 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -507,6 +507,7 @@ void StartMenu::on_stackedWidget_currentChanged(int val){ tmp = LOS::audioVolume(); ui->frame_audio->setVisible(tmp >= 0); if(tmp >= 0){ ui->slider_volume->setValue(tmp); } + }else if(page == ui->page_leave){ if( !ui->frame_leave_system->whatsThis().isEmpty() ){ //This frame is allowed/visible - need to adjust the shutdown detection @@ -514,6 +515,7 @@ void StartMenu::on_stackedWidget_currentChanged(int val){ ui->tool_restart->setEnabled(!updating); ui->tool_shutdown->setEnabled(!updating); ui->label_updating->setVisible(updating); //to let the user know *why* they can't shutdown/restart right now + ui->tool_restart_updates->setVisible(!updating && !LOS::systemPendingUpdates().isEmpty() ); } ui->frame_leave_suspend->setVisible( LOS::systemCanSuspend() ); } @@ -590,17 +592,25 @@ void StartMenu::on_tool_logout_clicked(){ void StartMenu::on_tool_restart_clicked(){ emit CloseMenu(); QCoreApplication::processEvents(); - bool skipupdates = false; - if( !promptAboutUpdates(skipupdates) ){ return; } - LSession::handle()->StartReboot(skipupdates); + //bool skipupdates = false; + //if( !promptAboutUpdates(skipupdates) ){ return; } + LSession::handle()->StartReboot(true); +} + +void StartMenu::on_tool_restart_update_clicked(){ + emit CloseMenu(); + QCoreApplication::processEvents(); + //bool skipupdates = false; + //if( !promptAboutUpdates(skipupdates) ){ return; } + LSession::handle()->StartReboot(false); } void StartMenu::on_tool_shutdown_clicked(){ emit CloseMenu(); QCoreApplication::processEvents(); - bool skipupdates = false; - if( !promptAboutUpdates(skipupdates) ){ return; } - LSession::handle()->StartShutdown(skipupdates); + //bool skipupdates = false; + //if( !promptAboutUpdates(skipupdates) ){ return; } + LSession::handle()->StartShutdown(); } void StartMenu::on_tool_suspend_clicked(){ diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h index e2dbb273..41bc3ec4 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h @@ -73,6 +73,7 @@ private slots: void on_tool_lock_clicked(); void on_tool_logout_clicked(); void on_tool_restart_clicked(); + void on_tool_restart_update_clicked(); void on_tool_shutdown_clicked(); void on_tool_suspend_clicked(); @@ -80,17 +81,17 @@ private slots: void on_slider_volume_valueChanged(int); void on_tool_launch_mixer_clicked(); void on_tool_mute_audio_clicked(); - + //Screen Brightness void on_slider_bright_valueChanged(int); - + //Workspace void on_tool_set_nextwkspace_clicked(); void on_tool_set_prevwkspace_clicked(); - + //Locale void on_combo_locale_currentIndexChanged(int); - + //Search void on_line_search_textEdited(QString); void startSearch(); @@ -99,7 +100,7 @@ private slots: signals: void CloseMenu(); void UpdateQuickLaunch(QStringList); - + }; #endif diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui index d374bfce..500b6559 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui @@ -6,8 +6,8 @@ 0 0 - 181 - 405 + 336 + 466 @@ -42,7 +42,7 @@ - 4 + 3 @@ -142,8 +142,8 @@ 0 0 - 179 - 208 + 334 + 102 @@ -438,8 +438,8 @@ 0 0 - 179 - 299 + 334 + 277 @@ -1002,6 +1002,31 @@ + + + + + 0 + 0 + + + + QToolButton{ background-color: rgba(150,150,0,100); } + + + Update and Restart + + + + + + Qt::ToolButtonTextBesideIcon + + + true + + + @@ -1033,7 +1058,7 @@ - (System Performing Updates) + (System Preparing Updates) Qt::AlignCenter @@ -1099,8 +1124,8 @@ 0 0 - 167 - 345 + 308 + 351 -- cgit From 7fd0fb0a3eb24d6da6dc69901a2de45642be58d5 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 06:43:27 -0500 Subject: Resync translation files with latest sources. --- .../core/lumina-desktop/i18n/lumina-desktop_af.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ar.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_az.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_bg.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_bn.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_bs.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ca.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_cs.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_cy.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_da.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_de.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_el.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_en_AU.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_en_GB.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_en_ZA.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_es.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_et.ts | 153 ++++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_eu.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_fa.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_fi.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_fr.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_fr_CA.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_gl.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_he.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_hi.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_hr.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_hu.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_id.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_is.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_it.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ja.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ka.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ko.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_lt.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_lv.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_mk.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_mn.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ms.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_mt.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_nb.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_nl.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_pa.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_pl.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_pt.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_pt_BR.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ro.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ru.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_sk.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_sl.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_sr.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_sv.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_sw.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_ta.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_tg.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_th.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_tr.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_uk.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_uz.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_vi.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_zh_CN.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_zh_HK.ts | 148 +++++++++++--------- .../lumina-desktop/i18n/lumina-desktop_zh_TW.ts | 148 +++++++++++--------- .../core/lumina-desktop/i18n/lumina-desktop_zu.ts | 148 +++++++++++--------- src-qt5/core/lumina-info/i18n/lumina-info_af.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ar.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_az.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_bg.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_bn.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_bs.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ca.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_cs.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_cy.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_da.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_de.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_el.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_es.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_et.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_eu.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_fa.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_fi.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_fr.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_gl.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_he.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_hi.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_hr.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_hu.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_id.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_is.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_it.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ja.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ka.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ko.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_lt.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_lv.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_mk.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_mn.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ms.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_mt.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_nb.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_nl.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_pa.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_pl.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_pt.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ro.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ru.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_sk.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_sl.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_sr.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_sv.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_sw.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_ta.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_tg.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_th.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_tr.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_uk.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_uz.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_vi.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts | 26 ++-- src-qt5/core/lumina-info/i18n/lumina-info_zu.ts | 26 ++-- src-qt5/core/lumina-open/i18n/lumina-open_af.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ar.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_az.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_bg.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_bn.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_bs.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ca.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_cs.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_cy.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_da.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_de.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_el.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_es.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_et.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_eu.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_fa.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_fi.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_fr.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_gl.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_he.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_hi.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_hr.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_hu.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_id.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_is.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_it.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ja.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ka.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ko.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_lt.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_lv.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_mk.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_mn.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ms.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_mt.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_nb.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_nl.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_pa.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_pl.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_pt.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ro.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ru.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_sk.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_sl.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_sr.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_sv.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_sw.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_ta.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_tg.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_th.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_tr.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_uk.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_uz.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_vi.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts | 37 +++-- src-qt5/core/lumina-open/i18n/lumina-open_zu.ts | 37 +++-- 189 files changed, 7058 insertions(+), 6240 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_af.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ar.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_az.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts index 4cce6320..d17703bb 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bg.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Кликнете за задаване - + Launch %1 Стартиране на %1 - + Open Отваряне - + Open With - + View Properties - + File Operations - + Rename - + Copy Копиране - + Cut Изрязване - + Delete Изтриване - + Select Application Избор на програма - + Name: Име: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (зарежда се) - + %1 % (%2 Remaining) %1 % (%2 оставащи) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Напускане - - - + + + Desktop Работен плот @@ -855,8 +855,8 @@ LSession - - + + Desktop Работен плот @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Активиране на прозореца - + Minimize Window Минимизиране на прозореца - + Restore Window Възстановяване на прозореца - + Maximize Window Максимизиране на прозореца - + Close Window Затваряне на прозореца - + Show All Windows Показване на всички прозорци - + Minimize All Windows Минимизиране на всички прозорци - + Close All Windows Затваряне на всички прозорци @@ -989,16 +989,19 @@ + CPU Temp: Температура на процесора + CPU Usage: Натовареност на процесора + Mem Usage: Използване на паметта @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Отписване @@ -1444,12 +1457,7 @@ Настройки - - (System Performing Updates) - (Системата е в процес на обновление) - - - + Back Назад @@ -1479,24 +1487,24 @@ Отказ - + %1% (Plugged In) %1% (външно захранване) - + %1% (%2 Estimated) %1% (приблизително %2) - + %1% Remaining остават %1% - - - + + + Workspace %1/%2 Работен плот %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Отказ - + Lock Заключване - + Suspend Изключване - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Мултимедия - + Development Разработка - + Education Образование - + Games Игри - + Graphics Изображения - + Network Мрежа - + Office Офис - + Science Наука - + Settings Настройки - + System - + Utility Инструменти - + Wine Wine - + Unsorted Несортирани diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bn.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_bs.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts index a7809769..4a65596e 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ca.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Cliqueu per establir-ho - + Launch %1 Llança %1 - + Open Obre - + Open With Obre amb - + View Properties Mostra'n les propietats - + File Operations Operacions de fitxers - + Rename Canvia'n el nom - + Copy Copia - + Cut Retalla - + Delete Suprimeix - + Select Application Seleccioneu l'aplicació - + Name: Nom: - + New Filename Nom de fitxer nou @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Carregant) - + %1 % (%2 Remaining) %1 % (resten %2) @@ -777,13 +777,13 @@ - + New Folder Carpeta nova - + New File Fitxer nou @@ -823,9 +823,9 @@ Surt - - - + + + Desktop Escriptori @@ -855,8 +855,8 @@ LSession - - + + Desktop Escriptori @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Activa la finestra - + Minimize Window Minimitza la finestra - + Restore Window Restaura la finestra - + Maximize Window Maximitza la finestra - + Close Window Tanca la finestra - + Show All Windows Mostra totes les finestres - + Minimize All Windows Minimitza totes les finestres - + Close All Windows Tanca totes les finestres @@ -989,16 +989,19 @@ + CPU Temp: Temp. CPU: + CPU Usage: Ús de la CPU: + Mem Usage: Ús de memòria: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off Atura - + + (System Preparing Updates) + + + + Log Out Surt @@ -1444,12 +1457,7 @@ Preferències - - (System Performing Updates) - (El sistema està processant actualitzacions) - - - + Back Enrere @@ -1479,24 +1487,24 @@ Cancel·la - + %1% (Plugged In) %1% (connectat) - + %1% (%2 Estimated) %1% (%2 estimat) - + %1% Remaining Resta %1% - - - + + + Workspace %1/%2 Espai de treball %1/%2 @@ -1524,38 +1532,48 @@ Atura - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Cancel·la - + Lock Bloqueja - + Suspend Atura temporalment - + Apply Updates? Aplico les actualitzacions? - + You have system updates waiting to be applied! Do you wish to install them now? Teniu actualitzacions de sistema per aplicar! Voleu instal·lar-les ara? - + Yes - + No No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimèdia - + Development Desenvolupament - + Education Educació - + Games Jocs - + Graphics Gràfics - + Network Xarxa - + Office Oficina - + Science Ciència - + Settings Configuració - + System Sistema - + Utility Utilitat - + Wine Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts index 5d5f26cd..eab383cb 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cs.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Nastavte kliknutím - + Launch %1 Spustit %1 - + Open Otevřít - + Open With Otevřít pomocí - + View Properties Zobrazit vlastnosti - + File Operations Operace se souborem - + Rename Přejmenovat - + Copy Kopírovat - + Cut Vyjmout - + Delete Vymazat - + Select Application Vybrat aplikaci - + Name: Název: - + New Filename Nový název souboru @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Nabíjení) - + %1 % (%2 Remaining) %1 % (%2 Zbývá) @@ -777,13 +777,13 @@ - + New Folder Nová složka - + New File Nový soubor @@ -823,9 +823,9 @@ Opustit - - - + + + Desktop Plocha @@ -855,8 +855,8 @@ LSession - - + + Desktop Plocha @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktivovat okno - + Minimize Window Minimalizovat okno - + Restore Window Obnovit okno - + Maximize Window Maximalizovat okno - + Close Window Zavřít okno - + Show All Windows Ukázat všechna okna - + Minimize All Windows Minimalizovat všechna okna - + Close All Windows Zavřít všechna okna @@ -989,16 +989,19 @@ + CPU Temp: Teplota procesoru: + CPU Usage: Využití procesoru: + Mem Usage: Využití operační paměti: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off Vypnout - + + (System Preparing Updates) + + + + Log Out Odhlásit se @@ -1444,12 +1457,7 @@ Nastavení - - (System Performing Updates) - (systém instaluje aktualizace) - - - + Back Zpět @@ -1479,24 +1487,24 @@ Storno - + %1% (Plugged In) %1% (zapojeno) - + %1% (%2 Estimated) %1% (odhadováno %2) - + %1% Remaining %1% zbývá - - - + + + Workspace %1/%2 Pracovní plocha %1/%2 @@ -1524,38 +1532,48 @@ Vypnout - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Storno - + Lock Zamknout - + Suspend Uspat do paměti - + Apply Updates? Nainstalovat aktualizace? - + You have system updates waiting to be applied! Do you wish to install them now? Aktualizace systému čekají na instalaci! Chcete je nainstalovat nyní? - + Yes Ano - + No Ne @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimédia - + Development Vývoj - + Education Výuka - + Games Hry - + Graphics Grafika - + Network Síť - + Office Kancelář - + Science Věda - + Settings Nastavení - + System Systém - + Utility Nástroje - + Wine Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_cy.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts index 00ff3157..2507a671 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_da.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Klik for at sætte - + Launch %1 Start %1 - + Open Åbn - + Open With Åbn med - + View Properties Vis egenskaber - + File Operations Filhandlinger - + Rename Omdøb - + Copy Kopiér - + Cut Klip - + Delete Slet - + Select Application Vælg program - + Name: Navn: - + New Filename Nyt filnavn @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (lader) - + %1 % (%2 Remaining) %1 % (%2 tilbage) @@ -777,13 +777,13 @@ - + New Folder Ny mappe - + New File Ny fil @@ -823,9 +823,9 @@ Afslut - - - + + + Desktop Skrivebord @@ -855,8 +855,8 @@ LSession - - + + Desktop Skrivebord @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktivér vindue - + Minimize Window Minimér vindue - + Restore Window Gendan vindue - + Maximize Window Maksimér vindue - + Close Window Luk vindue - + Show All Windows Vis alle vinduer - + Minimize All Windows Minimer alle vinduer - + Close All Windows Luk alle vinduer @@ -989,16 +989,19 @@ + CPU Temp: CPU-temperatur: + CPU Usage: CPU-forbrug: + Mem Usage: Hukommelsesforbrug: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off Sluk - + + (System Preparing Updates) + + + + Log Out Log ud @@ -1444,12 +1457,7 @@ Præferencer - - (System Performing Updates) - (systemet udfører opdateringer) - - - + Back Tilbage @@ -1479,24 +1487,24 @@ Annuller - + %1% (Plugged In) %1% (tilsluttet) - + %1% (%2 Estimated) %1% (%2 estimeret) - + %1% Remaining %1% tilbage - - - + + + Workspace %1/%2 Arbejdsområde %1/%2 @@ -1524,38 +1532,48 @@ Sluk - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Annuller - + Lock Lås - + Suspend Dvale - + Apply Updates? Opdater? - + You have system updates waiting to be applied! Do you wish to install them now? Du har systemopdateringer der venter! Ønsker du at installere dem nu? - + Yes Ja - + No Nej @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedie - + Development Udvikling - + Education Uddannelse - + Games Spil - + Graphics Grafik - + Network Netværk - + Office Kontor - + Science Videnskab - + Settings Indstillinger - + System System - + Utility Hjælpeværktøj - + Wine Wine - + Unsorted Usorteret diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts index 67d0805c..65b16cdd 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_de.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Klicken zum Festlegen - + Launch %1 %1 starten - + Open Öffnen - + Open With Öffnen mit - + View Properties Eigenschaften anzeigen - + File Operations Dateioperationen - + Rename Umbenennen - + Copy Kopieren - + Cut Ausschneiden - + Delete Löschen - + Select Application Anwendung auswählen - + Name: Name: - + New Filename Neuer Dateiname @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Aufladen) - + %1 % (%2 Remaining) %1 % (%2 verbleibend) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Verlassen - - - + + + Desktop Arbeitsfläche @@ -855,8 +855,8 @@ LSession - - + + Desktop Arbeitsfläche @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Fenster aktivieren - + Minimize Window Fenster minimieren - + Restore Window Fenster wiederherstellen - + Maximize Window Fenster maximieren - + Close Window Fenster schließen - + Show All Windows Zeige alle Fenster - + Minimize All Windows Alle Fenster minimieren - + Close All Windows Alle Fenster schließen @@ -989,16 +989,19 @@ + CPU Temp: CPU Temperatur: + CPU Usage: CPU-Auslastung: + Mem Usage: Speicherauslastung: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Abmelden @@ -1444,12 +1457,7 @@ Einstellungen - - (System Performing Updates) - (Updates werden verarbeitet) - - - + Back Zurück @@ -1479,24 +1487,24 @@ Abbrechen - + %1% (Plugged In) %1% (Eingesteckt) - + %1% (%2 Estimated) %1% (%2 Geschätzt) - + %1% Remaining %1% verbleibend - - - + + + Workspace %1/%2 Arbeitsbereich %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Abbrechen - + Lock Sperren - + Suspend In Bereitschaft versetzen - + Apply Updates? Aktualisierungen anwenden? - + You have system updates waiting to be applied! Do you wish to install them now? Sie haben Systemaktualisierungen, die darauf warten, angewendet zu werden! Möchten Sie sie jetzt installieren? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Entwicklung - + Education Bildung - + Games Spiele - + Graphics Grafik - + Network Netzwerk - + Office Büro - + Science Wissenschaft - + Settings Einstellungen - + System System - + Utility Dienstprogramm - + Wine Wine - + Unsorted Unsortiert diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts index f9d60a2c..341f847d 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_el.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application Επιλογή εφαρμογής - + Name: Όνομα: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts index d67d8301..52d0e88f 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_AU.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Click to Set - + Launch %1 Starte %1 - + Open Open - + Open With - + View Properties - + File Operations - + Rename - + Copy Copy - + Cut Cut - + Delete Delete - + Select Application Select Application - + Name: Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Charging) - + %1 % (%2 Remaining) %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Leave - - - + + + Desktop Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Activate Window - + Minimize Window Minimise Window - + Restore Window Restore Window - + Maximize Window Maximise Window - + Close Window Close Window - + Show All Windows Show All Windows - + Minimize All Windows Minimise All Windows - + Close All Windows Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: CPU Temp: + CPU Usage: CPU Usage: + Mem Usage: Mem Usage: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Log Out @@ -1444,12 +1457,7 @@ Preferences - - (System Performing Updates) - (System Performing Updates) - - - + Back Back @@ -1479,24 +1487,24 @@ Cancel - + %1% (Plugged In) %1% (Plugged In) - + %1% (%2 Estimated) %1% (%2 Estimated) - + %1% Remaining %1% Remaining - - - + + + Workspace %1/%2 Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Cancel - + Lock Lock - + Suspend Suspend - + Apply Updates? Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Development - + Education Education - + Games Games - + Graphics Graphics - + Network Network - + Office Office - + Science Science - + Settings Settings - + System System - + Utility Utility - + Wine Wine - + Unsorted Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts index e9bd9fde..ad847d47 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_GB.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Click to Set - + Launch %1 Starte %1 - + Open Open - + Open With - + View Properties - + File Operations - + Rename - + Copy Copy - + Cut Cut - + Delete Delete - + Select Application Select Application - + Name: Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Charging) - + %1 % (%2 Remaining) %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Leave - - - + + + Desktop Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Activate Window - + Minimize Window Minimise Window - + Restore Window Restore Window - + Maximize Window Maximise Window - + Close Window Close Window - + Show All Windows Show All Windows - + Minimize All Windows Minimise All Windows - + Close All Windows Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: CPU Temp: + CPU Usage: CPU Usage: + Mem Usage: Mem Usage: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Log Out @@ -1444,12 +1457,7 @@ Preferences - - (System Performing Updates) - (System Performing Updates) - - - + Back Back @@ -1479,24 +1487,24 @@ Cancel - + %1% (Plugged In) %1% (Plugged In) - + %1% (%2 Estimated) %1% (%2 Estimated) - + %1% Remaining %1% Remaining - - - + + + Workspace %1/%2 Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Cancel - + Lock Lock - + Suspend Suspend - + Apply Updates? Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Development - + Education Education - + Games Games - + Graphics Graphics - + Network Network - + Office Office - + Science Science - + Settings Settings - + System System - + Utility Utility - + Wine Wine - + Unsorted Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_en_ZA.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts index 54b2bec2..60c6c305 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_es.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Presione para Aplicar - + Launch %1 Lanzar %1 - + Open Abrir - + Open With Abrir con - + View Properties - + File Operations - + Rename - + Copy Copiar - + Cut Cortar - + Delete Borrar - + Select Application Seleccionar Aplicación - + Name: Nombre: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Cargando) - + %1 % (%2 Remaining) %1 % (%2 Restante) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Salir - - - + + + Desktop Escritorio @@ -855,8 +855,8 @@ LSession - - + + Desktop Escritorio @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Activar Ventana - + Minimize Window Minimizar Ventana - + Restore Window Restaurar Ventana - + Maximize Window Maximizar Ventana - + Close Window Cerrar Ventana - + Show All Windows Mostrar Todas Las Ventanas - + Minimize All Windows Minimizar Todas las Ventanas - + Close All Windows Cerrar Todas las Ventanas @@ -989,16 +989,19 @@ + CPU Temp: Temperatura de CPU: + CPU Usage: Uso del CPU: + Mem Usage: Uso de la Memoria: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Cerrar Sesión @@ -1444,12 +1457,7 @@ Preferencias - - (System Performing Updates) - (Sistema Aplicando Actualizaciones) - - - + Back Atrás @@ -1479,24 +1487,24 @@ Cancelar - + %1% (Plugged In) %1% (Conectado) - + %1% (%2 Estimated) %1% (%2 Estimado) - + %1% Remaining %1% Restante - - - + + + Workspace %1/%2 Área de Trabajo %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Cancelar - + Lock Bloquear - + Suspend Suspender - + Apply Updates? ¿Aplicar Actualizaciones? - + You have system updates waiting to be applied! Do you wish to install them now? !Tienes actualizaciones del sistema esperando ser aplicadas! ¿Quisieras instalarlas ahora? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Desarrollo - + Education Educación - + Games Juegos - + Graphics Gráficos - + Network Red - + Office Oficina - + Science Ciencia - + Settings Configuración - + System Sistema - + Utility Utilerías - + Wine Wine - + Unsorted Sin Ordenar diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts index c6d03883..e1b60acb 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_et.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Klõpsa määramiseks - + Launch %1 Käivita %1 - + Open Ava - + Open With Ava Kasutades - + View Properties Vaata Omadusi - + File Operations Failioperatsioonid - + Rename Nimeta Ümber - + Copy Kopeeri - + Cut Lõika - + Delete Kustuta - + Select Application Vali rakendus - + Name: Nimi: - + New Filename Uus Failinimi @@ -353,7 +353,6 @@ Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Ainult kaks asja on lõputud. Universum ja inimese lollus. Ma ei ole kusjuures esimeses kindel. - I find that the harder I work, the more luck I seem to have. @@ -665,12 +664,12 @@ LBattery - + %1 % (Charging) %1% (laeb) - + %1 % (%2 Remaining) %1% (%2 jäänud) @@ -778,13 +777,13 @@ - + New Folder Uus Kaust - + New File Uus Fail @@ -824,9 +823,9 @@ Lahku - - - + + + Desktop Töölaud @@ -849,15 +848,15 @@ LQuickLaunchButton - Remove from QuickLaunch - Eemalda Kiirkäivitusest + Remove from Quicklaunch + Eemalda Kiirkäivitusest LSession - - + + Desktop Töölaud @@ -928,42 +927,42 @@ LTaskButton - + Activate Window Aktiveeri aken - + Minimize Window Minimeeri aken - + Restore Window Taasta aken - + Maximize Window Maksimeeri aken - + Close Window Sulge aken - + Show All Windows Näita kõiki aknaid - + Minimize All Windows Minimeeri kõik aknad - + Close All Windows Sulge kõik aknad @@ -990,16 +989,19 @@ + CPU Temp: CPU temperatuur: + CPU Usage: CPU kasutus: + Mem Usage: Mälukasutus: @@ -1431,11 +1433,21 @@ + Update and Restart + + + + Power Off Lülita välja - + + (System Preparing Updates) + + + + Log Out Logi välja @@ -1445,12 +1457,7 @@ Eelistused - - (System Performing Updates) - (Süsteem paigaldab uuendusi) - - - + Back Tagasi @@ -1480,24 +1487,24 @@ Loobu - + %1% (Plugged In) %1% (ühendatud) - + %1% (%2 Estimated) %1% (%2 hinnanguliselt) - + %1% Remaining %1% jäänud - - - + + + Workspace %1/%2 Tööruum %1/%2 @@ -1525,38 +1532,48 @@ Lülita välja - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Loobu - + Lock Lukusta - + Suspend Arvuti peatamine - + Apply Updates? Paigalda uuendused? - + You have system updates waiting to be applied! Do you wish to install them now? Sul on ootel süsteemiuuendused! Kas soovid neid kohe lasta paigaldada? - + Yes Jah - + No Ei @@ -1768,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimeedia - + Development Arendus - + Education Haridus - + Games Mängud - + Graphics Graafika - + Network Võrk - + Office Kontor - + Science Teadus - + Settings Sätted - + System Süsteem - + Utility Tööriistad - + Wine Wine - + Unsorted Sortimata diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts index c8a65107..be61c50d 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_eu.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete Ezabatu - + Select Application Aplikazioa hautatu - + Name: Izena: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Kargatzen) - + %1 % (%2 Remaining) %1 % (%2 Faltan) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Lehioa aktibatu - + Minimize Window Leihoa minimizatu - + Restore Window Leihoa leheneratu - + Maximize Window Leihoa maximizatu - + Close Window Leihoa itxi - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Saioa amaitu @@ -1444,12 +1457,7 @@ - - (System Performing Updates) - - - - + Back @@ -1479,24 +1487,24 @@ Utzi - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 Laneko area %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Utzi - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Garapena - + Education Heziketa - + Games Jokoak - + Graphics Grafikoak - + Network Sarea - + Office Bulegoa - + Science Zientzia - + Settings Ezarpenak - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts index 96254899..c066d6b2 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fa.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 %1 را راه بیانداز - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application کاربست برگزین - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts index 80a27a4f..73bdf6d8 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fi.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Aseta napsauttamalla - + Launch %1 Käynnistä %1 - + Open Avaa - + Open With - + View Properties - + File Operations - + Rename - + Copy Kopioi - + Cut Leikkaa - + Delete Poista - + Select Application Valitse sovellus - + Name: Nimi: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (lataa) - + %1 % (%2 Remaining) %1 % (%2 jäljellä) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Poistu - - - + + + Desktop Työpöytä @@ -855,8 +855,8 @@ LSession - - + + Desktop Työpöytä @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktivoi ikkuna - + Minimize Window Pienennä ikkuna - + Restore Window Palauta ikkuna - + Maximize Window Suurenna ikkuna - + Close Window Sulje ikkuna - + Show All Windows Näytä kaikki ikkunat - + Minimize All Windows Pienennä kaikki ikkunat - + Close All Windows Sulje kaikki ikkunat @@ -989,16 +989,19 @@ + CPU Temp: Suorittimen lämpötila: + CPU Usage: Suorittimen käyttö: + Mem Usage: Muistin käyttö: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Kirjaudu ulos @@ -1444,12 +1457,7 @@ Asetukset - - (System Performing Updates) - (Järjestelmä suorittaa päivityksiä) - - - + Back Takaisin @@ -1479,24 +1487,24 @@ Peru - + %1% (Plugged In) %1 % (verkkovirta) - + %1% (%2 Estimated) %1 % (arviolta %2) - + %1% Remaining %1 % jäljellä - - - + + + Workspace %1/%2 Työtila %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Peru - + Lock Lukitse - + Suspend Valmiustila - + Apply Updates? Toteutetaanko päivitykset? - + You have system updates waiting to be applied! Do you wish to install them now? Joitakin järjestelmäpäivityksiä odottavat toteuttamista! Haluatko asentaa ne nyt? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Kehitystyökalut - + Education Kasvatus - + Games Pelit - + Graphics Grafiikka - + Network Verkko - + Office Toimisto - + Science Tiede - + Settings Asetukset - + System Järjestelmä - + Utility Työkalu - + Wine Wine - + Unsorted Lajittelematta diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts index 1c3189ed..c0217392 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Cliquer pour Définir - + Launch %1 Lancer %1 - + Open Ouvrir - + Open With - + View Properties - + File Operations - + Rename - + Copy Copier - + Cut Couper - + Delete Supprimer - + Select Application Sélectionner un Programme - + Name: Nom : - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Chargement) - + %1 % (%2 Remaining) %1 % (%2 Restant) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Quitter - - - + + + Desktop Bureau @@ -855,8 +855,8 @@ LSession - - + + Desktop Bureau @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Activer la Fenêtre - + Minimize Window Réduire la Fenêtre - + Restore Window Restaurer la Fenêtre - + Maximize Window Maximiser la Fenêtre - + Close Window Fermer la Fenêtre - + Show All Windows Afficher Toutes les Fenêtres - + Minimize All Windows Minimiser Toutes les Fenêtres - + Close All Windows Fermer Toutes les Fenêtres @@ -989,16 +989,19 @@ + CPU Temp: Température CPU : + CPU Usage: Utilisation CPU : + Mem Usage: Utilisation Mémoire : @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Se Déconnecter @@ -1444,12 +1457,7 @@ Préférences - - (System Performing Updates) - (Mise à jour Système en cours) - - - + Back Retour @@ -1479,24 +1487,24 @@ Annuler - + %1% (Plugged In) %1% (Branchée) - + %1% (%2 Estimated) %1% (%2 Estimé) - + %1% Remaining %1% restant(s) - - - + + + Workspace %1/%2 Espace de Travail %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Annuler - + Lock Verrouiller - + Suspend Mettre en Veille - + Apply Updates? Appliquer les Mises à Jour ? - + You have system updates waiting to be applied! Do you wish to install them now? Des mises à jour du système sont en attente, voulez-vous les installer maintenant ? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimédia - + Development Développement - + Education Éducation - + Games Jeux - + Graphics Graphiques - + Network Réseau - + Office - + Science Sciences - + Settings Paramètres - + System Système - + Utility - + Wine Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_fr_CA.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_gl.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts index b9ff009c..b494b2cb 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_he.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop שולחן עבודה @@ -855,8 +855,8 @@ LSession - - + + Desktop שולחן עבודה @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window מזער חלון - + Restore Window שחזר חלון - + Maximize Window הגדל חלון - + Close Window סגור חלון - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out התנתק @@ -1444,12 +1457,7 @@ העדפות - - (System Performing Updates) - - - - + Back אחורה @@ -1479,24 +1487,24 @@ ביטול - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel ביטול - + Lock נעל - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education לומדות - + Games משחקים - + Graphics גרפיקה - + Network אינטרנט - + Office משרד - + Science מדע - + Settings הגדרות - + System מערכת - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts index ee97464d..cee9a94d 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hi.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set निश्चित करने के लिए क्लिक करे - + Launch %1 प्रारंभ %1 - + Open चालू - + Open With - + View Properties - + File Operations - + Rename - + Copy कॉपी करें - + Cut काटें - + Delete नष्ट करें - + Select Application एप्लीकेशन चुनें - + Name: नाम - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 %(चार्ज हो रहा है) - + %1 % (%2 Remaining) %1 %(%2 बचा है) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ छोड़ें - - - + + + Desktop डेस्कटॉप @@ -855,8 +855,8 @@ LSession - - + + Desktop डेस्कटॉप @@ -927,42 +927,42 @@ LTaskButton - + Activate Window विंडो सक्रिय - + Minimize Window विंडो न्यून करें - + Restore Window विंडो पुनर्स्थापन - + Maximize Window विंडो बड़ी करें' - + Close Window विंडो बंद करें - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: तत्काल्लें CPU: + CPU Usage: CPU खपत + Mem Usage: मैमोरी खपत @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out लॉगआउट @@ -1444,12 +1457,7 @@ प्राथमिकताएं - - (System Performing Updates) - (उपकरण अपडेट हो रहा है) - - - + Back वापस @@ -1479,24 +1487,24 @@ रद्द - + %1% (Plugged In) %1%(प्लग इन) - + %1% (%2 Estimated) %1% (%2 लगभग) - + %1% Remaining %1% शेष - - - + + + Workspace %1/%2 कार्यस्थल %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel रद्द - + Lock लॉक - + Suspend रोकें - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia मल्टीमीडिया - + Development विकास - + Education पढाई - + Games खेल - + Graphics चित्र - + Network नेटवर्क - + Office कार्यालय - + Science विज्ञान - + Settings - + System - + Utility सुविधाएँ - + Wine शराब - + Unsorted अवर्गीकृत diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hr.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts index 10c49265..88455320 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_hu.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Kattintás a beállításhoz - + Launch %1 %1 indítása - + Open Megnyitás - + Open With - + View Properties - + File Operations - + Rename - + Copy Másolás - + Cut Kivágás - + Delete Törlés - + Select Application Alkalmazás kiválasztása - + Name: Név: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Töltés) - + %1 % (%2 Remaining) %1 % (%2 hátralévő) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Kilépés - - - + + + Desktop Asztal @@ -855,8 +855,8 @@ LSession - - + + Desktop Asztal @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Ablak aktiválása - + Minimize Window Ablak minimalizálása - + Restore Window Ablak visszaállítása - + Maximize Window Ablak maximalizálása - + Close Window Ablak bezárása - + Show All Windows Ablakok megjelenítése - + Minimize All Windows Ablakok minimalizálása - + Close All Windows Ablakok bezárása @@ -989,16 +989,19 @@ + CPU Temp: CPU hőmérséklete: + CPU Usage: CPU használat: + Mem Usage: Memória használat: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Kijelentkezés @@ -1444,12 +1457,7 @@ Beállítások - - (System Performing Updates) - - - - + Back Vissza @@ -1479,24 +1487,24 @@ Mégsem - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 %1/%2 munkaterület @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Mégsem - + Lock Zárolás - + Suspend Felfüggesztés - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimédia - + Development Fejlesztés - + Education Oktatás - + Games Játékok - + Graphics Grafika - + Network Hálózat - + Office Iroda - + Science Tudomány - + Settings Beállítások - + System Rendszer - + Utility Segédeszközök - + Wine Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts index efe0dc6a..2f3db87c 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_id.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set klik untuk mengatur - + Launch %1 Luncurkan %1 - + Open Buka - + Open With - + View Properties - + File Operations - + Rename - + Copy Salin - + Cut Potong - + Delete Hapus - + Select Application Pilih Aplikasi - + Name: Nama: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (pengisian baterai) - + %1 % (%2 Remaining) %1 % (%2 sisa) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Tinggalkan - - - + + + Desktop Layar Kerja Utama @@ -855,8 +855,8 @@ LSession - - + + Desktop Layar Kerja Utama @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktifkan jendela - + Minimize Window Minimalkan Window - + Restore Window Kembalikan Ukuran jendela - + Maximize Window Maksimalkan Ukuran Jendela - + Close Window Tutup Jendela - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: CPU Suhu: + CPU Usage: Penggunaan CPU: + Mem Usage: Penggunaan Memory: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Log Keluar @@ -1444,12 +1457,7 @@ Preferensi - - (System Performing Updates) - (Sistem Pertunjukan Updates) - - - + Back Mundur @@ -1479,24 +1487,24 @@ Batalkan - + %1% (Plugged In) %1% (Terpasang Dalam) - + %1% (%2 Estimated) %1% (%2 Perkiraan) - + %1% Remaining %1% Sisa - - - + + + Workspace %1/%2 Ruang kerja %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Batalkan - + Lock Kunci - + Suspend Suspensi - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Pengembangan - + Education Edukasi - + Games Permainan - + Graphics Grafis - + Network Jaringan - + Office Kantor - + Science Sains - + Settings Pengaturan - + System Sistem - + Utility Utilitas - + Wine Wine - + Unsorted Tak terurut diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_is.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts index ba24ba63..1cd93f4d 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_it.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Clicca per Impostare - + Launch %1 Lancia %1 - + Open Apri - + Open With - + View Properties - + File Operations - + Rename - + Copy Copia - + Cut Taglia - + Delete Cancella - + Select Application Seleziona Applicazione - + Name: Nome: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (In Carica) - + %1 % (%2 Remaining) %1 % (%2 Rimanente) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Esci - - - + + + Desktop Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Attiva Finestra - + Minimize Window Minimizza Finestra - + Restore Window Ripristina Finestra - + Maximize Window Massimizza Finestra - + Close Window Chiudi la Finestra - + Show All Windows Mostra tutte le finestre - + Minimize All Windows Minimizza tutte le finestre - + Close All Windows Chiudi tutte le finestre @@ -989,16 +989,19 @@ + CPU Temp: Temp, CPU: + CPU Usage: Uso CPU: + Mem Usage: Uso Memoria: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Esci @@ -1444,12 +1457,7 @@ Preferenze - - (System Performing Updates) - (Sistema Sta' Aggiornando) - - - + Back Indietro @@ -1479,24 +1487,24 @@ Cancella - + %1% (Plugged In) %1% (Plugged In) - + %1% (%2 Estimated) %1% (%2 Stimato) - + %1% Remaining %1% Rimanente - - - + + + Workspace %1/%2 Spazio Lavoro %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Cancella - + Lock Blocca - + Suspend Sospendi - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Sviluppo - + Education Educazione - + Games Giochi - + Graphics - + Network Rete - + Office Ufficio - + Science Scienza - + Settings Impostazioni - + System Sistema - + Utility Utilità - + Wine Wine - + Unsorted Non ordinato diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts index 0fbeb00e..15c0f6c7 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ja.ts @@ -34,69 +34,69 @@ AppLauncherPlugin - - + + Click to Set テキスト表示欄のツールチップ。アプリケーション名が設定されると置き換えられる。 クリックして設定してください - + Launch %1 %1 を起動 - + Open 開く - + Open With - + View Properties - + File Operations - + Rename - + Copy コピー - + Cut 切り取り - + Delete 削除 - + Select Application アプリケーションを選択してください - + Name: 名前: - + New Filename @@ -668,12 +668,12 @@ LBattery - + %1 % (Charging) %1 % (充電中) - + %1 % (%2 Remaining) %1 % (残り %2 %) @@ -782,13 +782,13 @@ - + New Folder - + New File @@ -828,9 +828,9 @@ 終了 - - - + + + Desktop @@ -860,8 +860,8 @@ LSession - - + + Desktop これ、ファイルパスなので、「デスクトップ」と訳したらまずい Desktop @@ -934,42 +934,42 @@ LTaskButton - + Activate Window ウィンドウをアクティブ化します - + Minimize Window ウィンドウを最小化します - + Restore Window ウィンドウを元のサイズに戻す - + Maximize Window ウィンドウを最大化します - + Close Window ウィンドウを閉じます - + Show All Windows すべてのウインドウを開く - + Minimize All Windows すべてのウインドウを最小化 - + Close All Windows すべてのウィンドウを閉じる @@ -997,16 +997,19 @@ + CPU Temp: CPU 温度: + CPU Usage: CPU 使用率: + Mem Usage: メモリー使用率: @@ -1447,11 +1450,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out ログアウト @@ -1461,12 +1474,7 @@ 設定 - - (System Performing Updates) - (システムはアップデート中です) - - - + Back 戻る @@ -1496,24 +1504,24 @@ キャンセル - + %1% (Plugged In) %1% (電源接続中) - + %1% (%2 Estimated) %1% (推定残り時間: %2) - + %1% Remaining 残り %1% - - - + + + Workspace %1/%2 ワークスペース %1/%2 @@ -1541,38 +1549,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel キャンセル - + Lock ロック - + Suspend サスペンド - + Apply Updates? 更新を行いますか? - + You have system updates waiting to be applied! Do you wish to install them now? システムが適用されるのを待っている更新があります! 今それらをインストールしますか? - + Yes - + No @@ -1791,67 +1809,67 @@ XDGDesktopList - + Multimedia マルチメディア - + Development 開発 - + Education 教育 - + Games ゲーム - + Graphics グラフィックス - + Network ネットワーク - + Office オフィス - + Science 科学 - + Settings 設定 - + System システム - + Utility ユーティリティー - + Wine Wine - + Unsorted 未分類 diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ka.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts index 05fa8608..0d69f01f 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ko.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set 설정하기 위해 누름 - + Launch %1 %1 실행 - + Open 열기 - + Open With - + View Properties - + File Operations - + Rename - + Copy 복사 - + Cut 잘라내기 - + Delete 삭제 - + Select Application 프로그램 선택 - + Name: 이름: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (충전중) - + %1 % (%2 Remaining) %1 % (%2 남음) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ 떠나기 - - - + + + Desktop 바탕 화면 @@ -855,8 +855,8 @@ LSession - - + + Desktop 바탕 화면 @@ -927,42 +927,42 @@ LTaskButton - + Activate Window 창 활성화 - + Minimize Window 창 최소화 - + Restore Window 창 복귀 - + Maximize Window 창 최대화 - + Close Window 창 닫기 - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: CPU 온도: + CPU Usage: CPU 사용량: + Mem Usage: 메모리 사용량: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out 로그 아웃 @@ -1444,12 +1457,7 @@ - - (System Performing Updates) - (시스템 업데이트 수행중) - - - + Back 뒤로 @@ -1479,24 +1487,24 @@ 취소 - + %1% (Plugged In) %1% (연결됨) - + %1% (%2 Estimated) %1% (%2 예상) - + %1% Remaining %1% 남음 - - - + + + Workspace %1/%2 작업 공간 %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel 취소 - + Lock 잠그기 - + Suspend 절전 - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia 멀티미디어 - + Development 개발 - + Education 교육 - + Games 게임 - + Graphics 그래픽 - + Network 네트워크 - + Office 업무 - + Science 과학 - + Settings 설정 - + System 시스템 - + Utility 유틸리티 - + Wine 와인 - + Unsorted 미분류 diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts index 35e14e86..c6f635aa 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lt.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Spustelėkite, norėdami nustatyti - + Launch %1 Paleisti %1 - + Open Atverti - + Open With Atverti, naudojant - + View Properties Rodyti savybes - + File Operations Failų operacijos - + Rename Pervadinti - + Copy Kopijuoti - + Cut Iškirpti - + Delete Ištrinti - + Select Application Pasirinkti programą - + Name: Pavadinimas: - + New Filename Naujas failo pavadinimas @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Kraunama) - + %1 % (%2 Remaining) %1 % (Liko %2) @@ -777,13 +777,13 @@ - + New Folder Naujas aplankas - + New File Naujas failas @@ -823,9 +823,9 @@ Išeiti - - - + + + Desktop Darbalaukis @@ -855,8 +855,8 @@ LSession - - + + Desktop Darbalaukis @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktyvuoti langą - + Minimize Window Suskleisti langą - + Restore Window Atkurti langą - + Maximize Window Išskleisti langą - + Close Window Užverti langą - + Show All Windows Rodyti visus langus - + Minimize All Windows Suskleisti visus langus - + Close All Windows Užverti visus langus @@ -989,16 +989,19 @@ + CPU Temp: CPU temperatūra: + CPU Usage: CPU naudojimas: + Mem Usage: Atminties naudojimas: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off Išjungti - + + (System Preparing Updates) + + + + Log Out Atsijungti @@ -1444,12 +1457,7 @@ Nuostatos - - (System Performing Updates) - (Sistema vykdo atnaujinimus) - - - + Back Atgal @@ -1479,24 +1487,24 @@ Atsisakyti - + %1% (Plugged In) %1% (Įdėta) - + %1% (%2 Estimated) %1% (Apytikriai %2) - + %1% Remaining Liko %1% - - - + + + Workspace %1/%2 Darbo sritis %1/%2 @@ -1524,38 +1532,48 @@ Išjungti - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Atsisakyti - + Lock Užrakinti - + Suspend Pristabdyti - + Apply Updates? Taikyti atnaujinimus? - + You have system updates waiting to be applied! Do you wish to install them now? Jūsų sistemoje yra laukiančių atnaujinimų! Ar norite įdiegti juos dabar? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedija - + Development Programavimas - + Education Švietimas - + Games Žaidimai - + Graphics Grafika - + Network Tinklas - + Office Raštinė - + Science Mokslas - + Settings Nustatymai - + System Sistema - + Utility Paslaugų programos - + Wine Wine - + Unsorted Nesurūšiuota diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts index c8581d11..3cb0b2b0 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_lv.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Klikšķiniet, lai iestatītu - + Launch %1 Palaist %1 - + Open Atvērt - + Open With - + View Properties - + File Operations - + Rename - + Copy Kopēt - + Cut Izgriezt - + Delete Dzēst - + Select Application Izvēlieties lietotni - + Name: Nosaukums: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (uzlādējas) - + %1 % (%2 Remaining) %1 % (%2 atlicis) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Atstāt - - - + + + Desktop Darbvirsma @@ -855,8 +855,8 @@ LSession - - + + Desktop Darbvirsma @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktivizēt logu - + Minimize Window Minimizēt logu - + Restore Window Atjaunot logu - + Maximize Window Maksimizēt logu - + Close Window Aizvērt logu - + Show All Windows Rādīt visus logus - + Minimize All Windows Minimizēt visus logus - + Close All Windows Aizvērt visus logus @@ -989,16 +989,19 @@ + CPU Temp: CPU temp.: + CPU Usage: CPU lietojums: + Mem Usage: Atmiņas lietojums: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Izrakstīties @@ -1444,12 +1457,7 @@ Preferences - - (System Performing Updates) - (Sistēma veic atjaunināšanu) - - - + Back Atpakaļ @@ -1479,24 +1487,24 @@ Atcelt - + %1% (Plugged In) %1% (pievienots) - + %1% (%2 Estimated) %1% (%2 paredzamais) - + %1% Remaining %1% atlicis - - - + + + Workspace %1/%2 Darbvieta %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Atcelt - + Lock Slēgt - + Suspend Iemidzināt - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1768,67 +1786,67 @@ XDGDesktopList - + Multimedia Multivide - + Development Izstrāde - + Education Izglītība - + Games Spēles - + Graphics Grafika - + Network Tīkls - + Office Birojs - + Science Zinātne - + Settings Iestatījumi - + System Sistēma - + Utility - + Wine Wine - + Unsorted Nesakārtots diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mk.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mn.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ms.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_mt.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nb.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts index 30025269..2b2f15a4 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_nl.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Klik om in te stellen - + Launch %1 %1 opstarten - + Open Openen - + Open With - + View Properties - + File Operations - + Rename - + Copy Plakken - + Cut Knippen - + Delete Verwijderen - + Select Application Applicatie selecteren - + Name: Naam: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Bezig met opladen) - + %1 % (%2 Remaining) %1 % (%2 resterend) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Verlaten - - - + + + Desktop Bureaublad @@ -855,8 +855,8 @@ LSession - - + + Desktop Bureaublad @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Venster activeren - + Minimize Window Venster minimaliseren - + Restore Window Venster herstellen - + Maximize Window Venster maximaliseren - + Close Window Venster sluiten - + Show All Windows Alle vensters weergeven - + Minimize All Windows Alle vensters minimaliseren - + Close All Windows Alle vensters sluiten @@ -989,16 +989,19 @@ + CPU Temp: CPU-temperatuur: + CPU Usage: CPU-gebruik: + Mem Usage: Geheugengebruik: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Uitloggen @@ -1444,12 +1457,7 @@ Voorkeuren - - (System Performing Updates) - (Systeem is bezig met uitvoeren van updates) - - - + Back Terug @@ -1479,24 +1487,24 @@ Annuleren - + %1% (Plugged In) %1% (Oplaadkabel is verbonden) - + %1% (%2 Estimated) %1% (%2 geschat) - + %1% Remaining %1% resterend - - - + + + Workspace %1/%2 Werkruimte %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Annuleren - + Lock Vergrendelen - + Suspend Pauzestand - + Apply Updates? Wilt u de updates toepassen? - + You have system updates waiting to be applied! Do you wish to install them now? Er zijn systeemupdates beschikbaar! Wilt u deze nu installeren? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Ontwikkeling - + Education - + Games Spellen - + Graphics Grafisch - + Network Netwerk - + Office Kantoor - + Science Wetenschap - + Settings Instellingen - + System Systeem - + Utility Hulpmiddel - + Wine Wine - + Unsorted Ongesorteerd diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pa.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts index b1c10e26..5ff8b01f 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pl.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Kliknij by ustawić - + Launch %1 Uruchom %1 - + Open Otwórz - + Open With - + View Properties - + File Operations - + Rename - + Copy Kopiuj - + Cut Wytnij - + Delete Usuń - + Select Application Wybierz aplikację - + Name: Nazwa: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Ładowanie) - + %1 % (%2 Remaining) %1 % (%2 pozostało) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Wyjdź - - - + + + Desktop Pulpit @@ -855,8 +855,8 @@ LSession - - + + Desktop Pulpit @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktywuj okno - + Minimize Window Minimalizuj okno - + Restore Window Przywróć okno - + Maximize Window Maksymalizuj okno - + Close Window Zamknij Okno - + Show All Windows Pokaż wszystkie okna - + Minimize All Windows Minimalizuj wszystkie okna - + Close All Windows Zamknij wszystkie okna @@ -989,16 +989,19 @@ + CPU Temp: Temperatura procesora: + CPU Usage: Wykorzystanie procesora: + Mem Usage: Wykorzystanie pamięci: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Wyloguj @@ -1444,12 +1457,7 @@ Ustawienia - - (System Performing Updates) - (System wykonuje aktualizacje) - - - + Back Wstecz @@ -1479,24 +1487,24 @@ Zaniechaj - + %1% (Plugged In) %1% (Podłączony) - + %1% (%2 Estimated) %1% (%2 Szacowane) - + %1% Remaining %1% Pozostało - - - + + + Workspace %1/%2 Przestrzeń robocza %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Zaniechaj - + Lock Zablokuj - + Suspend Wstrzymanie - + Apply Updates? Zastosować aktualizacje? - + You have system updates waiting to be applied! Do you wish to install them now? Masz oczekujące aktualizacje systemu gotowe do zastosowania! Czy chcesz je teraz zainstalować? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Narzędzia programistów - + Education Edukacja - + Games Gry - + Graphics Grafika - + Network Sieć - + Office Biuro - + Science Nauka - + Settings Ustawienia - + System System - + Utility Narzędzia - + Wine Wine - + Unsorted Nieuporządkowane diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts index 92b97b71..82881d5b 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Clique para Definir - + Launch %1 Iniciar %1 - + Open Abrir - + Open With - + View Properties - + File Operations - + Rename - + Copy Copiar - + Cut Cortar - + Delete Excluir - + Select Application Selecionar Aplicativo - + Name: Nome: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Carregando) - + %1 % (%2 Remaining) %1 % (%2 Restantes) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop Área de Trabalho @@ -855,8 +855,8 @@ LSession - - + + Desktop Área de Trabalho @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Ativar a Janela - + Minimize Window Minimizar Janela - + Restore Window Restaurar a Janela - + Maximize Window Maximizar Janela - + Close Window Fechar Janela - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: CPU Temp: + CPU Usage: Utilização da CPU: + Mem Usage: Utilização da Memória: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Sair @@ -1444,12 +1457,7 @@ - - (System Performing Updates) - - - - + Back @@ -1479,24 +1487,24 @@ Cancelar - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 Espaço de trabalho %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Cancelar - + Lock Bloquear - + Suspend Suspender - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimídia - + Development Desenvolvimento - + Education Educação - + Games Jogos - + Graphics Gráficos - + Network Rede - + Office Escritório - + Science Ciência - + Settings Definições - + System Sistema - + Utility Utilitário - + Wine Vinho - + Unsorted Sem ordem diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts index 130213bb..ec71e2ac 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_pt_BR.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Clique para definir - + Launch %1 Lançar %1 - + Open Abrir - + Open With - + View Properties - + File Operations - + Rename - + Copy Copiar - + Cut Cortar - + Delete Excluir - + Select Application Selecionar aplicativo - + Name: Nome: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (carregando) - + %1 % (%2 Remaining) %1 % (%2 restantes) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Deixar - - - + + + Desktop Área de trabalho @@ -855,8 +855,8 @@ LSession - - + + Desktop Área de trabalho @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Ativar janela - + Minimize Window Minimizar janela - + Restore Window Restaurar janela - + Maximize Window Maximizar janela - + Close Window Fechar janela - + Show All Windows Exibir todas janelas - + Minimize All Windows Minimizar todas janelas - + Close All Windows Fechar todas as janelas @@ -989,16 +989,19 @@ + CPU Temp: Temp. do CPU: + CPU Usage: Uso do CPU: + Mem Usage: Uso da mem.: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Encerrar sessão @@ -1444,12 +1457,7 @@ Preferências - - (System Performing Updates) - (Sistema aplicando atualizações) - - - + Back Voltar @@ -1479,24 +1487,24 @@ Cancelar - + %1% (Plugged In) %1% (Plugado) - + %1% (%2 Estimated) %1% (%2 Estimado) - + %1% Remaining %1% Restantes - - - + + + Workspace %1/%2 Espaço de trabalho %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Cancelar - + Lock Bloquear - + Suspend Suspender - + Apply Updates? Aplicar atualizações? - + You have system updates waiting to be applied! Do you wish to install them now? Você tem atualização de sistema pendentes! Gostaria de instalá-las agora? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimídia - + Development Desenvolvimento - + Education Educação - + Games Jogos - + Graphics Gráficos - + Network - + Office Escritório - + Science - + Settings Configurações - + System Sistema - + Utility - + Wine Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ro.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts index 45e3a5cd..0e54c34a 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ru.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Нажмите что бы выбрать - + Launch %1 Запуск %1 - + Open Открыть - + Open With Открыть с помощью - + View Properties Посмотреть свойства - + File Operations Операции с файлами - + Rename Переименовать - + Copy Копировать - + Cut Вырезать - + Delete Удалить - + Select Application Выбрать Приложение - + Name: Название: - + New Filename Новое имя файла @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Заряжается) - + %1 % (%2 Remaining) %1 % (Осталось %2 ) @@ -777,13 +777,13 @@ - + New Folder Новый каталог - + New File Новый файл @@ -823,9 +823,9 @@ Оставить - - - + + + Desktop Рабочий стол @@ -855,8 +855,8 @@ LSession - - + + Desktop Рабочий стол @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Активировать Окно - + Minimize Window Свернуть Окно - + Restore Window Восстановить Окно - + Maximize Window Развернуть Окно - + Close Window Закрыть окно - + Show All Windows Показать все окна - + Minimize All Windows Свернуть все окна - + Close All Windows Закрыть все окна @@ -989,16 +989,19 @@ + CPU Temp: Темп. CPU: + CPU Usage: Исп. CPU: + Mem Usage: Исп. Пам.: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off Выключить питание - + + (System Preparing Updates) + + + + Log Out Завершить Сеанс @@ -1444,12 +1457,7 @@ Настройки - - (System Performing Updates) - Система выполнения обновлений - - - + Back Назад @@ -1479,24 +1487,24 @@ Отмена - + %1% (Plugged In) %1% (подключенный) - + %1% (%2 Estimated) %1% (%2 расчетно) - + %1% Remaining %1% осталось - - - + + + Workspace %1/%2 Рабочая Область %1/%2 @@ -1524,38 +1532,48 @@ Выключить питание - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Отмена - + Lock Замок - + Suspend Отложить - + Apply Updates? Применить обновления? - + You have system updates waiting to be applied! Do you wish to install them now? У вас есть системные обновления! Вы хотите установить их сейчас? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Мультимедиа - + Development Разработка - + Education Образование - + Games Игры - + Graphics Графика - + Network Сети - + Office Офис - + Science Наука - + Settings - + System Система - + Utility Инструменты - + Wine Вино - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts index bb2b4d44..13e6c9a6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sk.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Kliknutím nastaviť - + Launch %1 Spustiť %1 - + Open Otvoriť - + Open With - + View Properties - + File Operations - + Rename - + Copy Kopírovať - + Cut Vystrihnúť - + Delete Vymazať - + Select Application Výber aplikácie - + Name: Meno: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Nabíjania) - + %1 % (%2 Remaining) %1 % (%2 zostáva) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Ponechať - - - + + + Desktop Pracovná plocha @@ -855,8 +855,8 @@ LSession - - + + Desktop Pracovná plocha @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktívne okno - + Minimize Window Minimalizovať okno - + Restore Window Obnoviť okno - + Maximize Window Maximalizovať okno - + Close Window Zatvoriť okno - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: Teplota CPU: + CPU Usage: Využite CPU: + Mem Usage: Využitie pamäte: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Odhlásiť sa @@ -1444,12 +1457,7 @@ - - (System Performing Updates) - (Systém vykonávajúci aktualizácie) - - - + Back Späť @@ -1479,24 +1487,24 @@ Zrušiť - + %1% (Plugged In) %1% (Nabitia) - + %1% (%2 Estimated) %1% (%2 odhadovaný) - + %1% Remaining Zostáva %1% - - - + + + Workspace %1/%2 Pracovná plocha %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Zrušiť - + Lock Uzamknúť - + Suspend Uspať - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimédiá - + Development Vývoj - + Education Vzdelávanie - + Games Hry - + Graphics Grafika - + Network Sieť - + Office Kancelária - + Science Veda - + Settings Nastavenie - + System Systém - + Utility Nástroje - + Wine Wine - + Unsorted Nezoradené diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts index 4a860781..ee11f368 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sl.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 Zaženi %1 - + Open Odpri - + Open With - + View Properties - + File Operations - + Rename - + Copy Kopiraj - + Cut Izreži - + Delete Izbriši - + Select Application Izberi program - + Name: Ime: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window Zapri okno - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Večpredstavnost - + Development Razvoj - + Education Izobraževanje - + Games Igre - + Graphics - + Network Omrežje - + Office - + Science Znanost - + Settings Nastavitve - + System - + Utility - + Wine Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sr.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts index b97f822b..e22270c5 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sv.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Klicka för att tilldela - + Launch %1 Starta %1 - + Open Öppna - + Open With Öppna med - + View Properties Visa egenskaper - + File Operations - + Rename Döp om - + Copy Kopiera - + Cut Klipp ut - + Delete Ta bort - + Select Application Välj program - + Name: Namn: - + New Filename Nytt filnamn @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Laddar) - + %1 % (%2 Remaining) %1 % (%2 Återstår) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Lämna - - - + + + Desktop Skrivbord @@ -855,8 +855,8 @@ LSession - - + + Desktop Skrivbord @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Aktivera fönster - + Minimize Window Minimera fönster - + Restore Window Återställ fönster - + Maximize Window Maximera fönster - + Close Window Stäng fönster - + Show All Windows Visa alla fönster - + Minimize All Windows Minimera alla fönster - + Close All Windows Stäng alla fönster @@ -989,16 +989,19 @@ + CPU Temp: CPU Temp: + CPU Usage: Processoranvändning: + Mem Usage: Minnesanvändning: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Logga ut @@ -1444,12 +1457,7 @@ Inställningar - - (System Performing Updates) - (Systemet utför uppdateringar) - - - + Back Bakåt @@ -1479,24 +1487,24 @@ Avbryt - + %1% (Plugged In) %1% (Inkopplad) - + %1% (%2 Estimated) %1% (%2 Beräknad) - + %1% Remaining %1% återstår - - - + + + Workspace %1/%2 Arbetsyta %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Avbryt - + Lock Lås - + Suspend Vänteläge - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Utveckling - + Education Utbildning - + Games Spel - + Graphics Grafik - + Network Nätverk - + Office Kontorsprogram - + Science Vetenskap - + Settings Inställningar - + System System - + Utility Verktyg - + Wine Wine - + Unsorted Osorterade diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_sw.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_ta.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tg.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_th.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts index 1741c455..704e1491 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_tr.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Ayarlamak için Tıkla - + Launch %1 %1 öğesini başlat - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy Kopyala - + Cut Kes - + Delete Sil - + Select Application Uygulama Seç - + Name: Ad: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) % %1 (Doluyor) - + %1 % (%2 Remaining) % %1 (Kalan %2) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Çık - - - + + + Desktop Masaüstü @@ -855,8 +855,8 @@ LSession - - + + Desktop Masaüstü @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Pencereyi Etkinleştir - + Minimize Window Pencereyi Küçült - + Restore Window Pencereyi Geri Yükle - + Maximize Window Pencereyi Büyüt - + Close Window Pencereyi Kapat - + Show All Windows Tüm Pencereleri Göster - + Minimize All Windows Tüm Pencereleri Küçült - + Close All Windows Tüm Pencereleri Kapat @@ -989,16 +989,19 @@ + CPU Temp: CPU Sıcaklığı: + CPU Usage: CPU Kullanımı: + Mem Usage: Bellek Kullanımı: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Oturumu Kapat @@ -1444,12 +1457,7 @@ Tercihler - - (System Performing Updates) - (Sistem Güncellemeleri Gerçekleştiriyor) - - - + Back Geri @@ -1479,24 +1487,24 @@ İptal - + %1% (Plugged In) %1% (Prize Takılı) - + %1% (%2 Estimated) %1% (Tahmini %2) - + %1% Remaining %1% Kaldı - - - + + + Workspace %1/%2 Çalışma alanı %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel İptal - + Lock Kilitle - + Suspend Beklet - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Multimedya - + Development Geliştirme - + Education Eğitim - + Games Oyunlar - + Graphics Grafik - + Network - + Office Ofis - + Science Bilim - + Settings Ayarlar - + System Sistem - + Utility Gereç - + Wine Wine - + Unsorted Sınıflandırılmamış diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts index d88a1b33..ec972577 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uk.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set Натисніть щоб встановити - + Launch %1 Запуск %1 - + Open Відкрити - + Open With - + View Properties - + File Operations - + Rename - + Copy Копіювати - + Cut Вирізати - + Delete Видалити - + Select Application Оберіть додаток - + Name: Ім'я: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 % (Заряд) - + %1 % (%2 Remaining) %1 (залишилося %2) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ Лишити - - - + + + Desktop Робочий стіл @@ -855,8 +855,8 @@ LSession - - + + Desktop Робочий стіл @@ -927,42 +927,42 @@ LTaskButton - + Activate Window Активне Вікно - + Minimize Window Згорнути вікно - + Restore Window Відновити вікно - + Maximize Window Розгорнути вікно - + Close Window Закрити вікно - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: Темп. CPU + CPU Usage: Вик. CPU: + Mem Usage: Вик. пам'яті: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out Завершити сеанс @@ -1444,12 +1457,7 @@ Налаштування - - (System Performing Updates) - (Система виконання оновлення) - - - + Back Назад @@ -1479,24 +1487,24 @@ Скасувати - + %1% (Plugged In) %1% (Підключено) - + %1% (%2 Estimated) %1% (%2 розрахунково) - + %1% Remaining %1% Залишилось - - - + + + Workspace %1/%2 Робочий простір %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel Скасувати - + Lock Заблокувати - + Suspend Призупинити - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia Мультимедіа - + Development Розробка - + Education Освіта - + Games Ігри - + Graphics Графіка - + Network Мережа - + Office Офіс - + Science Наука - + Settings Налаштування - + System Система - + Utility Утиліти - + Wine Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_uz.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_vi.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts index d1c65849..8d7ea859 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_CN.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set 单击以设定 - + Launch %1 启动 %1 - + Open 打开 - + Open With 打开用 - + View Properties 查看属性 - + File Operations 文件操作 - + Rename 重命名 - + Copy 复制 - + Cut 剪切 - + Delete 删除 - + Select Application 选择程序 - + Name: 名称: - + New Filename 新文件名 @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) %1 %(充电) - + %1 % (%2 Remaining) %1 (%2 剩余) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ 离开 - - - + + + Desktop 桌面 @@ -855,8 +855,8 @@ LSession - - + + Desktop 桌面 @@ -927,42 +927,42 @@ LTaskButton - + Activate Window 激活窗口 - + Minimize Window 最小化窗口 - + Restore Window 恢复窗口 - + Maximize Window 最大化窗口 - + Close Window 关闭窗口 - + Show All Windows 显示所有窗口 - + Minimize All Windows 最小化所有窗口 - + Close All Windows 关闭所有窗口 @@ -989,16 +989,19 @@ + CPU Temp: CPU 温度: + CPU Usage: CPU 占用: + Mem Usage: 内存使用: @@ -1430,11 +1433,21 @@ + Update and Restart + + + + Power Off - + + (System Preparing Updates) + + + + Log Out 注销 @@ -1444,12 +1457,7 @@ 首选项 - - (System Performing Updates) - (系统正在更新) - - - + Back 返回 @@ -1479,24 +1487,24 @@ 取消 - + %1% (Plugged In) %1% (已插电) - + %1% (%2 Estimated) %1% (估计 %2) - + %1% Remaining 剩余 %1% - - - + + + Workspace %1/%2 工作区 %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel 取消 - + Lock 锁定 - + Suspend 休眠 - + Apply Updates? 应用更新? - + You have system updates waiting to be applied! Do you wish to install them now? 您有系统更新可用!请问您是否想现在安装? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia 多媒体 - + Development 开发 - + Education 教育 - + Games 游戏 - + Graphics 图像 - + Network 网络 - + Office 办公 - + Science 科学 - + Settings 设置 - + System 系统 - + Utility 工具 - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_HK.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zh_TW.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts index d48278b9..2f9340c6 100644 --- a/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts +++ b/src-qt5/core/lumina-desktop/i18n/lumina-desktop_zu.ts @@ -32,68 +32,68 @@ AppLauncherPlugin - - + + Click to Set - + Launch %1 - + Open - + Open With - + View Properties - + File Operations - + Rename - + Copy - + Cut - + Delete - + Select Application - + Name: - + New Filename @@ -664,12 +664,12 @@ LBattery - + %1 % (Charging) - + %1 % (%2 Remaining) @@ -777,13 +777,13 @@ - + New Folder - + New File @@ -823,9 +823,9 @@ - - - + + + Desktop @@ -855,8 +855,8 @@ LSession - - + + Desktop @@ -927,42 +927,42 @@ LTaskButton - + Activate Window - + Minimize Window - + Restore Window - + Maximize Window - + Close Window - + Show All Windows - + Minimize All Windows - + Close All Windows @@ -989,16 +989,19 @@ + CPU Temp: + CPU Usage: + Mem Usage: @@ -1430,26 +1433,31 @@ + Update and Restart + + + + Power Off - - Log Out + + (System Preparing Updates) - - Preferences + + Log Out - - (System Performing Updates) + + Preferences - + Back @@ -1479,24 +1487,24 @@ - + %1% (Plugged In) - + %1% (%2 Estimated) - + %1% Remaining - - - + + + Workspace %1/%2 @@ -1524,38 +1532,48 @@ - - + + Update Now + + + + + Updates ready to install + + + + + Cancel - + Lock - + Suspend - + Apply Updates? - + You have system updates waiting to be applied! Do you wish to install them now? - + Yes - + No @@ -1767,67 +1785,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_af.ts b/src-qt5/core/lumina-info/i18n/lumina-info_af.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_af.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_af.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ar.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_az.ts b/src-qt5/core/lumina-info/i18n/lumina-info_az.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_az.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_az.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts b/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts index 454faad5..e855396e 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_bg.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts b/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_bn.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts b/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_bs.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts index 03baf485..2306a98e 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ca.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts b/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts index cb516383..b77630ee 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_cs.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts b/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_cy.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_da.ts b/src-qt5/core/lumina-info/i18n/lumina-info_da.ts index 12750d57..4c8757c7 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_da.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_da.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_de.ts b/src-qt5/core/lumina-info/i18n/lumina-info_de.ts index d4f3eb6c..9a94a622 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_de.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_de.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_el.ts b/src-qt5/core/lumina-info/i18n/lumina-info_el.ts index bf7645f3..27f41277 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_el.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_el.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts b/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts index ec2a3987..be3c6a35 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_en_AU.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts b/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts index 23414b75..ce25656b 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_en_GB.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts b/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_en_ZA.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_es.ts b/src-qt5/core/lumina-info/i18n/lumina-info_es.ts index 21806d0b..aff3fc8c 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_es.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_es.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts index 09142c95..3ce7575f 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_et.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_et.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia Multimeedia - + Development Arendustegevus - + Education Haridus - + Games Mängud - + Graphics Graafika - + Network Võrk - + Office Kontor - + Science Teadus - + Settings Sätted - + System Süsteem - + Utility Tööriistad - + Wine Wine - + Unsorted Sorteerimata diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts b/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts index 44d0427e..f5942c4b 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_eu.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fa.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts index 812f378f..71a5239b 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fi.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts index 47710462..acd5c507 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fr.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts b/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_fr_CA.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_gl.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_he.ts b/src-qt5/core/lumina-info/i18n/lumina-info_he.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_he.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_he.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts b/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts index 9aaa1aea..35271a65 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_hi.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_hr.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts b/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts index a618850d..54fa05a2 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_hu.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_id.ts b/src-qt5/core/lumina-info/i18n/lumina-info_id.ts index 3da2f670..ed752759 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_id.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_id.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_is.ts b/src-qt5/core/lumina-info/i18n/lumina-info_is.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_is.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_is.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_it.ts b/src-qt5/core/lumina-info/i18n/lumina-info_it.ts index befeb735..e1d96ade 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_it.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_it.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts index e3e2bbe6..f06520fa 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ja.ts @@ -98,67 +98,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ka.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts index 1ef0a61c..894f48d8 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ko.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts b/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts index bceaa49d..27940311 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_lt.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts b/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts index eb089eef..a3951196 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_lv.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts b/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_mk.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts b/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_mn.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ms.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts b/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_mt.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts b/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_nb.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts index d3608ebe..d923c00b 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_nl.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pa.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts index a563013e..694c09db 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pl.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts index 1fdbe6a1..40129431 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pt.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts b/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts index 6e9f6e1c..48e46625 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_pt_BR.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ro.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts index fca1cd8e..56797b99 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ru.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts index 44e2f1df..dff8e2ea 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sk.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts index dfb3708c..8e8e493a 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sl.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sr.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts index 06e91efa..c7c95716 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sv.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts b/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_sw.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts b/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_ta.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts b/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_tg.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_th.ts b/src-qt5/core/lumina-info/i18n/lumina-info_th.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_th.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_th.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts b/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts index b520af3d..95117833 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_tr.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts b/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts index 93acfa2f..a1141e82 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_uk.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts b/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_uz.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts b/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_vi.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts index d24b2b3e..018cefe4 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zh_CN.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zh_HK.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zh_TW.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts b/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts index bf95d1cb..72c575d3 100644 --- a/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts +++ b/src-qt5/core/lumina-info/i18n/lumina-info_zu.ts @@ -97,67 +97,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_af.ts b/src-qt5/core/lumina-open/i18n/lumina-open_af.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_af.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_af.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ar.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_az.ts b/src-qt5/core/lumina-open/i18n/lumina-open_az.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_az.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_az.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts b/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts index 6504b9bb..e2f19d0a 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_bg.ts @@ -142,7 +142,7 @@ QObject - + File Error Грешка във файла @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Непознат тип пряк път : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Грешка в програмата - + The following application experienced an error and needed to close: Възникна грешка в програмата и трябваше да бъде затворена: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Мултимедия - + Development Разработка - + Education Образование - + Games - + Graphics Изображения - + Network Мрежа - + Office Офис - + Science Наука - + Settings Настройки - + System Система - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts b/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_bn.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts b/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_bs.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts index 222884ed..ff2c550b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ca.ts @@ -142,7 +142,7 @@ QObject - + File Error Error del fitxer @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Tipus de drecera desconegut: %1 - - - Binary Missing - Falta un binari - Could not find "%1". Please ensure it is installed first. No s'ha pogut trobar "%1". Si us plau, assegureu-vos que estigui instal·lat. - + Application Error Error de l'aplicació - + The following application experienced an error and needed to close: L'aplicació següent ha tingut un error i s'ha hagut de tancar: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimèdia - + Development Desenvolupament - + Education Educació - + Games - + Graphics Gràfics - + Network Xarxa - + Office Oficina - + Science Ciència - + Settings Configuració - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts b/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts index 15cbfa0f..fd7ed2cf 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_cs.ts @@ -142,7 +142,7 @@ QObject - + File Error Chyba souboru @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Neznámý typ zkratky: %1 - - - Binary Missing - Chybí spustitelný soubor - Could not find "%1". Please ensure it is installed first. Nepodařilo se najít „%1“. Nejprve zajistěte, aby bylo nainstalované. - + Application Error Chyba aplikace - + The following application experienced an error and needed to close: V následující aplikaci došlo k chyba a bude proto ukončena: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimédia - + Development Vývoj - + Education Výuka - + Games - + Graphics Grafika - + Network Síť - + Office Kancelář - + Science Věda - + Settings Nastavení - + System Systém - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts b/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_cy.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_da.ts b/src-qt5/core/lumina-open/i18n/lumina-open_da.ts index 340bbfc5..770e717e 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_da.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_da.ts @@ -142,7 +142,7 @@ QObject - + File Error Filfejl @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Ukendt type genvej : %1 - - - Binary Missing - Binær mangler - Could not find "%1". Please ensure it is installed first. Kunne ikke finde "%1". Sørg for at programmet er installeret først. - + Application Error Programfejl - + The following application experienced an error and needed to close: Det følgende program oplevede en fejl og blev nødt til at afslutte: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedie - + Development Udvikling - + Education Uddannelse - + Games - + Graphics Grafik - + Network Netværk - + Office Kontor - + Science Videnskab - + Settings Indstillinger - + System System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_de.ts b/src-qt5/core/lumina-open/i18n/lumina-open_de.ts index 02b475dc..f1b09042 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_de.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_de.ts @@ -142,7 +142,7 @@ QObject - + File Error Dateifehler @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Unbekannter Typ für Vernüpfung: %1 - - - Binary Missing - Binärdatei fehlt - Could not find "%1". Please ensure it is installed first. Konnte "%1" nicht finden. Bitte stellen Sie zuerst sicher, dass es installiert ist. - + Application Error Anwendungsfehler - + The following application experienced an error and needed to close: Bei folgender Anwendung ist ein Fehler aufgetreten und sie wurde beendet: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Entwicklung - + Education Ausbildung - + Games - + Graphics Grafik - + Network Netzwerk - + Office Büro - + Science Wissenschaft - + Settings Einstellungen - + System System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_el.ts b/src-qt5/core/lumina-open/i18n/lumina-open_el.ts index f7344eb9..1cf5cbb8 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_el.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_el.ts @@ -142,7 +142,7 @@ QObject - + File Error Σφάλμα Αρχείου @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Άγνωστος τύπος συντόμευσης: %1 - - - Binary Missing - Το Εκτελέσιμο λείπει - Could not find "%1". Please ensure it is installed first. Αδυναμία έυρεσης "%1". Παρακαλώ βεβαιωθείτε ότι έχει ήδη εγκατασταθεί. - + Application Error Πρόβλημα Εφαρμογής - + The following application experienced an error and needed to close: Η παρακάτω εφαρμογή αντιμετώπισε ένα σφάλμα και πρέπει να τερματιστεί: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Πολυμέσα - + Development Ανάπτυξη - + Education Εκπαίδευση - + Games - + Graphics Γραφικά - + Network Δίκτυο - + Office Σουΐτα Γραφείου - + Science Επιστήμη - + Settings Ρυθμίσεις - + System Σύστημα - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts b/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts index f2675e28..dbca5225 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_en_AU.ts @@ -142,7 +142,7 @@ QObject - + File Error File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Unknown type of shortcut: %1 - - - Binary Missing - Binary Missing - Could not find "%1". Please ensure it is installed first. Could not find "%1". Please ensure it is installed first. - + Application Error Application Error - + The following application experienced an error and needed to close: The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Development - + Education Education - + Games - + Graphics Graphics - + Network Network - + Office Office - + Science Science - + Settings Settings - + System System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts b/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts index 0d6dcf0b..afa92889 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_en_GB.ts @@ -142,7 +142,7 @@ QObject - + File Error File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Unknown type of shortcut: %1 - - - Binary Missing - Binary Missing - Could not find "%1". Please ensure it is installed first. Could not find "%1". Please ensure it is installed first. - + Application Error Application Error - + The following application experienced an error and needed to close: The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Development - + Education Education - + Games - + Graphics Graphics - + Network Network - + Office Office - + Science Science - + Settings Settings - + System System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts b/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_en_ZA.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_es.ts b/src-qt5/core/lumina-open/i18n/lumina-open_es.ts index b8d7d446..abfe4962 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_es.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_es.ts @@ -142,7 +142,7 @@ QObject - + File Error Error de Archivo @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Tipo de acceso directo desconocido: %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Error en la Aplicación - + The following application experienced an error and needed to close: La siguiente aplicación presentó un error y necesita cerrarse: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Desarrollo - + Education Educación - + Games - + Graphics Gráficos - + Network Red - + Office Oficina - + Science Ciencia - + Settings Configuración - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_et.ts b/src-qt5/core/lumina-open/i18n/lumina-open_et.ts index ee6afe8b..fa069632 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_et.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_et.ts @@ -142,7 +142,7 @@ QObject - + File Error Faili viga @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Teadmata tüüpi otsetee: %1 - - - Binary Missing - Binaarfail puudub - Could not find "%1". Please ensure it is installed first. Ei leidnud "%1" . Palun veendu et see on paigaldatud. - + Application Error Programmi viga - + The following application experienced an error and needed to close: See rakendus sulgus, kuna esines viga: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimeedia - + Development Arendus - + Education Haridus - + Games Mängud - + Graphics Graafika - + Network Võrk - + Office Kontor - + Science Teadus - + Settings Sätted - + System Süsteem - + Utility Tööriistad - + Wine Wine - + Unsorted Sorteerimata diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts b/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts index 1cdbc65f..6a8f257b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_eu.ts @@ -142,7 +142,7 @@ QObject - + File Error Fitxategiko akatsa @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Lasterbide mota ezezaguna: %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Aplikazioko akatsa - + The following application experienced an error and needed to close: Hurrengo aplikazioak akats bat izan du eta itxi behar da: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Garapena - + Education Hezkuntza - + Games - + Graphics Grafikoak - + Network Sarea - + Office Bulegoa - + Science Zientzia - + Settings Ezarpenak - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fa.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts index 6a09c31b..403651fe 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fi.ts @@ -142,7 +142,7 @@ QObject - + File Error Tiedostovirhe @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Tuntematon pikakuvaketyyppi: %1 - - - Binary Missing - Ohjelmatiedosto puuttuu - Could not find "%1". Please ensure it is installed first. - + Application Error Sovellusvirhe - + The following application experienced an error and needed to close: Seuraavat sovellukset kohtasivat virheen ja ne täytyy sulkea: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Ohjelmakehitys - + Education Kasvatus - + Games - + Graphics Grafiikka - + Network Verkko - + Office Toimisto - + Science Tiede - + Settings Asetukset - + System Järjestelmä - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts index 6c950a8f..567fcf63 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fr.ts @@ -142,7 +142,7 @@ QObject - + File Error Erreur de fichier @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Type du raccourci inconnu : %1 - - - Binary Missing - Exécutable Manquant - Could not find "%1". Please ensure it is installed first. "%1" non trouvé. Vérifiez qu'il soit bien installé. - + Application Error Erreur du Programme - + The following application experienced an error and needed to close: Le programme suivant a provoqué une erreur et a dû être fermé : @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimédia - + Development Développement - + Education Éducation - + Games - + Graphics Graphiques - + Network Réseau - + Office Bureau - + Science Science - + Settings Paramètres - + System Système - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts b/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_fr_CA.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_gl.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_he.ts b/src-qt5/core/lumina-open/i18n/lumina-open_he.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_he.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_he.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts b/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts index 6e078c67..1b33caf3 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_hi.ts @@ -142,7 +142,7 @@ QObject - + File Error फाइल त्रुटि @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 अनजान प्रकार का शॉर्टकट:%1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error एप्लीकेशन त्रुटि - + The following application experienced an error and needed to close: इस एप्लीकेशन में त्रुटि है और इसे बंद करने की आवश्यकता है: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia मल्टीमीडिया - + Development विकास - + Education पढाई - + Games - + Graphics चित्र - + Network नेटवर्क - + Office कार्यालय - + Science विज्ञान - + Settings सेटिंग्स - + System उपकरण - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_hr.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts b/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts index c9fa6680..2356b492 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_hu.ts @@ -142,7 +142,7 @@ QObject - + File Error Fájl hiba @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Ismeretlen hivatkozás: %1 - - - Binary Missing - Hiányos binary - Could not find "%1". Please ensure it is installed first. Nem találom: "%1". Először győződj meg hogy telepítve van. - + Application Error Alkalmazás hiba - + The following application experienced an error and needed to close: Az alkalmazás hibát észlelt, és bezárandó: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimédia - + Development Fejlesztés - + Education Oktatás - + Games - + Graphics Grafika - + Network Hálózat - + Office Iroda - + Science Tudomány - + Settings Beállítások - + System Rendszer - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_id.ts b/src-qt5/core/lumina-open/i18n/lumina-open_id.ts index 143e052d..ee46566b 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_id.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_id.ts @@ -142,7 +142,7 @@ QObject - + File Error berkas error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Jenis diketahui shortcut: %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error aplikasi error - + The following application experienced an error and needed to close: Aplikasi berikut mengalami kesalahan dan diperlukan untuk menutup: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Pengembangan - + Education Edukasi - + Games - + Graphics Grafis - + Network Jaringan - + Office Kantor - + Science Sains - + Settings Pengaturan - + System Sistem - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_is.ts b/src-qt5/core/lumina-open/i18n/lumina-open_is.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_is.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_is.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_it.ts b/src-qt5/core/lumina-open/i18n/lumina-open_it.ts index aff2fc55..3189ccfa 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_it.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_it.ts @@ -142,7 +142,7 @@ QObject - + File Error Errore File @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Tipo di abbreviazione sconosciuto : %1 - - - Binary Missing - Manca codice Binario - Could not find "%1". Please ensure it is installed first. Impossibile trovare "% 1". Assicurarsi che sia installato per primo. - + Application Error Errore Applicazione - + The following application experienced an error and needed to close: La seguente applicazione ha avuto un errore e deve chiudere: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimediale - + Development Sviluppo - + Education Educazione - + Games - + Graphics Grafica - + Network Rete - + Office Ufficio - + Science Scienza - + Settings Impostazioni - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts index efe358cf..9eb3e794 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ja.ts @@ -143,7 +143,7 @@ QObject - + File Error ファイルエラー @@ -189,23 +189,18 @@ Unknown type of shortcut : %1 種類が不明なショートカットです: %1 - - - Binary Missing - バイナリーがありません - Could not find "%1". Please ensure it is installed first. "%1" が見つかりませんでした。まずそれがインストールされている事を確認してください。 - + Application Error アプリケーションエラー - + The following application experienced an error and needed to close: このアプリケーションでエラーが発生したため、閉じる必要があります: @@ -213,67 +208,67 @@ XDGDesktopList - + Multimedia マルチメディア - + Development 開発 - + Education 教育 - + Games - + Graphics グラフィックス - + Network ネットワーク - + Office オフィス - + Science 科学 - + Settings 設定 - + System システム - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ka.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts index 519726b9..bcee9b12 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ko.ts @@ -142,7 +142,7 @@ QObject - + File Error 파일 오류 @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 알 수 없는 종류의 바로 가기: %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error 프로그램 오류 - + The following application experienced an error and needed to close: 다음의 프로그램에 오류가 발생하여 종료하였습니다: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia 멀티미디어 - + Development 개발 - + Education 교육 - + Games - + Graphics 그래픽 - + Network 네트워크 - + Office 업무 - + Science 과학 - + Settings 설정 - + System 시스템 - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts b/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts index b5035cbf..e348dfba 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_lt.ts @@ -142,7 +142,7 @@ QObject - + File Error Failo klaida @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Nežinomas šaukinio tipas : %1 - - - Binary Missing - Trūksta dvejetainės - Could not find "%1". Please ensure it is installed first. Nepavyko rasti "%1". Iš pradžių, įsitikinkite ar ji įdiegta. - + Application Error Programos klaida - + The following application experienced an error and needed to close: Ši programa susidūrė su klaida ir turėjo būti užverta: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedija - + Development Programavimas - + Education Švietimas - + Games - + Graphics Grafika - + Network Tinklas - + Office Raštinė - + Science Mokslas - + Settings Nustatymai - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts b/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts index cac62f3a..8a818aa0 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_lv.ts @@ -142,7 +142,7 @@ QObject - + File Error Faila kļūda @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Nezināma tipa saīsne : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Lietotnes kļūda - + The following application experienced an error and needed to close: Šai lietotnei radās kļūda un bija nepieciešams to aizvērt: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multivide - + Development Izstrāde - + Education Izglītība - + Games - + Graphics Grafika - + Network Tīkls - + Office Birojs - + Science Zinātne - + Settings Iestatījumi - + System Sistēma - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts b/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_mk.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts b/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_mn.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ms.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts b/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_mt.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts b/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_nb.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts index 9e114de9..61b2a7c8 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_nl.ts @@ -142,7 +142,7 @@ QObject - + File Error Bestandsfout @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Onbekend soort snelkoppeling: %1 - - - Binary Missing - Het uitvoerbare bestand ontbreekt - Could not find "%1". Please ensure it is installed first. "%1" kan niet worden gevonden. Zorg ervoor dat het geïnstalleerd is. - + Application Error Applicatiefout - + The following application experienced an error and needed to close: Er is een fout opgetreden in de volgende applicatie en moet daarom worden gesloten: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Ontwikkeling - + Education Educatie - + Games - + Graphics Grafisch - + Network Netwerk - + Office Kantoor - + Science Wetenschap - + Settings Instellingen - + System Systeem - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pa.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts index e4abdbfc..81dc5121 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pl.ts @@ -142,7 +142,7 @@ QObject - + File Error Błąd pliku @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Nieznany błąd skrótu: %1 - - - Binary Missing - Brak pliku binarnego - Could not find "%1". Please ensure it is installed first. Nie można znaleźć "%1". Upewnij się, że jest zainstalowany. - + Application Error Błąd aplikacji - + The following application experienced an error and needed to close: Aplikacja napotkała błąd i musi zostać zamknięta: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Narzędzia programistów - + Education Edukacja - + Games - + Graphics Grafika - + Network Sieć - + Office Biuro - + Science Nauka - + Settings Ustawienia - + System System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts index 55dcbeda..bf7c5214 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pt.ts @@ -142,7 +142,7 @@ QObject - + File Error Erro no Arquivo @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Tipo de atalho desconhecido: %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Erro no Aplicativo - + The following application experienced an error and needed to close: O seguinte aplicativo encontrou um erro e teve que ser fechado: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimédia - + Development Desenvolvimento - + Education Educação - + Games - + Graphics Gráficos - + Network Rede - + Office Escritório - + Science Ciência - + Settings Definições - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts b/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts index f202622c..01c4ffa9 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_pt_BR.ts @@ -142,7 +142,7 @@ QObject - + File Error Erro de arquivo @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Tipo de atalho desconhecido: %1 - - - Binary Missing - Binário Faltando - Could not find "%1". Please ensure it is installed first. "%1" não pode ser localizado. Por favor, verifique se está instalado. - + Application Error Erro do aplicativo - + The following application experienced an error and needed to close: O seguinte aplicativo encontrou um erro e precisa ser fechado: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimídia - + Development Desenvolvimento - + Education Educação - + Games - + Graphics Gráficos - + Network Redes - + Office Escritório - + Science Ciências - + Settings Configurações - + System Sistema - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ro.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts index 472a6be3..3762faca 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ru.ts @@ -142,7 +142,7 @@ QObject - + File Error Ошибка Файла @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Неизвестный тип ярлыка: %1 - - - Binary Missing - Приложение отсутствует - Could not find "%1". Please ensure it is installed first. Не найден "%1". Пожалуйста, убедитесь, что он установлен в первую очередь. - + Application Error Ошибка Приложения - + The following application experienced an error and needed to close: Следующее приложение вызвало ошибку и должно быть закрыто: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Мультимедиа - + Development Разработка - + Education Образование - + Games - + Graphics Графика - + Network Сети - + Office Офис - + Science Наука - + Settings Настройки - + System Система - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts index 3433ff4b..153fbcf6 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sk.ts @@ -142,7 +142,7 @@ QObject - + File Error Chyba súboru @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Neznámy typ skratky: %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Chyba aplikácie - + The following application experienced an error and needed to close: Nasledujúca aplikácia hlási chybu a musí byť ukončená: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimédiá - + Development Vývoj - + Education Vzdelávanie - + Games - + Graphics Grafika - + Network Sieť - + Office Kancelária - + Science Veda - + Settings Nastavenie - + System Systém - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sl.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sr.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts index f8264625..7745b210 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sv.ts @@ -142,7 +142,7 @@ QObject - + File Error Filfel @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Okänd typ av genväg: %1 - - - Binary Missing - Binär saknas - Could not find "%1". Please ensure it is installed first. Kunde inte hitta "%1". Se till att du har detta programmet installerat först. - + Application Error Programfel - + The following application experienced an error and needed to close: Följande program upplevde ett fel och behövde stängas: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedia - + Development Utveckling - + Education Utbildning - + Games - + Graphics Grafik - + Network Nätverk - + Office Kontorsprogram - + Science Vetenskap - + Settings Inställningar - + System System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts b/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_sw.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts b/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_ta.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts b/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_tg.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_th.ts b/src-qt5/core/lumina-open/i18n/lumina-open_th.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_th.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_th.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts b/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts index fa53e159..06f75ad1 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_tr.ts @@ -142,7 +142,7 @@ QObject - + File Error Dosya Hatası @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Bilinmeyen kısayol türü: %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Uygulama Hatası - + The following application experienced an error and needed to close: İzleyen uygulama bir hatayla karşılaştı ve kapatılması gerekti: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Multimedya - + Development Geliştirme - + Education Eğitim - + Games - + Graphics Grafik - + Network - + Office Ofis - + Science Bilim - + Settings Ayarlar - + System Sistem - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts b/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts index 5fff2fcf..8d8a2e09 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_uk.ts @@ -142,7 +142,7 @@ QObject - + File Error Помилка файлу @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 Невідомий тип ярлику : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error Помилка програми - + The following application experienced an error and needed to close: Наступна програма викликало помилку и має бути закрита: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia Мультимедіа - + Development Розробка - + Education Освіта - + Games - + Graphics Графіка - + Network Мережа - + Office Офіс - + Science Наука - + Settings Налаштування - + System Система - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts b/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_uz.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts b/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_vi.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts index 312c9f6c..ffa75bdd 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zh_CN.ts @@ -142,7 +142,7 @@ QObject - + File Error 文件错误 @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 未知类型的快捷方式:%1 - - - Binary Missing - 二进制文件丢失 - Could not find "%1". Please ensure it is installed first. 无法找到 “%1”。请确认它已被安装。 - + Application Error 应用程序出错 - + The following application experienced an error and needed to close: 下面的应用程序遇到错误,需要关闭: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia 多媒体 - + Development 开发 - + Education 教育 - + Games - + Graphics 图像 - + Network 网络 - + Office 办公 - + Science 科学 - + Settings 设置 - + System 系统 - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zh_HK.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zh_TW.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted diff --git a/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts b/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts index bc022cb0..607f911f 100644 --- a/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts +++ b/src-qt5/core/lumina-open/i18n/lumina-open_zu.ts @@ -142,7 +142,7 @@ QObject - + File Error @@ -188,23 +188,18 @@ Unknown type of shortcut : %1 - - - Binary Missing - - Could not find "%1". Please ensure it is installed first. - + Application Error - + The following application experienced an error and needed to close: @@ -212,67 +207,67 @@ XDGDesktopList - + Multimedia - + Development - + Education - + Games - + Graphics - + Network - + Office - + Science - + Settings - + System - + Utility - + Wine - + Unsorted -- cgit From 800a9c66b01b977dbb6fb365414fe3555fbadc2e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 14:13:40 -0500 Subject: Cleanup some of the suspend-checking for FreeBSD. Remove pc-sysconfig as an option for brightness control on FreeBSD --- src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index 4c801112..78fe5028 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -117,12 +117,12 @@ void LOS::setScreenBrightness(int percent){ bool success = false; // - try hardware setting first (TrueOS || or intel_backlight) bool remoteSession = !QString(getenv("PICO_CLIENT_LOGIN")).isEmpty(); - if( LUtils::isValidBinary("pc-sysconfig") && !remoteSession){ + /*if( LUtils::isValidBinary("pc-sysconfig") && !remoteSession){ //Use TrueOS tool (direct sysctl control) QString ret = LUtils::getCmdOutput("pc-sysconfig", QStringList() <<"setscreenbrightness "+QString::number(percent)).join(""); success = ret.toLower().contains("success"); qDebug() << "Set hardware brightness:" << percent << success; - } + }*/ if( !success && LUtils::isValidBinary("intel_backlight") && !remoteSession){ //Use the intel_backlight utility (only for Intel mobo/hardware?) if(0== LUtils::runCmd("intel_backlight", QStringList() < Date: Mon, 20 Nov 2017 14:21:06 -0500 Subject: Bump the LICENSE year in lumina-info, and disable the old theme engine. --- src-qt5/core/lumina-info/LICENSE | 2 +- src-qt5/core/lumina-info/main.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-info/LICENSE b/src-qt5/core/lumina-info/LICENSE index 8cf98833..85d675a4 100644 --- a/src-qt5/core/lumina-info/LICENSE +++ b/src-qt5/core/lumina-info/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012-2016, Ken Moore (moorekou@gmail.com) +Copyright (c) 2012-2017, Ken Moore (moorekou@gmail.com) All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/src-qt5/core/lumina-info/main.cpp b/src-qt5/core/lumina-info/main.cpp index e30911c5..f4cd921a 100644 --- a/src-qt5/core/lumina-info/main.cpp +++ b/src-qt5/core/lumina-info/main.cpp @@ -17,8 +17,6 @@ int main(int argc, char ** argv) if( !a.isPrimaryProcess()){ return 0; } //qDebug() << "Set Application Name"; a.setApplicationName("About Lumina"); - //qDebug() << "Load Theme Engine"; - LuminaThemeEngine themes(&a); //qDebug() << "Start the UI"; //Start the UI MainUI w; -- cgit From 8b2a4a09ac2b635ebadd05658f5f34e14d2601f9 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 15:00:15 -0500 Subject: Add in the new manpages from Aaron St.John (lumina-docs repo). Also adjust the "community support" shortcut to point to gitter rather than IRC. --- src-qt5/core/lumina-info/lumina-info.8 | 26 ++++++ src-qt5/core/lumina-info/lumina-info.pro | 5 +- src-qt5/core/lumina-info/lumina-support.desktop | 5 +- src-qt5/core/lumina-open/lumina-open.1 | 114 ------------------------ src-qt5/core/lumina-open/lumina-open.8 | 104 +++++++++++++++++++++ src-qt5/core/lumina-open/lumina-open.pro | 4 +- 6 files changed, 138 insertions(+), 120 deletions(-) create mode 100644 src-qt5/core/lumina-info/lumina-info.8 delete mode 100644 src-qt5/core/lumina-open/lumina-open.1 create mode 100644 src-qt5/core/lumina-open/lumina-open.8 (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-info/lumina-info.8 b/src-qt5/core/lumina-info/lumina-info.8 new file mode 100644 index 00000000..81f0b90a --- /dev/null +++ b/src-qt5/core/lumina-info/lumina-info.8 @@ -0,0 +1,26 @@ +.Dd November 7, 2017 +.Dt LUMINA-INFO 8 +.Os 1.3.3 + +.Sh NAME +.Nm lumina-info +.Nd view information about the current desktop. + +.Sh SYNOPSIS +.Nm + +.Sh DESCRIPTION +.Nm +opens a graphical interface about: general information, license +information, and acknowledgements. +General information includes: desktop version, OS build, and an option +to view the Qt version. + +.Sh FILES +.Bl -tag -width indent +.It Pa /usr/local/bin/lumina-info +.El + +.Sh AUTHORS +.An Aaron St. John and Tim Moore +.Aq aaron@ixsystems.com diff --git a/src-qt5/core/lumina-info/lumina-info.pro b/src-qt5/core/lumina-info/lumina-info.pro index ec36e9af..c316b644 100644 --- a/src-qt5/core/lumina-info/lumina-info.pro +++ b/src-qt5/core/lumina-info/lumina-info.pro @@ -97,7 +97,10 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO desktop.files=lumina-info.desktop lumina-support.desktop desktop.path=$${L_SHAREDIR}/applications/ -INSTALLS += target desktop +manpage.path=$${L_MANDIR}/man8/ +manpage.extra="$${MAN_ZIP} lumina-info.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/lumina-info.8.gz" + +INSTALLS += target desktop manpage WITH_I18N{ INSTALLS += dotrans diff --git a/src-qt5/core/lumina-info/lumina-support.desktop b/src-qt5/core/lumina-info/lumina-support.desktop index 36ab28fd..127eb01b 100644 --- a/src-qt5/core/lumina-info/lumina-support.desktop +++ b/src-qt5/core/lumina-info/lumina-support.desktop @@ -1,10 +1,9 @@ [Desktop Entry] Type=Link -URL=https://webchat.freenode.net/?channels=%23lumina-desktop +URL=https://gitter.im/trueos/lumina Icon=Lumina-DE Categories=System; OnlyShowIn=Lumina; Name=Community Support GenericName=Get Desktop Help -Comment=Ask for desktop support on the community IRC channel - +Comment=Ask for desktop support on the community chat channel diff --git a/src-qt5/core/lumina-open/lumina-open.1 b/src-qt5/core/lumina-open/lumina-open.1 deleted file mode 100644 index cb671da3..00000000 --- a/src-qt5/core/lumina-open/lumina-open.1 +++ /dev/null @@ -1,114 +0,0 @@ -.Dd March 29, 2017 -.Dt LUMINA-OPEN 1 -.Os Lumina Desktop Environment -.\"------------------------------------------------------------------- -.Sh NAME -.Nm lumina-open -.Nd Application launcher for the Lumina Desktop Environment. -.\"------------------------------------------------------------------- -.Sh SYNOPSIS -.Nm -.Pp -.Nm -.Cm [-select | -action ] -.Pp -.Nm -.Cm [-volumeup | -volumedown | -brightnessup | -brightnessdown | --autostart-apps | -terminal] -.\"------------------------------------------------------------------- -.Sh DESCRIPTION -Given a file with an absolute pathway or URL, the -.Nm -utility finds the appropriate application with which to open the -file. If the file is a *.desktop application shortcut, -.Nm -starts the application automatically. Using the appropriate flags -allows -.Nm -to perform a few specific system operations. Here are the commands, -flags, and descriptions of their functionality: -.Pp -.Bl -tag -width indent -.It Ic lumina-open -Displays the description and usage for lumina-open. -.It Ic lumina-open [-select | -action ] -Opens the file using the appropriate application. -.It Fl select -Optional flag. Bypasses any default application settings to display -the application selector window. -.It Fl action\ -Optional flag. Runs the specified ActionID that is listed in -a .desktop registration file rather than the main command. -.It Ic lumina-open [-volumeup | -volumedown | -brightnessup | --brightnessdown | -autostart-apps | -terminal] -.Pp -This command is used to perform system operations, depending on the -specific flags. -.It Fl volumeup -Increase system audio volume by 5%. -.It Fl volumedown -Decrease system audio volume by 5%. -.It Fl brightnessup -Increase screen brightness by 5%. -.It Fl brightnessdown -Decrease screen brightness by 5%. -.It Fl autostart-apps -Launches all applications registered with the XDG autostart -application. Typically run by the desktop and not manually launched. -.It Fl terminal -Open the user's default terminal. -.El -.\"------------------------------------------------------------------- -.Sh EXAMPLES -.Bl -tag -width indent -.It lumina-open -brightnessup -Increase screen brightness. -.Pp -.It lumina-open sample.txt -.Nm -finds the default program for .txt files and opens sample.txt with -the appropriate application. -.It lumina-open ~/Documents -.Nm -launches the default file manager, pointed to the current user's -Documents directory. -.It lumina-open http://lumina-desktop.org -Launches the default web browser pointed to the Lumina website. -.El -.\"------------------------------------------------------------------- -.Sh FILES -.Bl -tag -width indent -.It Pa ${XDG_CONFIG_HOME}/mimeapps.list -Default file that saves mimetype to application associations. -.It Pa ${XDG_CONFIG_HOME}/${XDG_CURRENT_DESKTOP}-mimeapps.list -Default file that saves mimetype to application associations for the -current desktop session. This file is used before the generic -associations file. -.El -.\"------------------------------------------------------------------- -.Sh SEE ALSO -.Xr XDG-OPEN(1) -.\"------------------------------------------------------------------- -.Sh REFERENCES -For .desktop entry specifications and formatting, refer to these -websites: -.Bl -tag -width indent -.Pp -.Cm https://specifications.freedesktop.org/desktop-entry-spec/latest/ -.Pp -Specifications for .desktop files. -.Pp -.Cm https://specifications.freedesktop.org/mime-apps-spec/latest/ -.Pp -Details how default applications are registered. -.Pp -.Cm https://specifications.freedesktop.org/autostart-spec/latest/ -.Pp -Used in the -autostart-apps action. Determines which applications -are automatically started. -.Pp -.El -.\"------------------------------------------------------------------- -.Sh AUTHOR -.An Tim Moore -.Aq timmoore88@gmail.com diff --git a/src-qt5/core/lumina-open/lumina-open.8 b/src-qt5/core/lumina-open/lumina-open.8 new file mode 100644 index 00000000..582ad2ee --- /dev/null +++ b/src-qt5/core/lumina-open/lumina-open.8 @@ -0,0 +1,104 @@ +.Dd November 7, 2017 +.Dt LUMINA-OPEN 1 +.Os 1.3.3 + +.Sh NAME +.Nm lumina-open +.Nd a graphical front-end to xdg-open. +Opens files or links with the proper application. + +.Sh SYNOPSIS +.Nm +.Pp +.Nm +.Op Fl select | action No +.Op Ar FILE_PATH | URL +.Pp +.Nm +.Op Fl volumeup | volumedown | brightnessup | brightnessdown | \ + autostart-apps | terminal + +.Sh DESCRIPTION +Given a file with an absolute pathway or URL, the +.Nm +utility finds the appropriate application to open the file. +If the file is a *.desktop application shortcut, +.Nm +starts the application automatically. +.Nm +can also perform specific system operations. +Here are all flags and descriptions: +.Pp +.Bl -tag -width indent +.It Ic lumina-open +Displays the description and usage for lumina-open. +.It Nm Fl select +Bypasses any default application settings to display the application +selector window. +.It Nm Fl action\ \fIActionID\fR +Runs the specified ActionID that is listed in a .desktop registration +file rather than the main command. +.It Nm Fl volumeup +Increase system audio volume by 5%. +.It Nm Fl volumedown +Decrease system audio volume by 5%. +.It Nm Fl brightnessup +Increase screen brightness by 5%. +.It Nm Fl brightnessdown +Decrease screen brightness by 5%. +.It Nm Fl autostart-apps +Launches all applications registered with the XDG autostart application. +Typically run by the desktop instead of manually launched. +.It Nm Fl terminal +Open the default terminal. +.El + +.Sh EXAMPLES +.Bl -tag -width indent +.It lumina-open sample.txt +.Nm +finds the default program for .txt files and opens sample.txt with +the appropriate application. +.It lumina-open ~/Documents +.Nm +launches the default file manager pointed to the current Documents +directory. +.It lumina-open http://lumina-desktop.org +Launches the default web browser pointed to the Lumina website. +.El + +.Sh FILES +.Bl -tag -width indent +.It Pa %{XDG_CONFIG_HOME}/mimeapps.list +Default file that saves mimetype to application associations. +.It Pa %{XDG_CONFIG_HOME}/${XDG_CURRENT_DESKTOP}-mimeapps.list +Default file that saves mimetype to application associations for the +current desktop session. +This file is used before the generic associations file. +.El + +.Sh SEE ALSO +.Xr XDG-OPEN(1) + +.Sh REFERENCES +For .desktop entry specifications and formatting, refer to these +websites: +.Bl -tag -width indent +.Pp +.Cm https://specifications.freedesktop.org/desktop-entry-spec/latest/ +.Pp +Specifications for .desktop files. +.Pp +.Cm https://specifications.freedesktop.org/mime-apps-spec/latest/ +.Pp +Details how default applications are registered. +.Pp +.Cm https://specifications.freedesktop.org/autostart-spec/latest/ +.Pp +Used in the -autostart-apps action. +Determines which applications are automatically started. +.El + +.Sh AUTHORS +.An Tim Moore and Aaron St. John +.Aq timmoore88@gmail.com diff --git a/src-qt5/core/lumina-open/lumina-open.pro b/src-qt5/core/lumina-open/lumina-open.pro index b31c7a0e..0e0d1e76 100644 --- a/src-qt5/core/lumina-open/lumina-open.pro +++ b/src-qt5/core/lumina-open/lumina-open.pro @@ -89,8 +89,8 @@ TRANSLATIONS = i18n/lumina-open_af.ts \ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ -manpage.path=$${L_MANDIR}/man1/ -manpage.extra="$${MAN_ZIP} lumina-open.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-open.1.gz" +manpage.path=$${L_MANDIR}/man8/ +manpage.extra="$${MAN_ZIP} lumina-open.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/lumina-open.8.gz" INSTALLS += target manpage -- cgit From 757ff403a95e72b2637eb435f6447c7031c75dc5 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 15:24:19 -0500 Subject: Adjust the logout dialog size. Also add the current workspace to the panel button for the workspace switcher. --- src-qt5/core/lumina-desktop/LXcbEventFilter.cpp | 4 ++-- src-qt5/core/lumina-desktop/LXcbEventFilter.h | 12 ++++++------ src-qt5/core/lumina-desktop/SystemWindow.ui | 17 +++++++++++++++-- .../panel-plugins/desktopswitcher/LDesktopSwitcher.cpp | 7 ++++--- 4 files changed, 27 insertions(+), 13 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp index 038872ff..d5098a40 100644 --- a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp +++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp @@ -7,7 +7,7 @@ #include "LXcbEventFilter.h" //For all the XCB interactions and atoms -// is accessed via +// is accessed via // session->XCB->EWMH.(atom name) // session->XCB->(do something) #include @@ -41,7 +41,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag //qDebug() << "Property Notify Event:"; //qDebug() << " - Root Window:" << QX11Info::appRootWindow(); //qDebug() << " - Given Window:" << ((xcb_property_notify_event_t*)ev)->window; - //System-specific proprty change + //System-specific property change if( ((xcb_property_notify_event_t*)ev)->window == QX11Info::appRootWindow() \ && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_DESKTOP_GEOMETRY) \ || (((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_WORKAREA) )){ diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.h b/src-qt5/core/lumina-desktop/LXcbEventFilter.h index c56471c9..2946eacd 100644 --- a/src-qt5/core/lumina-desktop/LXcbEventFilter.h +++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.h @@ -62,7 +62,7 @@ private: QList WinNotifyAtoms, SysNotifyAtoms; int TrayDmgFlag; //internal damage event offset value for the system tray bool stopping; - + void InitAtoms(){ //Initialize any special atoms that we need to save/use regularly //NOTE: All the EWMH atoms are already saved in session->XCB->EWMH @@ -73,7 +73,7 @@ private: << session->XCB->EWMH._NET_WM_VISIBLE_ICON_NAME \ << session->XCB->EWMH._NET_WM_ICON \ << session->XCB->EWMH._NET_WM_ICON_GEOMETRY; - + SysNotifyAtoms.clear(); SysNotifyAtoms << session->XCB->EWMH._NET_CLIENT_LIST \ << session->XCB->EWMH._NET_CLIENT_LIST_STACKING \ @@ -85,12 +85,12 @@ private: //_NET_SYSTEM_TRAY_OPCODE xcb_intern_atom_cookie_t cookie = xcb_intern_atom(QX11Info::connection(), 0, 23,"_NET_SYSTEM_TRAY_OPCODE"); xcb_intern_atom_reply_t *r = xcb_intern_atom_reply(QX11Info::connection(), cookie, NULL); - if(r){ - _NET_SYSTEM_TRAY_OPCODE = r->atom; + if(r){ + _NET_SYSTEM_TRAY_OPCODE = r->atom; free(r); } } - + public: XCBEventFilter(LSession *sessionhandle); void setTrayDamageFlag(int flag); @@ -98,7 +98,7 @@ public: //This function format taken directly from the Qt5.3 documentation virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *) Q_DECL_OVERRIDE; - + }; #endif diff --git a/src-qt5/core/lumina-desktop/SystemWindow.ui b/src-qt5/core/lumina-desktop/SystemWindow.ui index 6108815b..dfc3bed2 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.ui +++ b/src-qt5/core/lumina-desktop/SystemWindow.ui @@ -6,8 +6,8 @@ 0 0 - 458 - 306 + 422 + 173 @@ -47,6 +47,19 @@ 0 + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp index e6e89075..294b37be 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp @@ -14,7 +14,7 @@ LDesktopSwitcher::LDesktopSwitcher(QWidget *parent, QString id, bool horizontal) label = new QToolButton(this); label->setPopupMode(QToolButton::DelayedPopup); label->setAutoRaise(true); - label->setToolButtonStyle(Qt::ToolButtonIconOnly); + label->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); label->setIcon( LXDG::findIcon("format-view-carousel", "preferences-desktop-display") ); label->setToolTip(QString(tr("Workspace 1"))); connect(label, SIGNAL(clicked()), this, SLOT(openMenu())); @@ -44,7 +44,7 @@ void LDesktopSwitcher::setNumberOfDesktops(int number) { Atom atom = XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False); XEvent xevent; xevent.type = ClientMessage; - xevent.xclient.type = ClientMessage; + xevent.xclient.type = ClientMessage; xevent.xclient.display = display; xevent.xclient.window = rootWindow; xevent.xclient.message_type = atom; @@ -129,7 +129,7 @@ void LDesktopSwitcher::createMenu() { int cur = LSession::handle()->XCB->CurrentWorkspace(); //current desktop number int tot = LSession::handle()->XCB->NumberOfWorkspaces(); //total number of desktops //qDebug() << "-- vor getCurrentDesktop SWITCH"; - qDebug() << "Virtual Desktops:" << tot << cur; + //qDebug() << "Virtual Desktops:" << tot << cur; menu->clear(); for (int i = 0; i < tot; i++) { QString name = QString(tr("Workspace %1")).arg( QString::number(i+1) ); @@ -137,6 +137,7 @@ void LDesktopSwitcher::createMenu() { menu->addAction(newAction(i, name)); } label->setToolTip(QString(tr("Workspace %1")).arg(QString::number(cur + 1))); + label->setText( QString::number(cur+1) ); } void LDesktopSwitcher::menuActionTriggered(QAction* act) { -- cgit From dd7d701b2b457a11d22162d503a4c144b08b9a38 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 16:15:31 -0500 Subject: Bump the version of Lumina to 1.4.0 Also ensure the lumina-theme-engine uses the same versioning system. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 2 +- src-qt5/core/libLumina/LDesktopUtils.pri | 1 + src-qt5/core/lumina-theme-engine/lthemeengine.pri | 2 +- src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp | 5 ++++- 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index f1b3de17..69d4ba52 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -16,7 +16,7 @@ static QStringList fav; QString LDesktopUtils::LuminaDesktopVersion(){ - QString ver = "1.3.3"; + QString ver = "1.4.0"; #ifdef GIT_VERSION ver.append( QString(" (Git Revision: %1)").arg(GIT_VERSION) ); #endif diff --git a/src-qt5/core/libLumina/LDesktopUtils.pri b/src-qt5/core/libLumina/LDesktopUtils.pri index fcacc586..ebfa89f4 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.pri +++ b/src-qt5/core/libLumina/LDesktopUtils.pri @@ -6,3 +6,4 @@ INCLUDEPATH *= ${PWD} #Now the other dependendies of it include(LUtils.pri) include(LuminaThemes.pri) +include(LuminaXDG.pri) diff --git a/src-qt5/core/lumina-theme-engine/lthemeengine.pri b/src-qt5/core/lumina-theme-engine/lthemeengine.pri index 40202045..781527c1 100644 --- a/src-qt5/core/lumina-theme-engine/lthemeengine.pri +++ b/src-qt5/core/lumina-theme-engine/lthemeengine.pri @@ -3,7 +3,7 @@ QT *= core gui widgets x11extras network error("Use Qt 5.4.0 or higher.") } include(../../OS-detect.pri) - +include(../libLumina/LDesktopUtils.pri) CONFIG *= c++11 #Install paths diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp index 28a5e558..6db249fe 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp @@ -13,6 +13,8 @@ #include "qsspage.h" #include "ui_mainwindow.h" +#include + MainWindow::MainWindow(QWidget *parent) : QWidget(parent), m_ui(new Ui::MainWindow){ m_ui->setupUi(this); bgroup = new QButtonGroup(this); @@ -35,7 +37,8 @@ MainWindow::MainWindow(QWidget *parent) : QWidget(parent), m_ui(new Ui::MainWind QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); restoreGeometry(settings.value("SettingsWindow/geometry").toByteArray()); setWindowIcon(QIcon::fromTheme("preferences-desktop-theme")); - m_ui->versionLabel->setText(tr("Version: %1").arg(LTHEMEENGINE_VERSION_STR)); + this->setWindowTitle(tr("Theme Settings")); + m_ui->versionLabel->setText(tr("Version: %1").arg(LDesktopUtils::LuminaDesktopVersion())); } MainWindow::~MainWindow(){ -- cgit From f0888f5a1323f3fff19b301c892195faac5e05df Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 17:18:00 -0500 Subject: Redo all the new man pages categories. Make sure they are all man1 instead of man8 --- src-qt5/core/lumina-desktop/lumina-desktop.1 | 61 +++++++++++++++ src-qt5/core/lumina-desktop/lumina-desktop.8 | 61 --------------- src-qt5/core/lumina-desktop/lumina-desktop.pro | 4 +- src-qt5/core/lumina-info/lumina-info.1 | 26 +++++++ src-qt5/core/lumina-info/lumina-info.8 | 26 ------- src-qt5/core/lumina-info/lumina-info.pro | 4 +- src-qt5/core/lumina-open/lumina-open.1 | 104 +++++++++++++++++++++++++ src-qt5/core/lumina-open/lumina-open.8 | 104 ------------------------- src-qt5/core/lumina-open/lumina-open.pro | 4 +- 9 files changed, 197 insertions(+), 197 deletions(-) create mode 100644 src-qt5/core/lumina-desktop/lumina-desktop.1 delete mode 100644 src-qt5/core/lumina-desktop/lumina-desktop.8 create mode 100644 src-qt5/core/lumina-info/lumina-info.1 delete mode 100644 src-qt5/core/lumina-info/lumina-info.8 create mode 100644 src-qt5/core/lumina-open/lumina-open.1 delete mode 100644 src-qt5/core/lumina-open/lumina-open.8 (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.1 b/src-qt5/core/lumina-desktop/lumina-desktop.1 new file mode 100644 index 00000000..4fa33371 --- /dev/null +++ b/src-qt5/core/lumina-desktop/lumina-desktop.1 @@ -0,0 +1,61 @@ +.Dd March 29, 2017 +.Dt LUMINA-DESKTOP 1 +.Os Lumina Desktop Environment +.\"------------------------------------------------------------------- +.Sh NAME +.Nm lumina-desktop +.Nd Binary used to run or communicate with the desktop. +.\"------------------------------------------------------------------- +.Sh SYNOPSIS +.Cm lumina-desktop +.Pp +.Cm lumina-desktop --check-geoms +.Pp +.Cm lumina-desktop --version +.\"------------------------------------------------------------------- +.Sh DESCRIPTION +The +.Nm +utility starts or communicates with instances of the Lumina desktop. +NOTE: The start-lumina-desktop command is recommended over +.Nm +, refer to the SEE ALSO section. +.Pp +Here are the +.Nm +options: +.Pp +.Bl -tag -width indent +.It Fl -check-geoms +Prompts the desktop to verify and/or match current monitor settings. +.It Fl -version +Returns the currently installed version of Lumina. +.El +.\"------------------------------------------------------------------- +.Sh EXAMPLES +.Bl -tag -width indent +.Pp +.It lumina-desktop --version +"1.2.1" (User's installed version of Lumina.) +.El +.\"------------------------------------------------------------------- +.Sh FILES +.Bl -tag -width indent +.It Pa /usr/local/bin/lumina-desktop +Binary location. +.It Pa /usr/local/share/lumina-desktop/ +Master directory containing sub-directories and auxiliary files +related to the Lumina runtime. +.It Pa ${XDG_CONFIG_HOME}/lumina-desktop/ +Directory containing the user's configuration files. See +https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html +for more information about the environment variable. +.El +.\"------------------------------------------------------------------- +.Sh SEE ALSO +.Xr lumina-open.1, +.Xr start-lumina-desktop.8 +.\"------------------------------------------------------------------- +.Sh AUTHOR +.An Tim Moore +.Aq timmoore88@gmail.com diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.8 b/src-qt5/core/lumina-desktop/lumina-desktop.8 deleted file mode 100644 index f86d3044..00000000 --- a/src-qt5/core/lumina-desktop/lumina-desktop.8 +++ /dev/null @@ -1,61 +0,0 @@ -.Dd March 29, 2017 -.Dt LUMINA-DESKTOP 8 -.Os Lumina Desktop Environment -.\"------------------------------------------------------------------- -.Sh NAME -.Nm lumina-desktop -.Nd Binary used to run or communicate with the desktop. -.\"------------------------------------------------------------------- -.Sh SYNOPSIS -.Cm lumina-desktop -.Pp -.Cm lumina-desktop --check-geoms -.Pp -.Cm lumina-desktop --version -.\"------------------------------------------------------------------- -.Sh DESCRIPTION -The -.Nm -utility starts or communicates with instances of the Lumina desktop. -NOTE: The start-lumina-desktop command is recommended over -.Nm -, refer to the SEE ALSO section. -.Pp -Here are the -.Nm -options: -.Pp -.Bl -tag -width indent -.It Fl -check-geoms -Prompts the desktop to verify and/or match current monitor settings. -.It Fl -version -Returns the currently installed version of Lumina. -.El -.\"------------------------------------------------------------------- -.Sh EXAMPLES -.Bl -tag -width indent -.Pp -.It lumina-desktop --version -"1.2.1" (User's installed version of Lumina.) -.El -.\"------------------------------------------------------------------- -.Sh FILES -.Bl -tag -width indent -.It Pa /usr/local/bin/lumina-desktop -Binary location. -.It Pa /usr/local/share/lumina-desktop/ -Master directory containing sub-directories and auxiliary files -related to the Lumina runtime. -.It Pa ${XDG_CONFIG_HOME}/lumina-desktop/ -Directory containing the user's configuration files. See -https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html -for more information about the environment variable. -.El -.\"------------------------------------------------------------------- -.Sh SEE ALSO -.Xr lumina-open.1, -.Xr start-lumina-desktop.8 -.\"------------------------------------------------------------------- -.Sh AUTHOR -.An Tim Moore -.Aq timmoore88@gmail.com diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index f7fead13..82da892c 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -172,8 +172,8 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ -manpage.path=$${L_MANDIR}/man8/ -manpage.extra="$${MAN_ZIP} lumina-desktop.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/lumina-desktop.8.gz" +manpage.path=$${L_MANDIR}/man1/ +manpage.extra="$${MAN_ZIP} lumina-desktop.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-desktop.1.gz" INSTALLS += target desktop icons defaults conf fluxconf manpage diff --git a/src-qt5/core/lumina-info/lumina-info.1 b/src-qt5/core/lumina-info/lumina-info.1 new file mode 100644 index 00000000..b2dec23a --- /dev/null +++ b/src-qt5/core/lumina-info/lumina-info.1 @@ -0,0 +1,26 @@ +.Dd November 7, 2017 +.Dt LUMINA-INFO 1 +.Os 1.3.3 + +.Sh NAME +.Nm lumina-info +.Nd view information about the current desktop. + +.Sh SYNOPSIS +.Nm + +.Sh DESCRIPTION +.Nm +opens a graphical interface about: general information, license +information, and acknowledgements. +General information includes: desktop version, OS build, and an option +to view the Qt version. + +.Sh FILES +.Bl -tag -width indent +.It Pa /usr/local/bin/lumina-info +.El + +.Sh AUTHORS +.An Aaron St. John and Tim Moore +.Aq aaron@ixsystems.com diff --git a/src-qt5/core/lumina-info/lumina-info.8 b/src-qt5/core/lumina-info/lumina-info.8 deleted file mode 100644 index 81f0b90a..00000000 --- a/src-qt5/core/lumina-info/lumina-info.8 +++ /dev/null @@ -1,26 +0,0 @@ -.Dd November 7, 2017 -.Dt LUMINA-INFO 8 -.Os 1.3.3 - -.Sh NAME -.Nm lumina-info -.Nd view information about the current desktop. - -.Sh SYNOPSIS -.Nm - -.Sh DESCRIPTION -.Nm -opens a graphical interface about: general information, license -information, and acknowledgements. -General information includes: desktop version, OS build, and an option -to view the Qt version. - -.Sh FILES -.Bl -tag -width indent -.It Pa /usr/local/bin/lumina-info -.El - -.Sh AUTHORS -.An Aaron St. John and Tim Moore -.Aq aaron@ixsystems.com diff --git a/src-qt5/core/lumina-info/lumina-info.pro b/src-qt5/core/lumina-info/lumina-info.pro index c316b644..0c8693a0 100644 --- a/src-qt5/core/lumina-info/lumina-info.pro +++ b/src-qt5/core/lumina-info/lumina-info.pro @@ -97,8 +97,8 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO desktop.files=lumina-info.desktop lumina-support.desktop desktop.path=$${L_SHAREDIR}/applications/ -manpage.path=$${L_MANDIR}/man8/ -manpage.extra="$${MAN_ZIP} lumina-info.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/lumina-info.8.gz" +manpage.path=$${L_MANDIR}/man1/ +manpage.extra="$${MAN_ZIP} lumina-info.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-info.1.gz" INSTALLS += target desktop manpage diff --git a/src-qt5/core/lumina-open/lumina-open.1 b/src-qt5/core/lumina-open/lumina-open.1 new file mode 100644 index 00000000..582ad2ee --- /dev/null +++ b/src-qt5/core/lumina-open/lumina-open.1 @@ -0,0 +1,104 @@ +.Dd November 7, 2017 +.Dt LUMINA-OPEN 1 +.Os 1.3.3 + +.Sh NAME +.Nm lumina-open +.Nd a graphical front-end to xdg-open. +Opens files or links with the proper application. + +.Sh SYNOPSIS +.Nm +.Pp +.Nm +.Op Fl select | action No +.Op Ar FILE_PATH | URL +.Pp +.Nm +.Op Fl volumeup | volumedown | brightnessup | brightnessdown | \ + autostart-apps | terminal + +.Sh DESCRIPTION +Given a file with an absolute pathway or URL, the +.Nm +utility finds the appropriate application to open the file. +If the file is a *.desktop application shortcut, +.Nm +starts the application automatically. +.Nm +can also perform specific system operations. +Here are all flags and descriptions: +.Pp +.Bl -tag -width indent +.It Ic lumina-open +Displays the description and usage for lumina-open. +.It Nm Fl select +Bypasses any default application settings to display the application +selector window. +.It Nm Fl action\ \fIActionID\fR +Runs the specified ActionID that is listed in a .desktop registration +file rather than the main command. +.It Nm Fl volumeup +Increase system audio volume by 5%. +.It Nm Fl volumedown +Decrease system audio volume by 5%. +.It Nm Fl brightnessup +Increase screen brightness by 5%. +.It Nm Fl brightnessdown +Decrease screen brightness by 5%. +.It Nm Fl autostart-apps +Launches all applications registered with the XDG autostart application. +Typically run by the desktop instead of manually launched. +.It Nm Fl terminal +Open the default terminal. +.El + +.Sh EXAMPLES +.Bl -tag -width indent +.It lumina-open sample.txt +.Nm +finds the default program for .txt files and opens sample.txt with +the appropriate application. +.It lumina-open ~/Documents +.Nm +launches the default file manager pointed to the current Documents +directory. +.It lumina-open http://lumina-desktop.org +Launches the default web browser pointed to the Lumina website. +.El + +.Sh FILES +.Bl -tag -width indent +.It Pa %{XDG_CONFIG_HOME}/mimeapps.list +Default file that saves mimetype to application associations. +.It Pa %{XDG_CONFIG_HOME}/${XDG_CURRENT_DESKTOP}-mimeapps.list +Default file that saves mimetype to application associations for the +current desktop session. +This file is used before the generic associations file. +.El + +.Sh SEE ALSO +.Xr XDG-OPEN(1) + +.Sh REFERENCES +For .desktop entry specifications and formatting, refer to these +websites: +.Bl -tag -width indent +.Pp +.Cm https://specifications.freedesktop.org/desktop-entry-spec/latest/ +.Pp +Specifications for .desktop files. +.Pp +.Cm https://specifications.freedesktop.org/mime-apps-spec/latest/ +.Pp +Details how default applications are registered. +.Pp +.Cm https://specifications.freedesktop.org/autostart-spec/latest/ +.Pp +Used in the -autostart-apps action. +Determines which applications are automatically started. +.El + +.Sh AUTHORS +.An Tim Moore and Aaron St. John +.Aq timmoore88@gmail.com diff --git a/src-qt5/core/lumina-open/lumina-open.8 b/src-qt5/core/lumina-open/lumina-open.8 deleted file mode 100644 index 582ad2ee..00000000 --- a/src-qt5/core/lumina-open/lumina-open.8 +++ /dev/null @@ -1,104 +0,0 @@ -.Dd November 7, 2017 -.Dt LUMINA-OPEN 1 -.Os 1.3.3 - -.Sh NAME -.Nm lumina-open -.Nd a graphical front-end to xdg-open. -Opens files or links with the proper application. - -.Sh SYNOPSIS -.Nm -.Pp -.Nm -.Op Fl select | action No -.Op Ar FILE_PATH | URL -.Pp -.Nm -.Op Fl volumeup | volumedown | brightnessup | brightnessdown | \ - autostart-apps | terminal - -.Sh DESCRIPTION -Given a file with an absolute pathway or URL, the -.Nm -utility finds the appropriate application to open the file. -If the file is a *.desktop application shortcut, -.Nm -starts the application automatically. -.Nm -can also perform specific system operations. -Here are all flags and descriptions: -.Pp -.Bl -tag -width indent -.It Ic lumina-open -Displays the description and usage for lumina-open. -.It Nm Fl select -Bypasses any default application settings to display the application -selector window. -.It Nm Fl action\ \fIActionID\fR -Runs the specified ActionID that is listed in a .desktop registration -file rather than the main command. -.It Nm Fl volumeup -Increase system audio volume by 5%. -.It Nm Fl volumedown -Decrease system audio volume by 5%. -.It Nm Fl brightnessup -Increase screen brightness by 5%. -.It Nm Fl brightnessdown -Decrease screen brightness by 5%. -.It Nm Fl autostart-apps -Launches all applications registered with the XDG autostart application. -Typically run by the desktop instead of manually launched. -.It Nm Fl terminal -Open the default terminal. -.El - -.Sh EXAMPLES -.Bl -tag -width indent -.It lumina-open sample.txt -.Nm -finds the default program for .txt files and opens sample.txt with -the appropriate application. -.It lumina-open ~/Documents -.Nm -launches the default file manager pointed to the current Documents -directory. -.It lumina-open http://lumina-desktop.org -Launches the default web browser pointed to the Lumina website. -.El - -.Sh FILES -.Bl -tag -width indent -.It Pa %{XDG_CONFIG_HOME}/mimeapps.list -Default file that saves mimetype to application associations. -.It Pa %{XDG_CONFIG_HOME}/${XDG_CURRENT_DESKTOP}-mimeapps.list -Default file that saves mimetype to application associations for the -current desktop session. -This file is used before the generic associations file. -.El - -.Sh SEE ALSO -.Xr XDG-OPEN(1) - -.Sh REFERENCES -For .desktop entry specifications and formatting, refer to these -websites: -.Bl -tag -width indent -.Pp -.Cm https://specifications.freedesktop.org/desktop-entry-spec/latest/ -.Pp -Specifications for .desktop files. -.Pp -.Cm https://specifications.freedesktop.org/mime-apps-spec/latest/ -.Pp -Details how default applications are registered. -.Pp -.Cm https://specifications.freedesktop.org/autostart-spec/latest/ -.Pp -Used in the -autostart-apps action. -Determines which applications are automatically started. -.El - -.Sh AUTHORS -.An Tim Moore and Aaron St. John -.Aq timmoore88@gmail.com diff --git a/src-qt5/core/lumina-open/lumina-open.pro b/src-qt5/core/lumina-open/lumina-open.pro index 0e0d1e76..b31c7a0e 100644 --- a/src-qt5/core/lumina-open/lumina-open.pro +++ b/src-qt5/core/lumina-open/lumina-open.pro @@ -89,8 +89,8 @@ TRANSLATIONS = i18n/lumina-open_af.ts \ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ -manpage.path=$${L_MANDIR}/man8/ -manpage.extra="$${MAN_ZIP} lumina-open.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/lumina-open.8.gz" +manpage.path=$${L_MANDIR}/man1/ +manpage.extra="$${MAN_ZIP} lumina-open.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-open.1.gz" INSTALLS += target manpage -- cgit From 879fb958e17dffa76a99611b9f3b5b0a435f38ad Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 17:37:23 -0500 Subject: Add another layer of defaults to the wallpapers. If nothing is specified, try to load the PREFIX/share/wallpapers/lumina-nature directory. If that does not exist, it will use the original fallback of the defaultBackground.jpg file in the share directory. --- src-qt5/core/lumina-desktop/LDesktop.cpp | 2 +- src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 71b10bd5..a7ab1340 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -535,7 +535,7 @@ void LDesktop::UpdateBackground(){ //Get the list of background(s) to show QStringList bgL = settings->value(DPREFIX+"background/filelist-workspace-"+QString::number( LSession::handle()->XCB->CurrentWorkspace()), QStringList()).toStringList(); if(bgL.isEmpty()){ bgL = settings->value(DPREFIX+"background/filelist", QStringList()).toStringList(); } - + if(bgL.isEmpty()){ bgL << LOS::LuminaShare()+"../wallpapers/lumina-nature"; } //Use this entire directory by default if nothing specified //qDebug() << " - List:" << bgL << CBG; //Remove any invalid files for(int i=0; i #GENERAL SESSION SETTINGS -- cgit From e2f1670041738256beac9830c16afca20963baad Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 21 Nov 2017 09:01:47 -0500 Subject: Cleanup a little bit of lthemeengine 1. Ensure setting paths are converted to absolute paths before comparisons 2. Get rid of the buttonbox in mainwindow and replace it with a couple toolbuttons with icons (same functionality) --- .../src/lthemeengine/appearancepage.cpp | 4 ++ .../src/lthemeengine/mainwindow.cpp | 25 ++++++------ .../src/lthemeengine/mainwindow.h | 3 +- .../src/lthemeengine/mainwindow.ui | 45 ++++++++++++++++++++-- .../src/lthemeengine/qsspage.cpp | 7 ++++ 5 files changed, 67 insertions(+), 17 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp index 88bde228..98f9c865 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp @@ -195,6 +195,10 @@ void AppearancePage::readSettings(){ m_ui->styleComboBox->setCurrentText(style); m_ui->customPaletteButton->setChecked(settings.value("custom_palette", false).toBool()); QString colorSchemePath = settings.value("color_scheme_path").toString(); + if(colorSchemePath.contains("..") || colorSchemePath.contains("//") ){ + //Make this an absolute path for comparison later + colorSchemePath = QFileInfo(colorSchemePath).absoluteFilePath(); + } QDir("/").mkpath(lthemeengine::userColorSchemePath()); findColorSchemes( QStringList() << lthemeengine::userColorSchemePath() << lthemeengine::sharedColorSchemePath()); if(m_ui->colorSchemeComboBox->count() == 0){ diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp index 6db249fe..a82f8cc6 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.cpp @@ -32,6 +32,8 @@ MainWindow::MainWindow(QWidget *parent) : QWidget(parent), m_ui(new Ui::MainWind bgroup->addButton(m_ui->tool_page_deskstyles, m_ui->stackedWidget->addWidget(new QSSPage(this, true))); bgroup->addButton(m_ui->tool_page_cursors, m_ui->stackedWidget->addWidget(new CursorThemePage(this)) ); connect(bgroup, SIGNAL(buttonClicked(int)), m_ui->stackedWidget, SLOT(setCurrentIndex(int)) ); + connect(m_ui->push_close, SIGNAL(clicked()), this, SLOT(closeWindow()) ); + connect(m_ui->push_apply, SIGNAL(clicked()), this, SLOT(applyWindow()) ); QTimer::singleShot(10, m_ui->tool_page_general, SLOT(toggle())); QSettings settings(lthemeengine::configFile(), QSettings::IniFormat); @@ -39,6 +41,7 @@ MainWindow::MainWindow(QWidget *parent) : QWidget(parent), m_ui(new Ui::MainWind setWindowIcon(QIcon::fromTheme("preferences-desktop-theme")); this->setWindowTitle(tr("Theme Settings")); m_ui->versionLabel->setText(tr("Version: %1").arg(LDesktopUtils::LuminaDesktopVersion())); + //m_ui->buttonBox->set } MainWindow::~MainWindow(){ @@ -50,16 +53,14 @@ void MainWindow::closeEvent(QCloseEvent *){ settings.setValue("SettingsWindow/geometry", saveGeometry()); } -void MainWindow::on_buttonBox_clicked(QAbstractButton *button){ - int id = m_ui->buttonBox->standardButton(button); - if(id == QDialogButtonBox::Ok || id == QDialogButtonBox::Apply){ - for(int i = 0; i < m_ui->stackedWidget->count(); ++i){ - TabPage *p = qobject_cast(m_ui->stackedWidget->widget(i)); - if(p) { p->writeSettings(); } - } - } - if(id == QDialogButtonBox::Ok || id == QDialogButtonBox::Cancel || id== QDialogButtonBox::Close){ - close(); - qApp->quit(); - } +void MainWindow::closeWindow(){ + close(); + QApplication::quit(); +} + +void MainWindow::applyWindow(){ + for(int i = 0; i < m_ui->stackedWidget->count(); ++i){ + TabPage *p = qobject_cast(m_ui->stackedWidget->widget(i)); + if(p) { p->writeSettings(); } + } } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h index 56ff1c98..333bc1fd 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.h @@ -19,7 +19,8 @@ public: ~MainWindow(); private slots: - void on_buttonBox_clicked(QAbstractButton *button); + void closeWindow(); + void applyWindow(); private: void closeEvent(QCloseEvent *); diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui index 0dc3245d..c60eb870 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/mainwindow.ui @@ -7,7 +7,7 @@ 0 0 672 - 723 + 747 @@ -285,15 +285,52 @@ Styles + + + 0 + 0 + + ... - - - QDialogButtonBox::Apply|QDialogButtonBox::Close + + + + 0 + 0 + + + + Close + + + + + + Qt::ToolButtonTextBesideIcon + + + + + + + + 0 + 0 + + + + Apply + + + + + + Qt::ToolButtonTextBesideIcon diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp index 6377016c..3140c553 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp @@ -224,7 +224,14 @@ void QSSPage::readSettings(){ QStringList styleSheets; if(desktop_qss){ styleSheets = settings.value("Interface/desktop_stylesheets").toStringList(); } else{ styleSheets = settings.value("Interface/stylesheets").toStringList(); } + for(int i=0; i Date: Tue, 21 Nov 2017 09:25:18 -0500 Subject: Make sure the window list get updated *as soon as* the workspace changes. --- src-qt5/core/lumina-desktop/LXcbEventFilter.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp index d5098a40..16689c76 100644 --- a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp +++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp @@ -50,6 +50,7 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_CURRENT_DESKTOP) )){ //qDebug() << "Got Workspace Change"; session->emit WorkspaceChanged(); + session->WindowPropertyEvent(); //make sure we update the lists again - some windows are now hidden }else if( SysNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){ //Update the status/list of all running windows session->WindowPropertyEvent(); -- cgit From a881c51e7b20f086b6b8b546c116d38478f87840 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 21 Nov 2017 11:21:47 -0500 Subject: Quick adjustment for the finding of icons. Only use the fallback icon *after* the more expansive routine also fails. --- src-qt5/core/libLumina/LuminaXDG.cpp | 2 +- .../core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index b4954a26..1933ba93 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -853,7 +853,7 @@ QIcon LXDG::findIcon(QString iconName, QString fallback){ QIcon tmp; if(!iconName.contains("libreoffice")){ //libreoffice is stupid - their svg icons are un-renderable with Qt tmp = QIcon::fromTheme(iconName); - if(tmp.isNull()){ tmp = QIcon::fromTheme(fallback); } + //if(tmp.isNull()){ tmp = QIcon::fromTheme(fallback); } } if(!tmp.isNull()){ return tmp; } //found one in the theme diff --git a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp index 1fd819b5..98770f18 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/applauncher/AppLaunchButton.cpp @@ -16,7 +16,7 @@ AppLaunchButtonPlugin::AppLaunchButtonPlugin(QWidget *parent, QString id, bool h button->setAutoRaise(true); button->setToolButtonStyle(Qt::ToolButtonIconOnly); appfile = id.section("---",0,0).section("::",1,1); - if(!QFile::exists(appfile) && appfile.endsWith(".desktop")){ + if(!QFile::exists(appfile) && appfile.endsWith(".desktop")){ //might be a relative path - try to find the file appfile = LUtils::AppToAbsolute(appfile.section("/",-1) ); } -- cgit From 1648b9e726d4878cf904e343271ad7e6179b60ae Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 22 Nov 2017 07:18:55 -0500 Subject: Update README.md Quick fix of the minimum Qt version for lumina-core --- src-qt5/core/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/README.md b/src-qt5/core/README.md index 6ed23f78..83d8b0b5 100644 --- a/src-qt5/core/README.md +++ b/src-qt5/core/README.md @@ -17,7 +17,7 @@ Other Files that get installed if "core" is built directly: ### Library Dependencies -1. Qt 5.2+ (specific modules listed below) +1. Qt 5.4+ (specific modules listed below) * concurrent * core * gui -- cgit From 23235740f9ea3ac85ea32fc183ac1f6707573578 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 22 Nov 2017 10:49:20 -0500 Subject: Fix the TrueOS update detection flag location. --- src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index 78fe5028..dc7de37f 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -248,7 +248,7 @@ bool LOS::systemPerformingUpdates(){ //Return the details of any updates which are waiting to apply on shutdown QString LOS::systemPendingUpdates(){ - if(QFile::exists("/tmp/.rebootRequired")){ return LUtils::readFile("/tmp/.rebootRequired").join("\n"); } + if(QFile::exists("/tmp/.trueos-update-staged")){ return LUtils::readFile("/tmp/.trueos-update-staged").join("\n"); } else{ return ""; } } @@ -260,7 +260,7 @@ void LOS::systemShutdown(bool skipupdates){ //start poweroff sequence //System Restart void LOS::systemRestart(bool skipupdates){ //start reboot sequence - bool activeupdates = !LUtils::readFile("/etc/defaults/vendor.conf").filter("trueos_active_update=\"YES\"").isEmpty(); + bool activeupdates = (LUtils::getCmdOutput("sysrc -n trueos_active_update").join("").simplified()=="YES"); if(skipupdates){ QProcess::startDetached("shutdown -ro now"); }else{ -- cgit From 0f2302e6e527d951776386b585901443249f6ead Mon Sep 17 00:00:00 2001 From: Andreas Müller Date: Thu, 23 Nov 2017 17:22:58 +0100 Subject: lumina-desktop.pro: fix out of tree installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: | cp: cannot stat 'defaults/desktop-background.jpg': No such file or directory Signed-off-by: Andreas Müller --- src-qt5/core/lumina-desktop/lumina-desktop.pro | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 82da892c..9c8272c8 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -92,17 +92,17 @@ conf.path = $${L_ETCDIR} message("Installing defaults settings for OS: $${DEFAULT_SETTINGS}") OS=$${DEFAULT_SETTINGS} } -exists("defaults/luminaDesktop-$${OS}.conf"){ +exists("$$PWD/defaults/luminaDesktop-$${OS}.conf"){ message(" -- Found OS-specific system config file: $${OS}"); - conf.extra = cp defaults/luminaDesktop-$${OS}.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist + conf.extra = cp $$PWD/defaults/luminaDesktop-$${OS}.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist }else{ - conf.extra = cp defaults/luminaDesktop.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist + conf.extra = cp $$PWD/defaults/luminaDesktop.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist } -exists("defaults/desktop-background-$${OS}.jpg"){ +exists("$$PWD/defaults/desktop-background-$${OS}.jpg"){ message(" -- Found OS-specific background image: $${OS}"); - defaults.extra = cp defaults/desktop-background-$${OS}.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg + defaults.extra = cp $$PWD/defaults/desktop-background-$${OS}.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg }else{ - defaults.extra = cp defaults/desktop-background.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg + defaults.extra = cp $$PWD/defaults/desktop-background.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg } TRANSLATIONS = i18n/lumina-desktop_af.ts \ -- cgit From a00b2a73d918c80645a51a57a1cb40c3ff3f09e1 Mon Sep 17 00:00:00 2001 From: Andreas Müller Date: Mon, 27 Nov 2017 17:18:29 +0100 Subject: manpages: fix out of tree install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes e.g: | gzip: lumina-info.1: No such file or directory Signed-off-by: Andreas Müller --- src-qt5/core/lumina-desktop/lumina-desktop.pro | 2 +- src-qt5/core/lumina-info/lumina-info.pro | 2 +- src-qt5/core/lumina-open/lumina-open.pro | 2 +- src-qt5/core/lumina-session/lumina-session.pro | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 9c8272c8..5e4beb3b 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -173,7 +173,7 @@ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ manpage.path=$${L_MANDIR}/man1/ -manpage.extra="$${MAN_ZIP} lumina-desktop.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-desktop.1.gz" +manpage.extra="$${MAN_ZIP} $$PWD/lumina-desktop.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-desktop.1.gz" INSTALLS += target desktop icons defaults conf fluxconf manpage diff --git a/src-qt5/core/lumina-info/lumina-info.pro b/src-qt5/core/lumina-info/lumina-info.pro index 0c8693a0..0a7d2dd4 100644 --- a/src-qt5/core/lumina-info/lumina-info.pro +++ b/src-qt5/core/lumina-info/lumina-info.pro @@ -98,7 +98,7 @@ desktop.files=lumina-info.desktop lumina-support.desktop desktop.path=$${L_SHAREDIR}/applications/ manpage.path=$${L_MANDIR}/man1/ -manpage.extra="$${MAN_ZIP} lumina-info.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-info.1.gz" +manpage.extra="$${MAN_ZIP} $$PWD/lumina-info.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-info.1.gz" INSTALLS += target desktop manpage diff --git a/src-qt5/core/lumina-open/lumina-open.pro b/src-qt5/core/lumina-open/lumina-open.pro index b31c7a0e..eba3f716 100644 --- a/src-qt5/core/lumina-open/lumina-open.pro +++ b/src-qt5/core/lumina-open/lumina-open.pro @@ -90,7 +90,7 @@ dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ manpage.path=$${L_MANDIR}/man1/ -manpage.extra="$${MAN_ZIP} lumina-open.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-open.1.gz" +manpage.extra="$${MAN_ZIP} $$PWD/lumina-open.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-open.1.gz" INSTALLS += target manpage diff --git a/src-qt5/core/lumina-session/lumina-session.pro b/src-qt5/core/lumina-session/lumina-session.pro index 797547db..9d8e8f87 100644 --- a/src-qt5/core/lumina-session/lumina-session.pro +++ b/src-qt5/core/lumina-session/lumina-session.pro @@ -16,6 +16,6 @@ SOURCES += main.cpp \ HEADERS += session.h manpage.path=$${L_MANDIR}/man8/ -manpage.extra="$${MAN_ZIP} start-lumina-desktop.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/start-lumina-desktop.8.gz" +manpage.extra="$${MAN_ZIP} $$PWD/start-lumina-desktop.8 > $(INSTALL_ROOT)$${L_MANDIR}/man8/start-lumina-desktop.8.gz" INSTALLS += target manpage -- cgit From d574947799c0a38b88a05387e04e1cf98c06fa89 Mon Sep 17 00:00:00 2001 From: Andreas Müller Date: Mon, 27 Nov 2017 17:37:59 +0100 Subject: i18n: fix out of tree build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes e.g: | /bin/sh: line 0: cd: i18n: No such file or directory | Makefile:955: recipe for target 'install_dotrans' failed | make[3]: *** [install_dotrans] Error 1 Signed-off-by: Andreas Müller --- src-qt5/core/lumina-desktop-unified/lumina-desktop.pro | 2 +- src-qt5/core/lumina-desktop/lumina-desktop.pro | 2 +- src-qt5/core/lumina-info/lumina-info.pro | 2 +- src-qt5/core/lumina-open/lumina-open.pro | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro index 21e46b22..ebc13b6f 100644 --- a/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop-unified/lumina-desktop.pro @@ -124,7 +124,7 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \ i18n/lumina-desktop_zu.ts dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ -dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ +dotrans.extra=cd $$PWD/i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ INSTALLS += target desktop defaults extrafiles diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 5e4beb3b..e36d11a2 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -170,7 +170,7 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \ i18n/lumina-desktop_zu.ts dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ -dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ +dotrans.extra=cd $$PWD/i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ manpage.path=$${L_MANDIR}/man1/ manpage.extra="$${MAN_ZIP} $$PWD/lumina-desktop.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-desktop.1.gz" diff --git a/src-qt5/core/lumina-info/lumina-info.pro b/src-qt5/core/lumina-info/lumina-info.pro index 0a7d2dd4..dc07c08e 100644 --- a/src-qt5/core/lumina-info/lumina-info.pro +++ b/src-qt5/core/lumina-info/lumina-info.pro @@ -92,7 +92,7 @@ TRANSLATIONS = i18n/lumina-info_af.ts \ i18n/lumina-info_zu.ts dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ -dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ +dotrans.extra=cd $$PWD/i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ desktop.files=lumina-info.desktop lumina-support.desktop desktop.path=$${L_SHAREDIR}/applications/ diff --git a/src-qt5/core/lumina-open/lumina-open.pro b/src-qt5/core/lumina-open/lumina-open.pro index eba3f716..3bc7e9bf 100644 --- a/src-qt5/core/lumina-open/lumina-open.pro +++ b/src-qt5/core/lumina-open/lumina-open.pro @@ -87,7 +87,7 @@ TRANSLATIONS = i18n/lumina-open_af.ts \ i18n/lumina-open_zu.ts dotrans.path=$${L_SHAREDIR}/lumina-desktop/i18n/ -dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ +dotrans.extra=cd $$PWD/i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/i18n/ manpage.path=$${L_MANDIR}/man1/ manpage.extra="$${MAN_ZIP} $$PWD/lumina-open.1 > $(INSTALL_ROOT)$${L_MANDIR}/man1/lumina-open.1.gz" -- cgit From 382406869d7e8180d9131b5886a9d06ffbc65320 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 4 Dec 2017 10:17:53 -0500 Subject: Fix up the battery notification system. --- src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp index 7a6b0e7c..69ea5faa 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/battery/LBattery.cpp @@ -77,6 +77,7 @@ void LBattery::updateBattery(bool force){ label->setPixmap( LXDG::findIcon("battery-unknown", "battery-missing").pixmap(label->size()) ); break; } + } if(iconvalue("PlayBatteryLowAudio",true).toBool(); @@ -97,7 +98,6 @@ void LBattery::updateBattery(bool force){ else{ tt = QString( tr("%1 % (%2 Remaining)") ).arg(QString::number(charge), getRemainingTime() ); } label->setToolTip(tt); } -} QString LBattery::getRemainingTime(){ int secs = LOS::batterySecondsLeft(); -- cgit From 79ccca2b82f7a91c68e09ec7eae17a0ca283d0b7 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 4 Dec 2017 11:25:33 -0500 Subject: Add the option to use stdout as an option for ExternalProcess. --- src-qt5/core/libLumina/ExternalProcess.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/ExternalProcess.h b/src-qt5/core/libLumina/ExternalProcess.h index 2a6f4949..38994931 100644 --- a/src-qt5/core/libLumina/ExternalProcess.h +++ b/src-qt5/core/libLumina/ExternalProcess.h @@ -21,6 +21,7 @@ class ExternalProcess : public QProcess{ Q_OBJECT private: bool cursorRestored; + QString logoutput; private slots: void resetCursor(){ @@ -46,6 +47,9 @@ private slots: //Clean up this object this->deleteLater(); } + void updateLog(){ + logoutput.append( QString(this->readAllStandardOutput()) ); + } public: ExternalProcess(QString logfile = "", bool manageCursors = false) : QProcess(){ @@ -53,6 +57,8 @@ public: cursorRestored = !manageCursors; if(logfile.isEmpty()){ this->setStandardOutputFile(QProcess::nullDevice()); + }else if(logfile=="stdout"){ + connect(this, SIGNAL(readyReadStandardOutput()), this, SLOT(updateLog()); }else{ this->setStandardOutputFile(logfile); } @@ -67,6 +73,11 @@ public: }*/ } + QString log(){ + //NOTE: This will only contain output if the "stdout" argument is used as the logfile + return logoutput; + } + static void launch(QString program, QStringList args = QStringList(), bool manageCursors = true){ //Quick launch of a process with logging disabled and automatic cleanup ExternalProcess *tmp = new ExternalProcess("", manageCursors); -- cgit From b77d83a4af22efe58dc5606495592c1b167f0107 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 4 Dec 2017 11:48:09 -0500 Subject: Oops - fix a typo in the ExternalProcess change. --- src-qt5/core/libLumina/ExternalProcess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/ExternalProcess.h b/src-qt5/core/libLumina/ExternalProcess.h index 38994931..e75d6108 100644 --- a/src-qt5/core/libLumina/ExternalProcess.h +++ b/src-qt5/core/libLumina/ExternalProcess.h @@ -58,7 +58,7 @@ public: if(logfile.isEmpty()){ this->setStandardOutputFile(QProcess::nullDevice()); }else if(logfile=="stdout"){ - connect(this, SIGNAL(readyReadStandardOutput()), this, SLOT(updateLog()); + connect(this, SIGNAL(readyReadStandardOutput()), this, SLOT(updateLog()) ); }else{ this->setStandardOutputFile(logfile); } -- cgit From 4a5d95cb039989dc99677ce1b1203d909117e323 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Fri, 1 Dec 2017 19:07:33 -0500 Subject: Preliminary ATOM parsing for the RSS reader --- .../desktop-plugins/rssreader/RSSObjects.cpp | 51 +++++++++++++++++++++- .../desktop-plugins/rssreader/RSSObjects.h | 2 + 2 files changed, 51 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp index cd29d5f0..dab8e596 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp @@ -116,18 +116,26 @@ RSSchannel RSSReader::readRSS(QByteArray bytes){ RSSchannel rssinfo; //qDebug() << "Can Read XML Stream:" << !xml.hasError(); if(xml.readNextStartElement()){ - //qDebug() << " - RSS Element:" << xml.name(); - if(xml.name() == "rss" && (xml.attributes().value("version") =="2.0" || xml.attributes().value("version") =="0.91") ){ + qDebug() << " - RSS Element:" << xml.name(); + if(xml.name() == "rss" && (xml.attributes().value("version") =="2.0" || xml.attributes().value("version") =="0.91")) { while(xml.readNextStartElement()){ //qDebug() << " - RSS Element:" << xml.name(); if(xml.name()=="channel"){ rssinfo = readRSSChannel(&xml); } else{ xml.skipCurrentElement(); } } + }else if(xml.name() == "feed") { + qDebug() << "starting feed"; + while(xml.readNextStartElement()){ + qDebug() << " - ATOM Element:" << xml.name(); + if(xml.name()=="entry"){ rssinfo = readRSSChannel(&xml); } + else{ xml.skipCurrentElement(); } + } } } if(xml.hasError()){ qDebug() << " - XML Read Error:" << xml.errorString() << "\n" << bytes; } return rssinfo; } + RSSchannel RSSReader::readRSSChannel(QXmlStreamReader *rss){ RSSchannel info; info.timetolive = -1; @@ -151,6 +159,45 @@ RSSchannel RSSReader::readRSSChannel(QXmlStreamReader *rss){ return info; } +RSSchannel RSSReader::readRSSChannelAtom(QXmlStreamReader *rss){ + RSSchannel info; + info.timetolive = -1; + while(rss->readNextStartElement()){ + qDebug() << " - RSS Element (channel):" <name(); + if(rss->name()=="entry"){ info.items << readRSSItemAtom(rss); } + else if(rss->name()=="title"){ info.title = rss->readElementText(); } + else if(rss->name()=="link"){ + QString txt = rss->readElementText(); + if(!txt.isEmpty()){ info.link = txt; } + } + else if(rss->name()=="subtitle"){ info.description = rss->readElementText(); } + else if(rss->name()=="updated"){ info.lastBuildDate = RSSDateTime(rss->readElementText()); } + else{ rss->skipCurrentElement(); } + } + return info; +} + +RSSitem RSSReader::readRSSItemAtom(QXmlStreamReader *rss){ + RSSitem item; + while(rss->readNextStartElement()){ + qDebug() << " - RSS Element (Item):" << rss->name(); + if(rss->name()=="title"){ item.title = rss->readElementText(); } + else if(rss->name()=="link"){ item.link = rss->readElementText(); } + else if(rss->name()=="summary"){ item.description = rss->readElementText(); } + else if(rss->name()=="comments"){ item.comments_url = rss->readElementText(); } + else if(rss->name()=="author"){ + //Special handling - this field can contain both email and name + rss->skipCurrentElement(); + item.author = rss->readElementText(); + qDebug() << item.author; + rss->skipCurrentElement(); + } + else if(rss->name()=="updated"){ item.pubdate = RSSDateTime(rss->readElementText()); } + else{ rss->skipCurrentElement(); } + } + return item; +} + RSSitem RSSReader::readRSSItem(QXmlStreamReader *rss){ RSSitem item; while(rss->readNextStartElement()){ diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.h b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.h index 3069bf8d..eb37dab3 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.h +++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.h @@ -88,7 +88,9 @@ private: //RSS parsing functions RSSchannel readRSS(QByteArray bytes); RSSchannel readRSSChannel(QXmlStreamReader *rss); + RSSchannel readRSSChannelAtom(QXmlStreamReader *rss); RSSitem readRSSItem(QXmlStreamReader *rss); + RSSitem readRSSItemAtom(QXmlStreamReader *rss); void readRSSImage(RSSchannel *item, QXmlStreamReader *rss); QDateTime RSSDateTime(QString datetime); -- cgit From b433ecf4b8a8667af5fc9df21c4d17c461875f3d Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 4 Dec 2017 18:22:45 -0500 Subject: Added the correct TrueOS RSS Feed --- src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp index dc7de37f..1ee8fb8a 100644 --- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp +++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp @@ -30,7 +30,7 @@ QString LOS::AppStoreShortcut(){ return "/usr/local/share/applications/appcafe.d QStringList LOS::RSSFeeds(){ QStringList feeds; feeds << "FreeBSD News Feed::::https://www.freebsd.org/news/rss.xml"; - feeds << "TrueOS News Feed::::http://www.trueos.org/?feed=rss2"; + feeds << "TrueOS News Feed::::http://www.trueos.org/feed/"; return feeds; } -- cgit From 6679414ee4e385e3f88aa1401cb24f8afe73b4c3 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 4 Dec 2017 19:18:26 -0500 Subject: Updated the RSS desktop plugin to work for ATOM feeds --- .../desktop-plugins/rssreader/RSSFeedPlugin.cpp | 6 +- .../desktop-plugins/rssreader/RSSObjects.cpp | 104 +++++++++++++-------- .../desktop-plugins/rssreader/RSSObjects.h | 4 +- 3 files changed, 70 insertions(+), 44 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSFeedPlugin.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSFeedPlugin.cpp index c330d6c0..e8e5adb4 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSFeedPlugin.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSFeedPlugin.cpp @@ -119,11 +119,13 @@ void RSSFeedPlugin::updateFeed(QString ID){ if(!data.items[i].author_email.isEmpty()){ html.append(""+data.items[i].author+""); } else{ html.append(data.items[i].author); } } - html.append(")
"); + html.append(")"); + if(data.rss) + html.append("
"); } html.append(data.items[i].description); //html.append("\n"); - if(i+1 < data.items.length()){ html.append("
"); } + if(i+1 < data.items.length() && data.rss){ html.append("
"); } } //html.append("\n"); // - load that html into the viewer diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp index dab8e596..a3fd056c 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp @@ -118,21 +118,44 @@ RSSchannel RSSReader::readRSS(QByteArray bytes){ if(xml.readNextStartElement()){ qDebug() << " - RSS Element:" << xml.name(); if(xml.name() == "rss" && (xml.attributes().value("version") =="2.0" || xml.attributes().value("version") =="0.91")) { + rssinfo.rss = true; while(xml.readNextStartElement()){ //qDebug() << " - RSS Element:" << xml.name(); if(xml.name()=="channel"){ rssinfo = readRSSChannel(&xml); } else{ xml.skipCurrentElement(); } } }else if(xml.name() == "feed") { - qDebug() << "starting feed"; + rssinfo.timetolive = -1; + rssinfo.rss = false; while(xml.readNextStartElement()){ - qDebug() << " - ATOM Element:" << xml.name(); - if(xml.name()=="entry"){ rssinfo = readRSSChannel(&xml); } - else{ xml.skipCurrentElement(); } + qDebug() << " - ATOM Element (channel):" << xml.name(); + if(xml.name()=="entry") { + rssinfo.items << readRSSItemAtom(&xml); + }else if(xml.name()=="title"){ + rssinfo.title = xml.readElementText(); + }else if(xml.name()=="link"){ + QXmlStreamAttributes att = xml.attributes(); + for(int i = 0; i < att.size(); i++) { + if(att[i].name() == "href") { + rssinfo.link = att[i].value().toString(); + } + } + xml.readElementText(); + }else if(xml.name()=="subtitle"){ + rssinfo.description = xml.readElementText(); + }else if(xml.name()=="updated"){ + rssinfo.lastBuildDate = ATOMDateTime(xml.readElementText()); + }else if(xml.name()=="icon"){ + rssinfo.icon_url = xml.readElementText(); + qDebug() << "icon" << rssinfo.icon_url; + requestRSS(rssinfo.icon_url); + }else{ + xml.skipCurrentElement(); + } } } } - if(xml.hasError()){ qDebug() << " - XML Read Error:" << xml.errorString() << "\n" << bytes; } + //if(xml.hasError()){ qDebug() << " - XML Read Error:" << xml.errorString() << "\n" << bytes; } return rssinfo; } @@ -159,41 +182,36 @@ RSSchannel RSSReader::readRSSChannel(QXmlStreamReader *rss){ return info; } -RSSchannel RSSReader::readRSSChannelAtom(QXmlStreamReader *rss){ - RSSchannel info; - info.timetolive = -1; - while(rss->readNextStartElement()){ - qDebug() << " - RSS Element (channel):" <name(); - if(rss->name()=="entry"){ info.items << readRSSItemAtom(rss); } - else if(rss->name()=="title"){ info.title = rss->readElementText(); } - else if(rss->name()=="link"){ - QString txt = rss->readElementText(); - if(!txt.isEmpty()){ info.link = txt; } - } - else if(rss->name()=="subtitle"){ info.description = rss->readElementText(); } - else if(rss->name()=="updated"){ info.lastBuildDate = RSSDateTime(rss->readElementText()); } - else{ rss->skipCurrentElement(); } - } - return info; -} - RSSitem RSSReader::readRSSItemAtom(QXmlStreamReader *rss){ RSSitem item; while(rss->readNextStartElement()){ - qDebug() << " - RSS Element (Item):" << rss->name(); - if(rss->name()=="title"){ item.title = rss->readElementText(); } - else if(rss->name()=="link"){ item.link = rss->readElementText(); } - else if(rss->name()=="summary"){ item.description = rss->readElementText(); } - else if(rss->name()=="comments"){ item.comments_url = rss->readElementText(); } - else if(rss->name()=="author"){ - //Special handling - this field can contain both email and name - rss->skipCurrentElement(); - item.author = rss->readElementText(); - qDebug() << item.author; - rss->skipCurrentElement(); - } - else if(rss->name()=="updated"){ item.pubdate = RSSDateTime(rss->readElementText()); } - else{ rss->skipCurrentElement(); } + if(rss->name()=="title"){ + item.title = rss->readElementText(); + qDebug() << rss->name() << item.title; + }else if(rss->name()=="link"){ + QXmlStreamAttributes att = rss->attributes(); + for(int i = 0; i < att.size(); i++) { + if(att[i].name() == "href") { + item.link = att[i].value().toString(); + } + } + rss->readElementText(); + qDebug() << rss->name() << item.link; + }else if(rss->name()=="summary"){ + item.description = rss->readElementText(); + qDebug() << rss->name() << item.description; + } else if(rss->name()=="comments"){ + item.comments_url = rss->readElementText(); + qDebug() << rss->name() << item.comments_url; + } else if(rss->name()=="author"){ + rss->readNextStartElement(); + item.author = rss->readElementText(); + qDebug() << "author" << item.author; + rss->skipCurrentElement(); + }else if(rss->name()=="updated"){ + item.pubdate = ATOMDateTime(rss->readElementText()); + qDebug() << rss->name() << item.pubdate; + } else{ rss->skipCurrentElement(); } } return item; } @@ -239,17 +257,21 @@ QDateTime RSSReader::RSSDateTime(QString datetime){ return QDateTime::fromString(datetime, Qt::RFC2822Date); } +QDateTime RSSReader::ATOMDateTime(QString datetime){ + return QDateTime::fromString(datetime, Qt::ISODate); +} + //================= // PRIVATE SLOTS //================= void RSSReader::replyFinished(QNetworkReply *reply){ QString url = reply->request().url().toString(); - //qDebug() << "Got Reply:" << url; + qDebug() << "Got Reply:" << url; QString key = keyForUrl(url); //current hash key for this URL QByteArray data = reply->readAll(); outstandingURLS.removeAll(url); if(data.isEmpty()){ - //qDebug() << "No data returned:" << url; + qDebug() << "No data returned:" << url; //see if the URL can be adjusted for known issues bool handled = false; QUrl redirecturl = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); @@ -276,13 +298,13 @@ void RSSReader::replyFinished(QNetworkReply *reply){ //Could also be an icon fetch response QStringList keys = hash.keys(); for(int i=0; i Date: Mon, 4 Dec 2017 19:19:59 -0500 Subject: Small updates to QML screensavers to take Screen size and further work on the Grav screensaver --- .../extrafiles/screensavers/qml_scripts/Grav.qml | 47 +++++++++++++--------- .../extrafiles/screensavers/qml_scripts/Video.qml | 6 +-- 2 files changed, 30 insertions(+), 23 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml index 7a3c33cd..d1e5d3c9 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Grav.qml @@ -4,11 +4,13 @@ import QtGraphicalEffects 1.0 Rectangle { id : canvas anchors.fill: parent - width: 800 - height: 600 + width: Screen.width + height: Screen.height color: "black" //TODO Add orbital trails option + //TODO Fix jitteryness and start position + //TODO Make orbits more extreme //Between 5 and 15 planets, read from settings property int planets: Math.round(( Math.random() * 10 ) + 5 ) @@ -30,6 +32,7 @@ Rectangle { property double a: Math.sqrt(b*b+c*c) //Random angle of rotation property double th: Math.random() * Math.PI + property var path: [] //Calculates starting position x: Math.round(cx + a * Math.cos(th)) @@ -45,34 +48,40 @@ Rectangle { //Give each planet a random color, semi-transparent color: Qt.rgba(Math.random(), Math.random(), Math.random(), 0.5) - Timer { + /*Timer { //Each planet updates between 1ms and 51ms (smaller times=faster) interval: Math.round(Math.random() * 50 ) + 1 repeat: true running: true - property bool starting: true property int time: 0 onTriggered: { - //Move a planet 80 pixels away from the sun if the planet is too close - if(starting) { - if(x > cx && Math.abs(cx-x) < 80) { - x+=80 - }else if(x < cx && Math.abs(cx-x) < 80) { - x-=80 - } - - if(y > cy && Math.abs(cy-y) < 80) { - y+=80 - }else if(y < cy && Math.abs(cy-y) < 80) { - y-=80 - } - starting = false; - } //Parametric equation that calculates the position of the general ellipse. Completes a loop ever 314 cycles. Credit to x = cx+a*Math.cos(2*Math.PI*(time/314.0))*Math.cos(th) - b*Math.sin(2*Math.PI*(time/314.0))*Math.sin(th) y = cy+a*Math.cos(2*Math.PI*(time/314.0))*Math.sin(th) + b*Math.sin(2*Math.PI*(time/314.0))*Math.cos(th) time++; + + //Move a planet 80 pixels away from the sun if the planet is too close + if(x > cx && Math.abs(cx-x) < 80) { + x+=80 + }else if(x < cx && Math.abs(cx-x) < 80) { + x-=80 + } + + if(y > cy && Math.abs(cy-y) < 80) { + y+=80 + }else if(y < cy && Math.abs(cy-y) < 80) { + y-=80 + } + } + }*/ + + Component.onCompleted: { + pahtX[0] = x + pahtY[0] = y + for(int i = 1; i <= 200; i++) { + pathX[i] = cx+a*Math.cos(2*Math.PI*(i/200.0)*Math.cos(th) - b*Math.sin(2*Math.PI*(i/200.0)*Math.sin(th) + pathY[i] = cy+a*Math.cos(2*Math.PI*(i/200.0)*Math.sin(th) + b*Math.sin(2*Math.PI*(i/200.0)*Math.cos(th) } } } diff --git a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml index e7d0626d..9948537b 100644 --- a/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml +++ b/src-qt5/core/lumina-desktop-unified/extrafiles/screensavers/qml_scripts/Video.qml @@ -4,10 +4,8 @@ import QtQuick.Window 2.2 import Qt.labs.folderlistmodel 2.1 Rectangle { - //width: Screen.width - //height: Screen.height - width: 800 - height: 600 + width: Screen.width + height: Screen.height color: "black" FolderListModel { -- cgit From c350bb3ad23e6bc946dbc35c2fd0d064758ede09 Mon Sep 17 00:00:00 2001 From: ZackaryWelch Date: Mon, 4 Dec 2017 19:35:48 -0500 Subject: Muted debug statements --- .../desktop-plugins/rssreader/RSSObjects.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp index a3fd056c..5f62f99f 100644 --- a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp +++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp @@ -10,6 +10,8 @@ #include "LSession.h" +#define DEBUG 0 + //============ // PUBLIC //============ @@ -116,7 +118,7 @@ RSSchannel RSSReader::readRSS(QByteArray bytes){ RSSchannel rssinfo; //qDebug() << "Can Read XML Stream:" << !xml.hasError(); if(xml.readNextStartElement()){ - qDebug() << " - RSS Element:" << xml.name(); + if(DEBUG) qDebug() << " - RSS Element:" << xml.name(); if(xml.name() == "rss" && (xml.attributes().value("version") =="2.0" || xml.attributes().value("version") =="0.91")) { rssinfo.rss = true; while(xml.readNextStartElement()){ @@ -128,11 +130,12 @@ RSSchannel RSSReader::readRSS(QByteArray bytes){ rssinfo.timetolive = -1; rssinfo.rss = false; while(xml.readNextStartElement()){ - qDebug() << " - ATOM Element (channel):" << xml.name(); + if(DEBUG) qDebug() << " - ATOM Element (channel):" << xml.name(); if(xml.name()=="entry") { rssinfo.items << readRSSItemAtom(&xml); }else if(xml.name()=="title"){ rssinfo.title = xml.readElementText(); + if(DEBUG) qDebug() << "title" << rssinfo.link; }else if(xml.name()=="link"){ QXmlStreamAttributes att = xml.attributes(); for(int i = 0; i < att.size(); i++) { @@ -141,13 +144,14 @@ RSSchannel RSSReader::readRSS(QByteArray bytes){ } } xml.readElementText(); + if(DEBUG) qDebug() << "link" << rssinfo.link; }else if(xml.name()=="subtitle"){ rssinfo.description = xml.readElementText(); }else if(xml.name()=="updated"){ rssinfo.lastBuildDate = ATOMDateTime(xml.readElementText()); }else if(xml.name()=="icon"){ rssinfo.icon_url = xml.readElementText(); - qDebug() << "icon" << rssinfo.icon_url; + if(DEBUG) qDebug() << "icon" << rssinfo.icon_url; requestRSS(rssinfo.icon_url); }else{ xml.skipCurrentElement(); @@ -187,7 +191,7 @@ RSSitem RSSReader::readRSSItemAtom(QXmlStreamReader *rss){ while(rss->readNextStartElement()){ if(rss->name()=="title"){ item.title = rss->readElementText(); - qDebug() << rss->name() << item.title; + if(DEBUG) qDebug() << rss->name() << item.title; }else if(rss->name()=="link"){ QXmlStreamAttributes att = rss->attributes(); for(int i = 0; i < att.size(); i++) { @@ -196,21 +200,21 @@ RSSitem RSSReader::readRSSItemAtom(QXmlStreamReader *rss){ } } rss->readElementText(); - qDebug() << rss->name() << item.link; + if(DEBUG) qDebug() << rss->name() << item.link; }else if(rss->name()=="summary"){ item.description = rss->readElementText(); - qDebug() << rss->name() << item.description; + if(DEBUG) qDebug() << rss->name() << item.description; } else if(rss->name()=="comments"){ item.comments_url = rss->readElementText(); - qDebug() << rss->name() << item.comments_url; + if(DEBUG) qDebug() << rss->name() << item.comments_url; } else if(rss->name()=="author"){ rss->readNextStartElement(); item.author = rss->readElementText(); - qDebug() << "author" << item.author; + if(DEBUG) qDebug() << "author" << item.author; rss->skipCurrentElement(); }else if(rss->name()=="updated"){ item.pubdate = ATOMDateTime(rss->readElementText()); - qDebug() << rss->name() << item.pubdate; + if(DEBUG) qDebug() << rss->name() << item.pubdate; } else{ rss->skipCurrentElement(); } } return item; -- cgit From e277e0d62ed039783f1e6dec1a921e7f0abaaa0b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 5 Dec 2017 08:00:27 -0500 Subject: Fix up the number->string conversion of UID in single application instance --- src-qt5/core/libLumina/LuminaSingleApplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaSingleApplication.cpp b/src-qt5/core/libLumina/LuminaSingleApplication.cpp index 5d276805..f328be36 100644 --- a/src-qt5/core/libLumina/LuminaSingleApplication.cpp +++ b/src-qt5/core/libLumina/LuminaSingleApplication.cpp @@ -11,7 +11,7 @@ #include #include -#include //for getlogin() +#include //for getuid() LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname) : QApplication(argc, argv){ //Load the proper translation systems @@ -19,7 +19,7 @@ LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname) if(appname!="lumina-desktop"){ cTrans = LUtils::LoadTranslation(this, appname); }//save the translator for later //Initialize a couple convenience internal variables cfile = QDir::tempPath()+"/.LSingleApp-%1-%2-%3"; - QString username = QString(getuid()); + QString username = QString::fromNumber(getuid()); //For locking the process use the official process name - not the user input (no masking) appname = this->applicationName(); cfile = cfile.arg( username, appname, QString::number(QX11Info::appScreen()) ); -- cgit From b99985a3d4aa953bd694228bc4b3fadbd158581c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 5 Dec 2017 15:54:11 -0500 Subject: Move the new OSInterface class over to the base-level src-cpp directory. Also get it all prepped/staged to be used by QML objects (not finished yet) --- src-qt5/core/libLumina/OSInterface-template.cpp | 100 ----------------- src-qt5/core/libLumina/OSInterface.h | 136 ------------------------ 2 files changed, 236 deletions(-) delete mode 100644 src-qt5/core/libLumina/OSInterface-template.cpp delete mode 100644 src-qt5/core/libLumina/OSInterface.h (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/OSInterface-template.cpp b/src-qt5/core/libLumina/OSInterface-template.cpp deleted file mode 100644 index 96b01e60..00000000 --- a/src-qt5/core/libLumina/OSInterface-template.cpp +++ /dev/null @@ -1,100 +0,0 @@ -//=========================================== -// Lumina desktop source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -#include - -//=========== -// PUBLIC -//=========== - -//Simple functions used to determine if the current OS supports using this class, and what levels of support -QList OSInterface::supportedNotifications(){ - //Which interfaces provide change notifications - return QList< OSInterface::Interface >(); -} - -QList OSInterface::supportedStatus(){ - //Which interfaces are available for "status" requests - return QList< OSInterface::Interface >(); -} - -QList OSInterface::supportedModify(){ - //Which interfaces are available for "modify" requests - return QList< OSInterface::Interface >(); -} - -//Start/stop interface watchers/notifications (each only called once per session) -void OSInterface::start(){ - //nothing to do -} - -void OSInterface::stop(){ - //nothing to do -} - -//Generic status update -QList OSInterface::status(OSInterface::Interface){ - // ==== Interface status output lists ==== - // Battery: [ float (percent charge), bool (is Charging), double (seconds remaining) ]; - // Volume: [int (percent volume) ] - // Devices: [ QStringList[ name, mountpoint, type (optional)] ] (List length depends on number of devices) - // Network: [bool (network access available)] - // PowerOff: [bool (can power off system)] - // Reboot: [bool (can reboot system)] - // Suspend: [bool (can suspend system)] - // Updates: [bool (is updating), bool (reboot required)] - // ========== - return QList(); -} - -//Individual Interface interactions -bool OSInterface::modify(OSInterface::Interface, QList){ //returns: success/failure - // ==== Interface modification argument lists ==== - // Battery: - // Volume: [int (set percent volume) ] - // Devices: - // Network: - // PowerOff: [bool (skip updates - optional)] - // Reboot: [bool (skip updates - optional)] - // Suspend: [] (No input arguments) - // Updates: - // ========== - return false; -} - -//================= -// PRIVATE SLOTS -//================= -//FileSystemWatcher slots -void OSInterface::watcherFileChanged(QString){ - -} - -void OSInterface::watcherDirChanged(QString){ - -} - -//IO Device slots -void OSInterface::iodeviceReadyRead(){ - -} - -void OSInterface::iodeviceAboutToClose(){ - -} - -//NetworkAccessManager slots -void OSInterface::netAccessChanged(QNetworkAccessManager::NetworkAccessibility){ - -} - -void OSInterface::netRequestFinished(QNetworkReply*){ - -} - -void OSInterface::netSslErrors(QNetworkReply*, const QList&){ - -} diff --git a/src-qt5/core/libLumina/OSInterface.h b/src-qt5/core/libLumina/OSInterface.h deleted file mode 100644 index acbd5c38..00000000 --- a/src-qt5/core/libLumina/OSInterface.h +++ /dev/null @@ -1,136 +0,0 @@ -//=========================================== -// Lumina desktop source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is the main interface for any OS-specific system calls -// To port Lumina to a different operating system, just create a file -// called "OSInterface-.cpp" -//=========================================== -#ifndef _LUMINA_LIBRARY_OS_INTERFACE_H -#define _LUMINA_LIBRARY_OS_INTERFACE_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -class OSInterface : public QObject{ - Q_OBJECT - -public: - enum Interface{ Battery, Volume, Devices, Network, PowerOff, Reboot, Suspend, Updates }; - -private slots: - //FileSystemWatcher slots - void watcherFileChanged(QString); - void watcherDirChanged(QString); - //IO Device slots - void iodeviceReadyRead(); - void iodeviceAboutToClose(); - //NetworkAccessManager slots - void netAccessChanged(QNetworkAccessManager::NetworkAccessibility); - void netRequestFinished(QNetworkReply*); - void netSslErrors(QNetworkReply*, const QList&); - -private: - //Internal persistant data storage, OS-specific usage implementation - QHash< OSInterface::Interface, QList > INFO; - - // ============ - // Internal possibilities for watching the system (OS-Specific usage/implementation) - // ============ - //File System Watcher - QFileSystemWatcher *watcher; - //IO Device (QLocalSocket, QTcpConnection, QFile, etc) - QIODevice *iodevice; - //Network Access Manager (check network connectivity, etc) - QNetworkAccessManager *netman; - - //Simplifications for connecting the various watcher objects to their respective slots - void connectWatcher(){ - if(watcher==0){ return; } - connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(watcherFileChanged(QString)) ); - connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherDirChanged(QString)) ); - } - void connectIodevice(){ - if(iodevice==0){ return; } - connect(iodevice, SIGNAL(readyRead()), this, SLOT(iodeviceReadyRead()) ); - } - void connectNetman(){ - if(netman==0){ return; } - connect(netman, SIGNAL(networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility)), this, SLOT(netAccessChanged(QNetworkAccessManager::NetworkAccessibility)) ); - connect(netman, SIGNAL(requestFinished(QNetworkReply*)), this, SLOT(netRequestFinished(QNetworkReply*)) ); - connect(netman, SIGNAL(sslErrors(QNetworkReply*, const QList&)), this, SLOT(netSslErrors(QNetworkReply*, const QList&)) ); - } - -public: - OSInterface(QObject *parent = 0) : QObject(parent){ - watcher = 0; - iodevice = 0; - netman = 0; - } - ~OSInterface(){ - if(watcher!=0){ - QStringList paths; paths << watcher->files() << watcher->directories(); - if(!paths.isEmpty()){ watcher->removePaths(paths); } - watcher->deleteLater(); - } - if(iodevice!=0){ - if(iodevice->isOpen()){ iodevice->close(); } - iodevice->deleteLater(); - } - if(netman!=0){ - netman->deleteLater(); - } - } - - //Simple functions used to determine if the current OS supports using this class, and what levels of support - QList supportedNotifications(); //Which interfaces provide change notifications - QList supportedStatus(); //Which interfaces are available for "status" requests - QList supportedModify(); //Which interfaces are available for "modify" requests - - //Start/stop interface watchers/notifications (each only called once per session) - void start(); - void stop(); - - //Generic status update - QList status(OSInterface::Interface); - // ==== Interface status output lists ==== - // Battery: [ float (percent charge), bool (is Charging), double (seconds remaining) ]; - // Volume: [int (percent volume) ] - // Devices: [ QStringList[ name, mountpoint, type (optional)] ] (List length depends on number of devices) - // Network: [bool (network access available)] - // PowerOff: [bool (can power off system)] - // Reboot: [bool (can reboot system)] - // Suspend: [bool (can suspend system)] - // Updates: [bool (is updating), bool (reboot required)] - // ========== - - //Individual Interface interactions - bool modify(OSInterface::Interface, QList args); //returns: success/failure - // ==== Interface modification argument lists ==== - // Battery: - // Volume: [int (set percent volume) ] - // Devices: - // Network: - // PowerOff: [bool (skip updates - optional)] - // Reboot: [bool (skip updates - optional)] - // Suspend: [] (No input arguments) - // Updates: - // ========== - -signals: - void interfaceChanged(OSInterface::Interface); - -}; -#endif -- cgit From 663d346df63890d1bcac73f475ef09536bc9a7c0 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 6 Dec 2017 10:30:35 -0500 Subject: Fix the LUtils.pri file: Forgot to remove a couple unused files from the includes. --- src-qt5/core/libLumina/LUtils.pri | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LUtils.pri b/src-qt5/core/libLumina/LUtils.pri index 6ce0839c..da5a78d5 100644 --- a/src-qt5/core/libLumina/LUtils.pri +++ b/src-qt5/core/libLumina/LUtils.pri @@ -15,8 +15,7 @@ GIT_VERSION=$$system(git describe --always) #DEFINES += BUILD_DATE='"\\\"$$system(date)\\\""' #LuminaOS files -HEADERS *= $${PWD}/LuminaOS.h \ - $${PWD}/OSInterface.h +HEADERS *= $${PWD}/LuminaOS.h # LuminaOS support functions (or fall back to generic one) exists($${PWD}/LuminaOS-$${LINUX_DISTRO}.cpp){ @@ -26,13 +25,6 @@ exists($${PWD}/LuminaOS-$${LINUX_DISTRO}.cpp){ }else{ SOURCES *= $${PWD}/LuminaOS-template.cpp } -exists($${PWD}/OSInterface-$${LINUX_DISTRO}.cpp){ - SOURCES *= $${PWD}/OSInterface-$${LINUX_DISTRO}.cpp -}else:exists($${PWD}/OSInterface-$${OS}.cpp){ - SOURCES *= $${PWD}/OSInterface-$${OS}.cpp -}else{ - SOURCES *= $${PWD}/OSInterface-template.cpp -} #LUtils Files SOURCES *= $${PWD}/LUtils.cpp -- cgit From 88050e04f0fe04eb70aec087f4b612b84be934de Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 6 Dec 2017 15:25:20 -0500 Subject: Start trying to get stylesheet validation into the qss editor. Not quite working yet - still not picking up on the error message from Qt itself from the new lthemeengine-sstest process. --- .../lumina-theme-engine/lumina-theme-engine.pro | 3 +- .../lthemeengine-sstest/lthemeengine-sstest.pro | 11 ++++++ .../src/lthemeengine-sstest/main.cpp | 18 ++++++++++ .../src/lthemeengine/qsseditordialog.cpp | 39 ++++++++++++++++++++++ .../src/lthemeengine/qsseditordialog.h | 4 +++ .../src/lthemeengine/qsseditordialog.ui | 36 ++++++++++++++++++-- 6 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/lthemeengine-sstest.pro create mode 100644 src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro b/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro index e1023752..1e8b2ca4 100644 --- a/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro +++ b/src-qt5/core/lumina-theme-engine/lumina-theme-engine.pro @@ -3,7 +3,8 @@ include(../../OS-detect.pri) TEMPLATE = subdirs SUBDIRS += src/lthemeengine-qtplugin \ src/lthemeengine-style \ - src/lthemeengine + src/lthemeengine \ + src/lthemeengine-sstest colors.files = colors/*.conf colors.path = $${L_SHAREDIR}/lthemeengine/colors diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/lthemeengine-sstest.pro b/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/lthemeengine-sstest.pro new file mode 100644 index 00000000..fadc6fcb --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/lthemeengine-sstest.pro @@ -0,0 +1,11 @@ +include(../../lthemeengine.pri) +TEMPLATE = app +QT *= widgets + +SOURCES += \ + main.cpp + +TARGET = lthemeengine-sstest +target.path = $${L_BINDIR} + +INSTALLS += target diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp new file mode 100644 index 00000000..bdab0a30 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine-sstest/main.cpp @@ -0,0 +1,18 @@ +#include +//#include +#include + +#include + +int main(int argc, char **argv){ + if(argc<2){ return 1; } //error + unsetenv("QT_QPA_PLATFORMTHEME"); //Make sure we are not testing anything related to the current theme engine + QString stylesheet = LUtils::readFile(argv[1]).join("\n"); + //qDebug() << "Found Stylesheet:" << stylesheet; + QApplication app(argc, argv); + app.setStyleSheet(stylesheet); + //qDebug() << " Using Stylesheet:" << app.styleSheet(); + QWidget tmp(0,Qt::SplashScreen | Qt::BypassWindowManagerHint); + tmp.show(); //needed to actually run the parser on the stylesheet (unused/unchecked otherwise) + return 0; +} diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.cpp index ac891a80..56289931 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.cpp @@ -4,6 +4,12 @@ #include "qsseditordialog.h" #include "ui_qsseditordialog.h" +#include +#include + +#include +#include + QSSEditorDialog::QSSEditorDialog(const QString &filePath, QWidget *parent) : QDialog(parent), m_ui(new Ui::QSSEditorDialog){ m_ui->setupUi(this); m_filePath = filePath; @@ -37,6 +43,11 @@ QSSEditorDialog::QSSEditorDialog(const QString &filePath, QWidget *parent) : QDi for(int i=0; iaddAction( colors[i].section("::::",0,0) )->setWhatsThis(colors[i].section("::::",1,1) ); } m_ui->tool_color->setMenu(colorMenu); connect(colorMenu, SIGNAL(triggered(QAction*)), this, SLOT(colorPicked(QAction*)) ); + validateTimer = new QTimer(this); + validateTimer->setInterval(500); //1/2 second after finish typing + validateTimer->setSingleShot(true); + connect(validateTimer, SIGNAL(timeout()), this, SLOT(validateStyleSheet()) ); + connect(m_ui->textEdit, SIGNAL(textChanged()), validateTimer, SLOT(start()) ); } QSSEditorDialog::~QSSEditorDialog(){ @@ -69,3 +80,31 @@ void QSSEditorDialog::colorPicked(QAction* act){ if(id.isEmpty()){ return; } m_ui->textEdit->insertPlainText( QString("palette(%1)").arg(id) ); } + +bool QSSEditorDialog::isStyleSheetValid(const QString &styleSheet){ + QTemporaryFile tempfile; + if(tempfile.open()){ + QTextStream out(&tempfile); + out << styleSheet; + out.flush(); + tempfile.close(); + } + QStringList log = LUtils::getCmdOutput("lthemeengine-sstest", QStringList() << tempfile.fileName()); + qDebug() << "Got Validation Log:" << log; + return log.join("").simplified().isEmpty(); +} + +void QSSEditorDialog::validateStyleSheet(){ + qDebug() << "Validating StyleSheet:"; + bool ok = isStyleSheetValid(m_ui->textEdit->toPlainText()); + + //Now update the button/label as needed + int sz = this->fontMetrics().height(); + if(ok){ + m_ui->label_status_icon->setPixmap(LXDG::findIcon("dialog-ok","").pixmap(sz,sz) ); + m_ui->label_status_icon->setToolTip(tr("Valid StyleSheet")); + }else{ + m_ui->label_status_icon->setPixmap(LXDG::findIcon("dialog-cancel","").pixmap(sz,sz) ); + m_ui->label_status_icon->setToolTip(tr("Invalid StyleSheet")); + } +} diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.h b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.h index 114611fe..f51434e9 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.h +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.h @@ -5,6 +5,7 @@ #include #include #include +#include namespace Ui { class QSSEditorDialog; @@ -23,6 +24,8 @@ public: private slots: void on_buttonBox_clicked(QAbstractButton *button); void colorPicked(QAction*); + bool isStyleSheetValid(const QString&); + void validateStyleSheet(); private: void save(); @@ -30,6 +33,7 @@ private: Ui::QSSEditorDialog *m_ui; QString m_filePath; QMenu *colorMenu; + QTimer *validateTimer; }; diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.ui index f75a21c6..68a14fb1 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsseditordialog.ui @@ -6,8 +6,8 @@ 0 0 - 643 - 499 + 808 + 512
@@ -52,6 +52,38 @@
+ + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 16 + 16 + + + + + + + false + + + Qt::AlignCenter + + + -- cgit From a360f2d4d0a60352a181f9a1317cc69e8bd44f0a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 7 Dec 2017 09:46:02 -0500 Subject: Update the default wallpaper for TrueOS (17.12) --- .../defaults/desktop-background-TrueOS.jpg | Bin 4005674 -> 2403325 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg b/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg index de11074e..3fd8cc49 100644 Binary files a/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg and b/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg differ -- cgit From 3781d4fc0f76a01f9918a5f94e3fff981d4d708f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 7 Dec 2017 11:16:15 -0500 Subject: Tag version 1.4.1 Also fix up the loading of favorites/mime_defaults from the luminaDesktop.conf, Update the TrueOS default configuration file a bit. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 50 +++++++++++++--------- src-qt5/core/libLumina/LuminaSingleApplication.cpp | 2 +- src-qt5/core/libLumina/LuminaXDG.cpp | 1 + .../defaults/luminaDesktop-TrueOS.conf | 4 +- 4 files changed, 33 insertions(+), 24 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 69d4ba52..92268672 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -13,10 +13,8 @@ #include "LuminaThemes.h" -static QStringList fav; - QString LDesktopUtils::LuminaDesktopVersion(){ - QString ver = "1.4.0"; + QString ver = "1.4.1"; #ifdef GIT_VERSION ver.append( QString(" (Git Revision: %1)").arg(GIT_VERSION) ); #endif @@ -80,22 +78,23 @@ QStringList LDesktopUtils::infoQuickPlugin(QString ID){ //Returns: [Name, Descri } QStringList LDesktopUtils::listFavorites(){ - static QDateTime lastRead; - QDateTime cur = QDateTime::currentDateTime(); - if(lastRead.isNull() || lastRead..) maj = mid = min = 0; bool ok = true; diff --git a/src-qt5/core/libLumina/LuminaSingleApplication.cpp b/src-qt5/core/libLumina/LuminaSingleApplication.cpp index f328be36..6107aff8 100644 --- a/src-qt5/core/libLumina/LuminaSingleApplication.cpp +++ b/src-qt5/core/libLumina/LuminaSingleApplication.cpp @@ -19,7 +19,7 @@ LSingleApplication::LSingleApplication(int &argc, char **argv, QString appname) if(appname!="lumina-desktop"){ cTrans = LUtils::LoadTranslation(this, appname); }//save the translator for later //Initialize a couple convenience internal variables cfile = QDir::tempPath()+"/.LSingleApp-%1-%2-%3"; - QString username = QString::fromNumber(getuid()); + QString username = QString::number(getuid()); //For locking the process use the official process name - not the user input (no masking) appname = this->applicationName(); cfile = cfile.arg( username, appname, QString::number(QX11Info::appScreen()) ); diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 1933ba93..e1c582d9 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -1294,6 +1294,7 @@ QStringList LXDG::findAvailableAppsForMime(QString mime){ } void LXDG::setDefaultAppForMime(QString mime, QString app){ + //qDebug() << "Set Default App For Mime:" << mime << app; QString filepath = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-mimeapps.list"; QStringList cinfo = LUtils::readFile(filepath); //If this is a new file, make sure to add the header appropriately diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf index e9520a3c..180730bf 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf @@ -60,14 +60,14 @@ theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also u #DESKTOP SETTINGS (used for the primary screen in multi-screen setups) desktop_visiblepanels=1 #[0 - 12] The number of panels visible by default -desktop_backgroundfiles=/usr/local/share/wallpapers/TrueOS/trueos-1-4k.png #list of absolute file paths for image files (disable for Lumina default) +desktop_backgroundfiles=/usr/local/share/lumina-desktop/desktop-background.jpg #list of absolute file paths for image files (disable for Lumina default) desktop_backgroundrotateminutes=5 #[positive integer] number of minutes between background rotations (if multiple files) #desktop_plugins= #list of plugins to be shown on the desktop by default desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop items #PANEL SETTINGS (preface with panel1. or panel2., depending on the number of panels you have visible by default) panel1_location=bottom #[top/bottom/left/right] Screen edge the panel should be on -panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or %[W/H] for a percentage of the screen width/height) +panel1_pixelsize=5%H #number of pixels wide/high the panel should be (or %[W/H] for a percentage of the screen width/height) panel1_autohide=false #[true/false] Have the panel become visible on mouse-over panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock, battery #list of plugins for the panel panel1_pinlocation=center #[left/center/right] Note:[left/right] corresponds to [top/bottom] for vertical panels -- cgit From de79a61b846df2392282b67a35a5f030b5ebbdfa Mon Sep 17 00:00:00 2001 From: q5sys Date: Thu, 7 Dec 2017 11:56:51 -0500 Subject: add qballoontip stylesheet --- src-qt5/core/lumina-theme-engine/qss/traynotification-simple.qss | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src-qt5/core/lumina-theme-engine/qss/traynotification-simple.qss (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/qss/traynotification-simple.qss b/src-qt5/core/lumina-theme-engine/qss/traynotification-simple.qss new file mode 100644 index 00000000..43aff087 --- /dev/null +++ b/src-qt5/core/lumina-theme-engine/qss/traynotification-simple.qss @@ -0,0 +1,4 @@ +QBalloonTip{ +background-color: palette(base); +color: palette(text); +} -- cgit From 956f6c5a919824315ed20bfdf54dff9f0d3f099b Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 7 Dec 2017 12:10:46 -0500 Subject: Fix up the sliders-simple.qss style. --- src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss b/src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss index e8311e92..a9b165a6 100644 --- a/src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss +++ b/src-qt5/core/lumina-theme-engine/qss/sliders-simple.qss @@ -1,26 +1,26 @@ /* SLIDERS */ QSlider::groove:horizontal { -border: 1px solid transparent; +border: 1px solid palette(mid); background: palette(alternate-window); height: 10px; border-radius: 3px; } QSlider::groove:vertical { -border: 1px solid transparent; +border: 1px solid palette(mid); background: palette(alternate-window); width: 10px; border-radius: 3px; } QSlider::sub-page:horizontal { background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, - stop: 0 palette(highlight), stop: 1 palette(window)); + stop: 0 transparent, stop: 1 palette(highlight) ); border: 1px solid transparent; height: 10px; border-radius: 3px; } -QSlider::sub-page:vertical { +QSlider::add-page:vertical { background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, - stop: 0 palette(highlight), stop: 1 palette(window)); + stop: 0 transparent, stop: 1 palette(highlight) ); border: 1px solid transparent; width: 10px; border-radius: 3px; @@ -31,7 +31,7 @@ border: 1px solid transparent; height: 10px; border-radius: 3px; } -QSlider::add-page:vertical{ +QSlider::sub-page:vertical{ background: palette(alternate-window); border: 1px solid transparent; width: 10px; @@ -40,13 +40,13 @@ border-radius: 3px; QSlider::handle:horizontal{ background: palette(mid); border: 1px solid palette(mid); -width: 1em; +width: 1ex; border-radius: 1px; } QSlider::handle:vertical{ background: palette(mid); border: 1px solid palette(mid); -height: 1em; +height: 1ex; border-radius: 1px; } QSlider::handle:horizontal:hover, QSlider::handle:vertical:hover{ -- cgit From b8b57326ccdebcc2060dfd653cb217cf3bec3c97 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 7 Dec 2017 12:13:40 -0500 Subject: Make sure the new traynotification-simple stylesheet is used. * Fix the pkg plist to account for it * Add it to the default style list --- src-qt5/core/libLumina/LDesktopUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 92268672..3154cfb2 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -546,7 +546,7 @@ bool LDesktopUtils::checkUserFiles(QString lastversion, QString currentversion){ newtheme.setValue("Interface/desktop_stylesheets", QStringList() << enginedir+"desktop_qss/Glass.qss"); } newtheme.setValue("Appearance/style", "Fusion"); - newtheme.setValue("Interface/stylesheets", QStringList() << enginedir+"qss/tooltip-simple.qss" << enginedir+"qss/scrollbar-simple.qss" << enginedir+"qss/sliders-simple.qss"); + newtheme.setValue("Interface/stylesheets", QStringList() << enginedir+"qss/tooltip-simple.qss" << enginedir+"qss/scrollbar-simple.qss" << enginedir+"qss/sliders-simple.qss" << enginedir+"qss/traynotification-simple.qss"); newtheme.sync(); //flush this to file right now } //end check for theme file existance } -- cgit From f925f25bd8f52c925db974a269d7dfd943f58669 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 7 Dec 2017 13:55:23 -0500 Subject: Fix up a couple more things: 1. Add option to load global styles from luminaDesktop.conf 2. Fix up the default icon/menu size of the start menu and item icons. 3. Fix up a signal/slot mis-connect in the start menu. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 1 + src-qt5/core/libLumina/LuminaThemes.cpp | 42 ++++++++++++++++++++-- src-qt5/core/libLumina/LuminaThemes.h | 3 ++ .../defaults/luminaDesktop-TrueOS.conf | 1 + .../lumina-desktop/defaults/luminaDesktop.conf | 3 +- .../panel-plugins/systemstart/ItemWidget.cpp | 22 ++++++------ .../panel-plugins/systemstart/LStartButton.cpp | 9 +++-- .../panel-plugins/systemstart/StartMenu.cpp | 2 +- .../panel-plugins/systemstart/StartMenu.h | 2 +- 9 files changed, 67 insertions(+), 18 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 3154cfb2..5595532a 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -399,6 +399,7 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ if(var.contains(".")){ var.replace(".","_"); } //Now parse the variable and put the value in the proper file if(var=="theme_themefile"){ themesettings[0] = val; } + else if(var=="theme_styles"){ LTHEME::setCurrentStyles( val.split(",",QString::SkipEmptyParts) ); } else if(var=="theme_colorfile"){ themesettings[1] = val; } else if(var=="theme_iconset"){ themesettings[2] = val; } else if(var=="theme_font"){ themesettings[3] = val; } diff --git a/src-qt5/core/libLumina/LuminaThemes.cpp b/src-qt5/core/libLumina/LuminaThemes.cpp index 857e604b..03524941 100644 --- a/src-qt5/core/libLumina/LuminaThemes.cpp +++ b/src-qt5/core/libLumina/LuminaThemes.cpp @@ -34,6 +34,17 @@ QStringList LTHEME::availableSystemThemes(){ return list; } +QStringList LTHEME::availableSystemStyles(){ + //returns: [name::::path] for each item + QDir dir(LOS::LuminaShare()+"../lthemeengine/qss"); + QStringList list = dir.entryList(QStringList() <<"*.qss", QDir::Files, QDir::Name); + for(int i=0; i::::] + list[i] = list[i].section(".qss",0,0)+"::::"+dir.absoluteFilePath(list[i]); + } + return list; +} + QStringList LTHEME::availableLocalThemes(){ //returns: [name::::path] for each item QDir dir( QString(getenv("XDG_CONFIG_HOME"))+"/lthemeengine/desktop_qss"); QStringList list = dir.entryList(QStringList() <<"*.qss", QDir::Files, QDir::Name); @@ -44,6 +55,16 @@ QStringList LTHEME::availableLocalThemes(){ //returns: [name::::path] for each i return list; } +QStringList LTHEME::availableLocalStyles(){ //returns: [name::::path] for each item + QDir dir( QString(getenv("XDG_CONFIG_HOME"))+"/lthemeengine/qss"); + QStringList list = dir.entryList(QStringList() <<"*.qss", QDir::Files, QDir::Name); + for(int i=0; i::::] + list[i] = list[i].section(".qss",0,0)+"::::"+dir.absoluteFilePath(list[i]); + } + return list; +} + QStringList LTHEME::availableSystemColors(){ //returns: [name::::path] for each item //returns: [name::::path] for each item QDir dir(LOS::LuminaShare()+"../lthemeengine/colors"); @@ -244,6 +265,23 @@ bool LTHEME::setCursorTheme(QString cursorname){ return LUtils::writeFile(QDir::homePath()+"/.icons/default/index.theme", info, true); } +bool LTHEME::setCurrentStyles(QStringList paths){ + //Verify that the paths are all absolute paths, otherwise scan/replace with absolute paths + QStringList avail = LTHEME::availableSystemStyles(); + for(int i=0; i highest + QSettings engineset("lthemeengine","lthemeengine"); + engineset.setValue("Interface/stylesheets",paths); + engineset.sync(); + return true; +} + //Return the complete stylesheet for a given theme/colors QString LTHEME::assembleStyleSheet(QString themepath, QString colorpath, QString font, QString fontsize){ QString stylesheet = LUtils::readFile(themepath).join("\n"); @@ -340,10 +378,10 @@ void LTHEME::LoadCustomEnvSettings(){ setenv(info[i].section("=",0,0).toLocal8Bit(), info[i].section("=",1,100).simplified().toLocal8Bit(), 1); } } - + } -bool LTHEME::setCustomEnvSetting(QString var, QString val){ +bool LTHEME::setCustomEnvSetting(QString var, QString val){ //variable/value pair (use an empty val to clear it) QStringList info = LTHEME::CustomEnvSettings(true); //user only bool changed = false; diff --git a/src-qt5/core/libLumina/LuminaThemes.h b/src-qt5/core/libLumina/LuminaThemes.h index ca79e0bd..133bd04d 100644 --- a/src-qt5/core/libLumina/LuminaThemes.h +++ b/src-qt5/core/libLumina/LuminaThemes.h @@ -25,7 +25,9 @@ class LTHEME{ public: //Read the Themes/Colors/Icons that are available on the system static QStringList availableSystemThemes();//returns: [name::::path] for each item + static QStringList availableSystemStyles();//returns: [name::::path] for each item static QStringList availableLocalThemes(); //returns: [name::::path] for each item + static QStringList availableLocalStyles(); //returns: [name::::path] for each item static QStringList availableSystemColors(); //returns: [name::::path] for each item static QStringList availableLocalColors(); //returns: [name::::path] for each item static QStringList availableSystemIcons(); //returns: [name] for each item @@ -42,6 +44,7 @@ public: //Change the current Theme/Colors/Icons static bool setCurrentSettings(QString themepath, QString colorpath, QString iconname, QString font, QString fontsize); static bool setCursorTheme(QString cursorname); + static bool setCurrentStyles(QStringList paths); //ordered by priority: lowest -> highest //Return the complete stylesheet for a given theme/colors static QString assembleStyleSheet(QString themepath, QString colorpath, QString font, QString fontsize); diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf index 180730bf..543f9eaa 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf @@ -53,6 +53,7 @@ mime_default_application/x-tar_ifexists=lumina-archiver.desktop #THEME SETTINGS theme_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default) +theme_styles=scrollbar-simple, tooltip-simple, sliders-simple, traynotification-simple theme_colorfile=darker #Name of the color spec file to use for theming theme_iconset=material-design-dark #Name of the icon theme to use theme_font=Noto Sans #Name of the font family to use diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf index e4229038..0e6101c1 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf @@ -50,7 +50,8 @@ mime_default_unknown/*=lumina-textedit.desktop mime_default_application/x-shellscript=lumina-textedit.desktop #THEME SETTINGS -theme_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default) +theme_themefile=DarkGlass #Name of the theme to use +theme_styles=scrollbar-simple, tooltip-simple, sliders-simple, traynotification-simple theme_colorfile=darker #Name of the color spec file to use for theming theme_iconset=material-design-dark #Name of the icon theme to use theme_font=Arial #Name of the font family to use diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp index f4382ffc..545000f4 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.cpp @@ -70,12 +70,12 @@ ItemWidget::ItemWidget(QWidget *parent, QString itemPath, QString type, bool gob iconPath = itemPath; //icon->setPixmap( QIcon(itemPath).pixmap(64,64) ); }else{ - if( LUtils::isValidBinary(itemPath) ){ + if( LUtils::isValidBinary(itemPath) ){ if(ICONS->exists(type)){ iconPath = type; } else{ iconPath = "application-x-executable"; } }else{ iconPath = LXDG::findAppMimeForFile(itemPath.section("/",-1)).replace("/","-"); } } - name->setText( itemPath.section("/",-1) ); //this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) ); + name->setText( itemPath.section("/",-1) ); //this->fontMetrics().elidedText(itemPath.section("/",-1), Qt::ElideRight, TEXTCUTOFF) ); text = itemPath.section("/",-1) ; } ICONS->loadIcon(icon, iconPath); @@ -133,11 +133,11 @@ ItemWidget::~ItemWidget(){ //actButton->deleteLater(); contextMenu->clear(); //contextMenu->deleteLater(); - if(actButton->menu()!=0){ + if(actButton->menu()!=0){ for(int i=0; imenu()->actions().length(); i++){ actButton->menu()->actions().at(i)->deleteLater(); } - actButton->menu()->deleteLater(); + actButton->menu()->deleteLater(); } //actButton->deleteLater(); //icon->deleteLater(); @@ -156,7 +156,7 @@ void ItemWidget::createWidget(){ menuopen = false; menureset = new QTimer(this); menureset->setSingleShot(true); - menureset->setInterval(1000); //1 second + menureset->setInterval(1000); //1 second this->setContentsMargins(0,0,0,0); contextMenu = new QMenu(this); connect(contextMenu, SIGNAL(aboutToShow()), this, SLOT(actionMenuOpen()) ); @@ -220,7 +220,7 @@ void ItemWidget::setupActions(XDGDesktop *app){ else{ ICONS->loadIcon(act, app->icon); } act->setToolTip(app->actions[i].ID); act->setWhatsThis(app->actions[i].ID); - actButton->menu()->addAction(act); + actButton->menu()->addAction(act); } connect(actButton->menu(), SIGNAL(triggered(QAction*)), this, SLOT(actionClicked(QAction*)) ); connect(actButton->menu(), SIGNAL(aboutToShow()), this, SLOT(actionMenuOpen()) ); @@ -230,9 +230,11 @@ void ItemWidget::setupActions(XDGDesktop *app){ void ItemWidget::updateItems(){ //update the text/icon to match sizes - int H = (2.5*name->fontMetrics().height() ) -4; //make sure the height is large enough for two lines + int H = (2.2*name->fontMetrics().height() ) -4; //make sure the height is large enough for two lines icon->setFixedSize(QSize(H, H)); + icon->setAlignment(Qt::AlignCenter); actButton->setFixedSize( QSize( H/2, H) ); + H = (1.8*name->fontMetrics().height() ) -4; QStringList newname = text.split("
"); for(int i=0; ifontMetrics().elidedText(newname[i], Qt::ElideRight, name->width()); } name->setText( newname.join("
") ); @@ -271,9 +273,9 @@ void ItemWidget::RemoveFavorite(){ void ItemWidget::AddFavorite(){ if( LDesktopUtils::addFavorite(icon->whatsThis()) ){ linkPath = icon->whatsThis(); - emit NewShortcut(); + emit NewShortcut(); } - + } void ItemWidget::RemoveQL(){ qDebug() << "Remove QuickLaunch Button:" << icon->whatsThis(); @@ -282,7 +284,7 @@ void ItemWidget::RemoveQL(){ void ItemWidget::AddQL(){ qDebug() << "Add QuickLaunch Button:" << icon->whatsThis(); - emit toggleQuickLaunch(icon->whatsThis(), true); + emit toggleQuickLaunch(icon->whatsThis(), true); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index 562122ae..d8014f4c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -25,9 +25,11 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon startmenu = new StartMenu(this); connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); - //QRect screenSize = QApplication::desktop()->availableGeometry(this); - QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0, 0)).toSize(); - if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value + + QRect screenSize = QApplication::desktop()->availableGeometry(this); + QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize",QSize(this->fontMetrics().width("x")*30 ,screenSize.height()/1.8)).toSize(); + //qDebug() << "Got Start Menu Saved Size:" << saved; + if(!saved.isNull() && saved.isValid()){ startmenu->setFixedSize(saved); } //re-load the previously saved value menu->setContents(startmenu); button->setMenu(menu); @@ -122,6 +124,7 @@ void LStartButtonPlugin::openMenu(){ menu->setContents(startmenu); if(old!=0){ old->deleteLater(); }*/ //-------- + //qDebug() << "Menu Size:" << startmenu->size(); startmenu->UpdateMenu(); button->showMenu(); } diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index 272bf0fa..ee3e0f80 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -597,7 +597,7 @@ void StartMenu::on_tool_restart_clicked(){ LSession::handle()->StartReboot(true); } -void StartMenu::on_tool_restart_update_clicked(){ +void StartMenu::on_tool_restart_updates_clicked(){ emit CloseMenu(); QCoreApplication::processEvents(); //bool skipupdates = false; diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h index 41bc3ec4..0a90311d 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h @@ -73,7 +73,7 @@ private slots: void on_tool_lock_clicked(); void on_tool_logout_clicked(); void on_tool_restart_clicked(); - void on_tool_restart_update_clicked(); + void on_tool_restart_updates_clicked(); void on_tool_shutdown_clicked(); void on_tool_suspend_clicked(); -- cgit