From 7b23b117b28cf911b7c56a77094206ae4383805e Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Tue, 1 Apr 2014 03:15:50 -0700 Subject: [PATCH] Add PREFS-EDIT topic to open preferences editor And clean up the edit_preferences docstring. Signed-off-by: Sean Robinson --- wifiradar/gui/g2/__init__.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/wifiradar/gui/g2/__init__.py b/wifiradar/gui/g2/__init__.py index f447b04..8b89b89 100644 --- a/wifiradar/gui/g2/__init__.py +++ b/wifiradar/gui/g2/__init__.py @@ -281,6 +281,8 @@ class RadarWindow: self.config = msg.details elif msg.topic == 'PROFILE-UPDATE': self.update_plist_items(msg.details) + elif msg.topic == 'PREFS-EDIT': + self.edit_preferences() else: logger.warning('unrecognized Message: "{}"'.format(msg)) @@ -419,18 +421,10 @@ class RadarWindow: about.run() about.destroy() - def edit_preferences(self, widget, data=None): - """ Init and run the preferences dialog - - Parameters: - - 'widget' -- gtk.Widget - The widget sending the event. - - 'data' -- tuple - list of arbitrary arguments (not used) - - Returns: - - nothing + def edit_preferences(self, widget=None, data=None): + """ Handle the life-cycle of the preferences dialog. :data:`widget` + is the widget sending the signal and :data:`data` is a list of + arbitrary arguments, both are ignored. """ # get raw strings from config file self.config.raw = True -- 2.11.4.GIT