aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/widgets/DirWidget.cpp39
-rw-r--r--lumina-fm/widgets/DirWidget.h6
2 files changed, 20 insertions, 25 deletions
diff --git a/lumina-fm/widgets/DirWidget.cpp b/lumina-fm/widgets/DirWidget.cpp
index 7954cc8e..6c1c4553 100644
--- a/lumina-fm/widgets/DirWidget.cpp
+++ b/lumina-fm/widgets/DirWidget.cpp
@@ -29,8 +29,6 @@
const QString sessionsettings_config_file = QDir::homePath() + "/.lumina/LuminaDE/sessionsettings.conf";
-QStringList DirWidget::date_format = QStringList();
-
DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){
ui->setupUi(this); //load the designer file
ID = objID;
@@ -162,6 +160,23 @@ void DirWidget::setShowCloseButton(bool show){
ui->actionClose_Browser->setVisible(show);
}
+QStringList DirWidget::getDateFormat() {
+ return date_format;
+}
+
+// This function is only called if user changes sessionsettings. By doing so, operations like sorting by date
+// are faster because the date format is already stored in DirWidget::date_format static variable
+void DirWidget::setDateFormat() {
+ if(!date_format.isEmpty())
+ date_format.clear();
+ QSettings settings("LuminaDE","sessionsettings");
+ QString date, time;
+ // If value doesn't exist or is not setted, empty string is returned
+ date_format << settings.value("DateFormat").toString();
+ date_format << settings.value("TimeFormat").toString();
+}
+
+
// ================
// PUBLIC SLOTS
// ================
@@ -905,23 +920,3 @@ void DirWidget::mouseReleaseEvent(QMouseEvent *ev){
ev->ignore(); //not handled here
}
}
-
-//====================
-// STATIC
-//====================
-
-QStringList DirWidget::getDateFormat() {
- return DirWidget::date_format;
-}
-
-// This function is only called if user changes sessionsettings. By doing so, operations like sorting by date
-// are faster because the date format is already stored in DirWidget::date_format static variable
-void DirWidget::setDateFormat() {
- if(!DirWidget::date_format.isEmpty())
- DirWidget::date_format.clear();
- QSettings settings("LuminaDE","sessionsettings");
- QString date, time;
- // If value doesn't exist or is not setted, empty string is returned
- DirWidget::date_format << settings.value("DateFormat").toString();
- DirWidget::date_format << settings.value("TimeFormat").toString();
-}
diff --git a/lumina-fm/widgets/DirWidget.h b/lumina-fm/widgets/DirWidget.h
index 6f0e3d8b..adf349a9 100644
--- a/lumina-fm/widgets/DirWidget.h
+++ b/lumina-fm/widgets/DirWidget.h
@@ -54,8 +54,8 @@ public:
void setShowCloseButton(bool show);
//Date format for show items
- static QStringList getDateFormat();
- static void setDateFormat();
+ QStringList getDateFormat();
+ void setDateFormat();
public slots:
void LoadDir(QString dir, LFileInfoList list);
@@ -98,7 +98,7 @@ private:
//Functions for internal use
void setupConnections();
QStringList currentSelection();
- static QStringList date_format;
+ QStringList date_format;
private slots:
//UI BUTTONS/Actions
bgstack15