From b0700aa90e50104730b478b76073e58034a73363 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 29 Jan 2009 22:35:42 +0000 Subject: [PATCH] Start of SVG support, check if the icon file exists and attempts to load it. --- oblogout/oblogout.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oblogout/oblogout.py b/oblogout/oblogout.py index 773ab5a..dbf20bd 100644 --- a/oblogout/oblogout.py +++ b/oblogout/oblogout.py @@ -315,7 +315,10 @@ class OpenboxLogout(): box = gtk.VBox() image = gtk.Image() - image.set_from_file("%s/%s/oblogout/%s.png" % (self.img_path, self.button_theme, name)) + if os.exists("%s/%s/oblogout/%s.svg" % (self.img_path, self.button_theme, name)): + image.set_from_file("%s/%s/oblogout/%s.svg" % (self.img_path, self.button_theme, name)) + else: + image.set_from_file("%s/%s/oblogout/%s.png" % (self.img_path, self.button_theme, name)) image.show() button = gtk.Button()