From 9b6ab24531e0e1706c5cdaf387ba1b36e263b727 Mon Sep 17 00:00:00 2001 From: Armin Besirovic Date: Wed, 4 May 2011 09:23:53 -0500 Subject: desktop/xfce4-xkb-plugin: Fixed a GTK-related crash Signed-off-by: Robby Workman --- .../xfce4-xkb-plugin/xfce4-xkb-plugin-gtk.patch | 46 ++++++++++++++++++++++ .../xfce4-xkb-plugin/xfce4-xkb-plugin.SlackBuild | 7 +++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 desktop/xfce4-xkb-plugin/xfce4-xkb-plugin-gtk.patch (limited to 'desktop/xfce4-xkb-plugin') diff --git a/desktop/xfce4-xkb-plugin/xfce4-xkb-plugin-gtk.patch b/desktop/xfce4-xkb-plugin/xfce4-xkb-plugin-gtk.patch new file mode 100644 index 0000000000..d7075b596e --- /dev/null +++ b/desktop/xfce4-xkb-plugin/xfce4-xkb-plugin-gtk.patch @@ -0,0 +1,46 @@ +diff -Naur xfce4-xkb-plugin-0.5.3.3.orig//panel-plugin/xkb-settings-dialog.c xfce4-xkb-plugin-0.5.3.3//panel-plugin/xkb-settings-dialog.c +--- xfce4-xkb-plugin-0.5.3.3.orig//panel-plugin/xkb-settings-dialog.c 2010-10-04 21:14:05.000000000 +0300 ++++ xfce4-xkb-plugin-0.5.3.3//panel-plugin/xkb-settings-dialog.c 2010-10-04 21:13:49.000000000 +0300 +@@ -31,8 +31,11 @@ + #include + #include + ++#undef XFCE_DISABLE_DEPRECATED ++ + #include + #include ++#include + + #include "xfce4-xkb-plugin.h" + #include "xfce4-xkb-plugin-private.h" +@@ -678,7 +681,7 @@ + xfce_xkb_about (XfcePanelPlugin *plugin) + { + GtkWidget *about; +- const gchar* authors[2] = { ++ const gchar* authors[] = { + "Alexander Iliev ", + "Gauvain Pocentek ", + NULL +@@ -825,15 +828,17 @@ + xkb_settings_update_from_ui (t_xkb *xkb) + { + gchar *layouts, *variants, *kbdmodel, *toggle_option, +- *compose_key_position, *tmp; ++ *compose_key_position; + t_xkb_kbd_config *kbd_config = xkb->settings->kbd_config; + gboolean is_default; + 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)) diff --git a/desktop/xfce4-xkb-plugin/xfce4-xkb-plugin.SlackBuild b/desktop/xfce4-xkb-plugin/xfce4-xkb-plugin.SlackBuild index b8746c6b56..7e38a54118 100644 --- a/desktop/xfce4-xkb-plugin/xfce4-xkb-plugin.SlackBuild +++ b/desktop/xfce4-xkb-plugin/xfce4-xkb-plugin.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=xfce4-xkb-plugin VERSION=0.5.3.3 -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} # Automatically determine the architecture we're building on: @@ -76,6 +76,11 @@ find . \ # http://lists.fedoraproject.org/pipermail/scm-commits/2010-January/384437.html patch -p1 < $CWD/xfce4-xkb-plugin-libxklavier_api_chance.diff +# Fixup for some gtk-related crashes +# Thanks to Andreas Radke (AndyRTR) or the Arch Linux project :) +# https://bugs.archlinux.org/task/21067?project=1&string=xfce4-xkb-plugin +patch -p1 < $CWD/xfce4-xkb-plugin-gtk.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ -- cgit v1.2.3