aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog12
-rw-r--r--debian/control5
-rwxr-xr-xdebian/rules2
-rw-r--r--libLumina/LuminaOS-Debian.cpp10
-rw-r--r--libLumina/LuminaOS-DragonFly.cpp10
-rw-r--r--libLumina/LuminaOS-FreeBSD.cpp16
-rw-r--r--libLumina/LuminaOS-Linux.cpp10
-rw-r--r--libLumina/LuminaOS-OpenBSD.cpp10
-rw-r--r--libLumina/LuminaOS-kFreeBSD.cpp10
-rw-r--r--libLumina/LuminaOS-template.cpp10
-rw-r--r--libLumina/LuminaOS.h5
-rw-r--r--libLumina/libLumina.pro14
-rw-r--r--lumina-desktop/SystemWindow.cpp12
-rw-r--r--lumina-desktop/SystemWindow.h4
-rw-r--r--lumina-desktop/SystemWindow.ui65
-rw-r--r--lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp7
-rw-r--r--lumina-fm/BackgroundWorker.cpp10
-rw-r--r--lumina-fm/BackgroundWorker.h2
-rw-r--r--lumina-fm/MainUI.cpp10
-rw-r--r--lumina-fm/MainUI.h2
20 files changed, 199 insertions, 27 deletions
diff --git a/debian/changelog b/debian/changelog
index b12b8d20..e9ce4488 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+lumina-desktop (0.8.4.475-1nano) unstable; urgency=low
+
+ * New git snapshot
+ * add runtime depencies for lumina-desktop:
+ - gstreamer1.0-plugins-base
+ - phonon4qt5-backend-gstreamer
+ - pavucontrol
+ - alsa-utils
+ - acpi
+
+ -- Christopher Roy Bratusek <nano@jpberlin.de> Sat, 18 Apr 2015 20:21:00 +0200
+
lumina-desktop (0.8.3.440-1nano) unstable; urgency=low
* New git snapshot
diff --git a/debian/control b/debian/control
index 2ef40b6a..da781d4a 100644
--- a/debian/control
+++ b/debian/control
@@ -17,8 +17,9 @@ Replaces: lumina-core (<< 0.8.3.372)
Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils1 (= ${binary:Version}),
libluminautils1, lumina-config, lumina-fm, oxygen-icon-theme,
lumina-open, lumina-screenshot, lumina-search, lumina-info,
- lxpolkit, lumina-data, fluxbox, numlockx, xbacklight, xscreensaver,
- usbmount
+ lumina-xconfig, lxpolkit, lumina-data, fluxbox, numlockx, xbacklight,
+ xscreensaver, usbmount, gstreamer1.0-plugins-base,
+ phonon4qt5-backend-gstreamer, alsa-utils, acpi, pavucontrol
Recommends: qt5-configuration-tool
Description: Lightweight Qt5-based desktop environment
Metapackage depending on all other lumina packages.
diff --git a/debian/rules b/debian/rules
index 877c4cbb..e1e14d53 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,14 +30,12 @@ QMAKE_EXTRA_DIRS = libLumina \
dh $@ --parallel
override_dh_auto_configure:
- sed -e 's/LuminaOS-Linux/LuminaOS-Debian/g' -i libLumina/libLumina.pro
$(QMAKE) $(USER_QMAKE_FLAGS)
for d in $(QMAKE_EXTRA_DIRS) ; do (cd $$d && $(QMAKE) $(USER_QMAKE_FLAGS)); done
override_dh_auto_clean:
dh_auto_clean
-find $(CURDIR) -name *.qm -delete
- -sed -e 's/LuminaOS-Debian/LuminaOS-Linux/g' -i libLumina/libLumina.pro
override_dh_install:
dh_install --list-missing
diff --git a/libLumina/LuminaOS-Debian.cpp b/libLumina/LuminaOS-Debian.cpp
index 7ce8250f..a7be653c 100644
--- a/libLumina/LuminaOS-Debian.cpp
+++ b/libLumina/LuminaOS-Debian.cpp
@@ -152,6 +152,16 @@ void LOS::systemRestart(){ //start reboot sequence
QProcess::startDetached("shutdown -r now");
}
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ return false;
+}
+
+//Put the system into the suspend state
+void LOS::systemSuspend(){
+
+}
+
//Battery Availability
bool LOS::hasBattery(){
QString my_status = LUtils::getCmdOutput("acpi -b").join("");
diff --git a/libLumina/LuminaOS-DragonFly.cpp b/libLumina/LuminaOS-DragonFly.cpp
index b9ba58a2..57ff1b2a 100644
--- a/libLumina/LuminaOS-DragonFly.cpp
+++ b/libLumina/LuminaOS-DragonFly.cpp
@@ -148,6 +148,16 @@ void LOS::systemRestart(){ //start reboot sequence
QProcess::startDetached("shutdown -r now");
}
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ return false;
+}
+
+//Put the system into the suspend state
+void LOS::systemSuspend(){
+
+}
+
//Battery Availability
bool LOS::hasBattery(){
int val = LUtils::getCmdOutput("apm -l").join("").toInt();
diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp
index 430a31fc..c9874605 100644
--- a/libLumina/LuminaOS-FreeBSD.cpp
+++ b/libLumina/LuminaOS-FreeBSD.cpp
@@ -171,6 +171,22 @@ void LOS::systemRestart(){ //start reboot sequence
QProcess::startDetached("shutdown -ro now");
}
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ //This will only function on PC-BSD
+ //(permissions issues on standard FreeBSD unless setup a special way)
+ 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");
+}
+
//Battery Availability
bool LOS::hasBattery(){
int val = LUtils::getCmdOutput("apm -l").join("").toInt();
diff --git a/libLumina/LuminaOS-Linux.cpp b/libLumina/LuminaOS-Linux.cpp
index 46a6371a..6929c9c3 100644
--- a/libLumina/LuminaOS-Linux.cpp
+++ b/libLumina/LuminaOS-Linux.cpp
@@ -149,6 +149,16 @@ void LOS::systemRestart(){ //start reboot sequence
QProcess::startDetached("shutdown -r now");
}
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ return false;
+}
+
+//Put the system into the suspend state
+void LOS::systemSuspend(){
+
+}
+
//Battery Availability
bool LOS::hasBattery(){
QString my_status = LUtils::getCmdOutput("acpi -b").join("");
diff --git a/libLumina/LuminaOS-OpenBSD.cpp b/libLumina/LuminaOS-OpenBSD.cpp
index df6ddeba..5fda4866 100644
--- a/libLumina/LuminaOS-OpenBSD.cpp
+++ b/libLumina/LuminaOS-OpenBSD.cpp
@@ -166,6 +166,16 @@ void LOS::systemRestart(){ //start reboot sequence
QProcess::startDetached("shutdown -r now");
}
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ return false;
+}
+
+//Put the system into the suspend state
+void LOS::systemSuspend(){
+
+}
+
//Battery Availability
bool LOS::hasBattery(){
int val = LUtils::getCmdOutput("apm -b").join("").toInt();
diff --git a/libLumina/LuminaOS-kFreeBSD.cpp b/libLumina/LuminaOS-kFreeBSD.cpp
index 2b24ce51..dee5a6c8 100644
--- a/libLumina/LuminaOS-kFreeBSD.cpp
+++ b/libLumina/LuminaOS-kFreeBSD.cpp
@@ -133,6 +133,16 @@ void LOS::systemRestart(){ //start reboot sequence
QProcess::startDetached("shutdown -r now");
}
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ return false;
+}
+
+//Put the system into the suspend state
+void LOS::systemSuspend(){
+
+}
+
//Battery Availability
bool LOS::hasBattery(){
return false;
diff --git a/libLumina/LuminaOS-template.cpp b/libLumina/LuminaOS-template.cpp
index dfb9d850..aabd7da3 100644
--- a/libLumina/LuminaOS-template.cpp
+++ b/libLumina/LuminaOS-template.cpp
@@ -81,6 +81,16 @@ void LOS::systemRestart(){ //start reboot sequence
QProcess::startDetached("shutdown -r now");
}
+//Check for suspend support
+bool LOS::systemCanSuspend(){
+ return false;
+}
+
+//Put the system into the suspend state
+void LOS::systemSuspend(){
+
+}
+
//Battery Availability
bool LOS::hasBattery(){
return false; //not implemented yet
diff --git a/libLumina/LuminaOS.h b/libLumina/LuminaOS.h
index 091a8d96..eb0e2eb6 100644
--- a/libLumina/LuminaOS.h
+++ b/libLumina/LuminaOS.h
@@ -71,6 +71,11 @@ public:
static void systemShutdown(); //start poweroff sequence
//System Restart
static void systemRestart(); //start reboot sequence
+ //Check for suspend support
+ static bool systemCanSuspend();
+ //Put the system into the suspend state
+ static void systemSuspend();
+
//Battery Availability
static bool hasBattery();
diff --git a/libLumina/libLumina.pro b/libLumina/libLumina.pro
index 1b78367a..8da9598c 100644
--- a/libLumina/libLumina.pro
+++ b/libLumina/libLumina.pro
@@ -36,10 +36,22 @@ SOURCES += LuminaXDG.cpp \
LuminaOS-FreeBSD.cpp \
LuminaOS-DragonFly.cpp \
LuminaOS-OpenBSD.cpp \
- LuminaOS-Linux.cpp \
LuminaOS-kFreeBSD.cpp
# new OS support can be added here
+# check linux distribution and use specific
+# LuminaOS support functions (or fall back to
+# generic one
+
+LINUX_DISTRIBUTION = $$system(lsb_release -si)
+
+equals(LINUX_DISTRIBUTION, "Debian"): {
+ SOURCES += LuminaOS-Debian.cpp
+} else {
+ SOURCES += LuminaOS-Linux.cpp
+}
+
+
INCLUDEPATH += $$PREFIX/include
LIBS += -lX11 -lXrender -lXcomposite -lxcb -lxcb-ewmh -lxcb-icccm -lxcb-image -lxcb-composite
diff --git a/lumina-desktop/SystemWindow.cpp b/lumina-desktop/SystemWindow.cpp
index 0540a5d9..02de54b9 100644
--- a/lumina-desktop/SystemWindow.cpp
+++ b/lumina-desktop/SystemWindow.cpp
@@ -17,19 +17,23 @@ SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){
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 the shutdown/restart buttons if necessary
if( !LOS::userHasShutdownAccess() ){
ui->tool_restart->setEnabled(false);
ui->tool_shutdown->setEnabled(false);
+
}
+ ui->tool_suspend->setVisible(LOS::systemCanSuspend());
//Center this window on the 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);
@@ -55,6 +59,14 @@ void SystemWindow::sysShutdown(){
this->close();
}
+void SystemWindow::sysSuspend(){
+ //Make sure to lock the system first (otherwise anybody can access it again)
+ LUtils::runCmd("xscreensaver-command -lock");
+ //Now suspend the system
+ LOS::systemSuspend();
+ this->close();
+}
+
void SystemWindow::sysLock(){
qDebug() << "Locking the desktop...";
QProcess::startDetached("xscreensaver-command -lock");
diff --git a/lumina-desktop/SystemWindow.h b/lumina-desktop/SystemWindow.h
index 211de5fd..4b1fab44 100644
--- a/lumina-desktop/SystemWindow.h
+++ b/lumina-desktop/SystemWindow.h
@@ -38,6 +38,8 @@ private slots:
void sysShutdown();
+ void sysSuspend();
+
void sysCancel(){
this->close();
}
@@ -45,4 +47,4 @@ private slots:
void sysLock();
};
-#endif \ No newline at end of file
+#endif
diff --git a/lumina-desktop/SystemWindow.ui b/lumina-desktop/SystemWindow.ui
index b03039f5..9e25509b 100644
--- a/lumina-desktop/SystemWindow.ui
+++ b/lumina-desktop/SystemWindow.ui
@@ -14,8 +14,17 @@
<string>System Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
- <property name="margin">
- <number>0</number>
+ <property name="leftMargin">
+ <number>2</number>
+ </property>
+ <property name="topMargin">
+ <number>2</number>
+ </property>
+ <property name="rightMargin">
+ <number>2</number>
+ </property>
+ <property name="bottomMargin">
+ <number>2</number>
</property>
<item>
<widget class="QFrame" name="frame">
@@ -47,8 +56,8 @@
</property>
<property name="iconSize">
<size>
- <width>60</width>
- <height>60</height>
+ <width>64</width>
+ <height>64</height>
</size>
</property>
<property name="toolButtonStyle">
@@ -63,8 +72,8 @@
</property>
<property name="iconSize">
<size>
- <width>60</width>
- <height>60</height>
+ <width>64</width>
+ <height>64</height>
</size>
</property>
<property name="toolButtonStyle">
@@ -79,8 +88,8 @@
</property>
<property name="iconSize">
<size>
- <width>60</width>
- <height>60</height>
+ <width>64</width>
+ <height>64</height>
</size>
</property>
<property name="toolButtonStyle">
@@ -113,10 +122,19 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
- <widget class="QPushButton" name="push_cancel">
+ <widget class="QToolButton" name="push_cancel">
<property name="text">
<string>Cancel</string>
</property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextUnderIcon</enum>
+ </property>
</widget>
</item>
<item>
@@ -133,9 +151,34 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="push_lock">
+ <widget class="QToolButton" name="push_lock">
<property name="text">
- <string>Lock Screen</string>
+ <string>Lock</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextUnderIcon</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_suspend">
+ <property name="text">
+ <string>Suspend</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
diff --git a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
index 08ab49d0..b470f191 100644
--- a/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
+++ b/lumina-desktop/panel-plugins/systemdashboard/SysMenuQuick.cpp
@@ -15,7 +15,7 @@ LSysMenuQuick::LSysMenuQuick(QWidget *parent) : QWidget(parent), ui(new Ui::LSys
settings = new QSettings("panel-plugins","systemdashboard");
brighttimer = new QTimer(this);
brighttimer->setSingleShot(true);
- brighttimer->setInterval(100); //100ms delay in setting the new value
+ brighttimer->setInterval(50); //50ms delay in setting the new value
//Now reset the initial saved settings (if any)
LOS::setScreenBrightness( settings->value("screenbrightness",100).toInt() ); //default to 100%
LOS::setAudioVolume( settings->value("audiovolume", 100).toInt() ); //default to 100%
@@ -121,6 +121,11 @@ 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(){
diff --git a/lumina-fm/BackgroundWorker.cpp b/lumina-fm/BackgroundWorker.cpp
index 125e0e1c..02d2f02e 100644
--- a/lumina-fm/BackgroundWorker.cpp
+++ b/lumina-fm/BackgroundWorker.cpp
@@ -88,14 +88,19 @@ void BackgroundWorker::startDirChecks(QString path){
}
-void BackgroundWorker::createStatusBarMsg(QFileInfoList fileList, QString path, QString message){
+void BackgroundWorker::createStatusBarMsg(QFileInfoList fileList, QString path, QString messageFolders, QString messageFiles){
+
//collect some statistics of dir and display them in statusbar
//Get the total size of the items
double totalSizes = 0;
+ int numberFolders = 0;
+ int numberFiles = 0;
for(int i=0; i<fileList.length(); i++){
if(!fileList[i].isDir()){
+ numberFiles++;
totalSizes += fileList[i].size(); //in Bytes
}
+ else { numberFolders++; }
}
//Convert the size into display units
static QStringList units = QStringList() << tr("B") << tr("KB") << tr("MB") << tr("GB") << tr("TB");
@@ -105,7 +110,8 @@ void BackgroundWorker::createStatusBarMsg(QFileInfoList fileList, QString path,
totalSizes = totalSizes/1024;
}
//Assemble the message
- QString msgStatusBar = QString(tr("%1: %2")).arg(message).arg(fileList.length());
+ QString msgStatusBar = QString(tr("%1: %2 / %3: %4")).arg(messageFolders).arg(numberFolders).arg(messageFiles).arg(numberFiles);
+
if(totalSizes > 0){
totalSizes = qRound(totalSizes*100)/100.0; //round to 2 decimel places
msgStatusBar += " "+QString(tr("Total size: %1 %2")).arg(QString::number(totalSizes), units[cunit]);
diff --git a/lumina-fm/BackgroundWorker.h b/lumina-fm/BackgroundWorker.h
index d50612fa..72060cad 100644
--- a/lumina-fm/BackgroundWorker.h
+++ b/lumina-fm/BackgroundWorker.h
@@ -34,7 +34,7 @@ public slots:
//Kickoff processes with these slots
// and then listen for the appropriate signals when finished
void startDirChecks(QString path);
- void createStatusBarMsg(QFileInfoList fileList, QString path, QString message);
+ void createStatusBarMsg(QFileInfoList fileList, QString path, QString messageFolders, QString messageFiles);
signals:
void ImagesAvailable(QStringList files);
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index 604e4c9c..0c38ae34 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -219,7 +219,7 @@ void MainUI::setupConnections(){
connect(worker, SIGNAL(SnapshotsAvailable(QString, QStringList)), this, SLOT(AvailableBackups(QString, QStringList)) );
//Background worker class for statusbar
- connect(this, SIGNAL(Si_AdaptStatusBar(QFileInfoList, QString, QString)), worker, SLOT(createStatusBarMsg(QFileInfoList, QString, QString)) );
+ connect(this, SIGNAL(Si_AdaptStatusBar(QFileInfoList, QString, QString, QString)), worker, SLOT(createStatusBarMsg(QFileInfoList, QString, QString, QString)) );
connect(worker, SIGNAL(Si_DisplayStatusBar(QString)), this, SLOT(DisplayStatusBar(QString)) );
//Action buttons on browser page
@@ -850,7 +850,7 @@ void MainUI::currentDirectoryLoaded(){
ui->tool_goToRestore->setVisible(false);
ui->tool_goToImages->setVisible(false);
emit DirChanged(getCurrentDir());
- emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), getCurrentDir(), tr("Items"));
+ emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), getCurrentDir(), tr("Folders"), tr("Files"));
ItemSelectionChanged();
}
@@ -983,9 +983,9 @@ void MainUI::ItemSelectionChanged(){
QFileInfoList sel = getSelectedItems();
//display info related to files selected.
//TO CHECK: impact if filesystem is very slow
- if(sel.size()>0){ emit Si_AdaptStatusBar(sel, "", tr("Items selected")); }
- else{ emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), getCurrentDir(), tr("Items")); }
-
+ if(sel.size()>0){ emit Si_AdaptStatusBar(sel, "", tr("Selected Folders"), tr("Files"));}
+ else{ emit Si_AdaptStatusBar(fsmod->rootDirectory().entryInfoList(), getCurrentDir(), tr("Folders"), tr("Files")); }
+
ui->tool_act_run->setEnabled(sel.length()==1);
ui->tool_act_runwith->setEnabled(sel.length()==1);
ui->tool_act_rm->setEnabled(!sel.isEmpty() && isUserWritable);
diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h
index d88492d6..58f03ee8 100644
--- a/lumina-fm/MainUI.h
+++ b/lumina-fm/MainUI.h
@@ -225,7 +225,7 @@ private slots:
signals:
void DirChanged(QString path);
- void Si_AdaptStatusBar(QFileInfoList fileList, QString path, QString message);
+ void Si_AdaptStatusBar(QFileInfoList fileList, QString path, QString messageFolders, QString messageFiles);
protected:
void resizeEvent(QResizeEvent*);
bgstack15