Verified Commit f3d31cb7 authored by Alf Gaida's avatar Alf Gaida

Adding upstream version 0.4.1.

Signed-off-by: Alf Gaida's avatarAlf Gaida <agaida@siduction.org>
parent a56544a9
......@@ -3,7 +3,7 @@ project(nm-tray)
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
cmake_policy(SET CMP0071 NEW)
set(NM_TRAY_VERSION "0.3.0")
set(NM_TRAY_VERSION "0.4.1")
set(QT_MIN_VERSION "5.4.0")
set(KF5_MIN_VERSION "5.36.0")
......
......@@ -21,7 +21,7 @@ This software is licensed under [GNU GPLv2 or later](https://www.gnu.org/license
For [arch users](https://www.archlinux.org/) there is an AUR package [nm-tray-git](https://aur.archlinux.org/packages/nm-tray-git/) (thanks to [pmattern](https://github.com/pmattern)).
For [openSUSE users](https://www.opensuse.org/) there is a [package](https://build.opensuse.org/package/show/X11:LXQt:git/nm-tray) in the [X11:LXQt:git](https://build.opensuse.org/project/show/X11:LXQt:git) devel project of OBS.
nm-tray is in the official repository of [openSUSE](https://www.opensuse.org/) since Leap 15.0. There is a also a [git package](https://build.opensuse.org/package/show/X11:LXQt:git/nm-tray) in the [X11:LXQt:git](https://build.opensuse.org/project/show/X11:LXQt:git) devel project of OBS.
## Translations
......
......@@ -22,7 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
COPYRIGHT_HEADER*/
#include "tray.h"
#include <QSystemTrayIcon>
#include <QMenu>
#include <QMessageBox>
#include <QApplication>
......@@ -392,11 +391,21 @@ void Tray::onQuitTriggered()
}
void Tray::onActivated()
void Tray::onActivated(const QSystemTrayIcon::ActivationReason reason)
{
QMenu * menu = new WindowMenu(&d->mNmModel);
menu->setAttribute(Qt::WA_DeleteOnClose);
menu->popup(QCursor::pos());
switch (reason)
{
case QSystemTrayIcon::Trigger:
case QSystemTrayIcon::DoubleClick:
{
QMenu * menu = new WindowMenu(&d->mNmModel);
menu->setAttribute(Qt::WA_DeleteOnClose);
menu->popup(QCursor::pos());
}
break;
default:
break;
}
}
void Tray::setActionsStates()
......
......@@ -25,6 +25,7 @@ COPYRIGHT_HEADER*/
#include <QObject>
#include <QScopedPointer>
#include <QSystemTrayIcon>
class TrayPrivate;
......@@ -44,7 +45,7 @@ private Q_SLOTS:
void onEditConnectionsTriggered();
void onAboutTriggered();
void onQuitTriggered();
void onActivated();
void onActivated(const QSystemTrayIcon::ActivationReason reason);
//NetworkManager
void setActionsStates();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment