rpms/wallpapoz/F-12 wallpapoz-0.4.1-rev92-animated-image.patch, NONE, 1.1 wallpapoz.spec, 1.36, 1.37
Mamoru Tasaka
mtasaka at fedoraproject.org
Fri Jun 11 19:44:36 UTC 2010
Author: mtasaka
Update of /cvs/extras/rpms/wallpapoz/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv4840/F-12
Modified Files:
wallpapoz.spec
Added Files:
wallpapoz-0.4.1-rev92-animated-image.patch
Log Message:
* Sat Jun 12 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-21.svn92_trunk
- Handle animated image file (bug 602921)
wallpapoz-0.4.1-rev92-animated-image.patch:
wallpapoz | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
--- NEW FILE wallpapoz-0.4.1-rev92-animated-image.patch ---
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.anime 2010-06-12 04:26:39.000000000 +0900
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-12 04:13:43.000000000 +0900
@@ -1236,15 +1236,32 @@
filename = self.store.get_value(position_iter, 1)
# display image properly
+ from glib import GError as glib_GError
try:
- im = Image.open(filename)
- # keep image proportions
- if im.size[0] > im.size[1]:
- self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, 400, int((float(im.size[1])/im.size[0]) * 400)))
+ anime = gtk.gdk.PixbufAnimation(filename)
+
+ if anime.is_static_image() :
+ im = Image.open(filename)
+ # keep image proportions
+ if im.size[0] > im.size[1]:
+ self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, 400, int((float(im.size[1])/im.size[0]) * 400)))
+ else:
+ self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, int(float(im.size[1])/im.size[0] * 300), 300))
+
else:
- self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, int(float(im.size[1])/im.size[0] * 300), 300))
+ width = anime.get_width()
+ height = anime.get_height()
+ static_im = anime.get_static_image()
+ if width > height:
+ self.image_widget.set_from_pixbuf(static_im.scale_simple(400, int((float(height)/width)*400),gtk.gdk.INTERP_BILINEAR))
+ else:
+ self.image_widget.set_from_pixbuf(static_im.scale_simple(int((float(width)/height)*300),300,gtk.gdk.INTERP_BILINEAR))
+
except IOError:
self.image_widget.clear()
+ except glib_GError, (msg):
+ print msg
+ self.image_widget.clear()
# display image filename
self.wallpaper_filename.set_markup("<b>" + os.path.basename(filename) + "</b>")
Index: wallpapoz.spec
===================================================================
RCS file: /cvs/extras/rpms/wallpapoz/F-12/wallpapoz.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -r1.36 -r1.37
--- wallpapoz.spec 17 Mar 2010 16:39:54 -0000 1.36
+++ wallpapoz.spec 11 Jun 2010 19:44:36 -0000 1.37
@@ -8,7 +8,7 @@
%define mainver 0.4.1
%undefine betaver
%define svnver svn92_trunk
-%define fedorarel 20
+%define fedorarel 21
%define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver}
@@ -40,6 +40,8 @@ Patch4: wallpapoz-0.4.1-rev92-pa
Patch5: wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
# Kill other daemon_wallpapoz if running
Patch6: wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
+# bug 602921, handle animated image file
+Patch7: wallpapoz-0.4.1-rev92-animated-image.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -54,13 +56,11 @@ BuildRequires: gnome-python2
%if 0%{?fedora} >= 10
BuildRequires: gnome-python2-gnome
%endif
+# Because wallpapoz uses gconftool-2 or so
Requires: GConf2
Requires: pygtk2-libglade
Requires: python-imaging
-Requires: gnome-python2
-%if 0%{?fedora} >= 10
Requires: gnome-python2-gnome
-%endif
Requires: xorg-x11-utils
Requires: %{_bindir}/kill
Requires: %{_bindir}/pgrep
@@ -77,6 +77,7 @@ wallpapers for different workspaces or v
%patch4 -p1 -b .patch_init
%patch5 -p1 -b .kill_nox
%patch6 -p1 -b .kill_multi
+%patch7 -p1 -b .anime
%build
@@ -123,6 +124,9 @@ desktop-file-install \
%{_datadir}/applications/fedora-%{name}.desktop
%changelog
+* Sat Jun 12 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-21.svn92_trunk
+- Handle animated image file (bug 602921)
+
* Thu Mar 18 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.4.1-20.svn92_trunk
- Handle another potentially race condition under compiz (may fix 573642)
More information about the scm-commits
mailing list