startup bug
authorMarcus Wikström <mece@ovi.com>
Sun, 7 Mar 2010 14:07:05 +0000 (16:07 +0200)
committerMarcus Wikström <mece@ovi.com>
Sun, 7 Mar 2010 14:07:05 +0000 (16:07 +0200)
src/usr/lib/hildon-desktop/comicwidget.py

index c4c8228..d81dea0 100644 (file)
@@ -18,8 +18,8 @@ socket.setdefaulttimeout(30)
 supports_alpha = False
 
 # LOGGING!
 supports_alpha = False
 
 # LOGGING!
-# sys.stdout = open('/home/user/.comic-widget/output_log.txt', 'a')
-# sys.stderr = open('/home/user/.comic-widget/error_log.txt', 'a')
+# sys.stdout = open('/home/user/.comic-widget/output_log.txt', 'a', 0)
+sys.stderr = open('/home/user/.comic-widget/error_log.txt', 'a', 0)
 # print "Start logging!"
 
 # constants. dbfile is the location of the csv
 # print "Start logging!"
 
 # constants. dbfile is the location of the csv
@@ -1315,7 +1315,8 @@ class ComicHomePlugin(hildondesktop.HomePluginItem):
                height = int(self.sizes['height'])
                picwidth = width - 2
                maxheight = height - 48
                height = int(self.sizes['height'])
                picwidth = width - 2
                maxheight = height - 48
-
+               if os.path.isfile(filename) == False:
+                       filename = "/opt/comic-widget/images/next0-48x48.png"
                pixbuf = gtk.gdk.pixbuf_new_from_file(filename)
                parent_buf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, pixbuf.get_has_alpha(), 8, width, maxheight)
                parent_buf.fill(0xffffffff)
                pixbuf = gtk.gdk.pixbuf_new_from_file(filename)
                parent_buf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, pixbuf.get_has_alpha(), 8, width, maxheight)
                parent_buf.fill(0xffffffff)