summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJekyll Wu <adaptee@gmail.com>2012-02-07 11:16:28 (GMT)
committerJekyll Wu <adaptee@gmail.com>2012-02-07 11:16:49 (GMT)
commit52f656663f539df8a53a8a2627e569d0c4065a7a (patch)
tree126c22a02c6e08861b289270ed5d766c2178636c
parent2a4795c509f5f08da5cda110cb5f27b4321d24ec (diff)
Add dbus method for returning the name of the default profile
FEATURE:252532 FIXED-IN:4.9
-rw-r--r--src/ViewManager.cpp5
-rw-r--r--src/ViewManager.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
index a9fb193..987ae33 100644
--- a/src/ViewManager.cpp
+++ b/src/ViewManager.cpp
@@ -988,6 +988,11 @@ int ViewManager::newSession(QString profile, QString directory)
return session->sessionId();
}
+QString ViewManager::defaultProfile()
+{
+ return SessionManager::instance()->defaultProfile()->name();
+}
+
QStringList ViewManager::profileList()
{
QStringList list;
diff --git a/src/ViewManager.h b/src/ViewManager.h
index 9b85358..5e0d437 100644
--- a/src/ViewManager.h
+++ b/src/ViewManager.h
@@ -241,6 +241,9 @@ public slots:
*/
int newSession(QString profile, QString directory);
+ // DBus slot that returns the name of default profile
+ QString defaultProfile();
+
// DBus slot that returns a string list of defined (known) profiles
QStringList profileList();