aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-11-23 14:20:13 -0500
committerKen Moore <moorekou@gmail.com>2015-11-23 14:20:13 -0500
commitdadef0f8c30c1603805f7f232add16b0c455d3b0 (patch)
tree355f4124ab74a192e22799b74f5328eacd153f2c /lumina-desktop
parentChange the desktop icon text color to white by default: This just looks a lot... (diff)
parentFix up the sorting of the favorites items in the start menu. Now the applicat... (diff)
downloadlumina-dadef0f8c30c1603805f7f232add16b0c455d3b0.tar.gz
lumina-dadef0f8c30c1603805f7f232add16b0c455d3b0.tar.bz2
lumina-dadef0f8c30c1603805f7f232add16b0c455d3b0.zip
Merge branch 'master' of github.com:pcbsd/lumina
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/LPanel.cpp5
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.cpp32
2 files changed, 29 insertions, 8 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp
index 2eabc96e..b0ead2e0 100644
--- a/lumina-desktop/LPanel.cpp
+++ b/lumina-desktop/LPanel.cpp
@@ -188,13 +188,10 @@ void LPanel::UpdatePanel(bool geomonly){
this->move(hidepoint); //Could bleed over onto the screen right
}
}
- //With QT5, we need to make sure to reset window properties on occasion
- //LSession::handle()->XCB->SetDisableWMActions(this->winId()); //ensure no WM actions
- //LSession::handle()->XCB->SetAsSticky(this->winId());
if(DEBUG){ qDebug() << " - Done with panel geometry"; }
if(geomonly){ return; }
//Now update the appearance of the toolbar
- if(settings->value(PPREFIX+"customcolor", false).toBool()){
+ if(settings->value(PPREFIX+"customColor", false).toBool()){
QString color = settings->value(PPREFIX+"color", "rgba(255,255,255,160)").toString();
QString style = "QWidget#LuminaPanelColor{ background: %1; border-radius: 3px; border: 1px solid %1; }";
style = style.arg(color);
diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
index 3c418ac5..661302dc 100644
--- a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
+++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
@@ -10,6 +10,7 @@
#include <LuminaOS.h>
#include "../../LSession.h"
+#include <QtConcurrent>
#include "ItemWidget.h"
//#define SSAVER QString("xscreensaver-demo")
@@ -250,10 +251,7 @@ void StartMenu::UpdateApps(){
ItemWidget *it = new ItemWidget(ui->scroll_apps->widget(), cats[c], "chcat::::"+cats[c] );
if(!it->gooditem){ continue; } //invalid for some reason
ui->scroll_apps->widget()->layout()->addWidget(it);
- //connect(it, SIGNAL(NewShortcut()), this, SLOT(UpdateFavs()) );
- //connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) );
connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) );
- //connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) );
}
}else{
//Show the "go back" button
@@ -303,11 +301,37 @@ void StartMenu::UpdateFavs(){
favs.sort();
//Iterate over types of favorites
QStringList rest = favs;
+ QStringList tmp;
for(int type = 0; type<3; type++){
- QStringList tmp;
if(type==0){ tmp = favs.filter("::::app::::"); } //apps first
else if(type==1){ tmp = favs.filter("::::dir::::"); } //dirs next
else{ tmp = rest; } //everything left over
+ if(type==1){
+ //Need to run a special routine for sorting the apps (already in the widget)
+ // Since each app actually might have a different name listed within the file
+ QLayout *lay = ui->scroll_favs->widget()->layout();
+ QStringList items;
+ for(int i=0; i<lay->count(); i++){
+ items << lay->itemAt(i)->widget()->whatsThis().toLower();
+ }
+
+ items.sort();
+ //qDebug() << " - Sorted Items:" << items;
+ for(int i=0; i<items.length(); i++){
+ if(items[i].isEmpty()){ continue; }
+ //QLayouts are weird in that they can only add items to the end - need to re-insert almost every item
+ for(int j=0; j<lay->count(); j++){
+ //Find this item
+ if(lay->itemAt(j)->widget()->whatsThis().toLower()==items[i]){
+ //Found it - now move it if necessary
+ //qDebug() << "Found Item:" << items[i] << i << j;
+ lay->addItem( lay->takeAt(j) );
+ break;
+ }
+ }
+ }
+ }//end of special app sorting routine
+ tmp.sort(); //Sort alphabetically by name (dirs/files)
for(int i=0; i<tmp.length(); i++){
if(type<2){ rest.removeAll(tmp[i]); }
if(!QFile::exists(tmp[i].section("::::",2,50))){ continue; } //invalid favorite - skip it
bgstack15