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/TrayUI.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/TrayUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/TrayUI.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/TrayUI.cpp b/src-qt5/desktop-utils/lumina-fm/TrayUI.cpp index 8e796c68..f7034d54 100644 --- a/src-qt5/desktop-utils/lumina-fm/TrayUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/TrayUI.cpp @@ -12,6 +12,7 @@ TrayUI::TrayUI(QObject *parent) : QSystemTrayIcon(parent){ this->setContextMenu( new QMenu() ); this->setIcon(LXDG::findIcon("Insight-FileManager","")); + connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(TrayActivated())); } TrayUI::~TrayUI(){ @@ -38,6 +39,10 @@ void TrayUI::createOP( FILEOP type, QStringList oldF, QStringList newF){ QTimer::singleShot(0, OP, SLOT(startOperation()) ); } +void TrayUI::TrayActivated(){ + this->contextMenu()->popup( this->geometry().center() ); +} + //Operation Widget Responses void TrayUI::OperationClosed(QString ID){ for(int i=0; i<OPS.length(); i++){ @@ -68,7 +73,7 @@ void TrayUI::OperationFinished(QString ID){ //qDebug() << " -- Errors:" << err << "Duration:" << OPS[i]->duration(); //Assemble the notification (if more than 1 second to perform operation) if(OPS[i]->duration()>1){ - this->showMessage( tr("Finished"), err ? tr("Errors during operation. Click to view details") : tr("No Errors"), err ? QSystemTrayIcon::Warning : QSystemTrayIcon::Information); + this->showMessage( tr("Finished"), err ? tr("Errors during operation. Click to view details") : "", err ? QSystemTrayIcon::Warning : QSystemTrayIcon::Information); } //Close the widget if no errors if(!err){ OperationClosed(ID); } |