File alacarte-force-Gtk3.patch of Package alacarte

From d7084b4a32102a3900d3b28469d7a5da3ba84b90 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
Date: Sat, 12 Jan 2013 13:33:03 +0100
Subject: [PATCH] Enforce the use of Gtk 3.0; Gtk 2.0 is no introspecatble and
 thus does not serve us anyway.

Fixes bug 691599.
---
 Alacarte/ItemEditor.py | 2 ++
 Alacarte/MainWindow.py | 2 ++
 Alacarte/util.py       | 3 +++
 3 files changed, 7 insertions(+)

Index: alacarte-3.6.1/Alacarte/MainWindow.py
===================================================================
--- alacarte-3.6.1.orig/Alacarte/MainWindow.py
+++ alacarte-3.6.1/Alacarte/MainWindow.py
@@ -17,6 +17,8 @@
 #   License along with this library; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
+import gi
+gi.require_version('Gtk', '3.0')
 from gi.repository import Gtk, GObject, Gio, GdkPixbuf, Gdk, GMenu, GLib
 import cgi
 import os
Index: alacarte-3.6.1/Alacarte/util.py
===================================================================
--- alacarte-3.6.1.orig/Alacarte/util.py
+++ alacarte-3.6.1/Alacarte/util.py
@@ -19,6 +19,9 @@
 import os
 import xml.dom.minidom
 from collections import Sequence
+
+import gi
+gi.require_version('Gtk', '3.0')
 from gi.repository import Gtk, GdkPixbuf, GMenu, GLib
 
 # XXX: look into pygobject error marshalling
openSUSE Build Service is sponsored by