summaryrefslogtreecommitdiff
path: root/gi/overrides
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:45:08 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:45:11 +0900
commitacd1a4731ee2dfd6bc09e0449094bc738ac6f939 (patch)
tree6ddf79b53514c06de41ff52247c080f6db49b03f /gi/overrides
parent55e9ab1b728021859bb9ef5d5f27049c530d880e (diff)
downloadpygobject2-acd1a4731ee2dfd6bc09e0449094bc738ac6f939.tar.gz
pygobject2-acd1a4731ee2dfd6bc09e0449094bc738ac6f939.tar.bz2
pygobject2-acd1a4731ee2dfd6bc09e0449094bc738ac6f939.zip
Imported Upstream version 3.2.1
Change-Id: I4de394b259e3dd06791eb9dfe3684a30dfeef7aa Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/overrides')
-rw-r--r--gi/overrides/Gio.py4
-rw-r--r--gi/overrides/Gtk.py40
-rw-r--r--gi/overrides/Makefile.am10
-rw-r--r--gi/overrides/Makefile.in33
4 files changed, 58 insertions, 29 deletions
diff --git a/gi/overrides/Gio.py b/gi/overrides/Gio.py
index 20adf0c..28d6e3c 100644
--- a/gi/overrides/Gio.py
+++ b/gi/overrides/Gio.py
@@ -51,8 +51,8 @@ __all__.append('FileEnumerator')
class Settings(Gio.Settings):
'''Provide dictionary-like access to GLib.Settings.'''
- def __init__(self, schema, path=None, backend=None):
- Gio.Settings.__init__(self, schema=schema, backend=backend, path=path)
+ def __init__(self, schema, path=None, backend=None, **kwargs):
+ Gio.Settings.__init__(self, schema=schema, backend=backend, path=path, **kwargs)
def __contains__(self, key):
return key in self.list_keys()
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 4018b32..aba5a73 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -327,8 +327,8 @@ __all__.append('SizeGroup')
class MenuItem(Gtk.MenuItem):
- def __init__(self, label=None):
- super(MenuItem, self).__init__(label=label)
+ def __init__(self, label=None, **kwds):
+ super(MenuItem, self).__init__(label=label, **kwds)
MenuItem = override(MenuItem)
__all__.append('MenuItem')
@@ -387,8 +387,8 @@ __all__.append('Builder')
# NOTE: This must come before any other Window/Dialog subclassing, to ensure
# that we have a correct inheritance hierarchy.
class Window(Gtk.Window):
- def __init__(self, type=Gtk.WindowType.TOPLEVEL, **kwargs):
- Gtk.Window.__init__(self, type=type, **kwargs)
+ def __init__(self, type=Gtk.WindowType.TOPLEVEL, **kwds):
+ Gtk.Window.__init__(self, type=type, **kwds)
Window = override(Window)
__all__.append('Window')
@@ -552,8 +552,8 @@ __all__.append('RecentChooserDialog')
class IconView(Gtk.IconView):
- def __init__(self, model=None):
- Gtk.IconView.__init__(self, model=model)
+ def __init__(self, model=None, **kwds):
+ Gtk.IconView.__init__(self, model=model, **kwds)
def get_item_at_pos(self, x, y):
success, path, cell = super(IconView, self).get_item_at_pos(x, y)
@@ -576,8 +576,8 @@ __all__.append('IconView')
class ToolButton(Gtk.ToolButton):
- def __init__(self, stock_id=None):
- Gtk.ToolButton.__init__(self, stock_id=stock_id)
+ def __init__(self, stock_id=None, **kwds):
+ Gtk.ToolButton.__init__(self, stock_id=stock_id, **kwds)
ToolButton = override(ToolButton)
__all__.append('ToolButton')
@@ -783,6 +783,12 @@ class TreeModel(Gtk.TreeModel):
if success:
return next_iter
+ def iter_previous(self, aiter):
+ prev_iter = aiter.copy()
+ success = super(TreeModel, self).iter_previous(prev_iter)
+ if success:
+ return prev_iter
+
def iter_children(self, aiter):
success, child_iter = super(TreeModel, self).iter_children(aiter)
if success:
@@ -1429,15 +1435,15 @@ __all__.append('ScrolledWindow')
class HScrollbar(Gtk.HScrollbar):
- def __init__(self, adjustment=None):
- Gtk.HScrollbar.__init__(self, adjustment=adjustment)
+ def __init__(self, adjustment=None, **kwds):
+ Gtk.HScrollbar.__init__(self, adjustment=adjustment, **kwds)
HScrollbar = override(HScrollbar)
__all__.append('HScrollbar')
class VScrollbar(Gtk.VScrollbar):
- def __init__(self, adjustment=None):
- Gtk.VScrollbar.__init__(self, adjustment=adjustment)
+ def __init__(self, adjustment=None, **kwds):
+ Gtk.VScrollbar.__init__(self, adjustment=adjustment, **kwds)
VScrollbar = override(VScrollbar)
__all__.append('VScrollbar')
@@ -1454,9 +1460,10 @@ __all__.append('Paned')
class Arrow(Gtk.Arrow):
- def __init__(self, arrow_type, shadow_type):
+ def __init__(self, arrow_type, shadow_type, **kwds):
Gtk.Arrow.__init__(self, arrow_type=arrow_type,
- shadow_type=shadow_type)
+ shadow_type=shadow_type,
+ **kwds)
Arrow = override(Arrow)
__all__.append('Arrow')
@@ -1475,9 +1482,10 @@ __all__.append('IconSet')
class Viewport(Gtk.Viewport):
- def __init__(self, hadjustment=None, vadjustment=None):
+ def __init__(self, hadjustment=None, vadjustment=None, **kwds):
Gtk.Viewport.__init__(self, hadjustment=hadjustment,
- vadjustment=vadjustment)
+ vadjustment=vadjustment,
+ **kwds)
Viewport = override(Viewport)
__all__.append('Viewport')
diff --git a/gi/overrides/Makefile.am b/gi/overrides/Makefile.am
index 2657eb3..5d9ddd6 100644
--- a/gi/overrides/Makefile.am
+++ b/gi/overrides/Makefile.am
@@ -10,5 +10,15 @@ pygioverrides_PYTHON = \
keysyms.py \
__init__.py
+# if we build in a separate tree, we need to symlink the *.py files from the
+# source tree; Python does not accept the extensions and modules in different
+# paths
+build_pylinks:
+ for f in $(pygioverrides_PYTHON); do \
+ [ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
+ done
+
+all-local: build_pylinks
+check-local: build_pylinks
-include $(top_srcdir)/git.mk
diff --git a/gi/overrides/Makefile.in b/gi/overrides/Makefile.in
index 38d09fe..78626f5 100644
--- a/gi/overrides/Makefile.in
+++ b/gi/overrides/Makefile.in
@@ -147,7 +147,6 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
@@ -192,7 +191,6 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
@@ -225,6 +223,7 @@ libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -367,8 +366,9 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
check: check-am
-all-am: Makefile
+all-am: Makefile all-local
installdirs:
for dir in "$(DESTDIR)$(pygioverridesdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -469,15 +469,15 @@ ps-am:
uninstall-am: uninstall-pygioverridesPYTHON
-.MAKE: install-am install-strip
+.MAKE: check-am install-am install-strip
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am \
+.PHONY: all all-am all-local check check-am check-local clean \
+ clean-generic clean-libtool distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-pygioverridesPYTHON install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
@@ -485,6 +485,17 @@ uninstall-am: uninstall-pygioverridesPYTHON
uninstall-pygioverridesPYTHON
+# if we build in a separate tree, we need to symlink the *.py files from the
+# source tree; Python does not accept the extensions and modules in different
+# paths
+build_pylinks:
+ for f in $(pygioverrides_PYTHON); do \
+ [ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
+ done
+
+all-local: build_pylinks
+check-local: build_pylinks
+
-include $(top_srcdir)/git.mk
# Tell versions [3.59,3.63) of GNU make to not export all variables.