diff --git a/config/wpa_gui.desktop b/config/wpa_gui.desktop index 31b8b6b..6985399 100644 --- a/config/wpa_gui.desktop +++ b/config/wpa_gui.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=wpa_gui Comment[en]=Wpa_supplicant management -Exec=kdesu wpa_gui +Exec=wpa_gui Icon=wpa_gui Type=Application Categories=Qt;Network; diff --git a/patches/wpa_supplicant-2.5-notify.patch b/patches/wpa_supplicant-2.5-notify.patch new file mode 100644 index 0000000..efff3f9 --- /dev/null +++ b/patches/wpa_supplicant-2.5-notify.patch @@ -0,0 +1,27 @@ +diff -Nur ../wpa_supplicant-2.5/wpa_supplicant/wpa_gui-qt4/wpagui.cpp ./wpa_supplicant/wpa_gui-qt4/wpagui.cpp +--- ../wpa_supplicant-2.5/wpa_supplicant/wpa_gui-qt4/wpagui.cpp 2015-09-27 21:02:05.000000000 +0200 ++++ ./wpa_supplicant/wpa_gui-qt4/wpagui.cpp 2016-10-11 21:34:31.043783564 +0200 +@@ -10,6 +10,7 @@ + #include + #endif /* CONFIG_NATIVE_WINDOWS */ + ++#include + #include + #include + #include +@@ -1415,13 +1416,10 @@ + void WpaGui::showTrayMessage(QSystemTrayIcon::MessageIcon type, int sec, + const QString & msg) + { +- if (!QSystemTrayIcon::supportsMessages()) ++ if (isVisible() || quietMode) + return; + +- if (isVisible() || !tray_icon || !tray_icon->isVisible() || quietMode) +- return; +- +- tray_icon->showMessage(qAppName(), msg, type, sec * 1000); ++ system(("notify-send -a " + qAppName() + " -t " + QString::number(sec * 1000) + " '" + qAppName() + "' '" + msg + "'").toStdString().c_str()); + } + + diff --git a/wpa_supplicant.SlackBuild b/wpa_supplicant.SlackBuild index d00d7ea..f7c2ee7 100755 --- a/wpa_supplicant.SlackBuild +++ b/wpa_supplicant.SlackBuild @@ -96,6 +96,9 @@ cat $CWD/patches/quiet-scan-results-message.diff | patch -p1 --verbose || exit 1 cat $CWD/patches/assoc-timeout.diff | patch -p1 --verbose || exit 1 cat $CWD/patches/flush-debug-output.diff | patch -p1 --verbose || exit 1 +# Use notify-send for notifications +cat $CWD/patches/wpa_supplicant-2.5-notify.patch | patch -p0 --verbose || exit 1 + cd wpa_supplicant # Create the configuration file for building wpa_supplicant: