From bd668294210a83bdaa6ea685c60ae336eb321709 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 17 Apr 2015 16:17:56 -0400 Subject: A couple changes to lumina-config: 1) Fix loading the current "applauncher" panel plugins for the second panel. 2) If the save button is active when the "defaults" page is selected, keep the save button visible until clicked. --- lumina-config/mainUI.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index 744d4bdf..987324f3 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -440,7 +440,7 @@ void MainUI::slotChangePage(bool enabled){ } ui->group_screen->setVisible(showScreen && (ui->spin_screen->maximum()>1) ); //Hide the save button for particular pages - ui->push_save->setVisible(!ui->actionDefaults->isChecked()); //hide on the default page + ui->push_save->setVisible(!ui->actionDefaults->isChecked() || moddesk || modpan || modmenu || modshort || moddef || modses); //hide on the default page if nothing waiting to be saved //Special functions for particular pages if(ui->page_panels->isVisible()){ checkpanels(); } @@ -557,11 +557,21 @@ void MainUI::loadCurrentSettings(bool screenonly){ ui->list_panel2_plugins->clear(); for(int i=0; ipanelPluginInfo(pid); - if(!info.ID.isEmpty()){ - QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(info.icon,""), info.name ); + 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); + ui->list_panel2_plugins->addItem(it); + } } } QString color = settings->value(PPrefix+"color","rgba(255,255,255,160)").toString(); @@ -730,6 +740,7 @@ void MainUI::saveCurrentSettings(bool screenonly){ moddesk = modpan = false; 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); } -- cgit