get rid of bad map() calls

This commit is contained in:
Daniel Pavel 2013-05-06 17:51:03 +02:00
parent f0d250ff15
commit 8d5ca66db7
3 changed files with 7 additions and 4 deletions

View File

@ -59,7 +59,8 @@ class _ThreadedHandle(object):
handles, self._handles = self._handles, [] handles, self._handles = self._handles, []
if _log.isEnabledFor(_DEBUG): if _log.isEnabledFor(_DEBUG):
_log.debug("%s closing %s", repr(self), handles) _log.debug("%s closing %s", repr(self), handles)
map(_base.close, handles) for h in handles:
_base.close(h)
@property @property
def notifications_hook(self): def notifications_hook(self):

View File

@ -110,9 +110,11 @@ def _run(args):
from gi.repository import Gtk from gi.repository import Gtk
Gtk.main() Gtk.main()
map(ReceiverListener.stop, listeners.values()) for l in listeners.values():
l.stop()
ui.notify.uninit() ui.notify.uninit()
map(ReceiverListener.join, listeners.values()) for l in listeners.values():
l.join()
def main(): def main():

View File

@ -359,7 +359,7 @@ def toggle_all(status_icon):
if not _windows: if not _windows:
return return
visible = [w.get_visible() for w in _windows.values()] visible = (w.get_visible() for w in _windows.values())
if all(visible): if all(visible):
for w in _windows.values(): for w in _windows.values():
_hide(w) _hide(w)