svn commit: r315751 - in head/x11-wm/xfce4-panel: . files
Olivier Duchateau
olivierd at FreeBSD.org
Sun Apr 7 07:12:33 UTC 2013
Author: olivierd
Date: Sun Apr 7 07:12:32 2013
New Revision: 315751
URL: http://svnweb.freebsd.org/changeset/ports/315751
Log:
Fix scale XPM icon in menu applications and launchers.
While I'm here,
- Use USES= pathfix instead of gnomehack
Approved by: portmgr (tabthorpe)
Added:
head/x11-wm/xfce4-panel/files/patch-libxfce4panel__xfce-panel-convenience.c (contents, props changed)
Modified:
head/x11-wm/xfce4-panel/Makefile
Modified: head/x11-wm/xfce4-panel/Makefile
==============================================================================
--- head/x11-wm/xfce4-panel/Makefile Sun Apr 7 07:11:16 2013 (r315750)
+++ head/x11-wm/xfce4-panel/Makefile Sun Apr 7 07:12:32 2013 (r315751)
@@ -4,7 +4,7 @@
PORTNAME= xfce4-panel
PORTVERSION= 4.10.0
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= x11-wm xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
DIST_SUBDIR= xfce4
@@ -16,11 +16,12 @@ LIB_DEPENDS= wnck-1:${PORTSDIR}/x11-tool
cairo:${PORTSDIR}/graphics/cairo \
dbus-glib-1:${PORTSDIR}/devel/dbus-glib
+USES= pathfix
GNU_CONFIGURE= yes
INSTALLS_ICONS= yes
USE_BZIP2= yes
USE_GMAKE= yes
-USE_GNOME= gnomehack glib20 gtk20 intltool intlhack desktopfileutils
+USE_GNOME= glib20 gtk20 intltool intlhack desktopfileutils
USE_LDCONFIG= yes
USE_PERL5= yes
USE_XFCE= configenv garcon libexo libmenu libutil xfconf
Added: head/x11-wm/xfce4-panel/files/patch-libxfce4panel__xfce-panel-convenience.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11-wm/xfce4-panel/files/patch-libxfce4panel__xfce-panel-convenience.c Sun Apr 7 07:12:32 2013 (r315751)
@@ -0,0 +1,46 @@
+--- ./libxfce4panel/xfce-panel-convenience.c.orig 2012-04-28 20:31:35.000000000 +0000
++++ ./libxfce4panel/xfce-panel-convenience.c 2013-04-06 21:01:14.000000000 +0000
+@@ -158,7 +158,7 @@
+ gchar *name;
+ gchar *filename;
+ gint src_w, src_h;
+- gdouble wratio, hratio;
++ gdouble ratio;
+ GdkPixbuf *dest;
+ GError *error = NULL;
+ gint size = MIN (dest_width, dest_height);
+@@ -170,15 +170,13 @@
+
+ if (G_UNLIKELY (g_path_is_absolute (source)))
+ {
+- pixbuf = gdk_pixbuf_new_from_file_at_scale (source, dest_width, dest_height, TRUE, &error);
++ pixbuf = gdk_pixbuf_new_from_file (source, &error);
+ if (G_UNLIKELY (pixbuf == NULL))
+ {
+ g_message ("Failed to load image \"%s\": %s",
+ source, error->message);
+ g_error_free (error);
+ }
+-
+- return pixbuf;
+ }
+ else
+ {
+@@ -233,13 +231,11 @@
+ if (src_w > dest_width || src_h > dest_height)
+ {
+ /* calculate the new dimensions */
+- wratio = (gdouble) src_w / (gdouble) size;
+- hratio = (gdouble) src_h / (gdouble) size;
++ ratio = MIN ((gdouble) dest_width / (gdouble) src_w,
++ (gdouble) dest_height / (gdouble) src_h);
+
+- if (hratio > wratio)
+- dest_width = rint (src_w / hratio);
+- else
+- dest_height = rint (src_h / wratio);
++ dest_width = rint (src_w * ratio);
++ dest_height = rint (src_h * ratio);
+
+ dest = gdk_pixbuf_scale_simple (pixbuf,
+ MAX (dest_width, 1),
More information about the svn-ports-head
mailing list