diff options
author | jerous <jerous@gmail.com> | 2008-11-16 14:17:40 +0100 |
---|---|---|
committer | jerous <jerous@gmail.com> | 2008-11-16 14:17:40 +0100 |
commit | 5dd321b46784ed695f96d0a37b1a8628f210b873 (patch) | |
tree | 823657ced517889d8952394ed8b722038720b217 /plugins/Shortcuts.py | |
parent | e0f52b88b86b142be9c4f605ba815d6453297b9a (diff) |
Shortcuts: toggle main-window
Diffstat (limited to 'plugins/Shortcuts.py')
-rw-r--r-- | plugins/Shortcuts.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/Shortcuts.py b/plugins/Shortcuts.py index e43731f..baa462f 100644 --- a/plugins/Shortcuts.py +++ b/plugins/Shortcuts.py @@ -25,6 +25,7 @@ class pluginShortcuts(Plugin): ['playnext', QtCore.Qt.META+QtCore.Qt.Key_Right, monty.next], ['playprevious', QtCore.Qt.META+QtCore.Qt.Key_Left, monty.previous], ['showosd', QtCore.Qt.META+QtCore.Qt.Key_O, self.showOSD], + ['togglewin', QtCore.Qt.META+QtCore.Qt.Key_P, self.toggleWinMain], ] # Note: don't use any non-alphanumerics in the prefix, as else it won't work self.actionPrefix="shortcuts" @@ -64,6 +65,12 @@ class pluginShortcuts(Plugin): else: monty.resume() + def toggleWinMain(self, b): + w=self.getWinMain() + if w.isVisible(): + w.setVisible(False) + else: + w.setVisible(True) def _getSettings(self): txt=QtGui.QTextEdit() |