aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils/lumina-config/AppDialog.h
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-09-22 16:41:42 -0400
committerKen Moore <ken@pcbsd.org>2016-09-22 16:41:42 -0400
commit82ebebfb8a5867b400c1df726a478bdcb9d7c005 (patch)
tree6c799a122fba9dc9068695f95e967e417f6b1636 /src-qt5/core-utils/lumina-config/AppDialog.h
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-82ebebfb8a5867b400c1df726a478bdcb9d7c005.tar.gz
lumina-82ebebfb8a5867b400c1df726a478bdcb9d7c005.tar.bz2
lumina-82ebebfb8a5867b400c1df726a478bdcb9d7c005.zip
Large update to how XDGDesktop files are created/used.
This impacts almost all tools/utilities within Lumina - please test (passed internal tests so far). This cleans up a lot of the backend XDG compliance class, moving lots of functionality into child functions of the XDGDesktop class and ensuring that they get cleaned up more regularly/properly. This *seems* to make the desktop startup a lot faster, even if the overall memory savings are slight (so far).
Diffstat (limited to 'src-qt5/core-utils/lumina-config/AppDialog.h')
-rw-r--r--src-qt5/core-utils/lumina-config/AppDialog.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/src-qt5/core-utils/lumina-config/AppDialog.h b/src-qt5/core-utils/lumina-config/AppDialog.h
index 392dbe4d..ea7615e2 100644
--- a/src-qt5/core-utils/lumina-config/AppDialog.h
+++ b/src-qt5/core-utils/lumina-config/AppDialog.h
@@ -9,13 +9,7 @@
#ifndef _LUMINA_FILE_MANAGER_APP_SELECT_DIALOG_H
#define _LUMINA_FILE_MANAGER_APP_SELECT_DIALOG_H
-#include <QDialog>
-#include <QString>
-#include <QList>
-#include <QPoint>
-#include <QDesktopWidget>
-#include <QCursor>
-#include <LuminaXDG.h>
+#include "globals.h"
#include "ui_AppDialog.h"
@@ -27,16 +21,15 @@ class AppDialog : public QDialog{
Q_OBJECT
private:
Ui::AppDialog *ui;
- QList<XDGDesktop> APPS;
public:
- AppDialog(QWidget *parent = 0, QList<XDGDesktop> applist = QList<XDGDesktop>()) : QDialog(parent), ui(new Ui::AppDialog){
+ AppDialog(QWidget *parent = 0) : QDialog(parent), ui(new Ui::AppDialog){
ui->setupUi(this); //load the designer file
- APPS = applist; //save this for later
appreset = false;
ui->comboBox->clear();
+ QList<XDGDesktop*> APPS = LXDG::sortDesktopNames(APPSLIST->apps(false,false)); //Don't show all/hidden
for(int i=0; i<APPS.length(); i++){
- ui->comboBox->addItem( LXDG::findIcon(APPS[i].icon,"application-x-executable"), APPS[i].name );
+ ui->comboBox->addItem( LXDG::findIcon(APPS[i]->icon,"application-x-executable"), APPS[i]->name, APPS[i]->filePath);
}
this->setWindowIcon( LXDG::findIcon("system-search","") );
if(parent!=0){
@@ -56,13 +49,14 @@ public:
ui->buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
}
}
- XDGDesktop appselected; //selected application (empty template for cancelled/reset)
+
+ QString appselected; //selected application
bool appreset; //Did the user select to reset to defaults?
private slots:
void on_buttonBox_accepted(){
- appselected = APPS[ ui->comboBox->currentIndex() ];
+ appselected = ui->comboBox->currentData().toString();
this->close();
}
void on_buttonBox_rejected(){
bgstack15