[pitivi: 2/5] Revert "previewer: use the appointment-soon icon as the default thumb icon."



commit 628bb9c3660d1a1c1e6b6234db1ab8a24f4461bf
Author: Alessandro Decina <alessandro d gmail com>
Date:   Wed Sep 8 17:10:21 2010 +0200

    Revert "previewer: use the appointment-soon icon as the default thumb icon."
    
    This reverts commit cb1eccc2db0b6d86a1c18e205b7dd78a3c2e1508.
    Revert this since it adds a dependency on python-rsvg. Ideally we should do the
    same with the gdk-pixbuf API.

 pitivi/ui/previewer.py |   23 ++---------------------
 1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/pitivi/ui/previewer.py b/pitivi/ui/previewer.py
index d4be972..971912c 100644
--- a/pitivi/ui/previewer.py
+++ b/pitivi/ui/previewer.py
@@ -28,8 +28,6 @@ import gobject
 import gst
 import cairo
 import os
-import gtk
-import rsvg
 from gettext import gettext as _
 import pitivi.utils as utils
 from pitivi.configure import get_pixmap_dir
@@ -152,25 +150,8 @@ class Previewer(Signallable, Loggable):
     def __init__(self, instance, factory, stream_):
         Loggable.__init__(self)
         # create default thumbnail
-        icon_theme = gtk.icon_theme_get_default()
-        icon = icon_theme.lookup_icon("appointment-soon", 48, ())
-        # If we can't find the appointment-soon icon, use our own
-        if icon is None:
-            path = os.path.join(get_pixmap_dir(), self.__DEFAULT_THUMB__)
-        else:
-            path = icon.get_filename()
-
-        # If it is an SVG, we have to render to cairo using librsvg
-        if path.endswith(".svg"):
-            handle = rsvg.Handle(file=path)
-            (width, height, width_fl, height_fl) = handle.get_dimension_data()
-            surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
-            cr = cairo.Context(surface)
-            handle.render_cairo(cr)
-            self.default_thumb = surface
-        else:
-            # Easy for PNGs
-            self.default_thumb = cairo.ImageSurface.create_from_png(path)
+        path = os.path.join(get_pixmap_dir(), self.__DEFAULT_THUMB__)
+        self.default_thumb = cairo.ImageSurface.create_from_png(path)
         self._connectSettings(instance.settings)
 
     def render_cairo(self, cr, bounds, element, y1):



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