[grilo-plugins] raitv: Add source icon



commit 58bdafb659f01db98c87684daaddc09a2a82d5b3
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 29 13:50:21 2014 +0100

    raitv: Add source icon
    
    Icon by Jakub Steiner.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723233

 src/raitv/Makefile.am         |   13 ++++-
 src/raitv/channel-rai.svg     |  120 +++++++++++++++++++++++++++++++++++++++++
 src/raitv/grl-raitv.c         |    7 +++
 src/raitv/raitv.gresource.xml |    6 ++
 4 files changed, 144 insertions(+), 2 deletions(-)
---
diff --git a/src/raitv/Makefile.am b/src/raitv/Makefile.am
index c376ea1..19f12da 100644
--- a/src/raitv/Makefile.am
+++ b/src/raitv/Makefile.am
@@ -23,13 +23,22 @@ libgrlraitv_la_LDFLAGS = \
 
 libgrlraitv_la_SOURCES =               \
        grl-raitv.c                     \
-       grl-raitv.h
+       grl-raitv.h                     \
+       raitvresources.h                \
+       raitvresources.c
 
 extdir                         = $(GRL_PLUGINS_DIR)
 raitvxmldir    = $(GRL_PLUGINS_DIR)
 raitvxml_DATA  = $(RAITV_PLUGIN_ID).xml
 
-EXTRA_DIST = $(raitvxml_DATA)
+raitvresources.h: raitv.gresource.xml
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/raitv.gresource.xml \
+               --target=$@ --sourcedir=$(srcdir) --c-name _grl_raitv --generate-header
+raitvresources.c: raitv.gresource.xml raitvresources.h channel-rai.svg
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/raitv.gresource.xml \
+               --target=$@ --sourcedir=$(srcdir) --c-name _grl_raitv --generate-source
+
+EXTRA_DIST = $(raitvxml_DATA) channel-rai.svg raitv.gresource.xml
 
 MAINTAINERCLEANFILES = \
        *.in            \
diff --git a/src/raitv/channel-rai.svg b/src/raitv/channel-rai.svg
new file mode 100644
index 0000000..c341acd
--- /dev/null
+++ b/src/raitv/channel-rai.svg
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="256"
+   height="256"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="channel-vimeo.svg">
+  <defs
+     id="defs4">
+    <clipPath
+       id="clipPath6193"
+       clipPathUnits="userSpaceOnUse">
+      <path
+         id="path6195"
+         d="m 1600,2252.8 5020,0 0,3650 -5020,0 0,-3650 z" />
+    </clipPath>
+    <linearGradient
+       id="linearGradient6181"
+       spreadMethod="pad"
+       gradientTransform="matrix(-3.593e-5,822,822,3.593e-5,411,0)"
+       gradientUnits="userSpaceOnUse"
+       y2="0"
+       x2="1"
+       y1="0"
+       x1="0">
+      <stop
+         id="stop6183"
+         offset="0"
+         style="stop-opacity:1;stop-color:#c01e25" />
+      <stop
+         id="stop6185"
+         offset="1"
+         style="stop-opacity:1;stop-color:#e62426" />
+    </linearGradient>
+    <clipPath
+       id="clipPath6177"
+       clipPathUnits="userSpaceOnUse">
+      <path
+         id="path6179"
+         d="M 8220,0 0,0 l 0,8220 8220,0 0,-8220 m -6620,5902.8 0,-3650 5020,0 0,3650 -5020,0" />
+    </clipPath>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#505050"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="1"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1"
+     inkscape:cx="222.0001"
+     inkscape:cy="70.020428"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     borderlayer="true"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="2560"
+     inkscape:window-height="1374"
+     inkscape:window-x="0"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-796.36218)">
+    <g
+       transform="matrix(630.025,0,0,-458.9,-77.5125,1218.8747)"
+       id="g6197" />
+    <g
+       transform="matrix(1.25,0,0,-1.25,7.20279,1046.5432)"
+       inkscape:label="ink_ext_XXXXXX"
+       id="g7214"
+       style="fill:#eeeeec">
+      <g
+         transform="scale(0.1,0.1)"
+         id="g7216"
+         style="fill:#eeeeec">
+        <path
+           id="path7220"
+           style="fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           d="m 496.738,1100.93 61.614,0 0,-170.879 -61.614,0 0,18.597 -2.32,0 c -4.652,-6.972 
-11.625,-13.945 -22.086,-18.597 -6.977,-3.488 -15.113,-5.813 -29.062,-5.813 -23.25,0 -44.176,10.465 
-61.61,27.899 -17.437,15.113 -24.414,37.199 -24.414,65.093 0,23.25 6.977,44.18 24.414,61.62 17.434,17.43 
36.031,26.73 61.61,26.73 22.085,0 41.843,-8.13 53.468,-22.08 l 0,17.43 z m 152.289,89.52 c 6.973,-6.98 
10.461,-13.95 10.461,-24.42 0,-10.46 -3.488,-17.43 -10.461,-24.41 -6.976,-6.97 -15.113,-9.3 -24.414,-9.3 
-8.136,0 -16.273,2.33 -23.25,9.3 -6.976,6.98 -10.461,13.95 -10.461,24.41 0,10.47 3.485,17.44 10.461,24.42 
6.977,6.97 15.114,9.29 23.25,9.29 9.301,0 17.438,-2.32 24.414,-9.29 z m -53.476,-89.52 60.449,0 0,-170.879 
-60.449,0 0,170.879 z M 487.441,988.176 c 6.977,6.976 9.297,15.114 9.297,29.054 0,8.14 -2.32,18.61 
-9.297,25.58 -8.14,6.97 -16.273,10.47 -29.062,10.47 -11.621,0 -18.598,-3.5 -26.734,-10.47 -6.973,-6.97 
-11.625,-17.44 -11.625,-25.58 0,-13.94 4.652,-22.078 11.625,-29.05
 4 8.136,-6.973 15.113,-10.465 26.734,-10.465 12.789,0 20.922,3.492 29.062,10.465 z m -260.394,81.374 c 
