aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2008-11-21 11:58:12 (GMT)
committerJouni Malinen <j@w1.fi>2008-11-21 11:58:12 (GMT)
commit8038591be2f49eb3851157f1d043706e761d54ac (patch)
tree0b8e255b2e2f53b7695d39f9f11c6a70ab55d0a6 /wpa_supplicant
parent012783f1abbfdecf781aedaf605239826368cfb8 (diff)
downloadhostap-06-8038591be2f49eb3851157f1d043706e761d54ac.zip
hostap-06-8038591be2f49eb3851157f1d043706e761d54ac.tar.gz
hostap-06-8038591be2f49eb3851157f1d043706e761d54ac.tar.bz2
wpa_gui: Add a PNG version of the tray icon for Windows binary build
It looks like Qt does not support SVG format by default on Windows and it was not trivial to add the plugin into the build, so for now, build a 16x16 PNG icon file for Windows binary to avoid showing an invisible icon in the tray.
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_gui-qt4/icons_png.qrc5
-rwxr-xr-xwpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling2
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpa_gui.pro1
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.cpp6
4 files changed, 13 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/icons_png.qrc b/wpa_supplicant/wpa_gui-qt4/icons_png.qrc
new file mode 100644
index 0000000..09f3d96
--- /dev/null
+++ b/wpa_supplicant/wpa_gui-qt4/icons_png.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/icons" >
+ <file alias="wpa_gui.png">icons/hicolor/16x16/apps/wpa_gui.png</file>
+ </qresource>
+</RCC>
diff --git a/wpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling b/wpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling
index 07e4a8f..b7d57f6 100755
--- a/wpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling
+++ b/wpa_supplicant/wpa_gui-qt4/setup-mingw-cross-compiling
@@ -9,3 +9,5 @@ cat Makefile.Release |
sed s%/usr/lib/qt4%/q/jm/qt4-win/4.3.3/lib%g |
sed s%/usr/include/qt4%/q/jm/qt4-win/4.3.3/include%g > tmp.Makefile.Release &&
mv -f tmp.Makefile.Release Makefile.Release
+
+make -C icons
diff --git a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
index c7dfa05..0f94f48 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
+++ b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
@@ -14,6 +14,7 @@ win32 {
LIBS += -lws2_32 -static
DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE
SOURCES += ../../src/utils/os_win32.c
+ RESOURCES += icons_png.qrc
} else {
DEFINES += CONFIG_CTRL_IFACE_UNIX
SOURCES += ../../src/utils/os_unix.c
diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index 8f73967..f1861e4 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -20,6 +20,7 @@
#include <cstdio>
#include <QMessageBox>
#include <QCloseEvent>
+#include <QImageReader>
#include "wpagui.h"
#include "dirent.h"
@@ -1095,7 +1096,10 @@ void WpaGui::createTrayIcon(bool trayOnly)
tray_icon = new QSystemTrayIcon(this);
tray_icon->setToolTip(qAppName() + " - wpa_supplicant user interface");
- tray_icon->setIcon(QIcon(":/icons/wpa_gui.svg"));
+ if (QImageReader::supportedImageFormats().contains(QByteArray("svg")))
+ tray_icon->setIcon(QIcon(":/icons/wpa_gui.svg"));
+ else
+ tray_icon->setIcon(QIcon(":/icons/wpa_gui.png"));
connect(tray_icon,
SIGNAL(activated(QSystemTrayIcon::ActivationReason)),