[grilo-plugins] apple-trailers: Add source icon



commit 3288b5686f1e7a6d2aae18f64ccd7b99cc2c5ecf
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 29 13:56:09 2014 +0100

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

 src/apple-trailers/Makefile.am                  |   13 +++-
 src/apple-trailers/apple-trailers.gresource.xml |    6 ++
 src/apple-trailers/channel-trailers.svg         |  107 +++++++++++++++++++++++
 src/apple-trailers/grl-apple-trailers.c         |    6 ++
 4 files changed, 130 insertions(+), 2 deletions(-)
---
diff --git a/src/apple-trailers/Makefile.am b/src/apple-trailers/Makefile.am
index 284efab..094525f 100644
--- a/src/apple-trailers/Makefile.am
+++ b/src/apple-trailers/Makefile.am
@@ -24,7 +24,9 @@ libgrlappletrailers_la_LDFLAGS = \
 
 libgrlappletrailers_la_SOURCES =       \
        grl-apple-trailers.c            \
-       grl-apple-trailers.h
+       grl-apple-trailers.h            \
+       apple-trailersresources.h       \
+       apple-trailersresources.c
 
 extdir                                         = $(GRL_PLUGINS_DIR)
 appletrailersxmldir            = $(GRL_PLUGINS_DIR)
@@ -38,7 +40,14 @@ copy-xml-to-libs-dir: libgrlappletrailers.la
 
 all-local: copy-xml-to-libs-dir
 
-EXTRA_DIST = $(appletrailersxml_DATA)
+apple-trailersresources.h: apple-trailers.gresource.xml
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/apple-trailers.gresource.xml \
+               --target=$@ --sourcedir=$(srcdir) --c-name _grl_apple_trailers --generate-header
+apple-trailersresources.c: apple-trailers.gresource.xml apple-trailersresources.h channel-trailers.svg
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/apple-trailers.gresource.xml \
+               --target=$@ --sourcedir=$(srcdir) --c-name _grl_apple_trailers --generate-source
+
+EXTRA_DIST = $(appletrailersxml_DATA) channel-trailers.svg apple-trailers.gresource.xml
 
 MAINTAINERCLEANFILES = \
        *.in            \
diff --git a/src/apple-trailers/apple-trailers.gresource.xml b/src/apple-trailers/apple-trailers.gresource.xml
new file mode 100644
index 0000000..98898a8
--- /dev/null
+++ b/src/apple-trailers/apple-trailers.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/grilo/plugins/apple-trailers">
+    <file compressed="false">channel-trailers.svg</file>
+  </gresource>
+</gresources>
diff --git a/src/apple-trailers/channel-trailers.svg b/src/apple-trailers/channel-trailers.svg
new file mode 100644
index 0000000..e58eeea
--- /dev/null
+++ b/src/apple-trailers/channel-trailers.svg
@@ -0,0 +1,107 @@
+<?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-bliptv.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="g7299"
+     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
+       id="g7288"
+       transform="translate(551.5,989.9982)">
+      <g
+         id="g7299"
+         transform="matrix(0.89344262,0,0,0.89344262,-396.25,-32.797277)">
+        <path
+           
style="color:#000000;fill:#73a444;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+           d="M 128 20 C 67.800965 20 19 68.800965 19 129 C 19 189.19904 67.800965 238 128 238 C 188.19904 
238 237 189.19904 237 129 C 237 68.800965 188.19904 20 128 20 z M 114.0625 80.375 C 122.24545 80.375 
129.30417 84.775651 133.1875 91.34375 C 137.07083 84.775651 144.12955 80.375 152.3125 80.375 C 164.63538 
80.375 174.625 90.364625 174.625 102.6875 C 174.625 109.82355 171.27566 116.13442 166.0625 120.21875 C 
167.40093 121.38569 168.25 123.07666 168.25 125 C 168.23725 137.75 168.25 144.45727 168.25 163.25 C 168.25 
166.78175 165.40675 169.625 161.875 169.625 L 104.5 169.625 C 100.96825 169.625 98.125 166.78175 98.125 
163.25 L 98.125 149.5 L 81.8125 161.65625 C 81.688825 161.73913 81.547137 161.7953 81.40625 161.84375 C 
81.209262 161.87563 81.009488 161.87563 80.8125 161.84375 C 80.680538 161.8565 80.538212 161.8565 80.40625 
161.84375 C 80.265362 161.79275 80.123675 161.73913 80 161.65625 C 79.859112 161.60525 79.717426 161.55226 
79.59375 161.46875 C 79.522355 161.405 79.46
 6813 161.3214 79.40625 161.25 C 79.334855 161.18625 79.279313 161.1339 79.21875 161.0625 C 79.13524 
