diff options
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/panel-plugins/clock/LClock.cpp | 4 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/clock/LClock.h | 4 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.cpp | 10 |
3 files changed, 17 insertions, 1 deletions
diff --git a/lumina-desktop/panel-plugins/clock/LClock.cpp b/lumina-desktop/panel-plugins/clock/LClock.cpp index e91a3a71..79cae84b 100644 --- a/lumina-desktop/panel-plugins/clock/LClock.cpp +++ b/lumina-desktop/panel-plugins/clock/LClock.cpp @@ -35,6 +35,7 @@ LClock::~LClock(){ void LClock::updateTime(){ QDateTime CT = QDateTime::currentDateTime(); + if(useTZ){ CT = CT.toTimeZone(TZ); } //Now update the display QString label; if(deftime){ label = CT.time().toString(Qt::SystemLocaleShortDate) ; } @@ -53,5 +54,8 @@ void LClock::updateFormats(){ datefmt = LSession::handle()->sessionSettings()->value("DateFormat","").toString(); deftime = timefmt.simplified().isEmpty(); defdate = datefmt.simplified().isEmpty(); + useTZ = LSession::handle()->sessionSettings()->value("CustomTimeZone",false).toBool(); + if(useTZ){ TZ = QTimeZone( LSession::handle()->sessionSettings()->value("TimeZoneByteCode", QByteArray()).toByteArray() ); } + } diff --git a/lumina-desktop/panel-plugins/clock/LClock.h b/lumina-desktop/panel-plugins/clock/LClock.h index 1e4c8294..8156e7d8 100644 --- a/lumina-desktop/panel-plugins/clock/LClock.h +++ b/lumina-desktop/panel-plugins/clock/LClock.h @@ -13,6 +13,7 @@ #include <QWidget> #include <QString> #include <QLocale> +#include <QTimeZone> #include "../LPPlugin.h" @@ -26,7 +27,8 @@ private: QTimer *timer; QLabel *labelWidget; QString timefmt, datefmt; - bool deftime, defdate; + bool deftime, defdate, useTZ; + QTimeZone TZ; private slots: void updateTime(); diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp index 82a06012..52d60714 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp @@ -194,6 +194,16 @@ void UserWidget::updateFavItems(){ connect(it, SIGNAL(RemovedShortcut()), this, SLOT(updateFavItems()) ); } static_cast<QBoxLayout*>(ui->scroll_fav->widget()->layout())->addStretch(); + + //Clean up any broken sym-links in the favorites directory + /*items = favdir.entryInfoList(QDir::System | QDir::NoDotAndDotDot, QDir::Name); + for(int i=0; i<items.length(); i++){ + if(items[i].isSymLink() && !items[i].exists()){ + //Broken sym-link - remove it + QFile::remove(items[i].absoluteFilePath()); + } + }*/ + } //Apps Tab |