From 36df3d58e25beb06f16fdf821f18fe8a4bcce2ae Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 20 Oct 2016 12:05:22 -0400 Subject: 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. --- src-qt5/desktop-utils/lumina-fm/TrayUI.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-fm/TrayUI.cpp') 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; iduration(); //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); } -- cgit