Merge pull request #4089 from jgkamat/jay/audible-tab-refactor
Move audible strings into class variables
This commit is contained in:
commit
d0412811d2
@ -54,6 +54,10 @@ class TabWidget(QTabWidget):
|
||||
tab_index_changed = pyqtSignal(int, int)
|
||||
new_tab_requested = pyqtSignal('QUrl', bool, bool)
|
||||
|
||||
# Strings for controlling the mute/audible text
|
||||
MUTE_STRING = '[M] '
|
||||
AUDIBLE_STRING = '[A] '
|
||||
|
||||
def __init__(self, win_id, parent=None):
|
||||
super().__init__(parent)
|
||||
bar = TabBar(win_id, self)
|
||||
@ -175,9 +179,9 @@ class TabWidget(QTabWidget):
|
||||
fields['private'] = ' [Private Mode] ' if tab.private else ''
|
||||
try:
|
||||
if tab.audio.is_muted():
|
||||
fields['audio'] = '[M] '
|
||||
fields['audio'] = TabWidget.MUTE_STRING
|
||||
elif tab.audio.is_recently_audible():
|
||||
fields['audio'] = '[A] '
|
||||
fields['audio'] = TabWidget.AUDIBLE_STRING
|
||||
else:
|
||||
fields['audio'] = ''
|
||||
except browsertab.WebTabError:
|
||||
|
Loading…
Reference in New Issue
Block a user