2 new commits in RapidSettings: https://bitbucket.org/nvdaaddonteam/rapidsettings/commits/1377332260da/ Changeset: 1377332260da Branch: None User: ABuffEr Date: 2014-02-27 23:11:59 Summary: Implemented function to use space to change a setting value Affected #: 1 file diff --git a/addon/globalPlugins/rapidSettings/__init__.py b/addon/globalPlugins/rapidSettings/__init__.py index ae4c5a4..4d74400 100644 --- a/addon/globalPlugins/rapidSettings/__init__.py +++ b/addon/globalPlugins/rapidSettings/__init__.py @@ -109,7 +109,8 @@ class SettingsTree(wx.TreeCtrl): if name is not None and self.find in name.lower(): treeSubItem = self.AppendItem(treeItem, name) self.Bind(wx.EVT_TREE_SEL_CHANGED, self.onSelectedItem) - self.Bind(wx.EVT_KEY_UP, self.onKeyPress) + self.Bind(wx.EVT_KEY_DOWN, self.onSpacePress) + self.Bind(wx.EVT_KEY_UP, self.onExit) # associate tree item with relative control self.SetPyData(treeSubItem, child) @@ -128,7 +129,16 @@ class SettingsTree(wx.TreeCtrl): wxControl = self.GetPyData(item) self.GetParent().enableItem(wxControl) - def onKeyPress(self, event): + def onSpacePress(self, event): + """Call cycleItem in SettingsTreeDialog, control associated with tree item as parameter""" + if event.GetKeyCode() == wx.WXK_SPACE: + item = self.GetSelection() + wxControl = self.GetPyData(item) + self.GetParent().cycleItem(wxControl) + else: + event.Skip() + + def onExit(self, event): """Invoke Destroy method of parent if you press escape""" if event.GetKeyCode() == wx.WXK_ESCAPE: self.GetParent().Destroy() @@ -347,7 +357,7 @@ class SettingsTreeDialog(SettingsDialog): item.SetSelection(self.combo.GetSelection()) # force phantom combobox to process its event method, # useful for language and variant comboboxes in voice section - item.Command(event) + item.GetEventHandler().ProcessEvent(event) # request a update to relative tree item self.tree.updateLabel(self.combo.GetLabel()) elif item.ClassName == u'wxTextCtrl': @@ -367,6 +377,39 @@ class SettingsTreeDialog(SettingsDialog): item.SetValue(self.slider.GetValue()) self.tree.updateLabel(str(self.slider.GetValue()), suffix='%') + def cycleItem(self, item): + if item.ClassName == u'wxChoice': + nextSelection = self.combo.GetSelection()+1 + if nextSelection == len(self.combo.GetItems()): + nextSelection = 0 + self.combo.SetSelection(nextSelection) + # entire life is a workaround... + event = wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED) + event.SetInt(self.combo.GetSelection()) + self.onItemChange(event, item) + elif item.ClassName == u'wxTextCtrl': + if not self.edit.GetValue().isdigit(): + self.edit.SetFocus() + else: + nextValue = int(self.edit.GetValue())+1 + self.edit.SetValue(str(nextValue)) + # except for combobox, event is not really necessary + self.onItemChange(None, item) + elif item.ClassName == u'wxCheckBox': + if self.rb1.GetValue(): + self.rb1.SetValue(False) + self.rb2.SetValue(True) + else: + self.rb1.SetValue(True) + self.rb2.SetValue(False) + self.onItemChange(None, item) + if item.ClassName == u'wxSlider': + nextValue = self.slider.GetValue()+1 + if nextValue == self.slider.GetMax()+1: + nextValue = 0 + self.slider.SetValue(nextValue) + self.onItemChange(None, item) + def onOk(self, event): """Call onOk(event) on phantom dialog instance, if this exists, and the same on superclass""" if ins is not None and "wxPyDeadObject" not in str(ins.__class__): https://bitbucket.org/nvdaaddonteam/rapidsettings/commits/c4e7eacf05ed/ Changeset: c4e7eacf05ed Branch: master User: ABuffEr Date: 2014-02-27 23:13:59 Summary: Updated readme files Affected #: 2 files diff --git a/addon/doc/it/readme.md b/addon/doc/it/readme.md index b87f012..6a14ba7 100644 --- a/addon/doc/it/readme.md +++ b/addon/doc/it/readme.md @@ -4,11 +4,11 @@ Questo add-on fornisce un accesso veloce a tutte le impostazioni di NVDA, raggruppando tutte le categorie delle impostazioni in una struttura ad albero, e permettendoti di ricercare fra di esse quando si dimentica dov'è una specifica opzione. -Inoltre, il titolo della finestra ti dà informazioni sull'attuale profilo di configurazione attivo (configurazione normale, o altro, se lo hai creato). +Inoltre, il titolo della finestra ti dà informazioni sugli attuali profili di configurazione attivi. ## Utilizzo ## -Premi semplicemente NVDA+O e naviga nell'albero, espandendo la sezione delle impostazioni desiderata. Quando vuoi cambiare un valore di un'impostazione, premi tab e modifica il valore nella combobox, editbox, e così via. +Premi semplicemente NVDA+O e naviga nell'albero, espandendo la sezione delle impostazioni desiderata. Quando vuoi cambiare un valore di un'impostazione, premi tab e modifica il valore nella combobox, editbox, e così via, oppure premi direttamente spazio sull'elemento dell'albero se vuoi ciclare fra i possibili valori o incrementare il valore attuale (se numerico). Puoi anche cercare in tutte le impostazioni, usando l'apposito campo prima dell'albero; per ripristinare l'albero originale dopo una ricerca, premi semplicemente invio nel campo di ricerca. @@ -16,6 +16,7 @@ Puoi anche cercare in tutte le impostazioni, usando l'apposito campo prima dell' * NVDA+O (tutti i layout): apre la finestra principale. * Invio (nel campo di ricerca): ripristina l'albero originale delle impostazioni. +* Spazio (su un elemento dell'albero): cicla fra i possibili valori dell'impostazione, o incrementa il valore attuale (se numerico). ## Cambiamenti per 1.0 ## diff --git a/readme.md b/readme.md index 937b665..2ff2cb6 100644 --- a/readme.md +++ b/readme.md @@ -4,18 +4,19 @@ This add-on provides a quick access to all NVDA settings, grouping all settings categories in a tree structure, and lets you to search among them when you forget where is a specific option. -Furthermore, the window title gives you information about the current active configuration profile (normal configuration, or other, if you created it). +Furthermore, the window title gives you information about the current active configuration profiles. ## Usage ## -Simply press NVDA+O and navigate in the tree, expanding your desired section of settings. When you want to change a setting value, press tab and modify the value in the combobox, editbox, and so on. +Simply press NVDA+O and navigate in the tree, expanding your desired section of settings. When you want to change a setting value, press tab and modify the value in the combobox, editbox, and so on, or press space directly on the tree item if you want to cycle through possible values or to increment the current value (if numeric). You can also search in all settings, using the specific field before the tree; to restore the original tree after a research, simply press enter key in search field. ## Key commands ## -* NVDA+o (all layouts): open main window. +* NVDA+O (all layouts): open main window. * Enter (in search field): restore original settings tree. +* Space (on a tree item): cycle through possible values of the setting, or increment the current value (if numeric). ## Changes for 1.0 ## Repository URL: https://bitbucket.org/nvdaaddonteam/rapidsettings/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.