deskbar-applet r2072 - in branches/gnome-2-22: . deskbar/ui
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2072 - in branches/gnome-2-22: . deskbar/ui
- Date: Mon, 7 Apr 2008 10:34:24 +0100 (BST)
Author: sebp
Date: Mon Apr 7 10:34:24 2008
New Revision: 2072
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2072&view=rev
Log:
Added check if SVG images are supported by gtk+
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/deskbar/ui/DeskbarTray.py
Modified: branches/gnome-2-22/deskbar/ui/DeskbarTray.py
==============================================================================
--- branches/gnome-2-22/deskbar/ui/DeskbarTray.py (original)
+++ branches/gnome-2-22/deskbar/ui/DeskbarTray.py Mon Apr 7 10:34:24 2008
@@ -149,16 +149,22 @@
else:
image_name += "-v"
- if size <= 36:
- image_name += ".png"
- s = -1
- else:
+ if size > 36 and self.__has_svg_support():
image_name += ".svg"
s = size-12
+ else:
+ image_name += ".png"
+ s = -1
self.set_button_image_from_file (join(deskbar.ART_DATA_DIR, image_name), s)
self.set_size_request( size, size )
-
+
+ def __has_svg_support (self):
+ for format in gtk.gdk.pixbuf_get_formats():
+ if format["name"] == "svg":
+ return True
+ return False
+
if gtk.pygtk_version < (2,8,0):
gobject.type_register(DeskbarTray)
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]