diff options
Diffstat (limited to 'lumina-config')
-rw-r--r-- | lumina-config/mainUI.cpp | 24 | ||||
-rw-r--r-- | lumina-config/mainUI.h | 2 | ||||
-rw-r--r-- | lumina-config/mainUI.ui | 63 |
3 files changed, 79 insertions, 10 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index c1f5b222..2e7b55ac 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -40,8 +40,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){ QTimer::singleShot(10, this, SLOT(loadCurrentSettings()) ); //Disable the incomplete pages/items at the moment - //ui->check_session_playloginaudio->setVisible(false); - //ui->check_session_playlogoutaudio->setVisible(false); + } MainUI::~MainUI(){ @@ -120,6 +119,8 @@ void MainUI::setupIcons(){ ui->tool_session_addfile->setIcon( LXDG::findIcon("run-build-file","") ); ui->tool_session_newtheme->setIcon( LXDG::findIcon("preferences-desktop-theme","") ); ui->tool_session_newcolor->setIcon( LXDG::findIcon("preferences-desktop-color","") ); + ui->push_session_resetSysDefaults->setIcon( LXDG::findIcon("pcbsd","view-refresh") ); + ui->push_session_resetLuminaDefaults->setIcon( LXDG::findIcon("Lumina-DE","") ); } @@ -213,6 +214,8 @@ void MainUI::setupConnections(){ connect(ui->tool_session_newcolor, SIGNAL(clicked()), this, SLOT(sessionEditColor()) ); connect(ui->tool_session_newtheme, SIGNAL(clicked()), this, SLOT(sessionEditTheme()) ); connect(ui->push_session_setUserIcon, SIGNAL(clicked()), this, SLOT(sessionChangeUserIcon()) ); + connect(ui->push_session_resetSysDefaults, SIGNAL(clicked()), this, SLOT(sessionResetSys()) ); + connect(ui->push_session_resetLuminaDefaults, SIGNAL(clicked()), this, SLOT(sessionResetLumina()) ); } void MainUI::setupMenus(){ @@ -529,8 +532,8 @@ void MainUI::loadCurrentSettings(bool screenonly){ QStringList items = settings->value("menu/itemlist", QStringList() ).toStringList(); if(items.isEmpty()){ items << "terminal" << "filemanager" << "applications" << "line" << "settings"; } //qDebug() << "Menu Items:" << items; - ui->list_menu->clear(); - for(int i=0; i<items.length(); i++){ + ui->list_menu->clear(); + for(int i=0; i<items.length(); i++){ LPI info = PINFO->menuPluginInfo(items[i]); if(items[i].startsWith("app::::")){ bool ok = false; @@ -552,7 +555,7 @@ void MainUI::loadCurrentSettings(bool screenonly){ item->setText( info.name ); item->setToolTip( info.description ); ui->list_menu->addItem(item); - } + } checkmenuicons(); //update buttons } //Shortcuts Page @@ -1918,4 +1921,13 @@ void MainUI::sessionChangeUserIcon(){ //Now re-load the icon in the UI ui->push_session_setUserIcon->setIcon( LXDG::findIcon(QDir::homePath()+"/.loginIcon.png", "user-identity") ); } -
\ No newline at end of file + +void MainUI::sessionResetSys(){ + LUtils::LoadSystemDefaults(); + QTimer::singleShot(500,this, SLOT(loadCurrentSettings()) ); +} + +void MainUI::sessionResetLumina(){ + LUtils::LoadSystemDefaults(true); //skip OS customizations + QTimer::singleShot(500,this, SLOT(loadCurrentSettings()) ); +} diff --git a/lumina-config/mainUI.h b/lumina-config/mainUI.h index 4c13f978..d3c622be 100644 --- a/lumina-config/mainUI.h +++ b/lumina-config/mainUI.h @@ -161,6 +161,8 @@ private slots: void sessionEditColor(); void sessionEditTheme(); void sessionChangeUserIcon(); + void sessionResetSys(); + void sessionResetLumina(); }; #endif diff --git a/lumina-config/mainUI.ui b/lumina-config/mainUI.ui index 6486ed6c..5d016d6c 100644 --- a/lumina-config/mainUI.ui +++ b/lumina-config/mainUI.ui @@ -384,8 +384,8 @@ <rect> <x>0</x> <y>0</y> - <width>265</width> - <height>184</height> + <width>214</width> + <height>140</height> </rect> </property> <attribute name="label"> @@ -621,8 +621,8 @@ <rect> <x>0</x> <y>0</y> - <width>266</width> - <height>184</height> + <width>214</width> + <height>140</height> </rect> </property> <attribute name="label"> @@ -1410,6 +1410,61 @@ </property> </spacer> </item> + <item> + <widget class="QGroupBox" name="groupBox_2"> + <property name="font"> + <font> + <weight>50</weight> + <bold>false</bold> + </font> + </property> + <property name="title"> + <string>Reset Desktop Settings</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_20"> + <item> + <spacer name="horizontalSpacer_18"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="push_session_resetSysDefaults"> + <property name="text"> + <string>Return to system defaults</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="push_session_resetLuminaDefaults"> + <property name="text"> + <string>Return to Lumina defaults</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_17"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> </layout> </widget> <widget class="QWidget" name="tab_2"> |