diff options
| author | Roy Marples <roy@marples.name> | 2020-08-09 12:10:55 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-08-09 12:10:55 +0100 |
| commit | 216835ca56ab1d889dacc336e7f5b1d72e924c21 (patch) | |
| tree | d2038d67f1a98afb389c046b9163a2a5e10737cf | |
| parent | d5d190456641edad9fd83c47396e011ef8584873 (diff) | |
| download | dhcpcd-ui-216835ca56ab1d889dacc336e7f5b1d72e924c21.tar.xz | |
dhcpcd-qt: Remove support for KDE Notifications
Qt Notifications are fine and highly portable.
KDE Notifications are now more tricky as they require a per app
config file to be installed and of course don't work with
other Qt based desktops.
If anyone wants them back, we should try and create dhcpcd-kde
instead of dhcpcd-qt.
| -rw-r--r-- | README.md | 6 | ||||
| -rwxr-xr-x | configure | 16 | ||||
| -rw-r--r-- | src/dhcpcd-qt/dhcpcd-qt.cpp | 15 |
3 files changed, 6 insertions, 31 deletions
@@ -27,3 +27,9 @@ Switches to control building of various parts: For each `--with` there is a `--without` and for each `--enable` a `--disable`. If each part is not specified then the configure will test the system for the needed libraries to build and install it. + +### Notifications + +Notifications are dependant on the chosen platform. +GTK+ will get them if libnotify is present. +Qt will get them by default. @@ -434,22 +434,6 @@ if $DHCPCD_QT; then QMAKE_CONFIG="$QMAKE_CONFIG PREFIX=$PREFIX" QMAKE_CONFIG="$QMAKE_CONFIG SYSCONFDIR=$SYSCONFDIR" QMAKE_CONFIG="$QMAKE_CONFIG MANDIR=$MANDIR" -fi -if $DHCPCD_QT && [ -z "$NOTIFY" -o "$NOTIFY" = yes ]; then - printf "Looking for KDE Notification support ... " - QT_KNOTE="QT+=KNotifications" - if (cd src/dhcpcd-qt; $QMAKE $QMAKE_CONFIG $QT_KNOTE dhcpcd-qt.pro) 2>>config.log; then - QMAKE_CONFIG="$QMAKE_CONFIG $QT_KNOTE DEFINES+=KNOTIFY5" - echo "KDE5" - elif kde4-config --path lib --locate libkdeui.so >/dev/null 2>&3; then - QMAKE_CONFIG="$QMAKE_CONFIG CONFIG+=has_libkdeui DEFINES+=KNOTIFY4" - echo "KDE4" - else - echo "none found" - [ "$NOTIFY" = yes ] && exit 1 - fi -fi -if $DHCPCD_QT; then if (cd src/dhcpcd-qt; $QMAKE $QMAKE_CONFIG dhcpcd-qt.pro); then UI="$UI${UI:+ }dhcpcd-qt" else diff --git a/src/dhcpcd-qt/dhcpcd-qt.cpp b/src/dhcpcd-qt/dhcpcd-qt.cpp index b9cf703..ab1bfc4 100644 --- a/src/dhcpcd-qt/dhcpcd-qt.cpp +++ b/src/dhcpcd-qt/dhcpcd-qt.cpp @@ -40,12 +40,6 @@ #include "dhcpcd-ifmenu.h" #include "dhcpcd-ssidmenu.h" -#if defined(KNOTIFY5) -#include <KNotification> -#elif defined(KNOTIFY4) -#include <knotification.h> -#endif - DhcpcdQt::DhcpcdQt() { @@ -539,14 +533,6 @@ void DhcpcdQt::dispatch() void DhcpcdQt::notify(const QString &title, const QString &msg, const QString &icon) { - -#if defined(KNOTIFY4) || defined(KNOTIFY5) - KNotification *n = new KNotification("event", this); - n->setIconName(icon); - n->setTitle(title); - n->setText(msg); - n->sendEvent(); -#else #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) const QIcon i = getIcon("status", icon); #else @@ -556,7 +542,6 @@ void DhcpcdQt::notify(const QString &title, const QString &msg, i = QSystemTrayIcon::Warning; #endif trayIcon->showMessage(title, msg, i); -#endif } void DhcpcdQt::closeEvent(QCloseEvent *event) |
