rpms/accountsdialog/F-13 0001-Fix-some-issues-with-icon-handling.patch, NONE, 1.1 accountsdialog.spec, 1.14, 1.15
Matthias Clasen
mclasen at fedoraproject.org
Mon Apr 5 15:59:17 UTC 2010
Author: mclasen
Update of /cvs/pkgs/rpms/accountsdialog/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv20677
Modified Files:
accountsdialog.spec
Added Files:
0001-Fix-some-issues-with-icon-handling.patch
Log Message:
fix some icon handling issues
0001-Fix-some-issues-with-icon-handling.patch:
um-crop-area.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
--- NEW FILE 0001-Fix-some-issues-with-icon-handling.patch ---
>From 8ad8318ae483cae8f6a9b53245e10de428e55a63 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen at redhat.com>
Date: Mon, 5 Apr 2010 11:31:01 -0400
Subject: [PATCH] Fix some issues with icon handling
Preserve alpha channels if present in the file, and be careful
about not passing out-of-bounds coordinates to gdk_pixbuf_new_subpixbuf()
---
src/um-crop-area.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/um-crop-area.c b/src/um-crop-area.c
index 2c473a1..14ba5ee 100644
--- a/src/um-crop-area.c
+++ b/src/um-crop-area.c
@@ -107,8 +107,10 @@ update_pixbufs (UmCropArea *area)
gdk_pixbuf_get_height (area->priv->pixbuf) != allocation.height) {
if (area->priv->pixbuf != NULL)
g_object_unref (area->priv->pixbuf);
- area->priv->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
- allocation.width, allocation.height);
+ area->priv->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
+ gdk_pixbuf_get_has_alpha (area->priv->browse_pixbuf),
+ 8,
+ allocation.width, allocation.height);
color = &widget->style->bg[GTK_WIDGET_STATE (widget)];
pixel = ((color->red & 0xff00) << 16) |
@@ -800,9 +802,17 @@ um_crop_area_new (void)
GdkPixbuf *
um_crop_area_get_picture (UmCropArea *area)
{
+ gint width, height;
+
+ width = gdk_pixbuf_get_width (area->priv->browse_pixbuf);
+ height = gdk_pixbuf_get_height (area->priv->browse_pixbuf);
+ width = MIN (area->priv->crop.width, width - area->priv->crop.x);
+ height = MIN (area->priv->crop.height, height - area->priv->crop.y);
+
return gdk_pixbuf_new_subpixbuf (area->priv->browse_pixbuf,
- area->priv->crop.x, area->priv->crop.y,
- area->priv->crop.width, area->priv->crop.height);
+ area->priv->crop.x,
+ area->priv->crop.y,
+ width, height);
}
void
--
1.7.0.1
Index: accountsdialog.spec
===================================================================
RCS file: /cvs/pkgs/rpms/accountsdialog/F-13/accountsdialog.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- accountsdialog.spec 30 Mar 2010 17:34:46 -0000 1.14
+++ accountsdialog.spec 5 Apr 2010 15:59:17 -0000 1.15
@@ -1,6 +1,6 @@
Name: accountsdialog
Version: 0.6
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: An application to view and modify user accounts information
Group: Applications/System
@@ -11,6 +11,9 @@ Source0: http://download.gnome.or
# hide nonfunctional UI
Patch0: hide-unimplemented-parts.patch
+# upstream fix
+Patch1: 0001-Fix-some-issues-with-icon-handling.patch
+
Requires: cheese-libs >= 2.29.90
BuildRequires: intltool
@@ -39,6 +42,7 @@ also lets you configure some aspects of
%prep
%setup -q
%patch0 -p1 -b .hide-unimplemented-parts
+%patch1 -p1 -b .icon-changes
%build
%configure
@@ -66,6 +70,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Apr 5 2010 Matthias Clasen <mclasen at redhat.com> - 0.6-2
+- Fix some issues with icon handling
+
* Tue Mar 30 2010 Matthias Clasen <mclasen at redhat.com> - 0.6-1
- Update to 0.6
More information about the scm-commits
mailing list