diff options
author | Ken Moore <ken@ixsystems.com> | 2016-10-20 12:05:22 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-10-20 12:05:22 -0400 |
commit | 36df3d58e25beb06f16fdf821f18fe8a4bcce2ae (patch) | |
tree | 137dfbf9c48f0eba2f4a58d0f3d22f7e870f0c2a /src-qt5/desktop-utils/lumina-fm/OPWidget.cpp | |
parent | Make sure all the translation files are synced to the sources. (diff) | |
download | lumina-36df3d58e25beb06f16fdf821f18fe8a4bcce2ae.tar.gz lumina-36df3d58e25beb06f16fdf821f18fe8a4bcce2ae.tar.bz2 lumina-36df3d58e25beb06f16fdf821f18fe8a4bcce2ae.zip |
Finish up the last couple buttons/actions related to the new Tray UI.
1) If closing the main window while an operation is running, hide it instead until the file operation is finished - then close.
2) Fix the icon on the show errors button
3) Hook up the show errors button to show a scroll dialog with the errors.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/OPWidget.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/OPWidget.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/OPWidget.cpp b/src-qt5/desktop-utils/lumina-fm/OPWidget.cpp index 3e842b90..3638e2a8 100644 --- a/src-qt5/desktop-utils/lumina-fm/OPWidget.cpp +++ b/src-qt5/desktop-utils/lumina-fm/OPWidget.cpp @@ -7,16 +7,19 @@ #include "OPWidget.h" #include "ui_OPWidget.h" +#include "ScrollDialog.h" + OPWidget::OPWidget(QWidget *parent) : QWidget(parent), ui(new Ui::OPWidget()){ starttime = endtime = -1; WA = new QWidgetAction(0); WA->setDefaultWidget(this); worker = 0; workthread = 0; + dlg = 0; //Now create the widget ui->setupUi(this); ui->tool_close->setIcon( LXDG::findIcon("dialog-close","view-close") ); - ui->tool_showerrors->setIcon(LXDG::findIcon("view-search","")); + ui->tool_showerrors->setIcon(LXDG::findIcon("dialog-warning","")); //connect the widget buttons connect(ui->tool_close, SIGNAL(clicked()), this, SLOT(closeWidget()) ); connect(ui->tool_showerrors, SIGNAL(clicked()), this, SLOT(showErrors()) ); @@ -26,6 +29,7 @@ OPWidget::~OPWidget(){ if(worker!=0){ worker->stopped = true; worker->deleteLater(); } if(workthread!=0){ workthread->quit(); workthread->wait(); delete workthread; } WA->deleteLater(); + if(dlg!=0){ dlg->deleteLater(); } } QWidgetAction* OPWidget::widgetAction(){ @@ -87,7 +91,12 @@ void OPWidget::closeWidget(){ void OPWidget::showErrors(){ qDebug() << "Errors:" << Errors; - //TODO + if(dlg==0){ + dlg = new ScrollDialog(); //need this to persist outside this function + dlg->setWindowTitle(tr("File Operation Errors")); + dlg->setText( Errors.join("\n") ); + } + dlg->showNormal(); } void OPWidget::opFinished(QStringList errors){ |