160.93882 79.04845 160.79714 79 160.65625 C 78.987251 160.52429 78.987251 160.38196 79 160.25 L 79 121.625 C 
78.987251 121.49304 78.987251 121.35071 79 121.21875 C 79.050998 121.07786 79.135238 120.93617 79.21875 
120.8125 C 79.282497 120.7411 79.334851 120.68556 79.40625 120.625 C 79.469997 120.5536 79.522351 120.46681 
79.59375 120.40625 C 79.657497 120.33485 79.7411 120.27931 79.8125 120.21875 C 79.876247 120.14735 79.9286 
120.09181 80 120.03125 C 80.123675 119.94837 80.265363 119.86095 80.40625 119.8125 C 80.603238 119.78062 
80.803012 119.78062 81 119.8125 C 81.066302 119.80866 81.121199 119.80866 81.1875 119.8125 C 81.258895 
119.87625 81.345687 119.95985 81.40625 120.03125 C 81.547137 120.08225 81.688825 120.13524 81.8125 120.21875 
L 98.125 132.375 L 98.125 125 C 98.125 123.07666 98.974068 121.38569 100.3125 120.21875 C 95.099344 116.13441 
91.75 109.82355 91.75 102.6875 C 9
 1.75 90.364625 101.73962 80.375 114.0625 80.375 z M 114.0625 93.125 C 108.78126 93.125 104.5 97.406259 104.5 
102.6875 C 104.5 107.96874 108.78126 112.25 114.0625 112.25 C 119.34374 112.25 123.625 107.96874 123.625 
102.6875 C 123.625 97.406259 119.34374 93.125 114.0625 93.125 z M 152.3125 93.125 C 147.03126 93.125 142.75 
97.406259 142.75 102.6875 C 142.75 107.96874 147.03126 112.25 152.3125 112.25 C 157.59374 112.25 161.875 
107.96874 161.875 102.6875 C 161.875 97.406259 157.59374 93.125 152.3125 93.125 z M 133.1875 114.03125 C 
132.17968 115.73586 131.03426 117.25093 129.625 118.625 L 136.78125 118.625 C 135.37199 117.25093 134.19532 
115.73586 133.1875 114.03125 z "
+           transform="matrix(1.1192661,0,0,1.1192661,-173.76606,-180.02135)"
+           id="path7297" />
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/src/apple-trailers/grl-apple-trailers.c b/src/apple-trailers/grl-apple-trailers.c
index 5e97d5d..cc94ee2 100644
--- a/src/apple-trailers/grl-apple-trailers.c
+++ b/src/apple-trailers/grl-apple-trailers.c
@@ -158,10 +158,15 @@ grl_apple_trailers_source_new (gboolean high_definition,
                                gboolean xlarge)
 {
   GrlAppleTrailersSource *source;
+  GIcon *icon;
+  GFile *file;
 
   GRL_DEBUG ("grl_apple_trailers_source_new%s%s",
              high_definition ? " (HD)" : "",
              xlarge ? " (X-large poster)" : "");
+  file = g_file_new_for_uri ("resource:///org/gnome/grilo/plugins/apple-trailers/channel-trailers.svg");
+  icon = g_file_icon_new (file);
+  g_object_unref (file);
   source = g_object_new (GRL_APPLE_TRAILERS_SOURCE_TYPE,
                          "source-id", SOURCE_ID,
                          "source-name", SOURCE_NAME,
@@ -169,6 +174,7 @@ grl_apple_trailers_source_new (gboolean high_definition,
                          "supported-media", GRL_MEDIA_TYPE_VIDEO,
                          "high-definition", high_definition,
                         "large-poster", xlarge,
+                         "source-icon", icon,
                          NULL);
 
   return source;


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