diff --git a/Makefile.am b/Makefile.am
index 6d43a9f..d25207f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ NULL =
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src man plugin po data
+SUBDIRS = src man plugin po data icons
EXTRA_DIST = \
$(PACKAGE).spec \
diff --git a/configure.ac b/configure.ac
index 7c19800..0824e32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,6 +164,13 @@ AC_OUTPUT([
Makefile
data/Makefile
data/virt-viewer.nsis
+ icons/Makefile
+ icons/16x16/Makefile
+ icons/22x22/Makefile
+ icons/24x24/Makefile
+ icons/32x32/Makefile
+ icons/48x48/Makefile
+ icons/256x256/Makefile
man/Makefile
mingw32-virt-viewer.spec
plugin/Makefile
diff --git a/icons/16x16/Makefile.am b/icons/16x16/Makefile.am
new file mode 100644
index 0000000..355b4d1
--- /dev/null
+++ b/icons/16x16/Makefile.am
@@ -0,0 +1,5 @@
+size = $(notdir $(PWD))
+icondir = $(datadir)/icons/hicolor/$(size)/apps/
+icon_DATA = $(PACKAGE).png
+
+EXTRA_DIST = $(icon_DATA)
diff --git a/icons/16x16/virt-viewer.png b/icons/16x16/virt-viewer.png
new file mode 100644
index 0000000..226881f
Binary files /dev/null and b/icons/16x16/virt-viewer.png differ
diff --git a/icons/22x22/Makefile.am b/icons/22x22/Makefile.am
new file mode 100644
index 0000000..355b4d1
--- /dev/null
+++ b/icons/22x22/Makefile.am
@@ -0,0 +1,5 @@
+size = $(notdir $(PWD))
+icondir = $(datadir)/icons/hicolor/$(size)/apps/
+icon_DATA = $(PACKAGE).png
+
+EXTRA_DIST = $(icon_DATA)
diff --git a/icons/22x22/virt-viewer.png b/icons/22x22/virt-viewer.png
new file mode 100644
index 0000000..f244adb
Binary files /dev/null and b/icons/22x22/virt-viewer.png differ
diff --git a/icons/24x24/Makefile.am b/icons/24x24/Makefile.am
new file mode 100644
index 0000000..355b4d1
--- /dev/null
+++ b/icons/24x24/Makefile.am
@@ -0,0 +1,5 @@
+size = $(notdir $(PWD))
+icondir = $(datadir)/icons/hicolor/$(size)/apps/
+icon_DATA = $(PACKAGE).png
+
+EXTRA_DIST = $(icon_DATA)
diff --git a/icons/24x24/virt-viewer.png b/icons/24x24/virt-viewer.png
new file mode 100644
index 0000000..f3d2e65
Binary files /dev/null and b/icons/24x24/virt-viewer.png differ
diff --git a/icons/256x256/Makefile.am b/icons/256x256/Makefile.am
new file mode 100644
index 0000000..355b4d1
--- /dev/null
+++ b/icons/256x256/Makefile.am
@@ -0,0 +1,5 @@
+size = $(notdir $(PWD))
+icondir = $(datadir)/icons/hicolor/$(size)/apps/
+icon_DATA = $(PACKAGE).png
+
+EXTRA_DIST = $(icon_DATA)
diff --git a/icons/256x256/virt-viewer.png b/icons/256x256/virt-viewer.png
new file mode 100644
index 0000000..d861b86
Binary files /dev/null and b/icons/256x256/virt-viewer.png differ
diff --git a/icons/32x32/Makefile.am b/icons/32x32/Makefile.am
new file mode 100644
index 0000000..355b4d1
--- /dev/null
+++ b/icons/32x32/Makefile.am
@@ -0,0 +1,5 @@
+size = $(notdir $(PWD))
+icondir = $(datadir)/icons/hicolor/$(size)/apps/
+icon_DATA = $(PACKAGE).png
+
+EXTRA_DIST = $(icon_DATA)
diff --git a/icons/32x32/virt-viewer.png b/icons/32x32/virt-viewer.png
new file mode 100644
index 0000000..b95ea5d
Binary files /dev/null and b/icons/32x32/virt-viewer.png differ
diff --git a/icons/48x48/Makefile.am b/icons/48x48/Makefile.am
new file mode 100644
index 0000000..355b4d1
--- /dev/null
+++ b/icons/48x48/Makefile.am
@@ -0,0 +1,5 @@
+size = $(notdir $(PWD))
+icondir = $(datadir)/icons/hicolor/$(size)/apps/
+icon_DATA = $(PACKAGE).png
+
+EXTRA_DIST = $(icon_DATA)
diff --git a/icons/48x48/virt-viewer.png b/icons/48x48/virt-viewer.png
new file mode 100644
index 0000000..28396d1
Binary files /dev/null and b/icons/48x48/virt-viewer.png differ
diff --git a/icons/Makefile.am b/icons/Makefile.am
new file mode 100644
index 0000000..189ea2b
--- /dev/null
+++ b/icons/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256
diff --git a/icons/virt-viewer.svg b/icons/virt-viewer.svg
new file mode 100644
index 0000000..26fe3a9
--- /dev/null
+++ b/icons/virt-viewer.svg
@@ -0,0 +1,488 @@
+
+
+
diff --git a/mingw32-virt-viewer.spec.in b/mingw32-virt-viewer.spec.in
index c1e7bd9..5ca433a 100644
--- a/mingw32-virt-viewer.spec.in
+++ b/mingw32-virt-viewer.spec.in
@@ -76,6 +76,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mingw32_datadir}/virt-viewer/ui/virt-viewer.xml
%{_mingw32_datadir}/virt-viewer/ui/virt-viewer-about.xml
%{_mingw32_datadir}/virt-viewer/ui/virt-viewer-auth.xml
+%{_mingw32_datadir}/icons/hicolor/*/apps/*
%{_mingw32_mandir}/man1/virt-viewer.1*
%{_mingw32_mandir}/man1/remote-viewer.1*
diff --git a/src/virt-viewer-about.xml b/src/virt-viewer-about.xml
index 0f96832..5c6edcd 100644
--- a/src/virt-viewer-about.xml
+++ b/src/virt-viewer-about.xml
@@ -14,6 +14,7 @@ Copyright (C) 2007-2012 Red Hat, Inc.
A remote desktop client built with GTK-VNC, SPICE-GTK and libvirt
http://virt-manager.org/
virt-manager.org
+ virt-viewer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c
index 3fa674f..cf7f55e 100644
--- a/src/virt-viewer-main.c
+++ b/src/virt-viewer-main.c
@@ -122,6 +122,8 @@ int main(int argc, char **argv)
goto cleanup;
}
+ gtk_window_set_default_icon_name("virt-viewer");
+
virt_viewer_app_set_debug(debug);
viewer = virt_viewer_new(uri, args[0], zoom, direct, attach, waitvm, reconnect, verbose, NULL);
diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in
index f10fe9d..12fccfc 100644
--- a/virt-viewer.spec.in
+++ b/virt-viewer.spec.in
@@ -124,14 +124,20 @@ rm -f %{buildroot}%{_libdir}/mozilla/plugins/%{name}-plugin.la
rm -rf $RPM_BUILD_ROOT
%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%{_sbindir}/update-alternatives --install %{_libexecdir}/spice-xpi-client \
spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer 20
%postun
if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_sbindir}/update-alternatives --remove spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer
fi
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README COPYING AUTHORS ChangeLog NEWS
@@ -142,6 +148,7 @@ fi
%{_datadir}/%{name}/ui/virt-viewer.xml
%{_datadir}/%{name}/ui/virt-viewer-auth.xml
%{_datadir}/%{name}/ui/virt-viewer-about.xml
+%{_datadir}/icons/hicolor/*/apps/*
%ghost %{_libexecdir}/spice-xpi-client
%{_libexecdir}/spice-xpi-client-remote-viewer
%{_mandir}/man1/virt-viewer.1*