[grilo-plugins] vimeo: Add source icon



commit 529b464b88159ff4dc8f815becacbc4f077e20f0
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 29 14:00:10 2014 +0100

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

 src/vimeo/Makefile.am         |   13 ++++-
 src/vimeo/channel-vimeo.svg   |  108 +++++++++++++++++++++++++++++++++++++++++
 src/vimeo/grl-vimeo.c         |    8 +++
 src/vimeo/vimeo.gresource.xml |    6 ++
 4 files changed, 133 insertions(+), 2 deletions(-)
---
diff --git a/src/vimeo/Makefile.am b/src/vimeo/Makefile.am
index 27c57db..566786d 100644
--- a/src/vimeo/Makefile.am
+++ b/src/vimeo/Makefile.am
@@ -26,7 +26,9 @@ libgrlvimeo_la_SOURCES =      \
        grl-vimeo.c             \
        grl-vimeo.h             \
        gvimeo.c                \
-       gvimeo.h
+       gvimeo.h                \
+       vimeoresources.h        \
+       vimeoresources.c
 
 extdir                 = $(GRL_PLUGINS_DIR)
 vimeoxmldir            = $(GRL_PLUGINS_DIR)
@@ -40,7 +42,14 @@ copy-xml-to-libs-dir: libgrlvimeo.la
 
 all-local: copy-xml-to-libs-dir
 
-EXTRA_DIST = $(vimeoxml_DATA)
+vimeoresources.h: vimeo.gresource.xml
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/vimeo.gresource.xml \
+               --target=$@ --sourcedir=$(srcdir) --c-name _grl_vimeo --generate-header
+vimeoresources.c: vimeo.gresource.xml vimeoresources.h channel-vimeo.svg
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/vimeo.gresource.xml \
+               --target=$@ --sourcedir=$(srcdir) --c-name _grl_vimeo --generate-source
+
+EXTRA_DIST = $(vimeoxml_DATA) channel-vimeo.svg vimeo.gresource.xml
 
 MAINTAINERCLEANFILES = \
        *.in            \
diff --git a/src/vimeo/channel-vimeo.svg b/src/vimeo/channel-vimeo.svg
new file mode 100644
index 0000000..61d4ed3
--- /dev/null
+++ b/src/vimeo/channel-vimeo.svg
@@ -0,0 +1,108 @@
+<?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-youtube.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.6065952,0,0,-1.6065952,-27.843516,1073.2062)"
+       inkscape:label="ink_ext_XXXXXX"
+       id="g7156">
+      <g
+         transform="scale(0.1,0.1)"
+         id="g7158">
+        <path
+           id="path7162"
+           style="fill:#00adef;fill-opacity:1;fill-rule:evenodd;stroke:none"
+           d="m 694.148,1088.41 c 19.196,15.29 25.106,39.79 13.2,54.76 -11.91,14.95 -37.121,14.69 
-56.317,-0.59 -19.195,-15.28 -25.101,-39.79 -13.199,-54.74 11.91,-14.97 37.117,-14.7 56.316,0.57 z M 
1544.92,870.051 c -10.19,-18.301 -27.85,-36.461 -48.98,-41.09 -41.3,-9.051 -38.18,51.07 -31.25,76.09 
2.98,10.801 7.37,19.769 11.96,27.929 9.19,16.329 22.06,34.258 40.53,40.618 1.25,0.429 2.53,0.808 3.84,1.132 
18.81,4.618 32.24,-8.671 38.2,-25.558 9.58,-27.07 -1.04,-55.293 -14.3,-79.121 z m -279.57,97.48 c 11.7,6.016 
31.15,8.547 35.04,-11.308 4.4,-22.539 -32.37,-66.274 -83.74,-86.813 -19.59,35.801 16.98,81.207 48.7,98.121 z 
m 371.13,-26.64 c -2.3,33.468 -16.11,66.109 -46.94,81.039 -28.33,13.71 -82.02,10.09 -110.6,-2.29 
-103.09,-48.417 -97.07,-136.249 -100.92,-156.781 -18.33,-12.257 -49.41,-21.3 -77.54,-25.089 -24.74,-3.301 
-51.56,-2.04 -66.7,9.699 51.36,20.41 178.4,83.578 136.83,157.351 -40.83,75.24 -271.82,0.85 -234.9,-163.25 
-21.17,-13.218 -29.61,-9.41 -34.77,11.02 -0.92,36.351 
 8.43,64.301 13.68,96.367 1.75,10.703 3.95,22.227 2.85,33.621 -1.9,19.642 -15.98,39.152 -37.64,41.062 
