1
0
mirror of https://github.com/gryf/wicd.git synced 2026-02-23 10:35:51 +01:00

Update docstrings.

This commit is contained in:
Dan O'Reilly
2009-03-22 18:39:44 -04:00
parent 65c72ba3a2
commit d09344b329

View File

@@ -465,11 +465,9 @@ class TrayIcon(object):
def on_net_menu_activate(self, item): def on_net_menu_activate(self, item):
""" Trigger a background scan to populate the network menu. """ Trigger a background scan to populate the network menu.
Called when the network submenu is moused over. We Clear the network menu, and schedule a method to be
sleep briefly, clear pending gtk events, and if called in .8 seconds to trigger a scan if the menu
we're still being moused over we trigger a scan. is still being moused over.
This is to prevent scans when the user is just
mousing past the menu to select another menu item.
""" """
if self._is_scanning: if self._is_scanning:
@@ -480,6 +478,7 @@ class TrayIcon(object):
@catchdbus @catchdbus
def _trigger_scan_if_needed(self, item): def _trigger_scan_if_needed(self, item):
""" Trigger a scan if the network menu is being hovered over. """
while gtk.events_pending(): while gtk.events_pending():
gtk.main_iteration() gtk.main_iteration()
if item.state != gtk.STATE_PRELIGHT: if item.state != gtk.STATE_PRELIGHT: