]> Pileus Git - aweather/commitdiff
Add new application icons
authorAndy Spencer <andy753421@gmail.com>
Tue, 6 Sep 2011 05:07:35 +0000 (05:07 +0000)
committerAndy Spencer <andy753421@gmail.com>
Tue, 6 Sep 2011 05:07:35 +0000 (05:07 +0000)
The new icon is works better with different background colors, it also
avoids using flat background colors or borders.

The small icons (less than 32) pixels do not includes the sun in the
background because it is difficult to see at such small sizes and just
add clutter.

The old icon is kept as logo.svg and is used in the about dialog. It may
be converted to use the new icon eventually as well.

19 files changed:
aweather.nsi
data/.gitignore
data/Makefile.am
data/aweather.desktop
data/icons/16x16/aweather.png [new file with mode: 0644]
data/icons/16x16/aweather.xcf [new file with mode: 0644]
data/icons/22x22/aweather.png [new file with mode: 0644]
data/icons/22x22/aweather.xcf [new file with mode: 0644]
data/icons/24x24/aweather.png [new file with mode: 0644]
data/icons/24x24/aweather.xcf [new file with mode: 0644]
data/icons/32x32/aweather.png [new file with mode: 0644]
data/icons/32x32/aweather.xcf [new file with mode: 0644]
data/icons/48x48/aweather.png [new file with mode: 0644]
data/icons/48x48/aweather.xcf [new file with mode: 0644]
data/icons/scalable/aweather.svg [new file with mode: 0644]
data/logo.svg [moved from data/aweather.svg with 100% similarity]
data/main.ui.in
src/Makefile.am
src/aweather-gui.c

index c897f01e1f9e66b14708f520653cb6bec87b574d..5db4eec6c8aa7edd180da31b68663328911f8be3 100644 (file)
@@ -23,7 +23,7 @@ name "AWeather"
        outFile "aweather-${VERSION}.exe"
 !endif
 installDir AWeather
        outFile "aweather-${VERSION}.exe"
 !endif
 installDir AWeather
-Icon "data/aweather.ico"
+Icon "data/icons/48x48/aweather.ico"
 
 !define MUI_ABORTWARNING
 
 
 !define MUI_ABORTWARNING
 
index 0b451448966b0464d85a2a2562b67abd89ffdd07..27de9f1013300d21dcb2b220ae87302d374d845e 100644 (file)
@@ -1,4 +1,3 @@
-*.png
 *.ico
 aweather
 main.ui
 *.ico
 aweather
 main.ui
index ad651d1e92601c1db3600bf63a95a59989f8d332..f6447507eca6260864509df364f4adb6c36fa64a 100644 (file)
@@ -4,24 +4,38 @@ dist_gtkbuilder_DATA = main.ui
 configdir = $(datadir)/aweather/
 dist_config_DATA = defaults.ini
 
 configdir = $(datadir)/aweather/
 dist_config_DATA = defaults.ini
 
