summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-06-11 13:20:19 +0200
committerDanny Baumann <dannybaumann@web.de>2007-06-11 13:20:19 +0200
commit65aa2c46fd8e824e29ccf87d765ffe6709c587f9 (patch)
treeb0889fc2957c37ef749a7276d35d7eea1b865436
parent02293f142e4c582afcd305520d1ba5057e05f67b (diff)
downloadccsm-65aa2c46fd8e824e29ccf87d765ffe6709c587f9.tar.gz
ccsm-65aa2c46fd8e824e29ccf87d765ffe6709c587f9.tar.bz2
Show an 'unknown' icon for plugins that don't have a specific icon.
For the moment, this is just a copy of the 'Uncategorized' icon - feel free to create a better replacement ;-)
-rwxr-xr-xccsm.in21
-rw-r--r--images/Makefile.am1
-rw-r--r--images/plugin-unknown.svg360
3 files changed, 374 insertions, 8 deletions
diff --git a/ccsm.in b/ccsm.in
index 02353a0..80b51be 100755
--- a/ccsm.in
+++ b/ccsm.in
@@ -18,7 +18,7 @@
# Copyright (C) 2007 Quinn Storm
-
+import os
import ccs
import pygtk
pygtk.require('2.0')
@@ -1853,17 +1853,22 @@ class MainWinClass:
def MakeImage(self, plugin = 0, category = 0, size = 32):
img = gtk.Image()
- try:
- if plugin != 0:
- pixbuf = gtk.gdk.pixbuf_new_from_file_at_size("%s/plugin-%s.svg"%(
- PixmapDir, plugin.Name), size, size)
+ if plugin != 0:
+ iconpath = "%s/plugin-%s.svg"%(PixmapDir, plugin.Name)
+ if not os.path.exists(iconpath):
+ iconpath = "%s/plugin-unknown.svg"%PixmapDir
+ try:
+ pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(iconpath, size, size)
img.set_from_pixbuf(pixbuf)
- elif category != 0:
+ except:
+ img.set_from_stock(gtk.STOCK_MISSING_IMAGE, gtk.ICON_SIZE_BUTTON)
+ elif category != 0:
+ try:
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size("%s/category-%s.svg"%(
PixmapDir, category), size, size)
img.set_from_pixbuf(pixbuf)
- except:
- img.set_from_stock(gtk.STOCK_MISSING_IMAGE, gtk.ICON_SIZE_BUTTON)
+ except:
+ img.set_from_stock(gtk.STOCK_MISSING_IMAGE, gtk.ICON_SIZE_BUTTON)
return img
def SelectPlugin(self, obj, select):
diff --git a/images/Makefile.am b/images/Makefile.am
index 0c5d36d..06d1fee 100644
--- a/images/Makefile.am
+++ b/images/Makefile.am
@@ -73,6 +73,7 @@ images_DATA = \
plugin-tile.svg \
plugin-trailfocus.svg \
plugin-video.svg \
+ plugin-unknown.svg \
plugin-wall.svg \
plugin-wallpaper.svg \
plugin-water.svg \
diff --git a/images/plugin-unknown.svg b/images/plugin-unknown.svg
new file mode 100644
index 0000000..dc86a28
--- /dev/null
+++ b/images/plugin-unknown.svg
@@ -0,0 +1,360 @@
+<?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://web.resource.org/cc/"
+ 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"
+ inkscape:export-ydpi="90.000000"
+ inkscape:export-xdpi="90.000000"
+ inkscape:export-filename="/home/patrick/Desktop/desktop.png"
+ width="48px"
+ height="48px"
+ id="svg11300"
+ sodipodi:version="0.32"
+ inkscape:version="0.45+devel"
+ sodipodi:docbase="/home/patrick/Projects/Beryl/svn/beryl/trunk/beryl-settings/images"
+ sodipodi:docname="category-uncategorized.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs3">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient15837">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop15839" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop15841" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient10969">
+ <stop
+ style="stop-color:#b6cce8;stop-opacity:1;"
+ offset="0"
+ id="stop10971" />
+ <stop
+ style="stop-color:#3465a4;stop-opacity:1;"
+ offset="1"
+ id="stop10973" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient9023">
+ <stop
+ style="stop-color:#cddcf0;stop-opacity:1;"
+ offset="0"
+ id="stop9025" />
+ <stop
+ style="stop-color:#3465a4;stop-opacity:1;"
+ offset="1"
+ id="stop9027" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient8440">
+ <stop
+ style="stop-color:#eff0ef;stop-opacity:1;"
+ offset="0"
+ id="stop8442" />
+ <stop
+ style="stop-color:#babdb6;stop-opacity:1;"
+ offset="1"
+ id="stop8444" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient47870">
+ <stop
+ id="stop47872"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:0" />
+ <stop
+ id="stop47878"
+ offset="0.5"
+ style="stop-color:#000000;stop-opacity:1" />
+ <stop
+ id="stop47874"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient51765">
+ <stop
+ id="stop51767"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1" />
+ <stop
+ id="stop51769"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0" />
+ </linearGradient>
+ <radialGradient
+ gradientTransform="matrix(-1.9576392,-9.2540676e-8,-1.2888861e-7,1.4565793,110.01781,62.73803)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient51765"
+ id="radialGradient54733"
+ fy="-12.203125"
+ fx="51.4375"
+ r="2.171875"
+ cy="-12.203125"
+ cx="51.4375" />
+ <radialGradient
+ gradientTransform="matrix(1.9576392,-8.146468e-7,6.6614241e-7,1.4565793,-59.017557,62.738067)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient51765"
+ id="radialGradient54731"
+ fy="-12.203125"
+ fx="51.4375"
+ r="2.171875"
+ cy="-12.203125"
+ cx="51.4375" />
+ <linearGradient
+ gradientTransform="matrix(0.9788196,0,0,0.7154223,-8.5008021,52.112719)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient47870"
+ id="linearGradient54729"
+ y2="-5.5633383"
+ x2="32.084972"
+ y1="-14.402173"
+ x1="32.084972" />
+ <linearGradient
+ id="linearGradient13816">
+ <stop
+ id="stop13818"
+ offset="0"
+ style="stop-color:#f7f7f6;stop-opacity:1" />
+ <stop
+ id="stop13820"
+ offset="1"
+ style="stop-color:#eff0ee;stop-opacity:0" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient12914">
+ <stop
+ id="stop12916"
+ offset="0"
+ style="stop-color:#3465a4;stop-opacity:1" />
+ <stop
+ id="stop12918"
+ offset="1"
+ style="stop-color:#3465a4;stop-opacity:0" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9023"
+ id="radialGradient9029"
+ cx="10.825692"
+ cy="11.969925"
+ fx="10.825692"
+ fy="11.969925"
+ r="18.374326"
+ gradientTransform="matrix(-0.6986183,1.8222966,-1.9447619,-0.745568,44.994811,-4.554959)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient10969"
+ id="radialGradient10975"
+ cx="9.328125"
+ cy="20.171875"
+ fx="9.328125"
+ fy="20.171875"
+ r="15.078125"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.7719902,1.4204211,-1.8254664,-0.9921297,55.477425,26.810124)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient15837"
+ id="radialGradient15843"
+ cx="26.812502"
+ cy="0.49999759"
+ fx="26.812502"
+ fy="0.49999759"
+ r="25.312502"
+ gradientTransform="matrix(1,0,0,7.4074073e-2,0,0.4629607)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient15837"
+ id="radialGradient15856"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,7.4074073e-2,0,0.4629607)"
+ cx="26.812502"
+ cy="0.49999759"
+ fx="26.812502"
+ fy="0.49999759"
+ r="25.312502" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9023"
+ id="radialGradient2220"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.6986183,1.8222966,-1.9447619,-0.745568,-13.134395,-2.7265323)"
+ cx="10.825692"
+ cy="11.969925"
+ fx="10.825692"
+ fy="11.969925"
+ r="18.374326" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9023"
+ id="radialGradient3983"
+ cx="15.33036"
+ cy="10.900933"
+ fx="15.33036"
+ fy="10.900933"
+ r="11.625177"
+ gradientTransform="matrix(-0.5146897,2.0655599,-2.3434309,-0.5839287,49.666596,-20.863038)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9023"
+ id="radialGradient4757"
+ cx="12.077888"
+ cy="5.1155567"
+ fx="12.077888"
+ fy="5.1155567"
+ r="5.5790009"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(4.7031029e-3,2.1657386,-2.7879239,6.3326526e-3,27.911065,-23.766194)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9023"
+ id="radialGradient5150"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(4.7031029e-3,2.1657386,-2.7879239,6.3326526e-3,27.911065,-23.766194)"
+ cx="12.077888"
+ cy="5.1155567"
+ fx="12.077888"
+ fy="5.1155567"
+ r="5.5790009" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient9023"
+ id="radialGradient5156"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.5146897,2.0655599,-2.3434309,-0.5839287,49.666596,-20.863038)"
+ cx="15.33036"
+ cy="10.900933"
+ fx="15.33036"
+ fy="10.900933"
+ r="11.625177" />
+ </defs>
+ <sodipodi:namedview
+ stroke="#ef2929"
+ fill="#eeeeec"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="0.25490196"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.99999995"
+ inkscape:cx="22.957888"
+ inkscape:cy="26.000286"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="906"
+ inkscape:window-height="662"
+ inkscape:window-x="61"
+ inkscape:window-y="49"
+ showguides="true"
+ inkscape:guide-bbox="true" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Patrick Niklaus</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source />
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
+ <dc:title>Uncategorized</dc:title>
+ <dc:subject>
+ <rdf:Bag />
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/SourceCode" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.24694375;fill:url(#radialGradient15856);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path14866"
+ sodipodi:cx="26.812502"
+ sodipodi:cy="0.49999759"
+ sodipodi:rx="25.312502"
+ sodipodi:ry="1.8750001"
+ d="M 52.125004,0.49999759 A 25.312502,1.8750001 0 1 1 1.5,0.49999759 A 25.312502,1.8750001 0 1 1 52.125004,0.49999759 z"
+ transform="matrix(0.5703704,0,0,1,7.7694448,44.125002)" />
+ <g
+ id="g5152"
+ transform="translate(0.25,1.0000001)">
+ <path
+ id="path2237"
+ d="M 24.21875,4.9375 C 21.479911,4.9503893 18.548817,5.6202899 16.125,7.40625 C 13.701183,9.1922101 11.989117,12.245444 12,16.0625 C 11.987249,16.96409 12.460938,17.802703 13.239682,18.257219 C 14.018426,18.711735 14.981574,18.711735 15.760318,18.257219 C 16.539062,17.802703 17.012751,16.96409 17,16.0625 C 16.992986,13.602171 17.806309,12.354885 19.09375,11.40625 C 20.381191,10.457615 22.332842,9.9465223 24.25,9.9375 C 26.040203,9.929075 27.077351,10.432931 27.875,11.375 C 28.672649,12.317069 29.257782,13.933576 29.25,16.3125 C 29.247443,17.094256 29.035883,17.625804 28.46875,18.375 C 27.901617,19.124196 26.970985,19.970282 25.90625,20.96875 C 23.776781,22.965686 20.977475,25.896507 21,30.4375 C 20.987249,31.33909 21.460938,32.177703 22.239682,32.632219 C 23.018426,33.086735 23.981574,33.086735 24.760318,32.632219 C 25.539062,32.177703 26.012751,31.33909 26,30.4375 C 25.987046,27.826143 27.309103,26.50371 29.3125,24.625 C 30.314199,23.685645 31.449161,22.680618 32.4375,21.375 C 33.425839,20.069382 34.243411,18.326661 34.25,16.3125 C 34.260512,13.099038 33.466114,10.256895 31.6875,8.15625 C 29.908886,6.0556048 27.172932,4.9235972 24.21875,4.9375 z"
+ style="fill:url(#radialGradient5156);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M 24.21875,5.9375 C 21.640529,5.9496334 18.927526,6.5912406 16.71875,8.21875 C 14.553547,9.8141534 12.989979,12.547711 13,16.0625 C 12.992462,16.595505 13.275715,17.098182 13.75,17.375 C 14.223621,17.65143 14.776379,17.65143 15.25,17.375 C 15.724285,17.098182 16.007538,16.595505 16,16.0625 C 15.992351,13.379553 17.036471,11.672133 18.5,10.59375 C 20.039333,9.4595114 22.157311,8.9473484 24.25,8.9375 C 26.230739,8.9281783 27.695055,9.5835237 28.65625,10.71875 C 29.663795,11.908718 30.258326,13.767167 30.25,16.3125 C 30.246854,17.274215 29.913908,18.132995 29.28125,18.96875 C 28.614481,19.849568 27.651977,20.695135 26.59375,21.6875 C 24.501645,23.649398 21.979536,26.311972 22,30.4375 C 21.992462,30.970505 22.275715,31.473182 22.75,31.75 C 23.223621,32.026431 23.776378,32.026431 24.25,31.75 C 24.724282,31.473185 25.007538,30.970504 25,30.4375 C 24.992677,28.961257 25.393457,27.748746 26.0625,26.71875 C 26.731543,25.688754 27.617933,24.850639 28.625,23.90625 C 29.642104,22.952449 30.710389,21.989471 31.625,20.78125 C 32.514491,19.606213 33.244295,18.056398 33.25,16.3125 C 33.259963,13.26673 32.491205,10.684423 30.90625,8.8125 C 29.34117,6.9640504 26.913089,5.9248201 24.21875,5.9375 z"
+ id="path3987"
+ style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#b4cdee;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:original="M 24.21875 4.9375 C 21.479911 4.9503893 18.548817 5.6202899 16.125 7.40625 C 13.701183 9.1922101 11.989117 12.245444 12 16.0625 C 11.987249 16.96409 12.471256 17.795484 13.25 18.25 C 14.028744 18.704516 14.971256 18.704516 15.75 18.25 C 16.528744 17.795484 17.012751 16.96409 17 16.0625 C 16.992986 13.602171 17.806309 12.354885 19.09375 11.40625 C 20.381191 10.457615 22.332842 9.9465223 24.25 9.9375 C 26.040203 9.929075 27.077351 10.432931 27.875 11.375 C 28.672649 12.317069 29.257782 13.933576 29.25 16.3125 C 29.247443 17.094256 29.035883 17.625804 28.46875 18.375 C 27.901617 19.124196 26.970985 19.970282 25.90625 20.96875 C 23.776781 22.965686 20.977475 25.896507 21 30.4375 C 20.987249 31.33909 21.471256 32.170484 22.25 32.625 C 23.028745 33.079518 23.971256 33.079516 24.75 32.625 C 25.528743 32.170486 26.012751 31.33909 26 30.4375 C 25.987046 27.826143 27.309103 26.50371 29.3125 24.625 C 30.314199 23.685645 31.449161 22.680618 32.4375 21.375 C 33.425839 20.069382 34.243411 18.326661 34.25 16.3125 C 34.260512 13.099038 33.466114 10.256895 31.6875 8.15625 C 29.908886 6.0556048 27.172932 4.9235972 24.21875 4.9375 z "
+ inkscape:radius="-1.0057564"
+ sodipodi:type="inkscape:offset" />
+ </g>
+ <g
+ id="g5146"
+ transform="translate(0.7071069,1.4142136)">
+ <path
+ transform="matrix(0.6394216,0,0,0.6468183,10.191029,32.820926)"
+ d="M 24.925515,9.285902 A 4.9497476,4.9497476 0 1 1 15.02602,9.285902 A 4.9497476,4.9497476 0 1 1 24.925515,9.285902 z"
+ sodipodi:ry="4.9497476"
+ sodipodi:rx="4.9497476"
+ sodipodi:cy="9.285902"
+ sodipodi:cx="19.975767"
+ id="path2222"
+ style="opacity:1;fill:url(#radialGradient5150);fill-opacity:1;fill-rule:evenodd;stroke:#204a87;stroke-width:1.55494559;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(0.6394216,0,0,0.6468183,10.191029,32.820926)"
+ d="M 19.96875,5.9375 C 18.08922,5.9375 16.625,7.4017208 16.625,9.28125 C 16.625,11.159773 18.102988,12.65625 19.96875,12.65625 C 21.8335,12.65625 23.34375,11.146 23.34375,9.28125 C 23.34375,7.4154893 21.847273,5.9375 19.96875,5.9375 z"
+ id="path5144"
+ style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#b4cdee;stroke-width:1.55494559;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ inkscape:original="M 19.96875 5.625 C 17.922508 5.625 16.3125 7.2350084 16.3125 9.28125 C 16.3125 11.327492 17.932229 12.96875 19.96875 12.96875 C 22.005271 12.96875 23.65625 11.317771 23.65625 9.28125 C 23.65625 7.2447298 22.014992 5.625 19.96875 5.625 z "
+ inkscape:radius="-0.31782496"
+ sodipodi:type="inkscape:offset" />
+ </g>
+ </g>
+</svg>