[arch-commits] Commit in gimp/trunk (PKGBUILD gtk-2.19-statusbar.patch)

Jan de Groot jgc at archlinux.org
Fri Apr 16 21:16:45 UTC 2010


    Date: Friday, April 16, 2010 @ 17:16:45
  Author: jgc
Revision: 77668

upgpkg: gimp 2.6.8-4
Add patch to fix statusbar with gtk > 2.19.1

Added:
  gimp/trunk/gtk-2.19-statusbar.patch
Modified:
  gimp/trunk/PKGBUILD

--------------------------+
 PKGBUILD                 |   11 ++++---
 gtk-2.19-statusbar.patch |   67 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-04-16 20:41:43 UTC (rev 77667)
+++ PKGBUILD	2010-04-16 21:16:45 UTC (rev 77668)
@@ -3,7 +3,7 @@
 
 pkgname=gimp
 pkgver=2.6.8
-pkgrel=3
+pkgrel=4
 pkgdesc="GNU Image Manipulation Program"
 arch=('i686' 'x86_64')
 url="http://www.gimp.org/"
@@ -24,15 +24,16 @@
 conflicts=('gimp-devel')
 install=gimp.install
 source=(ftp://ftp.gimp.org/pub/gimp/v${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2
-        linux.gpl libpng-1.4.patch)
+        linux.gpl libpng-1.4.patch gtk-2.19-statusbar.patch)
 md5sums=('a4d9462c9420954824a80c9b1963f9d9' 'bb27bc214261d36484093e857f015f38'\
-         '211eccab51593526e852816e647f7da4')
+         '211eccab51593526e852816e647f7da4' '8be7d21231e3032e4723cf86588375c0')
 sha1sums=('a550943f086abc9bf6b96d576741337b7186a4f4' '110ce9798173b19a662d086ed7b882b4729f06cf'\
-         '21c0fe284c39cc133ec977a48ec38220033020c5')
+          '21c0fe284c39cc133ec977a48ec38220033020c5' '417eafb49d324a2dc40905b1c333887e6868eef4')
 
 build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
-   patch -p1 < ../libpng-1.4.patch || return 1
+   patch -Np1 -i "../libpng-1.4.patch" || return 1
+   patch -Np1 -i "${srcdir}/gtk-2.19-statusbar.patch" || return 1
    ./configure --prefix=/usr --sysconfdir=/etc \
      --enable-mp --enable-gimp-console --enable-gimp-remote \
      --disable-devel-docs --enable-python --without-gvfs \

Added: gtk-2.19-statusbar.patch
===================================================================
--- gtk-2.19-statusbar.patch	                        (rev 0)
+++ gtk-2.19-statusbar.patch	2010-04-16 21:16:45 UTC (rev 77668)
@@ -0,0 +1,67 @@
+From 501c4f65f08c111df0654cb887d95c2c06e82710 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils at redhat.com>
+Date: Wed, 24 Mar 2010 17:08:01 +0000
+Subject: backport statusbar code needed for GTK+ >= 2.19.1
+
+Use the hbox that is provided via gtk_statusbar_get_message_area()
+since GTK+ 2.19.1.
+---
+diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c
+index 5e89427..36651cd 100644
+--- a/app/display/gimpstatusbar.c
++++ b/app/display/gimpstatusbar.c
+@@ -49,6 +49,9 @@
+ /*  maximal width of the string holding the cursor-coordinates  */
+ #define CURSOR_LEN        256
+ 
++/*  the spacing of the hbox                                     */
++#define HBOX_SPACING        1
++
+ /*  spacing between the icon and the statusbar label            */
+ #define ICON_SPACING        2
+ 
+@@ -152,6 +155,7 @@ static void
+ gimp_statusbar_init (GimpStatusbar *statusbar)
+ {
+   GtkWidget     *hbox;
++  GtkWidget     *label;
+   GtkWidget     *image;
+   GimpUnitStore *store;
+ 
+@@ -171,13 +175,27 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
+   statusbar->progress_active      = FALSE;
+   statusbar->progress_shown       = FALSE;
+ 
+-  /* remove the label and insert a hbox */
+-  gtk_container_remove (GTK_CONTAINER (GTK_STATUSBAR (statusbar)->frame),
+-                        g_object_ref (GTK_STATUSBAR (statusbar)->label));
+-
+-  hbox = gtk_hbox_new (FALSE, 1);
+-  gtk_container_add (GTK_CONTAINER (GTK_STATUSBAR (statusbar)->frame), hbox);
+-  gtk_widget_show (hbox);
++  label = g_object_ref (GTK_STATUSBAR (statusbar)->label);
++
++  /* remove the message area or label and insert a hbox */
++#if GTK_CHECK_VERSION (2, 19, 1)
++  {
++    hbox = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar));
++    gtk_box_set_spacing (GTK_BOX (hbox), HBOX_SPACING);
++    gtk_container_remove (GTK_CONTAINER (hbox), label);
++  }
++#else
++  {
++    GtkWidget *label_parent;
++
++    label_parent = gtk_widget_get_parent (label);
++    gtk_container_remove (GTK_CONTAINER (label_parent), label);
++
++    hbox = gtk_hbox_new (FALSE, HBOX_SPACING);
++    gtk_container_add (GTK_CONTAINER (label_parent), hbox);
++    gtk_widget_show (hbox);
++  }
++#endif
+ 
+   statusbar->cursor_label = gtk_label_new ("8888, 8888");
+   gtk_misc_set_alignment (GTK_MISC (statusbar->cursor_label), 0.5, 0.5);
+--
+cgit v0.8.3.1




More information about the arch-commits mailing list