-61.69,0 -94.549,-44.984 -110.025,-55.308 -6.16,14.836 15.363,54.728 -47.325,54.728 -47.8,2.97 
-79.582,-29.064 -102.621,-49.025 -3.179,11.668 -4.257,25.125 -9.129,35.915 -4.066,9.03 -12.062,18.97 
-22.234,20.53 -10.273,1.57 -21.699,-5.48 -29.078,-10.84 -22.656,-16.48 -45.68,-38.202 -61,-58.71 8.32,-15.45 
32.086,-4.785 47.32,-2.852 -0.656,-15.156 -1.855,-31 -3.992,-46.187 -3.351,-23.852 -4.008,-44.461 
-25.086,-59.301 -12.676,-8.91 -30.437,-16.559 -37.055,2.851 -6.402,18.809 -0.921,40.918 2.739,59.75 
4.566,23.454 7.008,47.164 10.371,70.817 1.805,12.668 4.047,22.572 -5.098,33.312 -7.058,8.28 -18.16,13.34 
-29.109,12.29 -29.11,-2.77 -42.824,-29.29 -63.281,-42.184 10.378,41.244 -22.629,52.964 -55.684,47.924 
-13.125,-2.01 -57.496,-21.58 -72.602,-68.452 26.754,2.051 40.77,-1.914 38.2,-31.347 -1.078,-12.34 
-7.297,-25.821 -14.25,-38.77 -8.032,-14.922 -23.086,-44.203 -42.817,-23.101 -17.
 769,19 -16.41,55.347 -20.472,79.547 -2.282,13.586 -4.672,30.488 -9.125,44.464 -3.829,12.029 -12.61,26.489 
-23.375,29.649 -11.555,3.39 -25.825,-1.91 -34.207,-6.85 -26.696,-15.69 -47.032,-38.037 -70.129,-56.443 l 
0,-1.707 c 4.566,-4.367 5.797,-11.555 12.547,-12.531 15.898,-2.325 31.039,14.824 41.597,-3.047 6.442,-10.899 
8.449,-22.852 12.567,-34.59 5.503,-15.684 9.753,-32.731 14.253,-50.742 7.618,-30.489 16.961,-76.051 
43.329,-87.231 13.461,-5.699 33.664,1.922 43.902,7.992 27.742,16.43 49.34,40.2 67.848,64.418 18.347,24.02 
36.82,52.121 51.304,80.954 8.883,17.675 14.813,32.617 39.914,29.082 -1.656,-36.774 -13.125,-67.965 
-19.957,-99.766 -2.406,-11.207 -5.527,-23.418 -5.699,-34.789 -0.308,-20.328 8.188,-40.25 23.375,-44.469 
11.242,-3.101 26.891,-1.93 37.633,-1.133 36.367,2.641 68.277,26.641 88.031,46.403 10.934,-13.2 24.758,-46.993 
76.332,-46.993 -23.672,51.84 -8.449,176.137 55.133,170.473 18.625,-7.168 10.246,-38.359 6.273,-55.859 
-2.742,-12.114 -27.578,-123.653 68.989,-115.172 
 0,21.172 -8.403,138.609 54.893,169.762 5.68,2.949 25.54,3.086 26.64,-6.7 4.93,-44.312 -15.51,-84.023 
-14.83,-128.843 0.52,-70.707 109.93,-11.329 133.99,2.261 13.81,-10.16 54.6,-50.308 148.23,-29.058 17.6,4.429 
33.11,9.097 47.32,15.957 14.93,7.203 28.75,15.109 43.9,19.961 -2.07,-0.668 17.87,-24.551 20.07,-26.231 
9.57,-7.371 21.16,-12.187 32.58,-15.859 26.57,-8.5 54.79,-5.391 81.58,0.949 54.05,12.82 90.62,53.563 
107.35,105.391 5.39,16.699 7.96,36.468 6.62,55.961"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/src/vimeo/grl-vimeo.c b/src/vimeo/grl-vimeo.c
index d3ecba2..21a9877 100644
--- a/src/vimeo/grl-vimeo.c
+++ b/src/vimeo/grl-vimeo.c
@@ -179,13 +179,21 @@ GRL_PLUGIN_REGISTER (grl_vimeo_plugin_init,
 static GrlVimeoSource *
 grl_vimeo_source_new (void)
 {
+  GIcon *icon;
+  GFile *file;
+
   GRL_DEBUG ("grl_vimeo_source_new");
 
+  file = g_file_new_for_uri ("resource:///org/gnome/grilo/plugins/vimeo/channel-vimeo.svg");
+  icon = g_file_icon_new (file);
+  g_object_unref (file);
+
   return g_object_new (GRL_VIMEO_SOURCE_TYPE,
                        "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/vimeo/vimeo.gresource.xml b/src/vimeo/vimeo.gresource.xml
new file mode 100644
index 0000000..aab7791
--- /dev/null
+++ b/src/vimeo/vimeo.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/grilo/plugins/vimeo">
+    <file compressed="false">channel-vimeo.svg</file>
+  </gresource>
+</gresources>


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