# HG changeset patch # User sqwishy # Date 1515281920 28800 # Sat Jan 06 15:38:40 2018 -0800 # Node ID 71a4c853b7883045901d6db888cc7e26131201a0 # Parent fac3f13d58adb2ade31c989362d390622b63ca29 connecting clear history button diff --git a/winrustler/ui/history.py b/winrustler/ui/history.py --- a/winrustler/ui/history.py +++ b/winrustler/ui/history.py @@ -57,7 +57,7 @@ self.winset = winset self.menu = menu self.separator = self.menu.addSeparator() - self.menu.addAction("&Clear") + self.menu.addAction("&Clear", self.clear_and_save) self.data = [] self.actions = {} # Maps data to actions? self.winset.tell_and_connect(self._refresh_engagement) @@ -98,7 +98,7 @@ def clear(self): while self.data: - self.menu.remove.removeAction(self.actions.pop(self.data.pop())) + self.menu.removeAction(self.actions.pop(self.data.pop())) @pyqtSlot(object) @show_exceptions diff --git a/winrustler/ui/widgets/tray.py b/winrustler/ui/widgets/tray.py --- a/winrustler/ui/widgets/tray.py +++ b/winrustler/ui/widgets/tray.py @@ -51,7 +51,9 @@ self.rustle_act = self.menu.addAction(self.rustle_icon, '&Rustle...', self.show_window) self.history_act = self.menu.addAction(self.alligator_icon, '&History') self.about_act = self.menu.addAction(self.about_icon, '&About...', self._about) + self.about_act.setMenuRole(QAction.AboutRole) self.exit_act = self.menu.addAction(self.exit_icon, '&Exit', self._exit) + self.about_act.setMenuRole(QAction.QuitRole) self.history_feature = history_feature self.history_act.setMenu(self.history_feature.menu)