Permalink
Browse files

Revert "previewer: use the appointment-soon icon as the default thumb…

… icon."

This reverts commit cb1eccc.
Revert this since it adds a dependency on python-rsvg. Ideally we should do the
same with the gdk-pixbuf API.
  • Loading branch information...
1 parent 4ac4353 commit 628bb9c3660d1a1c1e6b6234db1ab8a24f4461bf @alessandrod alessandrod committed Sep 8, 2010
Showing with 2 additions and 21 deletions.
  1. +2 −21 pitivi/ui/previewer.py
View
@@ -28,8 +28,6 @@
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):

0 comments on commit 628bb9c

Please sign in to comment.