[arch-commits] Commit in xfce4-xkb-plugin/trunk (PKGBUILD crashfix.diff)

andyrtr at archlinux.org andyrtr at archlinux.org
Sat Jan 22 17:04:45 EST 2011


    Date: Saturday, January 22, 2011 @ 17:04:45
  Author: andyrtr
Revision: 107269

upgpkg: xfce4-xkb-plugin 0.5.3.3-4
add a patch from upstream tracker to solve FS#21067

Added:
  xfce4-xkb-plugin/trunk/crashfix.diff
Modified:
  xfce4-xkb-plugin/trunk/PKGBUILD

---------------+
 PKGBUILD      |   16 +++++++++++-----
 crashfix.diff |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-01-22 21:55:54 UTC (rev 107268)
+++ PKGBUILD	2011-01-22 22:04:45 UTC (rev 107269)
@@ -4,7 +4,7 @@
 
 pkgname=xfce4-xkb-plugin
 pkgver=0.5.3.3
-pkgrel=3
+pkgrel=4
 pkgdesc="plugin to switch keyboard layouts for the Xfce4 panel"
 arch=(i686 x86_64)
 license=('custom')
@@ -14,13 +14,19 @@
 makedepends=('intltool')
 options=('!libtool')
 source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/0.5/${pkgname}-${pkgver}.tar.gz
-        xfce4-xkb-plugin-0.5.3.3-libxklavier.patch)
-sha1sums=('5e83d55cd6f14a62a87ccadd0f11eee070a6f4a7'
-          '44691bd348e33ea17afe45869675c0f7c03ed32f')
+        xfce4-xkb-plugin-0.5.3.3-libxklavier.patch
+	crashfix.diff)
+md5sums=('b233cc9de1cbace075eaf6e2c9a8e685'
+         '781165ce1bc08059ae8e846c45c0bab2'
+         '4faeaaea7d294cbad2972af964508086')
 
 build() {
   cd ${srcdir}/${pkgname}-${pkgver}
-  patch -Np1 -i "${srcdir}/xfce4-xkb-plugin-0.5.3.3-libxklavier.patch" || return 1
+  patch -Np1 -i "${srcdir}/xfce4-xkb-plugin-0.5.3.3-libxklavier.patch"
+
+  # https://bugs.archlinux.org/task/21067 - http://bugzilla.xfce.org/show_bug.cgi?id=6477
+  patch -Np1 -i ${srcdir}/crashfix.diff
+  
   ./configure --prefix=/usr \
 	--sysconfdir=/etc \
 	--libexecdir=/usr/lib \

Added: crashfix.diff
===================================================================
--- crashfix.diff	                        (rev 0)
+++ crashfix.diff	2011-01-22 22:04:45 UTC (rev 107269)
@@ -0,0 +1,34 @@
+From 52dc725bf5e44a0ab0064daebffe7ff139da0f78 Mon Sep 17 00:00:00 2001
+From: Lionel Le Folgoc <mrpouit at gmail.com>
+Date: Fri, 24 Sep 2010 21:28:49 +0200
+Subject: Handle cases when the keyboard model is empty
+
+gtk_combo_box_get_active_iter () does not set the iter, and a call to
+gtk_tree_model_get () using this iter will crash. Thus, check the return value
+of gtk_combo_box_get_active_iter () before using the iter.
+---
+ panel-plugin/xkb-settings-dialog.c |    8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c
+index 178ec5f..37a0a9a 100644
+--- a/panel-plugin/xkb-settings-dialog.c
++++ b/panel-plugin/xkb-settings-dialog.c
+@@ -831,9 +831,11 @@ xkb_settings_update_from_ui (t_xkb *xkb)
+     gint i = 0;
+ 
+     model = GTK_TREE_MODEL (xkb->combo_store);
+-    gtk_combo_box_get_active_iter (GTK_COMBO_BOX (xkb->kbd_model_combo), &iter);
+-    gtk_tree_model_get (model, &iter, NOM, &kbdmodel, -1);
+-    kbd_config->model = kbdmodel;
++    if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (xkb->kbd_model_combo), &iter))
++    {
++        gtk_tree_model_get (model, &iter, NOM, &kbdmodel, -1);
++        kbd_config->model = kbdmodel;
++    }
+ 
+     model = GTK_TREE_MODEL (xkb->toggle_options_store);
+     if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (xkb->toggle_options_combo), &iter))
+-- 
+1.7.1
+



More information about the arch-commits mailing list