diff options
author | Jesse Smith <jessefrgsmith@yahoo.ca> | 2014-09-15 19:45:53 -0300 |
---|---|---|
committer | Jesse Smith <jessefrgsmith@yahoo.ca> | 2014-09-15 19:45:53 -0300 |
commit | 7cd91c78c5219a2391a3c4a9a1c2e446989d4c2f (patch) | |
tree | c8163ad1f3458dae66f8e0e905fcd7258d8b898c /lumina-desktop | |
parent | Select the first exec entry from a .desktop file rather than the last. (diff) | |
parent | Update the Lumina user button a bit: (diff) | |
download | lumina-7cd91c78c5219a2391a3c4a9a1c2e446989d4c2f.tar.gz lumina-7cd91c78c5219a2391a3c4a9a1c2e446989d4c2f.tar.bz2 lumina-7cd91c78c5219a2391a3c4a9a1c2e446989d4c2f.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/AppMenu.cpp | 7 | ||||
-rw-r--r-- | lumina-desktop/LSession.cpp | 1 | ||||
-rw-r--r-- | lumina-desktop/lumina-desktop.pro | 7 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/LTBWidget.h | 2 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.cpp | 30 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.h | 2 |
6 files changed, 33 insertions, 16 deletions
diff --git a/lumina-desktop/AppMenu.cpp b/lumina-desktop/AppMenu.cpp index e2e5cede..c2d79c09 100644 --- a/lumina-desktop/AppMenu.cpp +++ b/lumina-desktop/AppMenu.cpp @@ -32,7 +32,9 @@ QHash<QString, QList<XDGDesktop> >* AppMenu::currentAppHash(){ void AppMenu::updateAppList(){ this->clear(); APPS.clear(); - APPS = LXDG::sortDesktopCats( LXDG::systemDesktopFiles() ); + QList<XDGDesktop> allfiles = LXDG::systemDesktopFiles(); + APPS = LXDG::sortDesktopCats(allfiles); + APPS.insert("All", LXDG::sortDesktopNames(allfiles)); //Now fill the menu bool ok; //for checking inputs //Add link to the file manager @@ -54,7 +56,8 @@ void AppMenu::updateAppList(){ for(int i=0; i<cats.length(); i++){ //Make sure they are translated and have the right icons QString name, icon; - if(cats[i] == "Multimedia"){ name = tr("Multimedia"); icon = "applications-multimedia"; } + if(cats[i]=="All"){continue; } //skip this listing for the menu + else if(cats[i] == "Multimedia"){ name = tr("Multimedia"); icon = "applications-multimedia"; } else if(cats[i] == "Development"){ name = tr("Development"); icon = "applications-development"; } else if(cats[i] == "Education"){ name = tr("Education"); icon = "applications-education"; } else if(cats[i] == "Game"){ name = tr("Games"); icon = "applications-games"; } diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 43a7ce79..7897966b 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -278,6 +278,7 @@ bool LSession::x11EventFilter(XEvent *event){ || event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_NAME",false) \ || event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_VISIBLE_NAME",false) \ || event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_ICON_NAME",false) \ + || event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_STATE",false) \ || event->xproperty.atom == XInternAtom(QX11Info::display(),"_NET_WM_VISIBLE_ICON_NAME",false) ){ LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (new window opened?) emit WindowListEvent(); diff --git a/lumina-desktop/lumina-desktop.pro b/lumina-desktop/lumina-desktop.pro index 885e914c..edc63010 100644 --- a/lumina-desktop/lumina-desktop.pro +++ b/lumina-desktop/lumina-desktop.pro @@ -10,6 +10,11 @@ DEPENDPATH += ../libLumina TEMPLATE = app +openbsd-g++4 { + LRELEASE = lrelease4 +} else { + LRELEASE = lrelease-qt4 +} SOURCES += main.cpp \ WMProcess.cpp \ @@ -170,6 +175,6 @@ TRANSLATIONS = i18n/lumina-desktop_af.ts \ i18n/lumina-desktop_zu.ts dotrans.path=/usr/local/share/Lumina-DE/i18n/ -dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/ +dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/ INSTALLS += target desktop icons wallpapers defaults dotrans diff --git a/lumina-desktop/panel-plugins/LTBWidget.h b/lumina-desktop/panel-plugins/LTBWidget.h index 02097039..5252c619 100644 --- a/lumina-desktop/panel-plugins/LTBWidget.h +++ b/lumina-desktop/panel-plugins/LTBWidget.h @@ -25,7 +25,7 @@ private: else if(cstate == Lumina::VISIBLE){ background = "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 255, 255, 240), stop:0.505682 rgba(240, 240, 240, 150), stop:1 rgba(210, 210, 210, 55));"; border="border: 1px solid transparent;"; } else if(cstate == Lumina::INVISIBLE){background = "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(215, 215, 215, 240), stop:0.505682 rgba(184, 185, 186, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent;"; } else if(cstate == Lumina::ACTIVE){ background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(241, 233, 156, 240), stop:0.355682 rgba(255, 243, 127, 150), stop:1 rgba(221, 246, 255, 55));"; border ="border: 1px solid transparent;"; } - else if(cstate == Lumina::NOTIFICATION){ background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(252, 187, 127, 240), stop:0.505682 rgba(255, 222, 197, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent"; } + else if(cstate == Lumina::NOTIFICATION){ background= "background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(252, 187, 127, 240), stop:0.505682 rgba(255, 222, 197, 150), stop:1 rgba(221, 246, 255, 55));"; border="border: 1px solid transparent;"; } QString raw = rawstyle; this->setStyleSheet( raw.replace("%1",background).replace("%2", border) ); } diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp index 8b49ed43..1571760b 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp @@ -75,7 +75,8 @@ UserWidget::UserWidget(QWidget* parent) : QWidget(parent), ui(new Ui::UserWidget }else{ ui->tool_qtconfig->setVisible(false); } - + lastUpdate = QDateTime::currentDateTime().addSecs(-30); //make sure it refreshes + QTimer::singleShot(10,this, SLOT(UpdateMenu())); //make sure to load this once after initialization } UserWidget::~UserWidget(){ @@ -100,15 +101,19 @@ void UserWidget::ClearScrollArea(QScrollArea *area){ // PRIVATE SLOTS //============ void UserWidget::UpdateMenu(){ - ui->tabWidget->setCurrentWidget(ui->tab_fav); - ui->tool_fav_apps->setChecked(true); - ui->tool_fav_dirs->setChecked(false); - ui->tool_fav_files->setChecked(false); - cfav = 0; //favorite apps - updateFavItems(); - updateHome(); - updateAppCategories(); - updateApps(); + if(QDateTime::currentDateTime() > lastUpdate.addSecs(30)){ + //Only re-arrange/reload things if not rapidly re-run + ui->tabWidget->setCurrentWidget(ui->tab_fav); + ui->tool_fav_apps->setChecked(true); + ui->tool_fav_dirs->setChecked(false); + ui->tool_fav_files->setChecked(false); + cfav = 0; //favorite apps + updateFavItems(); + updateHome(); + updateAppCategories(); + updateApps(); + } + lastUpdate = QDateTime::currentDateTime(); } void UserWidget::LaunchItem(QString cmd){ @@ -170,7 +175,8 @@ void UserWidget::updateAppCategories(){ cats.sort(); for(int i=0; i<cats.length(); i++){ QString name, icon; - if(cats[i] == "Multimedia"){ name = tr("Multimedia"); icon = "applications-multimedia"; } + if(cats[i] == "All"){ name = tr("All"); icon = "application-x-executable"; } + else if(cats[i] == "Multimedia"){ name = tr("Multimedia"); icon = "applications-multimedia"; } else if(cats[i] == "Development"){ name = tr("Development"); icon = "applications-development"; } else if(cats[i] == "Education"){ name = tr("Education"); icon = "applications-education"; } else if(cats[i] == "Game"){ name = tr("Games"); icon = "applications-games"; } @@ -180,7 +186,7 @@ void UserWidget::updateAppCategories(){ else if(cats[i] == "Science"){ name = tr("Science"); icon = "applications-science"; } else if(cats[i] == "Settings"){ name = tr("Settings"); icon = "preferences-system"; } else if(cats[i] == "System"){ name = tr("System"); icon = "applications-system"; } - else if(cats[i] == "Utility"){ name = tr("Utility"); icon = "applications-utilities"; } + else if(cats[i] == "Utility"){ name = tr("Utilities"); icon = "applications-utilities"; } else{ name = tr("Unsorted"); icon = "applications-other"; } ui->combo_app_cats->addItem( LXDG::findIcon(icon,""), name, cats[i] ); } diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.h b/lumina-desktop/panel-plugins/userbutton/UserWidget.h index b9eaffbe..0b42bff8 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.h +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.h @@ -15,6 +15,7 @@ #include <QHash> #include <QVBoxLayout> #include <QScrollArea> +#include <QDateTime> #include <LuminaXDG.h> #include <LuminaOS.h> @@ -40,6 +41,7 @@ public: private: Ui::UserWidget *ui; QHash<QString, QList<XDGDesktop> > *sysapps; + QDateTime lastUpdate; int cfav; //current favorite category void ClearScrollArea(QScrollArea *area); |