rpms/gnome-applets/devel gnome-applets-2.16.0.1-trash-icon-size.patch, NONE, 1.1 gnome-applets.spec, 1.182, 1.183

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Sep 15 15:08:07 UTC 2006


Author: mclasen

Update of /cvs/dist/rpms/gnome-applets/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24799

Modified Files:
	gnome-applets.spec 
Added Files:
	gnome-applets-2.16.0.1-trash-icon-size.patch 
Log Message:
fix trash applet icon size issues


gnome-applets-2.16.0.1-trash-icon-size.patch:
 trashapplet.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

--- NEW FILE gnome-applets-2.16.0.1-trash-icon-size.patch ---
--- gnome-applets-2.16.0.1/trashapplet/src/trashapplet.c.icon-size	2006-09-15 11:03:05.000000000 -0400
+++ gnome-applets-2.16.0.1/trashapplet/src/trashapplet.c	2006-09-15 11:03:10.000000000 -0400
@@ -129,7 +129,7 @@
 		client = gconf_client_get_default ();
 
 	applet->size = 0;
-	applet->new_size = panel_applet_get_size (PANEL_APPLET (applet));
+	applet->new_size = 0;
 
 	switch (panel_applet_get_orient (PANEL_APPLET (applet))) {
 	case PANEL_APPLET_ORIENT_LEFT:
@@ -420,9 +420,12 @@
 		new_icon = TRASH_ICON_FULL;
 	}
 
-	if (applet->image && (applet->icon_state != new_state ||
-			      applet->new_size != applet->size)) {
+	if (applet->image && applet->new_size > 10 &&
+            (applet->icon_state != new_state ||
+	     applet->new_size != applet->size)) {
+                gint size;
 		applet->size = applet->new_size;
+		size = applet->size - 4;
 		screen = gtk_widget_get_screen (GTK_WIDGET (applet));
 		icon_theme = gtk_icon_theme_get_for_screen (screen);
 		/* not all themes have the "accept" variant */
@@ -433,14 +436,15 @@
 					: TRASH_ICON_FULL;
 		}
 		pixbuf = gtk_icon_theme_load_icon (icon_theme, new_icon, 
-						   applet->size, 0, NULL);
+						   size, 0, NULL);
 		if (!pixbuf)
 		    return FALSE;
 
-		scaled = gdk_pixbuf_scale_simple (pixbuf, applet->size, applet->size, GDK_INTERP_BILINEAR);
-		if (scaled) {
-		    g_object_unref (pixbuf);
-		    pixbuf = scaled;
+                if (gdk_pixbuf_get_width (pixbuf) != size ||
+                    gdk_pixbuf_get_height (pixbuf) != size) {
+			scaled = gdk_pixbuf_scale_simple (pixbuf, size, size, GDK_INTERP_BILINEAR);
+			g_object_unref (pixbuf);
+		 	pixbuf = scaled;
 		}
 
 		gtk_image_set_from_pixbuf (GTK_IMAGE (applet->image), pixbuf);


Index: gnome-applets.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-applets/devel/gnome-applets.spec,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -r1.182 -r1.183
--- gnome-applets.spec	10 Sep 2006 04:46:09 -0000	1.182
+++ gnome-applets.spec	15 Sep 2006 15:08:05 -0000	1.183
@@ -32,7 +32,7 @@
 Summary:        Small applications for the GNOME panel
 Name:     	gnome-applets
 Version: 	2.16.0.1
-Release:  	3%{?dist}
+Release:  	4%{?dist}
 Epoch:          1
 License:	GPL
 Group:          User Interface/Desktops
@@ -64,6 +64,9 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=355223 
 Patch23: gnome-applets-2.16.0.1-desktop-clicks.patch
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=356138
+Patch24: gnome-applets-2.16.0.1-trash-icon-size.patch
+
 URL:		http://www.gnome.org/
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
@@ -152,6 +155,7 @@
 %patch21 -p1 -b .poll-less
 %patch22 -p1 -b .mixer-icon-size
 %patch23 -p1 -b .desktop-clicks
+%patch24 -p1 -b .trash-icon-size
 
 cp gswitchit/gswitchit-applet.png  gswitchit/gswitchit-properties-capplet.png
 
@@ -319,6 +323,9 @@
 %{_libdir}/pkgconfig/gweather.pc
 
 %changelog
+* Fri Sep 15 2006 Matthias Clasen <mclasen at redhat.com> - 1:2.16.0.1-4
+- Fix some icon size issues in the trash applet
+
 * Sun Sep 10 2006 Matthias Clasen <mclasen at redhat.com> - 1:2.16.0.1-3
 - Make stickynotes not wake up 10 times per second (#205909)
 




More information about the fedora-cvs-commits mailing list