+logodir = $(datadir)/aweather/
+logo_DATA = logo.svg
+
 colordir = $(datadir)/aweather/colors/
 dist_color_DATA = colors/*.clr
 
 if WIN32
 colordir = $(datadir)/aweather/colors/
 dist_color_DATA = colors/*.clr
 
 if WIN32
-noinst_DATA = aweather.ico
+noinst_DATA = icons/48x48/aweather.ico
 else
 desktopdir = $(datadir)/applications
 dist_desktop_DATA = aweather.desktop
 
 else
 desktopdir = $(datadir)/applications
 dist_desktop_DATA = aweather.desktop
 
-pixmapdir = $(datadir)/pixmaps
-dist_pixmap_DATA = aweather.png
+icon16dir = $(datadir)/icons/hicolor/16x16/apps/
+icon22dir = $(datadir)/icons/hicolor/22x22/apps/
+icon24dir = $(datadir)/icons/hicolor/24x24/apps/
+icon32dir = $(datadir)/icons/hicolor/32x32/apps/
+icon48dir = $(datadir)/icons/hicolor/48x48/apps/
+iconSCdir = $(datadir)/icons/hicolor/scalable/apps
+
+icon16_DATA = icons/16x16/aweather.png
+icon22_DATA = icons/22x22/aweather.png
+icon24_DATA = icons/24x24/aweather.png
+icon32_DATA = icons/32x32/aweather.png
+iconSC_DATA = icons/scalable/aweather.svg
+
+install-data-hook:
+       gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
 endif
 
 glade:
        GLADE_CATALOG_PATH=. glade-3 main.ui.in
 
 endif
 
 glade:
        GLADE_CATALOG_PATH=. glade-3 main.ui.in
 
-.svg.png:
-       rsvg -w 48 -h 48 $< $@
 .png.ico:
        icotool -c $< -o $@
 
 .png.ico:
        icotool -c $< -o $@
 
index 7019aca53e046f648c4e7d7d9567fca426ffbe5a..d06877b1fbe333b9be34d9b86e61837654eb74fb 100644 (file)
@@ -4,5 +4,5 @@ Name=AWeather
 Comment=Advanced weather reporting program
 Exec=aweather
 Terminal=false
 Comment=Advanced weather reporting program
 Exec=aweather
 Terminal=false
-Icon=aweather.png
+Icon=aweather
 Categories=Education;Science;Geoscience
 Categories=Education;Science;Geoscience
diff --git a/data/icons/16x16/aweather.png b/data/icons/16x16/aweather.png
new file mode 100644 (file)
index 0000000..de90ffc
Binary files /dev/null and b/data/icons/16x16/aweather.png differ
diff --git a/data/icons/16x16/aweather.xcf b/data/icons/16x16/aweather.xcf
new file mode 100644 (file)
index 0000000..d702012
Binary files /dev/null and b/data/icons/16x16/aweather.xcf differ
diff --git a/data/icons/22x22/aweather.png b/data/icons/22x22/aweather.png
new file mode 100644 (file)
index 0000000..7b7200e
Binary files /dev/null and b/data/icons/22x22/aweather.png differ
diff --git a/data/icons/22x22/aweather.xcf b/data/icons/22x22/aweather.xcf
new file mode 100644 (file)
index 0000000..74e3a5c
Binary files /dev/null and b/data/icons/22x22/aweather.xcf differ
diff --git a/data/icons/24x24/aweather.png b/data/icons/24x24/aweather.png
new file mode 100644 (file)
index 0000000..3ca8695
Binary files /dev/null and b/data/icons/24x24/aweather.png differ
diff --git a/data/icons/24x24/aweather.xcf b/data/icons/24x24/aweather.xcf
new file mode 100644 (file)
index 0000000..cfb80f8
Binary files /dev/null and b/data/icons/24x24/aweather.xcf differ
diff --git a/data/icons/32x32/aweather.png b/data/icons/32x32/aweather.png
new file mode 100644 (file)
index 0000000..2f3582a
Binary files /dev/null and b/data/icons/32x32/aweather.png differ
diff --git a/data/icons/32x32/aweather.xcf b/data/icons/32x32/aweather.xcf
new file mode 100644 (file)
index 0000000..99844ad
Binary files /dev/null and b/data/icons/32x32/aweather.xcf differ
diff --git a/data/icons/48x48/aweather.png b/data/icons/48x48/aweather.png
new file mode 100644 (file)
index 0000000..2b30a1c
Binary files /dev/null and b/data/icons/48x48/aweather.png differ
diff --git a/data/icons/48x48/aweather.xcf b/data/icons/48x48/aweather.xcf
new file mode 100644 (file)
index 0000000..69943b8
Binary files /dev/null and b/data/icons/48x48/aweather.xcf differ
diff --git a/data/icons/scalable/aweather.svg b/data/icons/scalable/aweather.svg
new file mode 100644 (file)
index 0000000..66996c7
--- /dev/null
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.0 r9654"
+   width="256"
+   height="256"
+   sodipodi:docname="aweather.svg">
+  <metadata
+     id="metadata8">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs6">
+    <linearGradient
+       id="linearGradient3912">
+      <stop
+         style="stop-color:#ed2500;stop-opacity:1;"
+         offset="0"
+         id="stop3914" />
+      <stop
+         id="stop3924"
+         offset="0.69575125"
+         style="stop-color:#ed6700;stop-opacity:1;" />
+      <stop
+         id="stop3920"
+         offset="0.85642195"
+         style="stop-color:#edaa00;stop-opacity:1;" />
+      <stop
+         style="stop-color:#ede000;stop-opacity:1;"
+         offset="1"
+         id="stop3916" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3898">
+      <stop
+         style="stop-color:#fce9ce;stop-opacity:1;"
+         offset="0"
+         id="stop3900" />
+      <stop
+         id="stop3908"
+         offset="0.66489369"
+         style="stop-color:#fce9b2;stop-opacity:1;" />
+      <stop
+         id="stop3906"
+         offset="1"
+         style="stop-color:#fce953;stop-opacity:1;" />
+      <stop
+         style="stop-color:#fce900;stop-opacity:1;"
+         offset="1"
+         id="stop3902" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3851">
+      <stop
+         style="stop-color:#f3f3f3;stop-opacity:1;"
+         offset="0"
+         id="stop3853" />
+      <stop
+         style="stop-color:#717171;stop-opacity:1;"
+         offset="1"
+         id="stop3855" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3809">
+      <stop
+         style="stop-color:#888a85;stop-opacity:1;"
+         offset="0"
+         id="stop3811" />
+      <stop
+         style="stop-color:#535451;stop-opacity:1;"
+         offset="1"
+         id="stop3813" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3799">
+      <stop
+         style="stop-color:#ffffcd;stop-opacity:1;"
+         offset="0"
+         id="stop3801" />
+      <stop
+         id="stop3803"
+         offset="1"
+         style="stop-color:#e4e65e;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3763"
+       osb:paint="gradient">
+      <stop
+         id="stop3775"
+         offset="0"
+         style="stop-color:#e5cd2a;stop-opacity:1;" />
+      <stop
+         style="stop-color:#c3a12c;stop-opacity:1;"
+         offset="1"
+         id="stop3767" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3799"
+       id="linearGradient3785"
+       x1="16.740398"
+       y1="25.144333"
+       x2="31.848434"
+       y2="45.519333"
+       gradientUnits="userSpaceOnUse"
+       spreadMethod="pad"
+       gradientTransform="matrix(5.3098826,0,0,5.2378618,0.43208239,0.05778)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3763"
+       id="linearGradient3797"
+       x1="16.740398"
+       y1="25.144333"
+       x2="31.848434"
+       y2="45.519333"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(5.3098826,0,0,5.2378618,0.43208239,0.05778)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3809"
+       id="linearGradient3815"
+       x1="4.1243281"
+       y1="19.125366"
+       x2="48.134125"
+       y2="19.125366"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3809"
+       id="linearGradient3824"
+       gradientUnits="userSpaceOnUse"
+       x1="4.1243281"
+       y1="19.125366"
+       x2="48.134125"
+       y2="19.125366" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3809"
+       id="linearGradient3827"
+       gradientUnits="userSpaceOnUse"
+       x1="6.3743281"
+       y1="2.3128662"
+       x2="42.821625"
+       y2="35.187866"
+       gradientTransform="matrix(5.3098826,0,0,5.2378618,0.43208239,0.05778)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3809"
+       id="linearGradient3835"
+       x1="10.810518"
+       y1="2.0311022"
+       x2="42.3125"
+       y2="33.281101"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(5.3098826,0,0,5.2378618,0.43208239,0.05778)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3851"
+       id="linearGradient3857"
+       x1="15.461828"
+       y1="1.6878672"
+       x2="39.546627"
+       y2="30.562868"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(5.3098826,0,0,5.2378618,0.43208239,0.38516)" />
+    <filter
+       inkscape:collect="always"
+       id="filter3894"
+       color-interpolation-filters="sRGB">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="0.095"
+         id="feGaussianBlur3896" />
+    </filter>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3898"
+       id="radialGradient3904"
+       cx="17"
+       cy="16.1875"
+       fx="17"
+       fy="16.1875"
+       r="9.8405666"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3912"
+       id="radialGradient3922"
+       cx="23.526337"
+       cy="2.5502341"
+       fx="23.526337"
+       fy="2.5502341"
+       r="8.84375"
+       gradientTransform="matrix(5.3467431,-6.0642343,4.7061147,4.0375147,-73.917308,196.72345)"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1673"
+     inkscape:window-height="1034"
+     id="namedview4"
+     showgrid="false"
+     inkscape:zoom="1"
+     inkscape:cx="-75.775511"
+     inkscape:cy="131.70617"
+     inkscape:window-x="0"
+     inkscape:window-y="15"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0" />
+  <path
+     style="fill:url(#radialGradient3922);fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="M 24.629977,94.47776 0,71.47764 21.345977,51.06907 21.017556,24.8295 46.632733,24.50554 68.635509,3.12516 92.937086,24.50554"
+     id="path3910"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="ccccccc" />
+  <path
+     sodipodi:type="arc"
+     style="fill:url(#radialGradient3904);fill-opacity:1;fill-rule:nonzero;stroke:#edd400;stroke-width:0.18313251;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3894)"
+     id="path3880"
+     sodipodi:cx="17"
+     sodipodi:cy="16.1875"
+     sodipodi:rx="9.5"
+     sodipodi:ry="9.5"
+     d="m 26.5,16.1875 a 9.5,9.5 0 1 1 -19,0 9.5,9.5 0 1 1 19,0 z"
+     transform="matrix(5.7989505,0,0,5.7202968,-21.488642,-16.917876)" />
+  <path
+     sodipodi:nodetypes="ccsscscc"
+     inkscape:connector-curvature="0"
+     id="path3837"
+     d="m 134.8385,3.33144 c 0,0 -58.111545,-6.545664 -62.723009,51.06916 -30.498685,-2.17942 -46.793331,22.2609 -47.12521,47.46814 -0.331859,25.20719 22.567003,47.79547 39.492258,47.79547 16.925252,0 143.366841,0 143.366841,0 20.57577,0.32737 46.79333,-20.29673 45.46581,-54.34282 C 251.98772,61.27529 228.75699,50.79957 198.2252,51.4543 196.89774,15.44399 171.01206,4.31353 134.17474,3.00407"
+     style="fill:url(#linearGradient3857);fill-opacity:1;stroke:#73d216;stroke-width:1.0547502;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+  <path
+     style="fill:none;stroke:url(#linearGradient3827);stroke-width:5.27374887;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     d="m 104.63852,81.572 c 0,0 -9.292289,-27.1714 -36.173563,-27.49877 -26.881287,-0.32737 -43.142797,22.26092 -43.474676,47.46814 -0.331859,25.20721 22.567003,47.79548 39.492258,47.79548 16.925252,0 143.366841,0 143.366841,0 20.57577,0.32736 46.79333,-20.29673 45.46581,-54.34283 -1.32747,-34.0461 -24.22626,-43.86709 -51.43943,-43.86709 -27.21314,0 -47.12521,17.02306 -50.44388,38.30187"
+     id="path3807"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cssscssc" />
+  <path
+     style="fill:url(#linearGradient3785);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3797);stroke-width:10.54749775;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     d="m 113.14458,127.1602 -30.460301,65.41516 28.873791,0 -8.88422,47.88762 70.28076,-69.32752 -31.88812,0 44.73855,-43.34929"
+     id="path2993"
+     inkscape:connector-curvature="0" />
+  <path
+     style="fill:none;stroke:url(#linearGradient3835);stroke-width:5.27374887;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+     d="m 72.447369,54.07323 c 0,0 -2.323079,-51.72389 62.059241,-51.39653 64.38235,0.32737 62.72299,40.59344 63.38671,47.79549"
+     id="path3819"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="csc" />
+</svg>
similarity index 100%
rename from data/aweather.svg
rename to data/logo.svg
index 0aeb93db234fce4b7a571b704f9df1b2e4ec5647..34fbbe926b23acf358aa653e400002eb95154b49 100644 (file)
@@ -320,6 +320,7 @@ The hypothetical commands `show w' and `show c' should show the appropriate part
   The GNU General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Lesser General Public License instead of this License.  But first, please read &lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
 </property>
     <property name="authors">Andy Spencer &lt;andy753421@gmail.com&gt;</property>
   The GNU General Public License does not permit incorporating your program into proprietary programs.  If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library.  If this is what you want to do, use the GNU Lesser General Public License instead of this License.  But first, please read &lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
 </property>
     <property name="authors">Andy Spencer &lt;andy753421@gmail.com&gt;</property>
+    <property name="logo">logo.svg</property>
     <property name="wrap_license">True</property>
     <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
     <signal name="response" handler="gtk_widget_hide" swapped="no"/>
     <property name="wrap_license">True</property>
     <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
     <signal name="response" handler="gtk_widget_hide" swapped="no"/>
index 7203aa093473542658c0580caed79f3aed9f5444..d3861ebfe9c8a9bb72ae79476ac5d4101dda6791 100644 (file)
@@ -10,6 +10,7 @@ aweather_SOURCES  = main.c \
        aweather-location.c aweather-location.h
 aweather_CPPFLAGS = \
        -DHTMLDIR="\"$(dots)$(htmldir)\"" \
        aweather-location.c aweather-location.h
 aweather_CPPFLAGS = \
        -DHTMLDIR="\"$(dots)$(htmldir)\"" \
+       -DICONDIR="\"$(dots)$(datadir)/icons\"" \
        -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
        -DPLUGINSDIR="\"$(dots)$(pkglibdir)\""
 aweather_LDADD    = $(GRITS_LIBS)
        -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
        -DPLUGINSDIR="\"$(dots)$(pkglibdir)\""
 aweather_LDADD    = $(GRITS_LIBS)
index c349d120cb290f6d14dcb15e56218f22b740877b..6d8e4239fadca1f331f3eeeb0b9bfebf0fef0594 100644 (file)
@@ -441,6 +441,27 @@ static void time_setup(AWeatherGui *self)
                        G_CALLBACK(update_time_widget), self);
 }
 
                        G_CALLBACK(update_time_widget), self);
 }
 
+static void icons_setup(AWeatherGui *self)
+{
+       gchar *icons[] = {
+               ICONDIR "/hicolor/16x16/apps/aweather.png",
+               ICONDIR "/hicolor/22x22/apps/aweather.png",
+               ICONDIR "/hicolor/24x24/apps/aweather.png",
+               ICONDIR "/hicolor/32x32/apps/aweather.png",
+               ICONDIR "/hicolor/48x48/apps/aweather.png",
+               ICONDIR "/hicolor/scalable/apps/aweather.svg",
+       };
+       GList *list = NULL;
+       for (int i = 0; i < G_N_ELEMENTS(icons); i++) {
+               GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(icons[i], NULL);
+               if (!pixbuf)
+                       g_warning("AWeatherGui: icons_setup - %s failed", icons[i]);
+               list = g_list_prepend(list, pixbuf);
+       }
+       gtk_window_set_default_icon_list(list);
+       g_list_free(list);
+}
+
 
 /***********
  * Methods *
 
 /***********
  * Methods *
@@ -549,6 +570,7 @@ static void aweather_gui_parser_finished(GtkBuildable *_self, GtkBuilder *builde
        site_setup(self);
        time_setup(self);
        prefs_setup(self);
        site_setup(self);
        time_setup(self);
        prefs_setup(self);
+       icons_setup(self);
 
        /* Connect signals */
        gtk_builder_connect_signals(self->builder, self);
 
        /* Connect signals */
        gtk_builder_connect_signals(self->builder, self);