Package list xapp / 3e41eb9
pygobject/XApp.py: simplify and add an explanation as to why this file is here (to remind me in a year.) Michael Webster 4 years ago
1 changed file(s) with 14 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
00 from gi.overrides import override
11 from gi.importer import modules
2
3 """
4 The only purpose of this file is to ensure the XApp widget GType is registered
5 at the time of import. Otherwise any user of XApp.GtkWindow would have to create
6 a dummy widget prior to using a GtkBuilder to parse a ui file containing an
7 XAppGtkWindow.
8
9 The gi import machinery sweeps usr/lib/python*/dist-packages/gi/overrides for file
10 matching the module name at the time of execution.
11
12 This file needs to be in both python2 and python3 overrides locations.
13
14 """
215
316 XApp = modules['XApp']._introspection_module
417
518 __all__ = []
619
720 class GtkWindow(XApp.GtkWindow):
8
9 def __init__(self, *args, **kwargs):
10 XApp.GtkWindow.__init__(self, *args, **kwargs)
21 pass
1122
1223 GtkWindow = override(GtkWindow)
1324 __all__.append('GtkWindow')