diff options
author | Ken Moore <ken@ixsystems.com> | 2016-11-21 11:00:21 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-11-21 11:00:21 -0500 |
commit | c0024651b0e21c77d34d01328bc406484d45880b (patch) | |
tree | 11fc8e6052ddb18b7f830b535d5c476952af6c72 /src-qt5 | |
parent | Add the "lockdesktop" menu plugin to the TrueOS default settings. (diff) | |
download | lumina-c0024651b0e21c77d34d01328bc406484d45880b.tar.gz lumina-c0024651b0e21c77d34d01328bc406484d45880b.tar.bz2 lumina-c0024651b0e21c77d34d01328bc406484d45880b.zip |
Add the ability to specify "--page <page_id>" when running lumina-config to go to a particular page.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core-utils/lumina-config/main.cpp | 7 | ||||
-rw-r--r-- | src-qt5/core-utils/lumina-config/mainWindow.cpp | 11 | ||||
-rw-r--r-- | src-qt5/core-utils/lumina-config/mainWindow.h | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/src-qt5/core-utils/lumina-config/main.cpp b/src-qt5/core-utils/lumina-config/main.cpp index 27493bac..e2c757a3 100644 --- a/src-qt5/core-utils/lumina-config/main.cpp +++ b/src-qt5/core-utils/lumina-config/main.cpp @@ -21,10 +21,11 @@ int main(int argc, char ** argv) if(!a.isPrimaryProcess()){ return 0; } //LuminaThemeEngine theme(&a); - + QStringList args; + for(int i=1; i<argc; i++){ args << QString(argv[i]); } mainWindow w; - QObject::connect(&a, SIGNAL(InputsAvailable(QStringList)), &w, SLOT(slotSingleInstance()) ); - //QObject::connect(&theme, SIGNAL(updateIcons()), &w, SLOT(setupIcons()) ); + QObject::connect(&a, SIGNAL(InputsAvailable(QStringList)), &w, SLOT(slotSingleInstance(QStringList)) ); + w.slotSingleInstance(args); w.show(); int retCode = a.exec(); diff --git a/src-qt5/core-utils/lumina-config/mainWindow.cpp b/src-qt5/core-utils/lumina-config/mainWindow.cpp index 659cb306..595d69f6 100644 --- a/src-qt5/core-utils/lumina-config/mainWindow.cpp +++ b/src-qt5/core-utils/lumina-config/mainWindow.cpp @@ -27,7 +27,7 @@ mainWindow::mainWindow() : QMainWindow(), ui(new Ui::mainWindow()){ connect(backShortcut, SIGNAL(activated()), this, SLOT(on_actionBack_triggered()) ); setupIcons(); loadMonitors(); - changePage(""); //load the default main page + //changePage(""); //load the default main page } mainWindow::~mainWindow(){ @@ -37,7 +37,14 @@ mainWindow::~mainWindow(){ //============== // PUBLIC SLOTS //============== -void mainWindow::slotSingleInstance(){ +void mainWindow::slotSingleInstance(QStringList args){ + for(int i=0; i<args.length(); i++){ + if(args[i]=="--page" && i<args.length()-1){ + i++; + changePage(args[i]); + } + } + if(cpage == "somerandomjunktostartwith"){ changePage(""); } this->showNormal(); //just in case it is hidden/minimized } diff --git a/src-qt5/core-utils/lumina-config/mainWindow.h b/src-qt5/core-utils/lumina-config/mainWindow.h index 14969473..71fda711 100644 --- a/src-qt5/core-utils/lumina-config/mainWindow.h +++ b/src-qt5/core-utils/lumina-config/mainWindow.h @@ -19,7 +19,7 @@ public: ~mainWindow(); public slots: - void slotSingleInstance(); + void slotSingleInstance(QStringList args); void setupIcons(); void loadMonitors(); |