summaryrefslogtreecommitdiffstats
path: root/src/xsession.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsession.h')
-rw-r--r--src/xsession.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/xsession.h b/src/xsession.h
index 27e431e..fcef5d4 100644
--- a/src/xsession.h
+++ b/src/xsession.h
@@ -6,6 +6,7 @@
#include <QDomDocument>
#include <QDir>
#include <QProcess>
+#include <QRegularExpression>
#include "session.h"
class XSession : public Session {
@@ -17,7 +18,6 @@ class XSession : public Session {
bool isActive() const;
bool isLocked() const;
bool isValid() const;
- int priority() const;
SectionType section() const {
return SECTION_XSESSION;
@@ -35,6 +35,10 @@ class XSession : public Session {
return this->exec_;
}
+ int priority() const {
+ return this->priority_;
+ }
+
QIcon icon() const;
bool run() const;
@@ -52,8 +56,23 @@ class XSession : public Session {
QString exec_;
QString comment_;
QString icon_;
+ int priority_;
QProcess *_process;
+
+ static void loadXSessionsConfig();
+
+ static inline int find(QChar c, int start, const QString& line)
+ {
+ do {
+ int next = line.indexOf(c, start);
+ if (next == -1)
+ return -1;
+ if (line.at(next - 1) != '\\')
+ return next;
+ start = next + 1;
+ } while (true);
+ }
};
#endif /*VMCHOOSER_XSESSION_H_*/