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' % (
|
dbg('Container:: skipping signal %s for %s, already exists' % (
|
||||||
signal['name'], widget))
|
signal['name'], widget))
|
||||||
else:
|
else:
|
||||||
dbg('Container:: registering signal for %s on %s' % (signal['name'], widget))
|
dbg('Container:: registering signal for %s on %s' %
|
||||||
|
(signal['name'], widget))
|
||||||
try:
|
try:
|
||||||
gobject.signal_new(signal['name'],
|
gobject.signal_new(signal['name'],
|
||||||
widget,
|
widget,
|
||||||
|
@ -52,7 +53,7 @@ class Container(object):
|
||||||
|
|
||||||
if data is not None:
|
if data is not None:
|
||||||
self.cnxids[widget].append(widget.connect(signal, handler, data))
|
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))
|
(handler.__name__, data, widget.__class__.__name__, signal))
|
||||||
else:
|
else:
|
||||||
self.cnxids[widget].append(widget.connect(signal, handler))
|
self.cnxids[widget].append(widget.connect(signal, handler))
|
||||||
|
@ -71,15 +72,6 @@ class Container(object):
|
||||||
"""Return a list of child widgets, if any"""
|
"""Return a list of child widgets, if any"""
|
||||||
return(self.children)
|
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):
|
def split_horiz(self, widget):
|
||||||
"""Split this container horizontally"""
|
"""Split this container horizontally"""
|
||||||
return(self.split_axis(widget, True))
|
return(self.split_axis(widget, True))
|
||||||
|
|
|
@ -49,6 +49,14 @@ def has_ancestor(widget, wtype):
|
||||||
return(True)
|
return(True)
|
||||||
return(False)
|
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):
|
def path_lookup(command):
|
||||||
'''Find a command in our path'''
|
'''Find a command in our path'''
|
||||||
if os.path.isabs(command):
|
if os.path.isabs(command):
|
||||||
|
|
Loading…
Reference in New Issue