31.391,0 46.5,9.3 46.5,27.9 0,22.08 -15.109,32.55 -46.5,32.55 l -4.645,0 0,-60.45 4.645,0 z m 89.512,91.83 c 
17.437,-12.78 24.414,-31.38 24.414,-58.12 0,-17.44 -5.813,-33.71 -13.95,-45.34 -10.464,-11.62 -24.414,-22.08 
-41.851,-25.57 l 79.051,-102.299 -81.375,0 -60.446,95.319 0,-95.319 -65.101,0 0,249.929 97.652,0 c 25.57,0 
44.168,-6.98 61.606,-18.6"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path7222"
+           style="fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           d="m 1274.43,934.703 -498.696,0 0,-11.621 5.813,0 16.273,-5.816 26.743,-6.977 30.218,-11.625 
20.926,-8.137 16.27,-9.3 19.765,-11.625 25.574,-17.438 60.45,-59.281 4.644,-8.141 6.98,-5.808 4.65,-3.489 
3.49,-4.652 3.49,-3.484 3.48,-2.329 2.33,-4.648 9.3,-3.488 6.97,-5.813 10.47,-2.324 11.62,-5.812 
49.98,-15.114 15.12,-8.136 5.81,0 -3.49,0 3.49,0 10.46,-5.813 10.46,-3.488 1.17,0 3.49,-3.485 0,-1.164 
4.64,-5.812 0,-1.16 2.33,-3.489 0,-20.921 -4.66,-10.465 -2.31,-9.301 0,-13.949 2.31,0 0,-3.489 2.33,-3.488 
12.79,-13.949 6.97,-1.164 4.65,-5.813 3.49,-1.16 3.49,-3.488 0,-10.461 -3.49,-8.137 3.49,-2.324 0,-4.652 
2.33,0 2.32,-2.325 6.97,0 c 2.33,-3.484 2.33,-3.484 2.33,-3.484 l 4.64,-1.164 0,-3.492 3.5,-3.485 0,-15.109 
-3.5,-2.328 0,-11.621 3.5,-3.488 3.48,-10.465 5.82,-1.16 9.29,-9.301 5.82,-8.137 6.97,-13.949 4.65,-15.113 
3.49,-11.625 5.81,-19.762 0,-13.949 9.3,0 0,502.187"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path7224"
+           style="fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           d="m 1288.38,1429.91 3.49,-20.92 6.97,-23.25 4.65,-17.44 13.96,-32.55 10.46,-17.43 11.62,-18.61 
17.43,-27.89 9.31,-9.3 9.3,-12.79 19.76,-15.11 22.08,-22.09 6.98,-5.81 4.65,-6.98 3.49,-4.65 5.81,-3.49 
2.32,-3.48 2.33,-3.49 4.65,-1.16 2.32,-5.81 3.5,-6.98 4.64,-8.14 2.33,-6.97 4.64,-11.62 18.61,-49.99 
2.32,-10.46 3.49,-4.65 0,-3.49 0,1.16 0,-1.16 4.65,-8.13 2.32,-6.98 0,-2.33 1.17,-4.64 0,-3.5 3.48,-2.32 
2.33,0 c 2.32,-1.16 2.32,-1.16 2.32,-1.16 l 2.33,-3.49 3.48,0 1.17,-2.33 20.92,0 5.81,2.33 8.14,3.49 3.49,0 
8.13,1.16 9.31,0 2.32,-1.16 5.82,-3.49 10.45,-11.63 3.49,-6.97 1.17,-5.81 3.48,-1.17 9.3,-5.8 4.65,0 
4.65,2.32 2.33,0 8.13,-2.32 2.33,0 1.16,-2.33 0,-9.299 10.47,-10.465 13.94,0 4.65,3.492 12.79,0 2.33,-3.492 
9.29,-4.648 3.49,-3.485 8.14,-10.469 10.46,-4.648 11.62,-6.973 13.95,-5.812 12.79,-4.653 11.63,-2.32 
10.46,-2.324 11.62,0 0,-9.301 -501.02,0 0,498.697 12.79,0 1.16,-3.49"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/src/raitv/grl-raitv.c b/src/raitv/grl-raitv.c
index 73d0241..3b70f03 100644
--- a/src/raitv/grl-raitv.c
+++ b/src/raitv/grl-raitv.c
@@ -258,11 +258,18 @@ GRL_PLUGIN_REGISTER (grl_raitv_plugin_init,
 static GrlRaitvSource *
 grl_raitv_source_new (void)
 {
+  GIcon *icon;
+  GFile *file;
+
+  file = g_file_new_for_uri ("resource:///org/gnome/grilo/plugins/raitv/channel-rai.svg");
+  icon = g_file_icon_new (file);
+  g_object_unref (file);
   return g_object_new (GRL_TYPE_RAITV_SOURCE,
                        "source-id", SOURCE_ID,
                        "source-name", SOURCE_NAME,
                        "source-desc", SOURCE_DESC,
                        "supported-media", GRL_MEDIA_TYPE_VIDEO,
+                       "source-icon", icon,
                        NULL);
 }
 
diff --git a/src/raitv/raitv.gresource.xml b/src/raitv/raitv.gresource.xml
new file mode 100644
index 0000000..0a99959
--- /dev/null
+++ b/src/raitv/raitv.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/grilo/plugins/raitv">
+    <file compressed="false">channel-rai.svg</file>
+  </gresource>
+</gresources>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]