pylint fixes
This commit is contained in:
parent
ac1a58e8b3
commit
0deda2434d
|
@ -34,7 +34,8 @@ class Container(object):
|
|||
dbg('Container:: skipping signal %s for %s, already exists' % (
|
||||
signal['name'], widget))
|
||||
else:
|
||||
dbg('Container:: registering signal for %s on %s' % (signal['name'], widget))
|
||||
dbg('Container:: registering signal for %s on %s' %
|
||||
(signal['name'], widget))
|
||||
try:
|
||||
gobject.signal_new(signal['name'],
|
||||
widget,
|
||||
|
@ -52,7 +53,7 @@ class Container(object):
|
|||
|
||||
if data is not None:
|
||||
self.cnxids[widget].append(widget.connect(signal, handler, data))
|
||||
dbg('Container::connect_child: registering %s(%s) to handle %s::%s' %
|
||||
dbg('Container::connect_child: connecting %s(%s) for %s::%s' %
|
||||
(handler.__name__, data, widget.__class__.__name__, signal))
|
||||
else:
|
||||
self.cnxids[widget].append(widget.connect(signal, handler))
|
||||
|
@ -71,15 +72,6 @@ class Container(object):
|
|||
"""Return a list of child widgets, if any"""
|
||||
return(self.children)
|
||||
|
||||
def get_top_window(self, startpoint):
|
||||
"""Return the Window instance this container belongs to"""
|
||||
widget = startpoint
|
||||
parent = widget.get_parent()
|
||||
while parent:
|
||||
widget = parent
|
||||
parent = widget.get_parent()
|
||||
return(widget)
|
||||
|
||||
def split_horiz(self, widget):
|
||||
"""Split this container horizontally"""
|
||||
return(self.split_axis(widget, True))
|
||||
|
|
|
@ -49,6 +49,14 @@ def has_ancestor(widget, wtype):
|
|||
return(True)
|
||||
return(False)
|
||||
|
||||
def get_top_window(widget):
|
||||
"""Return the Window instance a widget belongs to"""
|
||||
parent = widget.get_parent()
|
||||
while parent:
|
||||
widget = parent
|
||||
parent = widget.get_parent()
|
||||
return(widget)
|
||||
|
||||
def path_lookup(command):
|
||||
'''Find a command in our path'''
|
||||
if os.path.isabs(command):
|
||||
|
|
Loading…
Reference in New Issue