Commit 28225373 authored by Dan Pascu's avatar Dan Pascu

Renamed variable to better reflect what it is

parent 8546f805
...@@ -2212,12 +2212,12 @@ class AudioSessionListView(QListView): ...@@ -2212,12 +2212,12 @@ class AudioSessionListView(QListView):
self.context_menu.hide() self.context_menu.hide()
def keyPressEvent(self, event): def keyPressEvent(self, event):
digit = event.text() char = event.text()
if digit and digit in string.digits+string.uppercase+'#*': if char and char in string.digits+string.uppercase+'#*':
letter_map = {'2': 'ABC', '3': 'DEF', '4': 'GHI', '5': 'JKL', '6': 'MNO', '7': 'PQRS', '8': 'TUV', '9': 'WXYZ'} letter_map = {'2': 'ABC', '3': 'DEF', '4': 'GHI', '5': 'JKL', '6': 'MNO', '7': 'PQRS', '8': 'TUV', '9': 'WXYZ'}
letter_map = dict(chain(*(izip(letters, repeat(digit)) for digit, letters in letter_map.iteritems()))) letter_map = dict(chain(*(izip(letters, repeat(char)) for char, letters in letter_map.iteritems())))
for session in (s for s in self.model().sessions if s.active): for session in (s for s in self.model().sessions if s.active):
session.send_dtmf(letter_map.get(digit, digit)) session.send_dtmf(letter_map.get(char, char))
elif event.key() in (Qt.Key_Up, Qt.Key_Down): elif event.key() in (Qt.Key_Up, Qt.Key_Down):
selection_model = self.selectionModel() selection_model = self.selectionModel()
current_index = selection_model.currentIndex() current_index = selection_model.currentIndex()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment