aboutsummaryrefslogtreecommitdiff
path: root/lumina-config
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-config')
-rw-r--r--lumina-config/AppDialog.h6
-rw-r--r--lumina-config/KeyCatch.h2
-rw-r--r--lumina-config/LPlugins.cpp14
-rw-r--r--lumina-config/PanelWidget.ui56
-rw-r--r--lumina-config/mainUI.cpp584
-rw-r--r--lumina-config/mainUI.h25
-rw-r--r--lumina-config/mainUI.ui191
7 files changed, 241 insertions, 637 deletions
diff --git a/lumina-config/AppDialog.h b/lumina-config/AppDialog.h
index acc6c73e..8c35d9b7 100644
--- a/lumina-config/AppDialog.h
+++ b/lumina-config/AppDialog.h
@@ -39,8 +39,10 @@ public:
ui->comboBox->addItem( LXDG::findIcon(APPS[i].icon,"application-x-executable"), APPS[i].name );
}
this->setWindowIcon( LXDG::findIcon("system-search","") );
- QPoint center = QApplication::desktop()->screenGeometry(QCursor::pos()).center();
- this->move(center.x()-(this->width()/2), center.y()-(this->height()/2) );
+ if(parent!=0){
+ QPoint center = parent->geometry().center();
+ this->move(center.x()-(this->width()/2), center.y()-(this->height()/2) );
+ }
}
~AppDialog(){}
diff --git a/lumina-config/KeyCatch.h b/lumina-config/KeyCatch.h
index 78b34ac2..03193972 100644
--- a/lumina-config/KeyCatch.h
+++ b/lumina-config/KeyCatch.h
@@ -76,12 +76,14 @@ protected:
//Now get the main key
qkeys.replace("+"," ");
if(event->key()==0){
+ if(qkeys.isEmpty()){ qkeys="None "; } //For Fluxbox, need "None <X Key number>"
qkeys.append( QString::number(event->nativeVirtualKey()) );
}else{
qkeys.append( QKeySequence(event->key()).toString() ); //also save the text version (for display)
}
//Remove the modifier if it is only "shift", and the main key is not a symbol
xkeys = qkeys;
+ qkeys.remove("None "); //The display/Qt keycode does not need to show this
if(!xkeys.section(" ",-1).isEmpty() && xkeys.contains("Shift ")){
if(!xkeys.section(" ",-1).at(0).isLetter()){
xkeys.remove("Shift "); //The symbol/keycode is already different
diff --git a/lumina-config/LPlugins.cpp b/lumina-config/LPlugins.cpp
index 31b189bb..16725259 100644
--- a/lumina-config/LPlugins.cpp
+++ b/lumina-config/LPlugins.cpp
@@ -6,6 +6,8 @@
//===========================================
#include "LPlugins.h"
+#include <LuminaUtils.h>
+
LPlugins::LPlugins(){
LoadPanelPlugins();
LoadDesktopPlugins();
@@ -195,6 +197,18 @@ void LPlugins::LoadDesktopPlugins(){
info.ID = "systemmonitor";
info.icon = "cpu";
DESKTOP.insert(info.ID, info);
+ //Available QtQuick scripts
+ QStringList quickID = LUtils::listQuickPlugins();
+ for(int i=0; i<quickID.length(); i++){
+ QStringList quickinfo = LUtils::infoQuickPlugin(quickID[i]); //Returns: [name, description, icon]
+ if(quickinfo.length() < 3){ continue; } //invalid file (unreadable/other)
+ info = LPI();
+ info.name = quickinfo[0];
+ info.description = quickinfo[1];
+ info.ID = "quick-"+quickID[i]; //the "quick-" prefix is required for the desktop plugin syntax
+ info.icon = quickinfo[2];
+ DESKTOP.insert(info.ID, info);
+ }
}
void LPlugins::LoadMenuPlugins(){
diff --git a/lumina-config/PanelWidget.ui b/lumina-config/PanelWidget.ui
index 9cf4ffdb..b078a15e 100644
--- a/lumina-config/PanelWidget.ui
+++ b/lumina-config/PanelWidget.ui
@@ -6,25 +6,25 @@
<rect>
<x>0</x>
<y>0</y>
- <width>245</width>
- <height>246</height>
+ <width>250</width>
+ <height>239</height>
</rect>
</property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
- <width>245</width>
+ <width>250</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>245</width>
+ <width>400</width>
<height>16777215</height>
</size>
</property>
@@ -87,8 +87,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>241</width>
- <height>133</height>
+ <width>246</width>
+ <height>125</height>
</rect>
</property>
<attribute name="label">
@@ -113,12 +113,19 @@
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
- <string>Screen Edge:</string>
+ <string>Edge:</string>
</property>
</widget>
</item>
<item row="0" column="1">
- <widget class="QComboBox" name="combo_edge"/>
+ <widget class="QComboBox" name="combo_edge">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
@@ -177,7 +184,14 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="QComboBox" name="combo_align"/>
+ <widget class="QComboBox" name="combo_align">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
</item>
</layout>
</widget>
@@ -186,8 +200,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>241</width>
- <height>133</height>
+ <width>246</width>
+ <height>125</height>
</rect>
</property>
<attribute name="label">
@@ -274,8 +288,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>241</width>
- <height>133</height>
+ <width>260</width>
+ <height>112</height>
</rect>
</property>
<attribute name="label">
@@ -295,7 +309,14 @@
<number>2</number>
</property>
<item>
- <widget class="QListWidget" name="list_plugins"/>
+ <widget class="QListWidget" name="list_plugins">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
@@ -318,9 +339,12 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
- <width>40</width>
+ <width>10</width>
<height>20</height>
</size>
</property>
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp
index 2a98545a..4c1bd4a4 100644
--- a/lumina-config/mainUI.cpp
+++ b/lumina-config/mainUI.cpp
@@ -1,6 +1,6 @@
//===========================================
// Lumina-DE source code
-// Copyright (c) 2014, Ken Moore
+// Copyright (c) 2014-2015, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
@@ -12,6 +12,9 @@
#include <QTime>
#include <QDate>
#include <QTimeZone>
+#include <QScrollBar>
+
+#include <unistd.h>
MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){
ui->setupUi(this); //load the designer file
@@ -83,33 +86,13 @@ void MainUI::setupIcons(){
ui->tool_desk_addbg->setIcon( LXDG::findIcon("list-add","") );
ui->tool_desk_addbgcolor->setIcon( LXDG::findIcon("format-fill-color","") );
ui->tool_desk_rmbg->setIcon( LXDG::findIcon("list-remove","") );
- ui->push_addDesktopPlugin->setIcon( LXDG::findIcon("list-add","") );
ui->tabWidget_desktop->setTabIcon( ui->tabWidget_desktop->indexOf(ui->tab_wallpaper), LXDG::findIcon("preferences-desktop-wallpaper","") );
ui->tabWidget_desktop->setTabIcon( ui->tabWidget_desktop->indexOf(ui->tab_themes), LXDG::findIcon("preferences-desktop-theme","") );
-
+ ui->tool_desktop_addplugin->setIcon( LXDG::findIcon("list-add","") );
+ ui->tool_desktop_rmplugin->setIcon( LXDG::findIcon("list-remove","") );
+
//Panels Page
ui->tool_panels_add->setIcon( LXDG::findIcon("list-add","") );
- /*ui->tool_panel1_add->setIcon( LXDG::findIcon("list-add","") );
- ui->tool_panel1_rm->setIcon( LXDG::findIcon("list-remove","") );
- ui->tool_panel1_addplugin->setIcon( LXDG::findIcon("list-add","") );
- ui->tool_panel1_rmplugin->setIcon( LXDG::findIcon("list-remove","") );
- ui->tool_panel1_upplug->setIcon( LXDG::findIcon("go-up","") );
- ui->tool_panel1_dnplug->setIcon( LXDG::findIcon("go-down","") );
- ui->tool_panel1_getcolor->setIcon( LXDG::findIcon("preferences-desktop-color","") );
- ui->toolBox_panel1->setItemIcon(0,LXDG::findIcon("preferences-desktop-display",""));
- ui->toolBox_panel1->setItemIcon(1,LXDG::findIcon("preferences-plugin",""));
- ui->tool_panel2_add->setIcon( LXDG::findIcon("list-add","") );
- ui->tool_panel2_rm->setIcon( LXDG::findIcon("list-remove","") );
- ui->tool_panel2_addplugin->setIcon( LXDG::findIcon("list-add","") );
- ui->tool_panel2_rmplugin->setIcon( LXDG::findIcon("list-remove","") );
- ui->tool_panel2_upplug->setIcon( LXDG::findIcon("go-up","") );
- ui->tool_panel2_dnplug->setIcon( LXDG::findIcon("go-down","") );
- ui->tool_panel2_getcolor->setIcon( LXDG::findIcon("preferences-desktop-color","") );
- ui->toolBox_panel2->setItemIcon(0,LXDG::findIcon("preferences-desktop-display",""));
- ui->toolBox_panel2->setItemIcon(1,LXDG::findIcon("preferences-plugin",""));
- ui->tabWidget_panels->setTabIcon( ui->tabWidget_panels->indexOf(ui->tab_panels), LXDG::findIcon("configure-toolbars","") );
- ui->tabWidget_panels->setTabIcon( ui->tabWidget_panels->indexOf(ui->tab_desktopInterface), LXDG::findIcon("preferences-plugin","") );
- */
//Menu Page
ui->tool_menu_add->setIcon( LXDG::findIcon("list-add","") );
@@ -158,44 +141,17 @@ void MainUI::setupConnections(){
//connect(ui->combo_desk_plugs, SIGNAL(currentIndexChanged(int)), this, SLOT(deskplugchanged()) );
connect(ui->combo_desk_bg, SIGNAL(currentIndexChanged(int)), this, SLOT(deskbgchanged()) );
connect(ui->radio_desk_multi, SIGNAL(toggled(bool)), this, SLOT(desktimechanged()) );
- connect(ui->push_addDesktopPlugin, SIGNAL(clicked()), this, SLOT(deskplugadded()) );
+ connect(ui->tool_desktop_addplugin, SIGNAL(clicked()), this, SLOT(deskplugadded()) );
+ connect(ui->tool_desktop_rmplugin, SIGNAL(clicked()), this, SLOT(deskplugremoved()) );
connect(ui->tool_desk_addbg, SIGNAL(clicked()), this, SLOT(deskbgadded()) );
connect(ui->tool_desk_addbgcolor, SIGNAL(clicked()), this, SLOT(deskbgcoloradded()) );
connect(ui->tool_desk_rmbg, SIGNAL(clicked()), this, SLOT(deskbgremoved()) );
connect(ui->spin_desk_min, SIGNAL(valueChanged(int)), this, SLOT(desktimechanged()) );
connect(ui->check_desktop_autolaunchers, SIGNAL(clicked()), this, SLOT(desktimechanged()) ); //just need to poke the save routines
-
+
//Panels Page
connect(ui->tool_panels_add, SIGNAL(clicked()), this, SLOT(newPanel()) );
- /*connect(ui->tool_panel1_add,SIGNAL(clicked()), this, SLOT(addpanel1()) );
- connect(ui->tool_panel2_add,SIGNAL(clicked()), this, SLOT(addpanel2()) );
- connect(ui->tool_panel1_rm,SIGNAL(clicked()), this, SLOT(rmpanel1()) );
- connect(ui->tool_panel2_rm,SIGNAL(clicked()), this, SLOT(rmpanel2()) );
- connect(ui->tool_panel1_getcolor,SIGNAL(clicked()), this, SLOT(getpanel1color()) );
- connect(ui->tool_panel2_getcolor,SIGNAL(clicked()), this, SLOT(getpanel2color()) );
- connect(ui->toolBox_panel1, SIGNAL(currentChanged(int)), this, SLOT(adjustpanel2()) );
- connect(ui->toolBox_panel2, SIGNAL(currentChanged(int)), this, SLOT(adjustpanel1()) );
- connect(ui->combo_panel1_loc, SIGNAL(currentIndexChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->combo_panel2_loc, SIGNAL(currentIndexChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->combo_panel1_align, SIGNAL(currentIndexChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->combo_panel2_align, SIGNAL(currentIndexChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->spin_panel1_size, SIGNAL(valueChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->spin_panel2_size, SIGNAL(valueChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->spin_panel1_length, SIGNAL(valueChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->spin_panel2_length, SIGNAL(valueChanged(int)), this, SLOT(panelValChanged()) );
- connect(ui->check_panel1_hidepanel, SIGNAL(clicked()), this, SLOT(panelValChanged()) );
- connect(ui->check_panel2_hidepanel, SIGNAL(clicked()), this, SLOT(panelValChanged()) );
- connect(ui->check_panel1_usetheme, SIGNAL(clicked()), this, SLOT(panelValChanged()) );
- connect(ui->check_panel2_usetheme, SIGNAL(clicked()), this, SLOT(panelValChanged()) );
- connect(ui->tool_panel1_addplugin, SIGNAL(clicked()), this, SLOT(addpanel1plugin()) );
- connect(ui->tool_panel1_rmplugin, SIGNAL(clicked()), this, SLOT(rmpanel1plugin()) );
- connect(ui->tool_panel1_upplug, SIGNAL(clicked()), this, SLOT(uppanel1plugin()) );
- connect(ui->tool_panel1_dnplug, SIGNAL(clicked()), this, SLOT(dnpanel1plugin()) );
- connect(ui->tool_panel2_addplugin, SIGNAL(clicked()), this, SLOT(addpanel2plugin()) );
- connect(ui->tool_panel2_rmplugin, SIGNAL(clicked()), this, SLOT(rmpanel2plugin()) );
- connect(ui->tool_panel2_upplug, SIGNAL(clicked()), this, SLOT(uppanel2plugin()) );
- connect(ui->tool_panel2_dnplug, SIGNAL(clicked()), this, SLOT(dnpanel2plugin()) );
- */
+
//Menu Page
connect(ui->tool_menu_add, SIGNAL(clicked()), this, SLOT(addmenuplugin()) );
connect(ui->tool_menu_rm, SIGNAL(clicked()), this, SLOT(rmmenuplugin()) );
@@ -208,8 +164,6 @@ void MainUI::setupConnections(){
connect(ui->tool_shortcut_set, SIGNAL(clicked()), this, SLOT(getKeyPress()) );
//Defaults Page
- //connect(ui->tool_defaults_addextension, SIGNAL(clicked()), this, SLOT(adddefaultextension()) );
- //connect(ui->tool_defaults_addgroup, SIGNAL(clicked()), this, SLOT(adddefaultgroup()) );
connect(ui->tool_default_filemanager, SIGNAL(clicked()), this, SLOT(changeDefaultFileManager()) );
connect(ui->tool_default_terminal, SIGNAL(clicked()), this, SLOT(changeDefaultTerminal()) );
connect(ui->tool_default_webbrowser, SIGNAL(clicked()), this, SLOT(changeDefaultBrowser()) );
@@ -223,7 +177,6 @@ void MainUI::setupConnections(){
connect(ui->tool_session_addapp, SIGNAL(clicked()), this, SLOT(addsessionstartapp()) );
connect(ui->tool_session_addbin, SIGNAL(clicked()), this, SLOT(addsessionstartbin()) );
connect(ui->tool_session_addfile, SIGNAL(clicked()), this, SLOT(addsessionstartfile()) );
- //connect(ui->tool_session_rmapp, SIGNAL(clicked()), this, SLOT(rmsessionstartitem()) );
connect(ui->combo_session_wfocus, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionoptchanged()) );
connect(ui->combo_session_wloc, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionoptchanged()) );
connect(ui->combo_session_wtheme, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionthemechanged()) );
@@ -252,28 +205,6 @@ void MainUI::setupConnections(){
}
void MainUI::setupMenus(){
- //Desktop Plugin Menu
- /*ui->combo_desk_plugs->clear();
- QStringList plugs = PINFO->desktopPlugins();
- for(int i=0; i<plugs.length(); i++){
- LPI info = PINFO->desktopPluginInfo(plugs[i]);
- ui->combo_desk_plugs->addItem( LXDG::findIcon(info.icon,""), info.name, plugs[i]);
- }
- ui->tool_desk_addplug->setEnabled(!plugs.isEmpty());
- deskplugchanged(); //make sure it loads the right info
- */
-
- //Panel locations
- /*ui->combo_panel1_loc->clear();
- ui->combo_panel2_loc->clear();
- QStringList loc; loc << tr("Top") << tr("Bottom") << tr("Left") << tr("Right");
- ui->combo_panel1_loc->addItems(loc);
- ui->combo_panel2_loc->addItems(loc);
- ui->combo_panel1_align->clear(); ui->combo_panel2_align->clear();
- ui->combo_panel1_align->addItem(tr("Center"),"center"); ui->combo_panel2_align->addItem(tr("Center"),"center");
- ui->combo_panel1_align->addItem(tr("Top/Left"),"left"); ui->combo_panel2_align->addItem(tr("Top/Left"),"left");
- ui->combo_panel1_align->addItem(tr("Bottom/Right"),"right"); ui->combo_panel2_align->addItem(tr("Bottom/Right"),"right");
- */
//Session window manager settings
ui->combo_session_wfocus->clear();
@@ -347,22 +278,6 @@ QString MainUI::getColorStyle(QString current, bool allowTransparency){
return out;
}
-/*QString MainUI::getNewPanelPlugin(){
- QString out;
- //Now let the user select a new panel plugin
- QStringList plugs = PINFO->panelPlugins();
- QStringList names;
- for(int i=0; i<plugs.length(); i++){
- names << PINFO->panelPluginInfo(plugs[i]).name;
- }
- bool ok = false;
- QString sel = QInputDialog::getItem(this, tr("New Panel Plugin"), tr("Add Plugin:"), names, 0, false, &ok);
- if(ok && !sel.isEmpty()){
- out = plugs[ names.indexOf(sel) ];
- }
- return out;
-}*/
-
XDGDesktop MainUI::getSysApp(bool allowreset){
AppDialog dlg(this, sysApps);
dlg.allowReset(allowreset);
@@ -522,121 +437,43 @@ void MainUI::loadCurrentSettings(bool screenonly){
desktimechanged(); //ensure the display gets updated (in case the radio selection did not change);
ui->label_desk_res->setText( tr("Screen Resolution:")+"\n"+QString::number(desktop->screenGeometry(cdesk).width())+"x"+QString::number(desktop->screenGeometry(cdesk).height()) );
+ QStringList dplugs = settings->value(DPrefix+"pluginlist",QStringList()).toStringList();
+ ui->list_desktop_plugins->clear();
+ for(int i=0; i<dplugs.length(); i++){
+ QListWidgetItem* it = new QListWidgetItem();
+ it->setWhatsThis(dplugs[i]); //save the full thing instantly
+ //Now load the rest of the info about the plugin
+ QString num;
+ if(dplugs[i].contains("---")){
+ num = dplugs[i].section("---",1,1).section(".",1,1).simplified(); //Skip the screen number
+ if(num=="1"){ num.clear(); } //don't bother showing the number
+ dplugs[i] = dplugs[i].section("---",0,0);
+ }
+ if(dplugs[i].startsWith("applauncher::")){
+ bool ok = false;
+ XDGDesktop app = LXDG::loadDesktopFile(dplugs[i].section("::",1,50), ok);
+ if(!ok){ continue; } //invalid for some reason
+ //Now fill the item with the necessary info
+ it->setText(app.name);
+ it->setIcon(LXDG::findIcon(app.icon,"") );
+ it->setToolTip(app.comment);
+ }else{
+ //Load the info for this plugin
+ LPI info = PINFO->desktopPluginInfo(dplugs[i]);
+ if( info.ID.isEmpty() ){ continue; } //invalid plugin for some reason
+ it->setText(info.name);
+ it->setToolTip(info.description);
+ it->setIcon( LXDG::findIcon(info.icon,"") );
+ }
+ if(!num.isEmpty()){ it->setText( it->text()+" ("+num+")"); } //append the number
+ ui->list_desktop_plugins->addItem(it);
+ }
+
//Panels Page
int panels = settings->value(DPrefix+"panels",-1).toInt();
if(panels==-1 && primary){ panels=1; }
panelnumber = panels;
loadPanels();
- /*if(panels >= 1){
- //Load the panel 1 information
- QString PPrefix = "panel"+QString::number(cdesk)+".0/";
- ui->toolBox_panel1->setVisible(true);
- ui->spin_panel1_size->setValue( settings->value( PPrefix+"height",30).toInt() );
- ui->spin_panel1_length->setValue( settings->value( PPrefix+"lengthPercent",100).toInt() );
- ui->check_panel1_hidepanel->setChecked( settings->value(PPrefix+"hidepanel", false).toBool() );
- ui->check_panel1_usetheme->setChecked( !settings->value(PPrefix+"customcolor",false).toBool() );
- QString loc = settings->value(PPrefix+"location","top").toString().toLower();
- if(loc=="top"){ ui->combo_panel1_loc->setCurrentIndex(0); }
- else if(loc=="bottom"){ ui->combo_panel1_loc->setCurrentIndex(1); }
- else if(loc=="left"){ ui->combo_panel1_loc->setCurrentIndex(2); }
- else{ ui->combo_panel1_loc->setCurrentIndex(3); } //right
- int aindex = ui->combo_panel1_align->findData(settings->value(PPrefix+"pinLocation","center").toString().toLower());
- if(aindex>=0){ ui->combo_panel1_align->setCurrentIndex(aindex); }
- QStringList plugs = settings->value(PPrefix+"pluginlist", QStringList()).toStringList();
- if(plugs.isEmpty() && primary){ plugs << "userbutton" << "taskmanager" << "systemtray" << "clock" << "systemdashboard"; }
- ui->list_panel1_plugins->clear();
- for(int i=0; i<plugs.length(); i++){
- QString pid = plugs[i].section("---",0,0);
- if(pid.startsWith("applauncher")){
- bool ok = false;
- XDGDesktop desk = LXDG::loadDesktopFile(pid.section("::",1,1),ok);
- if(ok){
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(desk.icon,""), desk.name );
- it->setWhatsThis(plugs[i]); //make sure to preserve the entire plugin ID (is the unique version)
- ui->list_panel1_plugins->addItem(it);
- }
- }else{
- LPI info = PINFO->panelPluginInfo(pid);
- if(!info.ID.isEmpty()){
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(info.icon,""), info.name );
- it->setWhatsThis(plugs[i]); //make sure to preserve the entire plugin ID (is the unique version)
- ui->list_panel1_plugins->addItem(it);
- }
- }
- }
- QString color = settings->value(PPrefix+"color","rgba(255,255,255,160)").toString();
- ui->label_panel1_sample->setWhatsThis(color);
- ui->label_panel1_sample->setStyleSheet("background: "+color);
- //panelnumber++;
- }else{
- //Panel 1 defaults
- ui->toolBox_panel1->setVisible(false); //not initially visible
- ui->spin_panel1_size->setValue(30);
- ui->spin_panel1_length->setValue(100);
- ui->check_panel1_hidepanel->setChecked( false );
- ui->check_panel1_usetheme->setChecked( true );
- ui->combo_panel1_loc->setCurrentIndex(0); //Top
- ui->combo_panel1_align->setCurrentIndex(0); //Center
- ui->list_panel1_plugins->clear();
- ui->label_panel1_sample->setWhatsThis("rgba(255,255,255,160)");
- ui->label_panel1_sample->setStyleSheet("background: rgba(255,255,255,160)");
- }
- if(panels >= 2){
- //Load the panel 2 information
- ui->toolBox_panel2->setVisible(true);
- QString PPrefix = "panel"+QString::number(cdesk)+".1/";
- ui->spin_panel2_size->setValue( settings->value( PPrefix+"height",30).toInt() );
- ui->spin_panel2_length->setValue( settings->value( PPrefix+"lengthPercent",100).toInt() );
- ui->check_panel2_hidepanel->setChecked( settings->value(PPrefix+"hidepanel", false).toBool() );
- ui->check_panel2_usetheme->setChecked( !settings->value(PPrefix+"customcolor",false).toBool() );
- QString loc = settings->value(PPrefix+"location","top").toString().toLower();
- if(loc=="top"){ ui->combo_panel2_loc->setCurrentIndex(0); }
- else if(loc=="bottom"){ ui->combo_panel2_loc->setCurrentIndex(1); }
- else if(loc=="left"){ ui->combo_panel2_loc->setCurrentIndex(2); }
- else{ ui->combo_panel2_loc->setCurrentIndex(3); } //right
- int aindex = ui->combo_panel2_align->findData(settings->value(PPrefix+"pinLocation","center").toString().toLower());
- if(aindex>=0){ ui->combo_panel2_align->setCurrentIndex(aindex); }
- QStringList plugs = settings->value(PPrefix+"pluginlist", QStringList()).toStringList();
- ui->list_panel2_plugins->clear();
- for(int i=0; i<plugs.length(); i++){
- QString pid = plugs[i].section("---",0,0);
- if(pid.startsWith("applauncher")){
- bool ok = false;
- XDGDesktop desk = LXDG::loadDesktopFile(pid.section("::",1,1),ok);
- if(ok){
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(desk.icon,""), desk.name );
- it->setWhatsThis(plugs[i]); //make sure to preserve the entire plugin ID (is the unique version)
- ui->list_panel2_plugins->addItem(it);
- }
- }else{
- LPI info = PINFO->panelPluginInfo(pid);
- if(!info.ID.isEmpty()){
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(info.icon,""), info.name );
- it->setWhatsThis(plugs[i]); //make sure to preserve the entire plugin ID (is the unique version)
- ui->list_panel2_plugins->addItem(it);
- }
- }
- }
- QString color = settings->value(PPrefix+"color","rgba(255,255,255,160)").toString();
- ui->label_panel2_sample->setWhatsThis(color);
- ui->label_panel2_sample->setStyleSheet("background: "+color);
- //panelnumber++;
- }else{
- //Panel 2 defaults
- ui->toolBox_panel2->setVisible(false); //not initially visible
- ui->spin_panel2_size->setValue(30);
- ui->spin_panel2_length->setValue(100);
- ui->check_panel2_hidepanel->setChecked( false );
- ui->check_panel2_usetheme->setChecked( true );
- ui->combo_panel2_loc->setCurrentIndex(1); //Bottom
- ui->combo_panel2_align->setCurrentIndex(0); //Center
- ui->list_panel2_plugins->clear();
- ui->label_panel2_sample->setWhatsThis("rgba(255,255,255,160)");
- ui->label_panel2_sample->setStyleSheet("background: rgba(255,255,255,160)");
- }
- checkpanels(); //make sure buttons are updated
- */
-
if(!screenonly){
// Menu Page
@@ -691,7 +528,7 @@ void MainUI::loadCurrentSettings(bool screenonly){
void MainUI::saveCurrentSettings(bool screenonly){
QString DPrefix = "desktop-"+QString::number(currentDesktop())+"/";
-
+ bool needreload = false;
// Desktop Page
if(moddesk){
QStringList bgs; //get the list of backgrounds to use
@@ -707,6 +544,14 @@ void MainUI::saveCurrentSettings(bool screenonly){
settings->setValue(DPrefix+"background/filelist", bgs);
settings->setValue(DPrefix+"background/minutesToChange", ui->spin_desk_min->value());
settings->setValue(DPrefix+"generateDesktopIcons", ui->check_desktop_autolaunchers->isChecked());
+ QStringList plugs;
+ for(int i=0; i<ui->list_desktop_plugins->count(); i++){
+ plugs << ui->list_desktop_plugins->item(i)->whatsThis();
+ }
+ if(settings->value(DPrefix+"pluginlist",QStringList()).toStringList() != plugs){
+ settings->setValue(DPrefix+"pluginlist", plugs);
+ needreload = true;
+ }
}
// Panels Page
@@ -714,55 +559,6 @@ void MainUI::saveCurrentSettings(bool screenonly){
settings->setValue(DPrefix+"panels", PANELS.length());
savePanels();
}
- /*settings->setValue(DPrefix+"panels", panelnumber);
- if(panelnumber>=1){
- QString PPrefix = "panel"+QString::number(currentDesktop())+".0/";
- settings->setValue(PPrefix+"color", ui->label_panel1_sample->whatsThis());
- settings->setValue(PPrefix+"height", ui->spin_panel1_size->value());
- settings->setValue(PPrefix+"lengthPercent", ui->spin_panel1_length->value());
- settings->setValue(PPrefix+"hidepanel", ui->check_panel1_hidepanel->isChecked());
- settings->setValue(PPrefix+"customcolor", !ui->check_panel1_usetheme->isChecked());
- int loc = ui->combo_panel1_loc->currentIndex();
- if(loc==0){ settings->setValue(PPrefix+"location", "top"); }
- else if(loc==1){ settings->setValue(PPrefix+"location", "bottom"); }
- else if(loc==2){ settings->setValue(PPrefix+"location", "left"); }
- else{ settings->setValue(PPrefix+"location", "right"); }
- settings->setValue(PPrefix+"pinLocation", ui->combo_panel1_align->currentData().toString());
- QStringList plugs;
- for(int i=0; i<ui->list_panel1_plugins->count(); i++){
- plugs << ui->list_panel1_plugins->item(i)->whatsThis();
- }
- settings->setValue(PPrefix+"pluginlist",plugs);
-
- }else{
- //Clear that panel's saved settings
- QStringList keys = settings->allKeys().filter("panel"+QString::number(currentDesktop())+".0/");
- for(int i=0; i<keys.length(); i++){ settings->remove(keys[i]); }
- }
- if(panelnumber>=2){
- QString PPrefix = "panel"+QString::number(currentDesktop())+".1/";
- settings->setValue(PPrefix+"color", ui->label_panel2_sample->whatsThis());
- settings->setValue(PPrefix+"height", ui->spin_panel2_size->value());
- settings->setValue(PPrefix+"lengthPercent", ui->spin_panel2_length->value());
- settings->setValue(PPrefix+"hidepanel", ui->check_panel2_hidepanel->isChecked());
- settings->setValue(PPrefix+"customcolor", !ui->check_panel2_usetheme->isChecked());
- int loc = ui->combo_panel2_loc->currentIndex();
- if(loc==0){ settings->setValue(PPrefix+"location", "top"); }
- else if(loc==1){ settings->setValue(PPrefix+"location", "bottom"); }
- else if(loc==2){ settings->setValue(PPrefix+"location", "left"); }
- else{ settings->setValue(PPrefix+"location", "right"); }
- settings->setValue(PPrefix+"pinLocation", ui->combo_panel2_align->currentData().toString());
- QStringList plugs;
- for(int i=0; i<ui->list_panel2_plugins->count(); i++){
- plugs << ui->list_panel2_plugins->item(i)->whatsThis();
- }
- settings->setValue(PPrefix+"pluginlist",plugs);
- }else{
- //Clear that panel's saved settings
- QStringList keys = settings->allKeys().filter("panel"+QString::number(currentDesktop())+".1/");
- for(int i=0; i<keys.length(); i++){ settings->remove(keys[i]); }
- }
- }*/
// Menu Page
if(modmenu && !screenonly){
@@ -795,25 +591,17 @@ void MainUI::saveCurrentSettings(bool screenonly){
if(!screenonly){ modmenu = modshort = moddef = modses = false; }
ui->push_save->setEnabled(modmenu || modshort || moddef || modses); //wait for new changes
//ui->push_save->setVisible(!ui->actionDefaults->isChecked() || modmenu || modshort || moddef || modses);
+ if(needreload){
+ //Wait 1 second
+ for(int i=0; i<10; i++){ QApplication::processEvents(); usleep(100000); }
+ loadCurrentSettings(screenonly);
+ }
}
//===============
// DESKTOP PAGE
//===============
-/*void MainUI::deskplugchanged(){
- //NOTE: This is not a major change and will not enable the save button
- if(ui->combo_desk_plugs->count()==0){
- //No plugins available
- ui->label_desk_pluginfo->setText("");
- return;
- }
- //Load the new plugin summary
- QString plug = ui->combo_desk_plugs->itemData( ui->combo_desk_plugs->currentIndex() ).toString();
- LPI info = PINFO->desktopPluginInfo(plug);
- ui->label_desk_pluginfo->setText( info.description );
-}*/
-
void MainUI::deskbgchanged(){
//Load the new image preview
if(ui->combo_desk_bg->count()==0){
@@ -906,28 +694,55 @@ void MainUI::deskplugadded(){
dlg.exec();
if( !dlg.selected ){ return; } //cancelled
QString newplug = dlg.plugID;
- //QString newplug = ui->combo_desk_plugs->itemData( ui->combo_desk_plugs->currentIndex() ).toString();
+ QListWidgetItem *it = new QListWidgetItem();
if(newplug=="applauncher"){
//Prompt for the application to add
XDGDesktop app = getSysApp();
if(app.filePath.isEmpty()){ return; } //cancelled
newplug.append("::"+app.filePath);
- }
- settings->sync(); //make sure we have the newly-modified list from the desktop (unique IDs for new plugins)
+ //Now fill the item with the necessary info
+ it->setWhatsThis(newplug);
+ it->setText(app.name);
+ it->setIcon(LXDG::findIcon(app.icon,"") );
+ it->setToolTip(app.comment);
+ }else{
+ //Load the info for this plugin
+ LPI info = PINFO->desktopPluginInfo(newplug);
+ if( info.ID.isEmpty() ){ return; } //invalid plugin for some reason (should never happen)
+ it->setWhatsThis(newplug);
+ it->setText(info.name);
+ it->setToolTip(info.description);
+ it->setIcon( LXDG::findIcon(info.icon,"") );
+ }
+ ui->list_desktop_plugins->addItem(it);
+ ui->list_desktop_plugins->scrollToItem(it);
+ ui->push_save->setEnabled(true);
+ moddesk = true;
+ /*settings->sync(); //make sure we have the newly-modified list from the desktop (unique IDs for new plugins)
QString DPrefix = "desktop-"+QString::number(currentDesktop())+"/";
QStringList plugins = settings->value(DPrefix+"pluginlist").toStringList();
//qDebug() << "Current Plugins:" << plugins;
plugins << newplug;
//qDebug() << "New Plugins:" << plugins;
settings->setValue(DPrefix+"pluginlist", plugins);
- settings->sync();
+ settings->sync();*/
}
+void MainUI::deskplugremoved(){
+ QList<QListWidgetItem*> sel = ui->list_desktop_plugins->selectedItems();
+ if(sel.isEmpty()){ return; } //nothing to do
+ for(int i=0; i<sel.length(); i++){
+ delete sel[i];
+ }
+ ui->push_save->setEnabled(true);
+ moddesk = true;
+}
//=============
// PANELS PAGE
//=============
void MainUI::panelValChanged(){
+ ui->tool_panels_add->setEnabled(panelnumber < 12);
if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
}
@@ -939,7 +754,13 @@ void MainUI::newPanel(){
PANELS << tmp;
connect(tmp, SIGNAL(PanelChanged()), this, SLOT(panelValChanged()) );
connect(tmp, SIGNAL(PanelRemoved(int)), this, SLOT(removePanel(int)) );
- ui->scroll_panels->widget()->layout()->addWidget(tmp);
+ static_cast<QBoxLayout*>(ui->scroll_panels->widget()->layout())->insertWidget(PANELS.length()-1, tmp);
+ //update the widget first (2 necessary for scroll below to work)
+ ui->scroll_panels->update();
+ QApplication::processEvents();
+ QApplication::processEvents();
+ ui->scroll_panels->ensureWidgetVisible(tmp);
+ panelValChanged();
}
void MainUI::removePanel(int pan){
@@ -967,6 +788,7 @@ void MainUI::loadPanels(){
//Now create new panels
int dnum = currentDesktop();
if(ui->scroll_panels->widget()->layout()==0){ ui->scroll_panels->widget()->setLayout( new QHBoxLayout() ); }
+ ui->scroll_panels->widget()->layout()->setAlignment(Qt::AlignLeft);
for(int i=0; i<panelnumber; i++){
PanelWidget *tmp = new PanelWidget(ui->scroll_panels->widget(), this, PINFO);
tmp->LoadSettings(settings, dnum, i);
@@ -975,6 +797,7 @@ void MainUI::loadPanels(){
connect(tmp, SIGNAL(PanelRemoved(int)), this, SLOT(removePanel(int)) );
ui->scroll_panels->widget()->layout()->addWidget(tmp);
}
+ static_cast<QHBoxLayout*>(ui->scroll_panels->widget()->layout())->addStretch();
}
void MainUI::savePanels(){
@@ -983,216 +806,6 @@ void MainUI::savePanels(){
}
}
-/*void MainUI::addpanel1(){
- ui->toolBox_panel1->setVisible(true);
- panelnumber = 1;
- checkpanels();
- ui->push_save->setEnabled(true);
- modpan = true;
-}
-
-void MainUI::addpanel2(){
- ui->toolBox_panel2->setVisible(true);
- panelnumber = 2;
- checkpanels();
- ui->push_save->setEnabled(true);
- modpan = true;
-}
-
-void MainUI::rmpanel1(){
- ui->toolBox_panel1->setVisible(false);
- panelnumber = 0;
- checkpanels();
- ui->push_save->setEnabled(true);
- modpan = true;
-}
-
-void MainUI::rmpanel2(){
- ui->toolBox_panel2->setVisible(false);
- panelnumber = 1;
- checkpanels();
- ui->push_save->setEnabled(true);
- modpan = true;
-}
-
-void MainUI::checkpanels(){
- //This checks the primary panel buttons/visibility
- //panel 1
- ui->tool_panel1_add->setVisible(panelnumber < 1);
- ui->tool_panel1_rm->setVisible(panelnumber == 1);
- ui->toolBox_panel1->setVisible(panelnumber>0);
- //panel1 label is always visible
- //panel 2
- ui->tool_panel2_add->setVisible(panelnumber==1);
- ui->tool_panel2_rm->setVisible(panelnumber>1);
- ui->toolBox_panel2->setVisible(panelnumber>1);
- ui->label_panel2->setVisible(panelnumber>0);
-
- //Sizing/layout fix for side-by-side vertical layouts
- if(panelnumber<1){
- ui->gridLayout_panels->setColumnStretch(2,1);
- }else{
- ui->gridLayout_panels->setColumnStretch(2,0);
- }
-
-}
-
-void MainUI::adjustpanel1(){
- //Adjust panel 1 to complement a panel 2 change
- if(loading || panadjust){ return; }
- panadjust = true;
- qDebug() << "Adjust Panel 1:";
- //bool valchanged = ui->toolBox_panel1->currentIndex()==ui->toolBox_panel2->currentIndex();
- //if(!valchanged){
- //Just a toolbox page change - switch to match and exit
- ui->toolBox_panel1->setCurrentIndex( ui->toolBox_panel2->currentIndex() );
- panadjust = false;
- return;
- //}
- //panadjust = false;
- //if(!loading && valchanged){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::adjustpanel2(){
- if(loading || panadjust){ return; }
- panadjust = true;
- //Adjust panel 2 to complement a panel 1 change
- qDebug() << "Adjust Panel 2:";
- //bool valchanged = ui->toolBox_panel1->currentIndex()==ui->toolBox_panel2->currentIndex();
- //if(!valchanged){
- //Just a toolbox page change - switch to match and exit
- ui->toolBox_panel2->setCurrentIndex( ui->toolBox_panel1->currentIndex() );
- panadjust = false;
- return;
- //}
- //panadjust = false;
- //if(!loading && valchanged){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-
-void MainUI::getpanel1color(){
- QString color = getColorStyle(ui->label_panel1_sample->whatsThis());
- if(color.isEmpty()){ return; } //nothing selected
- ui->label_panel1_sample->setStyleSheet("background: "+color);
- ui->label_panel1_sample->setWhatsThis(color);
- ui->push_save->setEnabled(true);
- modpan = true;
-}
-
-void MainUI::getpanel2color(){
- QString color = getColorStyle(ui->label_panel2_sample->whatsThis());
- if(color.isEmpty()){ return; } //nothing selected
- ui->label_panel2_sample->setStyleSheet("background: "+color);
- ui->label_panel2_sample->setWhatsThis(color);
- ui->push_save->setEnabled(true);
- modpan = true;
-}
-
-void MainUI::addpanel1plugin(){
- GetPluginDialog dlg(this);
- dlg.LoadPlugins("panel", PINFO);
- dlg.exec();
- if(!dlg.selected){ return; } //cancelled
- QString pan = dlg.plugID; //getNewPanelPlugin();
- if(pan == "applauncher"){
- //Prompt for the application to add
- XDGDesktop app = getSysApp();
- if(app.filePath.isEmpty()){ return; } //cancelled
- pan.append("::"+app.filePath);
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(app.icon,""), app.name);
- it->setWhatsThis(pan);
- ui->list_panel1_plugins->addItem(it);
- ui->list_panel1_plugins->setCurrentItem(it);
- ui->list_panel1_plugins->scrollToItem(it);
- }else{
- if(pan.isEmpty()){ return; } //nothing selected
- //Add the new plugin to the list
- LPI info = PINFO->panelPluginInfo(pan);
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(info.icon,""), info.name);
- it->setWhatsThis(info.ID);
- ui->list_panel1_plugins->addItem(it);
- ui->list_panel1_plugins->setCurrentItem(it);
- ui->list_panel1_plugins->scrollToItem(it);
- }
- checkpanels(); //update buttons
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::addpanel2plugin(){
- GetPluginDialog dlg(this);
- dlg.LoadPlugins("panel", PINFO);
- dlg.exec();
- if(!dlg.selected){ return; } //cancelled
- QString pan = dlg.plugID; //getNewPanelPlugin();
- if(pan == "applauncher"){
- //Prompt for the application to add
- XDGDesktop app = getSysApp();
- if(app.filePath.isEmpty()){ return; } //cancelled
- pan.append("::"+app.filePath);
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(app.icon,""), app.name);
- it->setWhatsThis(pan);
- ui->list_panel2_plugins->addItem(it);
- ui->list_panel2_plugins->setCurrentItem(it);
- ui->list_panel2_plugins->scrollToItem(it);
- }else{
- if(pan.isEmpty()){ return; } //nothing selected
- //Add the new plugin to the list
- LPI info = PINFO->panelPluginInfo(pan);
- QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(info.icon,""), info.name);
- it->setWhatsThis(info.ID);
- ui->list_panel2_plugins->addItem(it);
- ui->list_panel2_plugins->setCurrentItem(it);
- ui->list_panel2_plugins->scrollToItem(it);
- }
- checkpanels(); //update buttons
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::rmpanel1plugin(){
- if(ui->list_panel1_plugins->currentRow() < 0){ return; }
- delete ui->list_panel1_plugins->takeItem( ui->list_panel1_plugins->currentRow() );
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::rmpanel2plugin(){
- if(ui->list_panel2_plugins->currentRow() < 0){ return; }
- delete ui->list_panel2_plugins->takeItem( ui->list_panel2_plugins->currentRow() );
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::uppanel1plugin(){
- int row = ui->list_panel1_plugins->currentRow();
- if( row <= 0){ return; }
- ui->list_panel1_plugins->insertItem(row-1, ui->list_panel1_plugins->takeItem(row));
- ui->list_panel1_plugins->setCurrentRow(row-1);
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::uppanel2plugin(){
- int row = ui->list_panel2_plugins->currentRow();
- if( row <= 0){ return; }
- ui->list_panel2_plugins->insertItem(row-1, ui->list_panel2_plugins->takeItem(row));
- ui->list_panel2_plugins->setCurrentRow(row-1);
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::dnpanel1plugin(){
- int row = ui->list_panel1_plugins->currentRow();
- if( row < 0 || row >= (ui->list_panel1_plugins->count()-1) ){ return; }
- ui->list_panel1_plugins->insertItem(row+1, ui->list_panel1_plugins->takeItem(row));
- ui->list_panel1_plugins->setCurrentRow(row+1);
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}
-
-void MainUI::dnpanel2plugin(){
- int row = ui->list_panel2_plugins->currentRow();
- if( row < 0 || row >= (ui->list_panel2_plugins->count()-1) ){ return; }
- ui->list_panel2_plugins->insertItem(row+1, ui->list_panel2_plugins->takeItem(row));
- ui->list_panel2_plugins->setCurrentRow(row+1);
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
-}*/
-
-
//============
// MENU PAGE
//============
@@ -1276,7 +889,8 @@ void MainUI::loadKeyboardShortcuts(){
<< "Exec lumina-open -volumedown::::"+tr("Audio Volume Down") \
<< "Exec lumina-open -brightnessup::::"+tr("Screen Brightness Up") \
<< "Exec lumina-open -brightnessdown::::"+tr("Screen Brightness Down") \
- << "Exec lumina-screenshot::::"+tr("Take Screenshot");
+ << "Exec lumina-screenshot::::"+tr("Take Screenshot") \
+ << "Exec xscreensaver-command -lock::::"+tr("Lock Screen");
for(int i=0; i<special.length(); i++){
QString spec = info.filter(":"+special[i].section("::::",0,0)).join("").simplified();
QTreeWidgetItem *it = new QTreeWidgetItem();
diff --git a/lumina-config/mainUI.h b/lumina-config/mainUI.h
index 04c6253c..ee5b5feb 100644
--- a/lumina-config/mainUI.h
+++ b/lumina-config/mainUI.h
@@ -1,6 +1,6 @@
//===========================================
// Lumina-DE source code
-// Copyright (c) 2014, Ken Moore
+// Copyright (c) 2014-2015, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
@@ -107,6 +107,7 @@ private slots:
void deskbgadded();
void deskbgcoloradded();
void deskplugadded();
+ void deskplugremoved();
//Panels Page
@@ -115,26 +116,6 @@ private slots:
void removePanel(int); //connected to a signal from the panel widget
void loadPanels();
void savePanels();
-
- /*void addpanel1();
- void addpanel2();
- void rmpanel1();
- void rmpanel2();
-
- void checkpanels();
- void adjustpanel1();
- void adjustpanel2();
-
- void getpanel1color();
- void getpanel2color();
- void addpanel1plugin();
- void addpanel2plugin();
- void rmpanel1plugin();
- void rmpanel2plugin();
- void uppanel1plugin();
- void uppanel2plugin();
- void dnpanel1plugin();
- void dnpanel2plugin();*/
//Menu Page/Tab
void addmenuplugin();
@@ -156,8 +137,6 @@ private slots:
void changeDefaultTerminal();
void loadDefaultSettings();
//void saveDefaultSettings();
- //void adddefaultgroup();
- //void adddefaultextension();
void cleardefaultitem();
void setdefaultitem();
void setdefaultbinary();
diff --git a/lumina-config/mainUI.ui b/lumina-config/mainUI.ui
index 6a05726d..db944804 100644
--- a/lumina-config/mainUI.ui
+++ b/lumina-config/mainUI.ui
@@ -36,7 +36,7 @@
<item>
<widget class="QFrame" name="group_screen">
<property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
+ <enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
@@ -381,13 +381,65 @@
<item>
<widget class="QTabWidget" name="tabWidget_panels">
<property name="currentIndex">
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="tab_desktopInterface">
<attribute name="title">
<string>Desktop</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_4">
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Quick-Access Menu</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" rowspan="3">
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_15">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Embedded Utilities</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QListWidget" name="list_menu"/>
+ </item>
+ <item row="1" column="2">
+ <widget class="QListWidget" name="list_desktop_plugins">
+ <property name="selectionMode">
+ <enum>QAbstractItemView::ExtendedSelection</enum>
+ </property>
+ <property name="sortingEnabled">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
@@ -433,112 +485,39 @@
</item>
</layout>
</item>
- <item row="1" column="0">
- <widget class="QListWidget" name="list_menu"/>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_10">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Quick-Access Menu</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label_15">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Embedded Utilities</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1" rowspan="2">
- <layout class="QVBoxLayout" name="verticalLayout_18">
+ <item row="2" column="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <spacer name="horizontalSpacer_7">
- <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_addDesktopPlugin">
- <property name="text">
- <string>Add Utility to Screen</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_8">
- <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>
- </item>
- <item>
- <widget class="QCheckBox" name="check_desktop_autolaunchers">
+ <widget class="QToolButton" name="tool_desktop_addplugin">
<property name="text">
- <string>Auto-Create Desktop Shortcuts</string>
+ <string notr="true">add</string>
</property>
</widget>
</item>
<item>
- <widget class="QLabel" name="label_23">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <widget class="QToolButton" name="tool_desktop_rmplugin">
<property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Note:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Modifying or removing embedded utilities is performed from the desktop itself. Each screen may be individually unlocked (allowing modifications) from the quick-access menu.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="scaledContents">
- <bool>true</bool>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ <string notr="true">rem</string>
</property>
- <property name="wordWrap">
- <bool>true</bool>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="margin">
- <number>0</number>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>20</height>
+ </size>
</property>
- <property name="indent">
- <number>10</number>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="check_desktop_autolaunchers">
+ <property name="text">
+ <string>Generate Desktop Links</string>
</property>
</widget>
</item>
@@ -592,7 +571,7 @@
<x>0</x>
<y>0</y>
<width>498</width>
- <height>270</height>
+ <height>292</height>
</rect>
</property>
</widget>
@@ -1385,7 +1364,7 @@
<x>0</x>
<y>0</y>
<width>117</width>
- <height>28</height>
+ <height>17</height>
</rect>
</property>
<property name="sizePolicy">
@@ -1498,16 +1477,6 @@
</item>
</layout>
</widget>
- <widget class="QMenuBar" name="menubar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>596</width>
- <height>20</height>
- </rect>
- </property>
- </widget>
<widget class="QToolBar" name="toolBar">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
bgstack15