* [gentoo-commits] proj/gnome:gnome-next commit in: app-accessibility/caribou/, app-accessibility/caribou/files/
@ 2011-08-30 5:37 Alexandre Restovtsev
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Restovtsev @ 2011-08-30 5:37 UTC (permalink / raw
To: gentoo-commits
commit: 51c5b6af66c6f77f3244b5c27ca19b25bc884473
Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Tue Aug 30 05:33:56 2011 +0000
Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Tue Aug 30 05:35:11 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=51c5b6af
app-accessibility/caribou: 0.2.00 → 0.3.5
Bump to gnome-3.1.x release; massive number of changes. Add a patch for
compatibility with pygobject:3 (see upstream bug 657666). Also, delete
the custom PYTHONPATH in shell files; it is totally unnecessary on
Gentoo systems, and can lead to errors (e.g. on multilib strict).
---
app-accessibility/caribou/caribou-0.2.00.ebuild | 38 ---
app-accessibility/caribou/caribou-0.3.5.ebuild | 86 ++++++
.../caribou/files/caribou-0.3.5-pygobject-3.patch | 304 ++++++++++++++++++++
3 files changed, 390 insertions(+), 38 deletions(-)
diff --git a/app-accessibility/caribou/caribou-0.2.00.ebuild b/app-accessibility/caribou/caribou-0.2.00.ebuild
deleted file mode 100644
index c0c790d..0000000
--- a/app-accessibility/caribou/caribou-0.2.00.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI="3"
-GCONF_DEBUG="no"
-PYTHON_DEPEND="2:2.4"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.*"
-
-inherit gnome2-python
-
-DESCRIPTION="Input assistive technology intended for switch and pointer users"
-HOMEPAGE="https://live.gnome.org/Caribou"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-COMMON_DEPEND=">=dev-python/pygobject-2.27.92:2
- >=x11-libs/gtk+-2.91.8:3
- >=media-libs/clutter-1.5.11:1.0"
-# gsettings-desktop-schemas is needed for the 'toolkit-accessibility' key
-RDEPEND="${COMMON_DEPEND}
- dev-python/pyatspi
- dev-python/python-virtkey
- gnome-base/gsettings-desktop-schemas"
-DEPEND="${RDEPEND}
- >=dev-util/intltool-0.35.5
- app-text/gnome-doc-utils"
-
-DOCS="AUTHORS ChangeLog NEWS README"
-
-src_install() {
- gnome2-python_src_install
- python_convert_shebangs -r 2 "${ED}"
-}
diff --git a/app-accessibility/caribou/caribou-0.3.5.ebuild b/app-accessibility/caribou/caribou-0.3.5.ebuild
new file mode 100644
index 0000000..3aa4994
--- /dev/null
+++ b/app-accessibility/caribou/caribou-0.3.5.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="3"
+GNOME_TARBALL_SUFFIX="xz"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_DEPEND="2:2.4"
+PYTHON_USE_WITH="xml"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit eutils gnome2-python
+
+DESCRIPTION="Input assistive technology intended for switch and pointer users"
+HOMEPAGE="https://live.gnome.org/Caribou"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND=">=dev-python/pygobject-2.27.92:2[introspection]
+ >=x11-libs/gtk+-3.0.0:3[introspection]
+ x11-libs/gtk+:2
+ >=dev-libs/gobject-introspection-0.10.7
+ dev-libs/libgee
+ dev-libs/libxml2
+ >=media-libs/clutter-1.5.11:1.0[introspection]
+ x11-libs/libX11
+ x11-libs/libxklavier
+ x11-libs/libXtst"
+# gsettings-desktop-schemas is needed for the 'toolkit-accessibility' key
+# pyatspi-2.1.90 needed to run caribou if pygobject:3 is installed
+# librsvg[gtk3] needed to load svg images in css styles
+RDEPEND="${COMMON_DEPEND}
+ dev-python/dbus-python
+ >=dev-python/pyatspi-2.1.90
+ gnome-base/gconf[introspection]
+ gnome-base/gsettings-desktop-schemas
+ gnome-base/librsvg[gtk3]
+ sys-apps/dbus"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.35.5
+ app-text/gnome-doc-utils"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+pkg_setup() {
+ gnome2-python_pkg_setup
+ G2CONF="${G2CONF}
+ --disable-static
+ --disable-schemas-compile
+ --disable-maintainer-mode
+ --enable-gtk3-module
+ --enable-gtk2-module
+ VALAC="
+ # vala is not needed for tarball builds, but configure checks for it...
+}
+
+src_prepare() {
+ # https://bugzilla.gnome.org/show_bug.cgi?id=657666
+ epatch "${FILESDIR}/${PN}-0.3.5-pygobject-3.patch"
+ # delete custom PYTHONPATH, useless on Gentoo and potential bug source
+ sed -e '/export PYTHONPATH=.*python/ d' \
+ -i bin/{antler-keyboard,caribou,caribou-preferences}.in ||
+ die "sed failed"
+
+ gnome2-python_src_prepare
+}
+
+src_install() {
+ gnome2-python_src_install
+ python_convert_shebangs -r 2 "${ED}"
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ python_mod_optimize caribou
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+ python_mod_cleanup caribou
+}
diff --git a/app-accessibility/caribou/files/caribou-0.3.5-pygobject-3.patch b/app-accessibility/caribou/files/caribou-0.3.5-pygobject-3.patch
new file mode 100644
index 0000000..39f25c4
--- /dev/null
+++ b/app-accessibility/caribou/files/caribou-0.3.5-pygobject-3.patch
@@ -0,0 +1,304 @@
+From fc6795b711e8449a2bbeaa69bebda02e77bc84fe Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Mon, 29 Aug 2011 23:05:11 -0400
+Subject: [PATCH] Use GLib, GObject from gi.repository instead of glib,
+ gobject
+
+Use GLib and GObject from gi.repository instead of glib and gobject
+modules for compatibility with pygobject-3.0. Otherwise, when running on
+a system with pygobject-2.0 and pygobject-3.0 installed, caribou-preferences
+fails with
+
+ImportError: could not import gobject (error was: ImportError('When
+using gi.repository you must not import static modules like "gobject".
+Please change all occurrences of "import gobject" to "from gi.repository
+import GObject".',))
+
+https://bugzilla.gnome.org/show_bug.cgi?id=657666
+---
+ bin/antler-keyboard.in | 2 +-
+ bin/caribou-preferences.in | 2 +-
+ caribou/antler/keyboard_view.py | 18 +++++++++---------
+ caribou/antler/main.py | 7 +++----
+ caribou/antler/window.py | 14 +++++++-------
+ caribou/settings/preferences_window.py | 6 +++---
+ caribou/settings/setting_types.py | 27 +++++++++++++--------------
+ 7 files changed, 37 insertions(+), 39 deletions(-)
+
+diff --git a/bin/antler-keyboard.in b/bin/antler-keyboard.in
+index 1b0c450..ce64128 100755
+--- a/bin/antler-keyboard.in
++++ b/bin/antler-keyboard.in
+@@ -25,7 +25,7 @@ exec_prefix=@exec_prefix@
+
+ if [ $script_dir == "@libexecdir@" ]
+ then
+- datadir="$(@PYTHON@ -c "import glib; print ':'.join(glib.get_system_data_dirs())")"
++ datadir="$(@PYTHON@ -c "from gi.repository import GLib; print ':'.join(GLib.get_system_data_dirs())")"
+ export PYTHONPATH="${prefix}/lib/python@PYTHON_VERSION@/site-packages${PYTHONPATH:+:$PYTHONPATH}"
+ export GI_TYPELIB_PATH="@libdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
+ export LD_LIBRARY_PATH="@libdir@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+diff --git a/bin/caribou-preferences.in b/bin/caribou-preferences.in
+index 6aae29e..57772e7 100755
+--- a/bin/caribou-preferences.in
++++ b/bin/caribou-preferences.in
+@@ -25,7 +25,7 @@ exec_prefix=@exec_prefix@
+
+ if [ $script_dir == "@bindir@" ]
+ then
+- datadir="$(@PYTHON@ -c "import glib; print ':'.join(glib.get_system_data_dirs())")"
++ datadir="$(@PYTHON@ -c "from gi.repository import GLib; print ':'.join(GLib.get_system_data_dirs())")"
+ export PYTHONPATH="@prefix@/lib/python@PYTHON_VERSION@/site-packages${PYTHONPATH:+:$PYTHONPATH}"
+ export GI_TYPELIB_PATH="@libdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
+ export LD_LIBRARY_PATH="@libdir@${LD_LIBRARY_PATH:+:LD_LIBRARY_PATH}"
+diff --git a/caribou/antler/keyboard_view.py b/caribou/antler/keyboard_view.py
+index 3e09d94..350be91 100644
+--- a/caribou/antler/keyboard_view.py
++++ b/caribou/antler/keyboard_view.py
+@@ -3,9 +3,9 @@ from caribou.settings import CaribouSettings
+ from antler_settings import AntlerSettings
+ from gi.repository import Gtk
+ from gi.repository import Gdk
++from gi.repository import GObject
++from gi.repository import GLib
+ from gi.repository import Caribou
+-import gobject
+-import glib
+ import os
+ from math import ceil
+
+@@ -30,7 +30,7 @@ PRETTY_LABELS = {
+
+ class AntlerKey(Gtk.Button):
+ def __init__(self, key, spacing=0):
+- gobject.GObject.__init__(self)
++ GObject.GObject.__init__(self)
+ self.caribou_key = key.weak_ref()
+ self.set_label(self._get_key_label())
+ self._spacing = spacing
+@@ -71,7 +71,7 @@ class AntlerKey(Gtk.Button):
+ if not unichar.isspace() and unichar != u'\x00':
+ label = unichar
+
+- return "<b>%s</b>" % glib.markup_escape_text(label.encode('utf-8'))
++ return "<b>%s</b>" % GLib.markup_escape_text(label.encode('utf-8'))
+
+ def _caribou_key_pressed (self, key, _key):
+ self.set_state_flags(Gtk.StateFlags.ACTIVE, False)
+@@ -106,7 +106,7 @@ class AntlerKey(Gtk.Button):
+
+ class AntlerSubLevel(Gtk.Window):
+ def __init__(self, key):
+- gobject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
++ GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
+
+ self.set_decorated(False)
+ self.set_resizable(False)
+@@ -138,7 +138,7 @@ class AntlerLayout(Gtk.Box):
+ KEY_SPAN = 4
+
+ def __init__(self, level=None, spacing=6):
+- gobject.GObject.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
++ GObject.GObject.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
+ self.set_spacing(12)
+ self._columns = []
+ self._keys_map = {}
+@@ -243,7 +243,7 @@ class AntlerLayout(Gtk.Box):
+
+ class AntlerKeyboardView(Gtk.Notebook):
+ def __init__(self, keyboard_type):
+- gobject.GObject.__init__(self)
++ GObject.GObject.__init__(self)
+ settings = AntlerSettings()
+ self.set_show_tabs(False)
+
+@@ -253,7 +253,7 @@ class AntlerKeyboardView(Gtk.Notebook):
+ self._app_css_provider = Gtk.CssProvider()
+ self._load_style(
+ self._app_css_provider, "style.css",
+- [glib.get_user_data_dir()] + list(glib.get_system_data_dirs()))
++ [GLib.get_user_data_dir()] + list(GLib.get_system_data_dirs()))
+
+ if not use_system.value:
+ Gtk.StyleContext.add_provider_for_screen(
+@@ -262,7 +262,7 @@ class AntlerKeyboardView(Gtk.Notebook):
+
+ self._user_css_provider = Gtk.CssProvider()
+ self._load_style(self._user_css_provider, "user-style.css",
+- [glib.get_user_data_dir()])
++ [GLib.get_user_data_dir()])
+ Gtk.StyleContext.add_provider_for_screen(
+ Gdk.Screen.get_default(), self._user_css_provider,
+ Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + 1)
+diff --git a/caribou/antler/main.py b/caribou/antler/main.py
+index 6bd3932..fab1c60 100644
+--- a/caribou/antler/main.py
++++ b/caribou/antler/main.py
+@@ -1,17 +1,16 @@
+-from gi.repository import Caribou
++from gi.repository import Caribou, GObject
+ from window import AntlerWindowEntry
+ from keyboard_view import AntlerKeyboardView
+-import gobject
+ import sys
+
+ class AntlerKeyboardService(Caribou.KeyboardService):
+ def __init__(self):
+- gobject.GObject.__init__(self)
++ GObject.GObject.__init__(self)
+ self.register_keyboard("Antler")
+ self.window = AntlerWindowEntry(AntlerKeyboardView)
+
+ def run(self):
+- loop = gobject.MainLoop()
++ loop = GObject.MainLoop()
+ loop.run()
+
+ def do_show(self, timestamp):
+diff --git a/caribou/antler/window.py b/caribou/antler/window.py
+index a72203e..f7c5fa5 100644
+--- a/caribou/antler/window.py
++++ b/caribou/antler/window.py
+@@ -22,24 +22,24 @@
+
+ from gi.repository import Gtk
+ from gi.repository import Gdk
++from gi.repository import GObject
+ from gi.repository import Clutter
+ from antler_settings import AntlerSettings
+ from math import sqrt
+ import os
+ import sys
+-import gobject
+
+ Clutter.init("antler")
+
+
+ class AnimatedWindowBase(Gtk.Window, Clutter.Animatable):
+ __gproperties__ = {
+- 'antler-window-position' : (gobject.TYPE_PYOBJECT, 'Window position',
++ 'antler-window-position' : (GObject.TYPE_PYOBJECT, 'Window position',
+ 'Window position in X, Y coordinates',
+- gobject.PARAM_READWRITE)
++ GObject.PARAM_READWRITE)
+ }
+ def __init__(self):
+- gobject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
++ GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
+ # animation
+ self._stage = Clutter.Stage.get_default()
+ self._move_animation = None
+@@ -71,7 +71,7 @@ class AnimatedWindowBase(Gtk.Window, Clutter.Animatable):
+ return True
+ if prop_name == "opacity":
+ opacity = initial_value + ((final_value - initial_value) * progress)
+- gobject.idle_add(lambda: self.set_opacity(opacity))
++ GObject.idle_add(lambda: self.set_opacity(opacity))
+
+ return True
+ else:
+@@ -132,9 +132,9 @@ class ProximityWindowBase(AnimatedWindowBase):
+ self.min_alpha = min_alpha
+ if self.max_alpha != self.min_alpha:
+ if self._poll_tid == 0:
+- self._poll_tid = gobject.timeout_add(100, self._proximity_check)
++ self._poll_tid = GObject.timeout_add(100, self._proximity_check)
+ elif self._poll_tid != 0:
+- gobject.source_remove(self._poll_tid)
++ GObject.source_remove(self._poll_tid)
+
+ def _onmapped(self, obj, event, settings):
+ if self.is_composited():
+diff --git a/caribou/settings/preferences_window.py b/caribou/settings/preferences_window.py
+index 55f9fca..541ecb5 100644
+--- a/caribou/settings/preferences_window.py
++++ b/caribou/settings/preferences_window.py
+@@ -20,7 +20,7 @@
+
+ from caribou.settings.setting_types import *
+
+-import gobject
++from gi.repository import GObject
+ from gi.repository import Gdk
+ from gi.repository import Gtk
+
+@@ -230,7 +230,7 @@ class PreferencesDialog(Gtk.Dialog, AbstractPreferencesUI):
+ __gtype_name__ = "PreferencesDialog"
+
+ def __init__(self, settings_manager):
+- gobject.GObject.__init__(self)
++ GObject.GObject.__init__(self)
+ self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
+ self.set_border_width(6)
+ self.set_title(settings_manager.groups.label)
+@@ -243,7 +243,7 @@ class PreferencesWindow(Gtk.Window, AbstractPreferencesUI):
+ __gtype_name__ = "PreferencesWindow"
+
+ def __init__(self, settings_manager):
+- gobject.GObject.__init__(self)
++ GObject.GObject.__init__(self)
+ self.set_border_width(6)
+ self.set_title(settings_manager.groups.label)
+
+diff --git a/caribou/settings/setting_types.py b/caribou/settings/setting_types.py
+index 66fb0f0..c4af2a6 100644
+--- a/caribou/settings/setting_types.py
++++ b/caribou/settings/setting_types.py
+@@ -1,5 +1,4 @@
+-import gobject
+-from gi.repository import GLib
++from gi.repository import GLib, GObject
+
+ ENTRY_DEFAULT=0
+ ENTRY_COMBO=1
+@@ -10,17 +9,17 @@ ENTRY_SLIDER=5
+ ENTRY_CHECKBOX=6
+ ENTRY_RADIO=7
+
+-class Setting(gobject.GObject):
++class Setting(GObject.GObject):
+ __gsignals__ = {'value-changed' :
+- (gobject.SIGNAL_RUN_FIRST,
+- gobject.TYPE_NONE,
+- (gobject.TYPE_PYOBJECT,)),
++ (GObject.SIGNAL_RUN_FIRST,
++ GObject.TYPE_NONE,
++ (GObject.TYPE_PYOBJECT,)),
+ 'sensitivity-changed' :
+- (gobject.SIGNAL_RUN_FIRST,
+- gobject.TYPE_NONE,
+- (gobject.TYPE_BOOLEAN,))}
++ (GObject.SIGNAL_RUN_FIRST,
++ GObject.TYPE_NONE,
++ (GObject.TYPE_BOOLEAN,))}
+ def __init__(self, name, label, children=[]):
+- gobject.GObject.__init__(self)
++ GObject.GObject.__init__(self)
+ self.name = name
+ self.label = label
+ self.children = children
+@@ -129,8 +128,8 @@ class IntegerSetting(ValueSetting):
+ variant_type = 'i'
+ entry_type = ENTRY_SPIN
+ def __init__(self, *args, **kwargs):
+- self.min = kwargs.pop('min', gobject.G_MININT)
+- self.max = kwargs.pop('max', gobject.G_MAXINT)
++ self.min = kwargs.pop('min', GObject.G_MININT)
++ self.max = kwargs.pop('max', GObject.G_MAXINT)
+ ValueSetting.__init__(self, *args, **kwargs)
+
+ def convert_value(self, val):
+@@ -140,8 +139,8 @@ class FloatSetting(ValueSetting):
+ variant_type = 'd'
+ entry_type = ENTRY_SPIN
+ def __init__(self, *args, **kwargs):
+- self.min = kwargs.pop('min', gobject.G_MINFLOAT)
+- self.max = kwargs.pop('max', gobject.G_MAXFLOAT)
++ self.min = kwargs.pop('min', GObject.G_MINFLOAT)
++ self.max = kwargs.pop('max', GObject.G_MAXFLOAT)
+ ValueSetting.__init__(self, *args, **kwargs)
+
+ def convert_value(self, val):
+--
+1.7.6.1
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/gnome:gnome-next commit in: app-accessibility/caribou/, app-accessibility/caribou/files/
@ 2011-09-11 9:13 Alexandre Restovtsev
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Restovtsev @ 2011-09-11 9:13 UTC (permalink / raw
To: gentoo-commits
commit: 25a9cc63c7bfdf74097a333a5ee33d771521fae6
Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Sun Sep 11 08:09:27 2011 +0000
Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Sun Sep 11 08:09:27 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=25a9cc63
app-accessibility/caribou: 0.3.5 → 0.3.91
Version bump. Patch was applied upstream. Update dependencies and slot
libgee.
---
...{caribou-0.3.5.ebuild => caribou-0.3.91.ebuild} | 8 +-
.../caribou/files/caribou-0.3.5-pygobject-3.patch | 304 --------------------
2 files changed, 3 insertions(+), 309 deletions(-)
diff --git a/app-accessibility/caribou/caribou-0.3.5.ebuild b/app-accessibility/caribou/caribou-0.3.91.ebuild
similarity index 90%
rename from app-accessibility/caribou/caribou-0.3.5.ebuild
rename to app-accessibility/caribou/caribou-0.3.91.ebuild
index c6adf1b..d46c1fc 100644
--- a/app-accessibility/caribou/caribou-0.3.5.ebuild
+++ b/app-accessibility/caribou/caribou-0.3.91.ebuild
@@ -11,7 +11,7 @@ PYTHON_USE_WITH="xml"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
-inherit eutils gnome2-python
+inherit gnome2-python
DESCRIPTION="Input assistive technology intended for switch and pointer users"
HOMEPAGE="https://live.gnome.org/Caribou"
@@ -21,11 +21,11 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
-COMMON_DEPEND=">=dev-python/pygobject-2.27.92:2[introspection]
+COMMON_DEPEND=">=dev-python/pygobject-2.90.3:3
>=x11-libs/gtk+-3.0.0:3[introspection]
x11-libs/gtk+:2
>=dev-libs/gobject-introspection-0.10.7
- dev-libs/libgee
+ dev-libs/libgee:0
dev-libs/libxml2
>=media-libs/clutter-1.5.11:1.0[introspection]
x11-libs/libX11
@@ -61,8 +61,6 @@ pkg_setup() {
}
src_prepare() {
- # https://bugzilla.gnome.org/show_bug.cgi?id=657666
- epatch "${FILESDIR}/${PN}-0.3.5-pygobject-3.patch"
# delete custom PYTHONPATH, useless on Gentoo and potential bug source
sed -e '/export PYTHONPATH=.*python/ d' \
-i bin/{antler-keyboard,caribou,caribou-preferences}.in ||
diff --git a/app-accessibility/caribou/files/caribou-0.3.5-pygobject-3.patch b/app-accessibility/caribou/files/caribou-0.3.5-pygobject-3.patch
deleted file mode 100644
index 39f25c4..0000000
--- a/app-accessibility/caribou/files/caribou-0.3.5-pygobject-3.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-From fc6795b711e8449a2bbeaa69bebda02e77bc84fe Mon Sep 17 00:00:00 2001
-From: Alexandre Rostovtsev <tetromino@gmail.com>
-Date: Mon, 29 Aug 2011 23:05:11 -0400
-Subject: [PATCH] Use GLib, GObject from gi.repository instead of glib,
- gobject
-
-Use GLib and GObject from gi.repository instead of glib and gobject
-modules for compatibility with pygobject-3.0. Otherwise, when running on
-a system with pygobject-2.0 and pygobject-3.0 installed, caribou-preferences
-fails with
-
-ImportError: could not import gobject (error was: ImportError('When
-using gi.repository you must not import static modules like "gobject".
-Please change all occurrences of "import gobject" to "from gi.repository
-import GObject".',))
-
-https://bugzilla.gnome.org/show_bug.cgi?id=657666
----
- bin/antler-keyboard.in | 2 +-
- bin/caribou-preferences.in | 2 +-
- caribou/antler/keyboard_view.py | 18 +++++++++---------
- caribou/antler/main.py | 7 +++----
- caribou/antler/window.py | 14 +++++++-------
- caribou/settings/preferences_window.py | 6 +++---
- caribou/settings/setting_types.py | 27 +++++++++++++--------------
- 7 files changed, 37 insertions(+), 39 deletions(-)
-
-diff --git a/bin/antler-keyboard.in b/bin/antler-keyboard.in
-index 1b0c450..ce64128 100755
---- a/bin/antler-keyboard.in
-+++ b/bin/antler-keyboard.in
-@@ -25,7 +25,7 @@ exec_prefix=@exec_prefix@
-
- if [ $script_dir == "@libexecdir@" ]
- then
-- datadir="$(@PYTHON@ -c "import glib; print ':'.join(glib.get_system_data_dirs())")"
-+ datadir="$(@PYTHON@ -c "from gi.repository import GLib; print ':'.join(GLib.get_system_data_dirs())")"
- export PYTHONPATH="${prefix}/lib/python@PYTHON_VERSION@/site-packages${PYTHONPATH:+:$PYTHONPATH}"
- export GI_TYPELIB_PATH="@libdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
- export LD_LIBRARY_PATH="@libdir@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
-diff --git a/bin/caribou-preferences.in b/bin/caribou-preferences.in
-index 6aae29e..57772e7 100755
---- a/bin/caribou-preferences.in
-+++ b/bin/caribou-preferences.in
-@@ -25,7 +25,7 @@ exec_prefix=@exec_prefix@
-
- if [ $script_dir == "@bindir@" ]
- then
-- datadir="$(@PYTHON@ -c "import glib; print ':'.join(glib.get_system_data_dirs())")"
-+ datadir="$(@PYTHON@ -c "from gi.repository import GLib; print ':'.join(GLib.get_system_data_dirs())")"
- export PYTHONPATH="@prefix@/lib/python@PYTHON_VERSION@/site-packages${PYTHONPATH:+:$PYTHONPATH}"
- export GI_TYPELIB_PATH="@libdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
- export LD_LIBRARY_PATH="@libdir@${LD_LIBRARY_PATH:+:LD_LIBRARY_PATH}"
-diff --git a/caribou/antler/keyboard_view.py b/caribou/antler/keyboard_view.py
-index 3e09d94..350be91 100644
---- a/caribou/antler/keyboard_view.py
-+++ b/caribou/antler/keyboard_view.py
-@@ -3,9 +3,9 @@ from caribou.settings import CaribouSettings
- from antler_settings import AntlerSettings
- from gi.repository import Gtk
- from gi.repository import Gdk
-+from gi.repository import GObject
-+from gi.repository import GLib
- from gi.repository import Caribou
--import gobject
--import glib
- import os
- from math import ceil
-
-@@ -30,7 +30,7 @@ PRETTY_LABELS = {
-
- class AntlerKey(Gtk.Button):
- def __init__(self, key, spacing=0):
-- gobject.GObject.__init__(self)
-+ GObject.GObject.__init__(self)
- self.caribou_key = key.weak_ref()
- self.set_label(self._get_key_label())
- self._spacing = spacing
-@@ -71,7 +71,7 @@ class AntlerKey(Gtk.Button):
- if not unichar.isspace() and unichar != u'\x00':
- label = unichar
-
-- return "<b>%s</b>" % glib.markup_escape_text(label.encode('utf-8'))
-+ return "<b>%s</b>" % GLib.markup_escape_text(label.encode('utf-8'))
-
- def _caribou_key_pressed (self, key, _key):
- self.set_state_flags(Gtk.StateFlags.ACTIVE, False)
-@@ -106,7 +106,7 @@ class AntlerKey(Gtk.Button):
-
- class AntlerSubLevel(Gtk.Window):
- def __init__(self, key):
-- gobject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
-+ GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
-
- self.set_decorated(False)
- self.set_resizable(False)
-@@ -138,7 +138,7 @@ class AntlerLayout(Gtk.Box):
- KEY_SPAN = 4
-
- def __init__(self, level=None, spacing=6):
-- gobject.GObject.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
-+ GObject.GObject.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
- self.set_spacing(12)
- self._columns = []
- self._keys_map = {}
-@@ -243,7 +243,7 @@ class AntlerLayout(Gtk.Box):
-
- class AntlerKeyboardView(Gtk.Notebook):
- def __init__(self, keyboard_type):
-- gobject.GObject.__init__(self)
-+ GObject.GObject.__init__(self)
- settings = AntlerSettings()
- self.set_show_tabs(False)
-
-@@ -253,7 +253,7 @@ class AntlerKeyboardView(Gtk.Notebook):
- self._app_css_provider = Gtk.CssProvider()
- self._load_style(
- self._app_css_provider, "style.css",
-- [glib.get_user_data_dir()] + list(glib.get_system_data_dirs()))
-+ [GLib.get_user_data_dir()] + list(GLib.get_system_data_dirs()))
-
- if not use_system.value:
- Gtk.StyleContext.add_provider_for_screen(
-@@ -262,7 +262,7 @@ class AntlerKeyboardView(Gtk.Notebook):
-
- self._user_css_provider = Gtk.CssProvider()
- self._load_style(self._user_css_provider, "user-style.css",
-- [glib.get_user_data_dir()])
-+ [GLib.get_user_data_dir()])
- Gtk.StyleContext.add_provider_for_screen(
- Gdk.Screen.get_default(), self._user_css_provider,
- Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION + 1)
-diff --git a/caribou/antler/main.py b/caribou/antler/main.py
-index 6bd3932..fab1c60 100644
---- a/caribou/antler/main.py
-+++ b/caribou/antler/main.py
-@@ -1,17 +1,16 @@
--from gi.repository import Caribou
-+from gi.repository import Caribou, GObject
- from window import AntlerWindowEntry
- from keyboard_view import AntlerKeyboardView
--import gobject
- import sys
-
- class AntlerKeyboardService(Caribou.KeyboardService):
- def __init__(self):
-- gobject.GObject.__init__(self)
-+ GObject.GObject.__init__(self)
- self.register_keyboard("Antler")
- self.window = AntlerWindowEntry(AntlerKeyboardView)
-
- def run(self):
-- loop = gobject.MainLoop()
-+ loop = GObject.MainLoop()
- loop.run()
-
- def do_show(self, timestamp):
-diff --git a/caribou/antler/window.py b/caribou/antler/window.py
-index a72203e..f7c5fa5 100644
---- a/caribou/antler/window.py
-+++ b/caribou/antler/window.py
-@@ -22,24 +22,24 @@
-
- from gi.repository import Gtk
- from gi.repository import Gdk
-+from gi.repository import GObject
- from gi.repository import Clutter
- from antler_settings import AntlerSettings
- from math import sqrt
- import os
- import sys
--import gobject
-
- Clutter.init("antler")
-
-
- class AnimatedWindowBase(Gtk.Window, Clutter.Animatable):
- __gproperties__ = {
-- 'antler-window-position' : (gobject.TYPE_PYOBJECT, 'Window position',
-+ 'antler-window-position' : (GObject.TYPE_PYOBJECT, 'Window position',
- 'Window position in X, Y coordinates',
-- gobject.PARAM_READWRITE)
-+ GObject.PARAM_READWRITE)
- }
- def __init__(self):
-- gobject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
-+ GObject.GObject.__init__(self, type=Gtk.WindowType.POPUP)
- # animation
- self._stage = Clutter.Stage.get_default()
- self._move_animation = None
-@@ -71,7 +71,7 @@ class AnimatedWindowBase(Gtk.Window, Clutter.Animatable):
- return True
- if prop_name == "opacity":
- opacity = initial_value + ((final_value - initial_value) * progress)
-- gobject.idle_add(lambda: self.set_opacity(opacity))
-+ GObject.idle_add(lambda: self.set_opacity(opacity))
-
- return True
- else:
-@@ -132,9 +132,9 @@ class ProximityWindowBase(AnimatedWindowBase):
- self.min_alpha = min_alpha
- if self.max_alpha != self.min_alpha:
- if self._poll_tid == 0:
-- self._poll_tid = gobject.timeout_add(100, self._proximity_check)
-+ self._poll_tid = GObject.timeout_add(100, self._proximity_check)
- elif self._poll_tid != 0:
-- gobject.source_remove(self._poll_tid)
-+ GObject.source_remove(self._poll_tid)
-
- def _onmapped(self, obj, event, settings):
- if self.is_composited():
-diff --git a/caribou/settings/preferences_window.py b/caribou/settings/preferences_window.py
-index 55f9fca..541ecb5 100644
---- a/caribou/settings/preferences_window.py
-+++ b/caribou/settings/preferences_window.py
-@@ -20,7 +20,7 @@
-
- from caribou.settings.setting_types import *
-
--import gobject
-+from gi.repository import GObject
- from gi.repository import Gdk
- from gi.repository import Gtk
-
-@@ -230,7 +230,7 @@ class PreferencesDialog(Gtk.Dialog, AbstractPreferencesUI):
- __gtype_name__ = "PreferencesDialog"
-
- def __init__(self, settings_manager):
-- gobject.GObject.__init__(self)
-+ GObject.GObject.__init__(self)
- self.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
- self.set_border_width(6)
- self.set_title(settings_manager.groups.label)
-@@ -243,7 +243,7 @@ class PreferencesWindow(Gtk.Window, AbstractPreferencesUI):
- __gtype_name__ = "PreferencesWindow"
-
- def __init__(self, settings_manager):
-- gobject.GObject.__init__(self)
-+ GObject.GObject.__init__(self)
- self.set_border_width(6)
- self.set_title(settings_manager.groups.label)
-
-diff --git a/caribou/settings/setting_types.py b/caribou/settings/setting_types.py
-index 66fb0f0..c4af2a6 100644
---- a/caribou/settings/setting_types.py
-+++ b/caribou/settings/setting_types.py
-@@ -1,5 +1,4 @@
--import gobject
--from gi.repository import GLib
-+from gi.repository import GLib, GObject
-
- ENTRY_DEFAULT=0
- ENTRY_COMBO=1
-@@ -10,17 +9,17 @@ ENTRY_SLIDER=5
- ENTRY_CHECKBOX=6
- ENTRY_RADIO=7
-
--class Setting(gobject.GObject):
-+class Setting(GObject.GObject):
- __gsignals__ = {'value-changed' :
-- (gobject.SIGNAL_RUN_FIRST,
-- gobject.TYPE_NONE,
-- (gobject.TYPE_PYOBJECT,)),
-+ (GObject.SIGNAL_RUN_FIRST,
-+ GObject.TYPE_NONE,
-+ (GObject.TYPE_PYOBJECT,)),
- 'sensitivity-changed' :
-- (gobject.SIGNAL_RUN_FIRST,
-- gobject.TYPE_NONE,
-- (gobject.TYPE_BOOLEAN,))}
-+ (GObject.SIGNAL_RUN_FIRST,
-+ GObject.TYPE_NONE,
-+ (GObject.TYPE_BOOLEAN,))}
- def __init__(self, name, label, children=[]):
-- gobject.GObject.__init__(self)
-+ GObject.GObject.__init__(self)
- self.name = name
- self.label = label
- self.children = children
-@@ -129,8 +128,8 @@ class IntegerSetting(ValueSetting):
- variant_type = 'i'
- entry_type = ENTRY_SPIN
- def __init__(self, *args, **kwargs):
-- self.min = kwargs.pop('min', gobject.G_MININT)
-- self.max = kwargs.pop('max', gobject.G_MAXINT)
-+ self.min = kwargs.pop('min', GObject.G_MININT)
-+ self.max = kwargs.pop('max', GObject.G_MAXINT)
- ValueSetting.__init__(self, *args, **kwargs)
-
- def convert_value(self, val):
-@@ -140,8 +139,8 @@ class FloatSetting(ValueSetting):
- variant_type = 'd'
- entry_type = ENTRY_SPIN
- def __init__(self, *args, **kwargs):
-- self.min = kwargs.pop('min', gobject.G_MINFLOAT)
-- self.max = kwargs.pop('max', gobject.G_MAXFLOAT)
-+ self.min = kwargs.pop('min', GObject.G_MINFLOAT)
-+ self.max = kwargs.pop('max', GObject.G_MAXFLOAT)
- ValueSetting.__init__(self, *args, **kwargs)
-
- def convert_value(self, val):
---
-1.7.6.1
-
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-11 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-11 9:13 [gentoo-commits] proj/gnome:gnome-next commit in: app-accessibility/caribou/, app-accessibility/caribou/files/ Alexandre Restovtsev
-- strict thread matches above, loose matches on Subject: below --
2011-08-30 5:37 Alexandre Restovtsev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox