From a399c140305d5100f8dd9ca720e1c104451d874f Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 14 Jun 2016 09:40:15 -0400 Subject: Large update to the project files: 1) Move from "NO_I18N" to "WITH_I18N". This will ensure that the source version of the localizations are not installed unless explicitly requested (since the "real" localization files are in the lumina-i18n repo - these source files are theauto-generated ones before getting sent up to the pootle localization system). 2) Add a few more .desktop files for the various Lumina utilities. --- src-qt5/core-utils/lumina-config/lumina-config.pro | 9 +- src-qt5/core-utils/lumina-search/lumina-search.pro | 6 +- .../core-utils/lumina-xconfig/lumina-xconfig.pro | 9 +- src-qt5/core/lumina-desktop/LSession.cpp | 138 +-------------------- src-qt5/core/lumina-desktop/lumina-desktop.pro | 6 +- src-qt5/core/lumina-info/lumina-info.pro | 6 +- src-qt5/core/lumina-open/lumina-open.pro | 6 +- src-qt5/core/lumina-wm-INCOMPLETE/lumina-wm.pro | 6 +- .../lumina-fileinfo/lumina-fileinfo.pro | 6 +- src-qt5/desktop-utils/lumina-fm/lumina-fm.pro | 6 +- .../lumina-screenshot/lumina-screenshot.pro | 6 +- .../lumina-terminal/lumina-terminal.pro | 10 +- src-qt5/desktop-utils/lumina-terminal/main.cpp | 6 +- .../lumina-textedit/lumina-textedit.pro | 6 +- 14 files changed, 49 insertions(+), 177 deletions(-) diff --git a/src-qt5/core-utils/lumina-config/lumina-config.pro b/src-qt5/core-utils/lumina-config/lumina-config.pro index 1f5d3f10..5beb22a8 100644 --- a/src-qt5/core-utils/lumina-config/lumina-config.pro +++ b/src-qt5/core-utils/lumina-config/lumina-config.pro @@ -109,8 +109,11 @@ TRANSLATIONS = i18n/lumina-config_af.ts \ dotrans.path=$${L_SHAREDIR}/Lumina-DE/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/Lumina-DE/i18n/ -INSTALLS += target dotrans +desktop.files=lumina-config.desktop +desktop.path=$${L_SHAREDIR}/applications/ -NO_I18N{ - INSTALLS -= dotrans +INSTALLS += target desktop + +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/core-utils/lumina-search/lumina-search.pro b/src-qt5/core-utils/lumina-search/lumina-search.pro index 2ba8b7c4..72dd75e6 100644 --- a/src-qt5/core-utils/lumina-search/lumina-search.pro +++ b/src-qt5/core-utils/lumina-search/lumina-search.pro @@ -95,8 +95,8 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO desktop.files=lumina-search.desktop desktop.path=$${L_SHAREDIR}/applications/ -INSTALLS += target dotrans desktop +INSTALLS += target desktop -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.pro b/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.pro index 2661c19b..22a47d8a 100644 --- a/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.pro +++ b/src-qt5/core-utils/lumina-xconfig/lumina-xconfig.pro @@ -90,8 +90,11 @@ TRANSLATIONS = i18n/lumina-xconfig_af.ts \ dotrans.path=$${L_SHAREDIR}/Lumina-DE/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/Lumina-DE/i18n/ -INSTALLS += target dotrans +desktop.files=lumina-xconfig.desktop +desktop.path=$${L_SHAREDIR}/applications/ -NO_I18N{ - INSTALLS -= dotrans +INSTALLS += target desktop + +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp index 42eb6bc7..9444edd6 100644 --- a/src-qt5/core/lumina-desktop/LSession.cpp +++ b/src-qt5/core/lumina-desktop/LSession.cpp @@ -115,8 +115,6 @@ void LSession::setupSession(){ //Initialize the internal variables DESKTOPS.clear(); - //savedScreens.clear(); - //for(int i=0; idesktop()->screenCount(); i++){ savedScreens << this->desktop()->screenGeometry(i); } //Start the background system tray splash.showScreen("systray"); @@ -333,33 +331,18 @@ void LSession::watcherChange(QString changed){ if(!watcher->files().contains(changed) && !watcher->directories().contains(changed)){ watcher->addPath(changed); } - /*QStringList files = watcher->files(); - if(files.length() < 5){ - qDebug() << " - Resetting Watched Files..."; - watcher->removePaths(files); //clear the current files before re-setting them - watcher->addPath( QDir::homePath()+"/.lumina/LuminaDE/sessionsettings.conf" ); - watcher->addPath( QDir::homePath()+"/.lumina/LuminaDE/desktopsettings.conf" ); - watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-init" ); - watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-keys" ); - watcher->addPath( QDir::homePath()+"/Desktop"); - }*/ } void LSession::screensChanged(){ qDebug() << "Screen Number Changed"; if(screenTimer->isActive()){ screenTimer->stop(); } screenTimer->start(); - //updateDesktops(); } void LSession::screenResized(int scrn){ - qDebug() << "Screen Resized:" << scrn; // << this->desktop()->screenGeometry(scrn); - /*for(int i=0; iScreen() == scrn){ DESKTOPS[i]->UpdateGeometry(); return; } - }*/ + qDebug() << "Screen Resized:" << scrn; if(screenTimer->isActive()){ screenTimer->stop(); } screenTimer->start(); - //updateDesktops(); } void LSession::checkWindowGeoms(){ @@ -380,99 +363,6 @@ void LSession::checkUserFiles(){ //Save the current version of the session to the settings file (for next time) sessionsettings->setValue("DesktopVersion", this->applicationVersion()); } - - /*int oldversion = VersionStringToNumber(OVS); - int nversion = VersionStringToNumber(this->applicationVersion()); - bool newversion = ( oldversion < VersionStringToNumber(this->applicationVersion()) ); //increasing version number - bool newrelease = ( OVS.contains("-devel", Qt::CaseInsensitive) && this->applicationVersion().contains("-release", Qt::CaseInsensitive) ); //Moving from devel to release - - //Check for the desktop settings file - QString dset = QDir::homePath()+"/.lumina/LuminaDE/desktopsettings.conf"; - bool firstrun = false; - if(!QFile::exists(dset) || oldversion < 5000){ - if( oldversion < 5000 ){ QFile::remove(dset); qDebug() << "Current desktop settings obsolete: Re-implementing defaults"; } - else{ firstrun = true; } - LUtils::LoadSystemDefaults(); - } - //Convert the favorites framework as necessary (change occured with 0.8.4) - if(newversion || newrelease){ - LUtils::upgradeFavorites(oldversion); - } - //Convert any "userbutton" and "appmenu" panel plugins to the new "systemstart" plugin (0.8.7) - if(oldversion <= 8007 && (newversion || newrelease) && nversion < 8008){ - QSettings dset(QSettings::UserScope, "LuminaDE","desktopsettings", this); - QStringList plugKeys = dset.allKeys().filter("panel").filter("/pluginlist"); - for(int i=0; i systemstart conversion - plugs = plugs.join(";;;;").replace("userbutton","systemstart").replace("appmenu","systemstart").split(";;;;"); - //Remove any system dashboard plugins - plugs.removeAll("systemdashboard"); - //Now save that back to the file - dset.setValue(plugKeys[i], plugs); - } - //Also remove any "desktopview" desktop plugin and enable the automatic desktop icons instead - plugKeys = dset.allKeys().filter("desktop-").filter("/pluginlist"); - for(int i=0; isetValue("DesktopVersion", this->applicationVersion()); - }*/ } void LSession::refreshWindowManager(){ @@ -513,7 +403,6 @@ void LSession::updateDesktops(){ DESKTOPS[i]->UpdateGeometry(); DESKTOPS[i]->show(); dnums << DESKTOPS[i]->Screen(); - //QTimer::singleShot(0,DESKTOPS[i], SLOT(checkResolution())); } } @@ -529,7 +418,6 @@ void LSession::updateDesktops(){ //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"; - //QTimer::singleShot(1000,WM, SLOT(restartWM())); //Note: This causes crashes in X if a full-screen app WM->updateWM(); } @@ -605,16 +493,6 @@ void LSession::adjustWindowGeom(WId win, bool maximize){ qDebug() << " - New Geom:" << geom << fgeom; } XCB->WM_Request_MoveResize_Window(win, geom); - /* - //Need to use the frame origin point with the window size (for some reason - strange Fluxbox issue) - XCB->MoveResizeWindow(win, QRect(fgeom.topLeft(), geom.size()) ); - - //For the random windows which are *still* off the top of the screen - QRect nfgeom = XCB->WindowGeometry(win, true); //re-fetch the current geometry (including frame) - if(nfgeom!=fgeom){ - if(DEBUG){ qDebug() << " -- Adjust again:" << fgeom; } - XCB->MoveResizeWindow(win, geom); - }*/ } } @@ -638,16 +516,6 @@ QFileInfoList LSession::DesktopFiles(){ QRect LSession::screenGeom(int num){ if(num < 0 || num >= this->desktop()->screenCount() ){ return QRect(); } QRect geom = this->desktop()->screenGeometry(num); - /*QScreen* scrn = this->screens().at(num); - //if(DEBUG){ qDebug() << "Screen Geometry:" << num << geom << scrn->geometry() << scrn->virtualGeometry(); } - if(geom.isNull() ){ - if( !scrn->geometry().isNull() ){ geom = scrn->geometry(); } - else if( !scrn->virtualGeometry().isNull() ){ geom = scrn->virtualGeometry(); } - //else if(num < savedScreens.length() ){ - //Qt is backfiring (Xinarama w/ Fluxbox?) - return the saved geometry - //geom = savedScreens[num]; - //} - }*/ return geom; } @@ -717,7 +585,6 @@ void LSession::playAudioFile(QString filepath){ mediaObj->setVolume(100); mediaObj->setMedia(QUrl::fromLocalFile(filepath)); mediaObj->play(); - //if(!audioThread->isRunning()){ audioThread->start(); } LSession::processEvents(); } if(DEBUG){ qDebug() << " - Done with Audio File"; } @@ -729,7 +596,6 @@ void LSession::RootSizeChange(){ qDebug() << "Got Root Size Change"; if(DESKTOPS.isEmpty()){ return; } //Initial setup not run yet screenTimer->start(); - //QTimer::singleShot(0,this, SLOT(screensChanged()) ); } void LSession::WindowPropertyEvent(){ @@ -844,7 +710,6 @@ void LSession::startSystemTray(){ if(SystemTrayID!=0){ XCB->SelectInput(SystemTrayID); //make sure TrayID events get forwarded here TrayDmgEvent = XCB->GenerateDamageID(SystemTrayID); - //XDamageQueryExtension( QX11Info::display(), &TrayDmgEvent, &TrayDmgError); evFilter->setTrayDamageFlag(TrayDmgEvent); qDebug() << "System Tray Started Successfully"; if(DEBUG){ qDebug() << " - System Tray Flags:" << TrayDmgEvent << TrayDmgError; } @@ -861,7 +726,6 @@ void LSession::stopSystemTray(bool detachall){ if(!detachall){ for(int i=0; iWindowClass(tmpApps[i]); - //XCB->CloseWindow(RunningTrayApps[i]); //Tray apps are special and closing the window does not close the app XCB->KillClient(tmpApps[i]); LSession::processEvents(); diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro index 0af668fd..f09f4f32 100644 --- a/src-qt5/core/lumina-desktop/lumina-desktop.pro +++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro @@ -162,8 +162,8 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \ dotrans.path=$${L_SHAREDIR}/Lumina-DE/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/Lumina-DE/i18n/ -INSTALLS += target desktop icons wallpapers defaults conf fluxconf dotrans +INSTALLS += target desktop icons wallpapers defaults conf fluxconf -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/core/lumina-info/lumina-info.pro b/src-qt5/core/lumina-info/lumina-info.pro index dab88a12..1bfc4ca0 100644 --- a/src-qt5/core/lumina-info/lumina-info.pro +++ b/src-qt5/core/lumina-info/lumina-info.pro @@ -90,8 +90,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/ -INSTALLS += target dotrans desktop +INSTALLS += target desktop -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/core/lumina-open/lumina-open.pro b/src-qt5/core/lumina-open/lumina-open.pro index 273587f3..aecd262e 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-DE/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/Lumina-DE/i18n/ -INSTALLS += target dotrans +INSTALLS += target -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/core/lumina-wm-INCOMPLETE/lumina-wm.pro b/src-qt5/core/lumina-wm-INCOMPLETE/lumina-wm.pro index ca483fdc..36d31c33 100644 --- a/src-qt5/core/lumina-wm-INCOMPLETE/lumina-wm.pro +++ b/src-qt5/core/lumina-wm-INCOMPLETE/lumina-wm.pro @@ -100,8 +100,8 @@ TRANSLATIONS = i18n/lumina-wm_af.ts \ dotrans.path=$${L_SHAREDIR}/Lumina-DE/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/Lumina-DE/i18n/ -INSTALLS += target dotrans +INSTALLS += target -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/desktop-utils/lumina-fileinfo/lumina-fileinfo.pro b/src-qt5/desktop-utils/lumina-fileinfo/lumina-fileinfo.pro index cb596060..dd51f948 100644 --- a/src-qt5/desktop-utils/lumina-fileinfo/lumina-fileinfo.pro +++ b/src-qt5/desktop-utils/lumina-fileinfo/lumina-fileinfo.pro @@ -89,8 +89,8 @@ TRANSLATIONS = i18n/lumina-fileinfo_af.ts \ dotrans.path=$${L_SHAREDIR}/Lumina-DE/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/Lumina-DE/i18n/ -INSTALLS += target dotrans +INSTALLS += target -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro b/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro index 5e0717f8..32077e3a 100644 --- a/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro +++ b/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro @@ -108,8 +108,8 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO desktop.files=lumina-fm.desktop desktop.path=$${L_SHAREDIR}/applications/ -INSTALLS += target dotrans desktop icons +INSTALLS += target desktop icons -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro index eb33107c..95e40b33 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro +++ b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro @@ -91,8 +91,8 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO desktop.files=lumina-screenshot.desktop desktop.path=$${L_SHAREDIR}/applications/ -INSTALLS += target dotrans desktop +INSTALLS += target desktop -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } diff --git a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro index 104ff33f..c71bafe7 100644 --- a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro +++ b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro @@ -88,9 +88,11 @@ TRANSLATIONS = i18n/lumina-terminal_af.ts \ dotrans.path=$${L_SHAREDIR}/Lumina-DE/i18n/ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$${L_SHAREDIR}/Lumina-DE/i18n/ -INSTALLS += target dotrans +desktop.files=lumina-terminal.desktop +desktop.path=$${L_SHAREDIR}/applications/ -NO_I18N{ - INSTALLS -= dotrans -} +INSTALLS += target desktop +WITH_I18N{ + INSTALLS += dotrans +} diff --git a/src-qt5/desktop-utils/lumina-terminal/main.cpp b/src-qt5/desktop-utils/lumina-terminal/main.cpp index 896f7765..7375b074 100644 --- a/src-qt5/desktop-utils/lumina-terminal/main.cpp +++ b/src-qt5/desktop-utils/lumina-terminal/main.cpp @@ -19,19 +19,19 @@ int main(int argc, char *argv[]) { if( !a.isPrimaryProcess() ){ return 0; } //poked the current process instead //First make sure a system tray is available - /*qDebug() << "Checking for system tray"; + qDebug() << "Checking for system tray"; bool ready = false; for(int i=0; i<60 && !ready; i++){ ready = QSystemTrayIcon::isSystemTrayAvailable(); if(!ready){ //Pause for 5 seconds - sleep(5); //don't worry about stopping event handling - nothing running yet + sleep(5); //don't worry about stopping event handling - nothing really running yet } } if(!ready){ qDebug() << "Could not find any available system tray after 5 minutes: exiting...."; return 1; - }*/ + } //Now go ahead and setup the app LuminaThemeEngine theme(&a); diff --git a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro index 35c74cb4..666238d5 100644 --- a/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro +++ b/src-qt5/desktop-utils/lumina-textedit/lumina-textedit.pro @@ -92,8 +92,8 @@ dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_RO desktop.files=lumina-textedit.desktop desktop.path=$${L_SHAREDIR}/applications/ -INSTALLS += target dotrans desktop +INSTALLS += target desktop -NO_I18N{ - INSTALLS -= dotrans +WITH_I18N{ + INSTALLS += dotrans } -- cgit