aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp
index 3e0150e2..02d064ab 100644
--- a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp
@@ -15,7 +15,7 @@
#include <LuminaOS.h>
//LFileInfo INFO = LFileInfo("");
-
+
MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){
ui->setupUi(this); //load the designer form
canwrite = false;
@@ -27,14 +27,16 @@ MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){
MainUI::~MainUI(){
terminate_thread = true;
- if(INFO!=0){ delete INFO; }
+ disconnect(this, SIGNAL(folder_size_changed(quint64, quint64, quint64, bool )) );
+ if(!INFO){ delete INFO; }
+ this->close();
}
//=============
// PUBLIC
//=============
void MainUI::LoadFile(QString path, QString type){
-
+
//Do the first file information tab
qDebug() << "Load File:" << path << type;
INFO = new LFileInfo(path);
@@ -51,7 +53,6 @@ void MainUI::LoadFile(QString path, QString type){
if(type=="APP"){ INFO->XDG()->type = XDGDesktop::APP; }
else if(type=="LINK"){ INFO->XDG()->type = XDGDesktop::LINK; }
}
-
//First load the general file information
if(!INFO->filePath().isEmpty()){
ui->label_file_name->setText( INFO->fileName() );
@@ -106,7 +107,7 @@ void MainUI::LoadFile(QString path, QString type){
qDebug() << "Check XDG Info:" << type;
//qDebug() << INFO->isDesktopFile() << type;
if(INFO->isDesktopFile() || !type.isEmpty()){
-
+
if(INFO->XDG()->type == XDGDesktop::APP){
ui->line_xdg_command->setText(INFO->XDG()->exec);
ui->line_xdg_wdir->setText(INFO->XDG()->path);
@@ -126,9 +127,9 @@ void MainUI::LoadFile(QString path, QString type){
ui->lblWorkingDir->setText(tr("URL:"));
ui->line_xdg_wdir->setText( INFO->XDG()->url );
ui->tool_xdg_getDir->setVisible(false); //the dir selection button
-
+
}
- ui->line_xdg_name->setText(INFO->XDG()->name);
+ ui->line_xdg_name->setText(INFO->XDG()->name);
ui->line_xdg_comment->setText(INFO->XDG()->comment);
ui->push_xdg_getIcon->setWhatsThis( INFO->XDG()->icon );
ReloadAppIcon();
@@ -142,12 +143,12 @@ void MainUI::LoadFile(QString path, QString type){
}else{
xdgvaluechanged(); //just do the disables here
//Also remove the xdg tab
- if(ui->tabWidget->indexOf(ui->tab_deskedit) >= 0){
+ if(ui->tabWidget->indexOf(ui->tab_deskedit) >= 0){
qDebug() << "Removing the deskedit tab";
ui->tabWidget->removeTab( ui->tabWidget->indexOf(ui->tab_deskedit) );
}
}
- //Setup the tab
+ //Setup the tab
if(type.isEmpty()){ ui->tabWidget->setCurrentIndex(0); }
else if(ui->tabWidget->count()>1){ ui->tabWidget->setCurrentIndex(1); }
qDebug() << "Done Loading File";
@@ -157,8 +158,8 @@ void MainUI::UpdateIcons(){
this->setWindowIcon(LXDG::findIcon("document-preview","unknown"));
ui->push_close->setIcon( LXDG::findIcon("dialog-close","") );
ui->push_save->setIcon( LXDG::findIcon("document-save","") );
- ui->tool_xdg_getCommand->setIcon( LXDG::findIcon("edit-find-project","") );
- ui->tool_xdg_getDir->setIcon( LXDG::findIcon("document-open","") );
+ ui->tool_xdg_getCommand->setIcon( LXDG::findIcon("edit-find-page","") );
+ ui->tool_xdg_getDir->setIcon( LXDG::findIcon("document-open","") );
}
//==============
@@ -234,7 +235,6 @@ void MainUI::on_push_close_clicked(){
if(ui->push_save->isEnabled()){
//Still have unsaved changes
//TO-DO - prompt for whether to save the changes
-
}
this->close();
}
@@ -317,7 +317,7 @@ void MainUI::on_push_xdg_getIcon_clicked(){
for(int i=0; i<ext.length(); i++){ ext[i].prepend("*."); } //turn them into valid filters
QString file = QFileDialog::getOpenFileName(this, tr("Select an icon"), dir ,QString(tr("Images (%1);; All Files (*)")).arg(ext.join(" ")) );
if(file.isEmpty()){ return; } //cancelled
- ui->push_xdg_getIcon->setWhatsThis(file);
+ ui->push_xdg_getIcon->setWhatsThis(file);
ReloadAppIcon();
xdgvaluechanged();
}
@@ -329,7 +329,7 @@ void MainUI::xdgvaluechanged(){
//Compare the current UI values to the file values
ui->push_save->setEnabled(canwrite); //assume changed at this point
// TO-DO
-
+
}else{
ui->push_save->setVisible(false);
ui->push_save->setEnabled(false);
bgstack15