mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-26 09:59:23 +00:00
Added keyboard shortcuts for account and global settings dialogs
This commit is contained in:
@@ -12,49 +12,49 @@ class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
|
||||
super(generalAccount, self).__init__(parent)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
userAutocompletionBox = wx.StaticBox(self, label=_("User autocompletion settings"))
|
||||
self.userAutocompletionScan = wx.Button(self, wx.ID_ANY, _("Scan account and add followers and following users to the user autocompletion database"))
|
||||
self.userAutocompletionManage = wx.Button(self, wx.ID_ANY, _("Manage autocompletion database"))
|
||||
self.userAutocompletionScan = wx.Button(self, wx.ID_ANY, _("&Scan account and add followers and following users to the user autocompletion database"))
|
||||
self.userAutocompletionManage = wx.Button(self, wx.ID_ANY, _("&Manage autocompletion database"))
|
||||
autocompletionSizer = wx.StaticBoxSizer(userAutocompletionBox, wx.HORIZONTAL)
|
||||
autocompletionSizer.Add(self.userAutocompletionScan, 0, wx.ALL, 5)
|
||||
autocompletionSizer.Add(self.userAutocompletionManage, 0, wx.ALL, 5)
|
||||
sizer.Add(autocompletionSizer, 0, wx.ALL, 5)
|
||||
self.disable_streaming = wx.CheckBox(self, wx.ID_ANY, _("Disable Streaming API endpoints"))
|
||||
self.disable_streaming = wx.CheckBox(self, wx.ID_ANY, _("&Disable Streaming API endpoints"))
|
||||
sizer.Add(self.disable_streaming, 0, wx.ALL, 5)
|
||||
self.relative_time = wx.CheckBox(self, wx.ID_ANY, _("Relative timestamps"))
|
||||
self.relative_time = wx.CheckBox(self, wx.ID_ANY, _("&Relative timestamps"))
|
||||
sizer.Add(self.relative_time, 0, wx.ALL, 5)
|
||||
self.read_preferences_from_instance = wx.CheckBox(self, wx.ID_ANY, _("Read preferences from instance (default visibility when publishing and displaying sensitive content)"))
|
||||
self.read_preferences_from_instance = wx.CheckBox(self, wx.ID_ANY, _("R&ead preferences from instance (default visibility when publishing and displaying sensitive content)"))
|
||||
sizer.Add(self.read_preferences_from_instance, 0, wx.ALL, 5)
|
||||
itemsPerCallBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
itemsPerCallBox.Add(wx.StaticText(self, -1, _("Items on each API call")), 0, wx.ALL, 5)
|
||||
itemsPerCallBox.Add(wx.StaticText(self, -1, _("&Items on each API call")), 0, wx.ALL, 5)
|
||||
self.itemsPerApiCall = wx.SpinCtrl(self, wx.ID_ANY)
|
||||
self.itemsPerApiCall.SetRange(0, 40)
|
||||
self.itemsPerApiCall.SetSize(self.itemsPerApiCall.GetBestSize())
|
||||
itemsPerCallBox.Add(self.itemsPerApiCall, 0, wx.ALL, 5)
|
||||
sizer.Add(itemsPerCallBox, 0, wx.ALL, 5)
|
||||
self.reverse_timelines = wx.CheckBox(self, wx.ID_ANY, _("Inverted buffers: The newest items will be shown at the beginning while the oldest at the end"))
|
||||
self.reverse_timelines = wx.CheckBox(self, wx.ID_ANY, _("I&nverted buffers: The newest items will be shown at the beginning while the oldest at the end"))
|
||||
sizer.Add(self.reverse_timelines, 0, wx.ALL, 5)
|
||||
self.ask_before_boost = wx.CheckBox(self, wx.ID_ANY, _("Ask confirmation before boosting a post"))
|
||||
self.ask_before_boost = wx.CheckBox(self, wx.ID_ANY, _("&Ask confirmation before boosting a post"))
|
||||
sizer.Add(self.ask_before_boost, 0, wx.ALL, 5)
|
||||
self.show_screen_names = wx.CheckBox(self, wx.ID_ANY, _("Show screen names instead of full names"))
|
||||
self.show_screen_names = wx.CheckBox(self, wx.ID_ANY, _("S&how screen names instead of full names"))
|
||||
sizer.Add(self.show_screen_names, 0, wx.ALL, 5)
|
||||
self.hide_emojis = wx.CheckBox(self, wx.ID_ANY, _("hide emojis in usernames"))
|
||||
self.hide_emojis = wx.CheckBox(self, wx.ID_ANY, _("H&ide emojis in usernames"))
|
||||
sizer.Add(self.hide_emojis, 0, wx.ALL, 5)
|
||||
PersistSizeLabel = wx.StaticText(self, -1, _("Number of items per buffer to cache in database (0 to disable caching, blank for unlimited)"))
|
||||
PersistSizeLabel = wx.StaticText(self, -1, _("&Number of items per buffer to cache in database (0 to disable caching, blank for unlimited)"))
|
||||
self.persist_size = wx.TextCtrl(self, -1)
|
||||
sizer.Add(PersistSizeLabel, 0, wx.ALL, 5)
|
||||
sizer.Add(self.persist_size, 0, wx.ALL, 5)
|
||||
self.load_cache_in_memory = wx.CheckBox(self, wx.NewId(), _("Load cache for items in memory (much faster in big datasets but requires more RAM)"))
|
||||
self.load_cache_in_memory = wx.CheckBox(self, wx.NewId(), _("&Load cache for items in memory (much faster in big datasets but requires more RAM)"))
|
||||
self.SetSizer(sizer)
|
||||
|
||||
class templates(wx.Panel, baseDialog.BaseWXDialog):
|
||||
def __init__(self, parent, post_template, conversation_template, person_template):
|
||||
super(templates, self).__init__(parent)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.post = wx.Button(self, wx.ID_ANY, _("Edit template for posts. Current template: {}").format(post_template))
|
||||
self.post = wx.Button(self, wx.ID_ANY, _("Edit template for &posts. Current template: {}").format(post_template))
|
||||
sizer.Add(self.post, 0, wx.ALL, 5)
|
||||
self.conversation = wx.Button(self, wx.ID_ANY, _("Edit template for conversations. Current template: {}").format(conversation_template))
|
||||
self.conversation = wx.Button(self, wx.ID_ANY, _("Edit template for &conversations. Current template: {}").format(conversation_template))
|
||||
sizer.Add(self.conversation, 0, wx.ALL, 5)
|
||||
self.person = wx.Button(self, wx.ID_ANY, _("Edit template for persons. Current template: {}").format(person_template))
|
||||
self.person = wx.Button(self, wx.ID_ANY, _("Edit template for &persons. Current template: {}").format(person_template))
|
||||
sizer.Add(self.person, 0, wx.ALL, 5)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
@@ -62,7 +62,7 @@ class sound(wx.Panel):
|
||||
def __init__(self, parent, input_devices, output_devices, soundpacks):
|
||||
wx.Panel.__init__(self, parent)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
volume = wx.StaticText(self, -1, _(u"Volume"))
|
||||
volume = wx.StaticText(self, -1, _(u"&Volume"))
|
||||
self.volumeCtrl = wx.Slider(self)
|
||||
# Connect a key handler here to handle volume slider being inverted when moving with up and down arrows.
|
||||
# see https://github.com/manuelcortez/TWBlue/issues/261
|
||||
@@ -73,16 +73,16 @@ class sound(wx.Panel):
|
||||
volumeBox.Add(volume, 0, wx.ALL, 5)
|
||||
volumeBox.Add(self.volumeCtrl, 0, wx.ALL, 5)
|
||||
sizer.Add(volumeBox, 0, wx.ALL, 5)
|
||||
self.session_mute = wx.CheckBox(self, -1, _(u"Session mute"))
|
||||
self.session_mute = wx.CheckBox(self, -1, _(u"&Session mute"))
|
||||
sizer.Add(self.session_mute, 0, wx.ALL, 5)
|
||||
output_label = wx.StaticText(self, -1, _(u"Output device"))
|
||||
output_label = wx.StaticText(self, -1, _(u"&Output device"))
|
||||
self.output = wx.ComboBox(self, -1, choices=output_devices, style=wx.CB_READONLY)
|
||||
self.output.SetSize(self.output.GetBestSize())
|
||||
outputBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
outputBox.Add(output_label, 0, wx.ALL, 5)
|
||||
outputBox.Add(self.output, 0, wx.ALL, 5)
|
||||
sizer.Add(outputBox, 0, wx.ALL, 5)
|
||||
input_label = wx.StaticText(self, -1, _(u"Input device"))
|
||||
input_label = wx.StaticText(self, -1, _(u"&Input device"))
|
||||
self.input = wx.ComboBox(self, -1, choices=input_devices, style=wx.CB_READONLY)
|
||||
self.input.SetSize(self.input.GetBestSize())
|
||||
inputBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
@@ -90,15 +90,15 @@ class sound(wx.Panel):
|
||||
inputBox.Add(self.input, 0, wx.ALL, 5)
|
||||
sizer.Add(inputBox, 0, wx.ALL, 5)
|
||||
soundBox = wx.BoxSizer(wx.VERTICAL)
|
||||
soundpack_label = wx.StaticText(self, -1, _(u"Sound pack"))
|
||||
soundpack_label = wx.StaticText(self, -1, _(u"Sound &pack"))
|
||||
self.soundpack = wx.ComboBox(self, -1, choices=soundpacks, style=wx.CB_READONLY)
|
||||
self.soundpack.SetSize(self.soundpack.GetBestSize())
|
||||
soundBox.Add(soundpack_label, 0, wx.ALL, 5)
|
||||
soundBox.Add(self.soundpack, 0, wx.ALL, 5)
|
||||
sizer.Add(soundBox, 0, wx.ALL, 5)
|
||||
self.indicate_audio = wx.CheckBox(self, -1, _("Indicate audio or video in posts with sound"))
|
||||
self.indicate_audio = wx.CheckBox(self, -1, _("Indicate &audio or video in posts with sound"))
|
||||
sizer.Add(self.indicate_audio, 0, wx.ALL, 5)
|
||||
self.indicate_img = wx.CheckBox(self, -1, _("Indicate posts containing images with sound"))
|
||||
self.indicate_img = wx.CheckBox(self, -1, _("Indicate posts containing i&mages with sound"))
|
||||
sizer.Add(self.indicate_img, 0, wx.ALL, 5)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
@@ -121,7 +121,7 @@ class extrasPanel(wx.Panel):
|
||||
def __init__(self, parent, ocr_languages=[], translation_languages=[]):
|
||||
super(extrasPanel, self).__init__(parent)
|
||||
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
OCRBox = wx.StaticBox(self, label=_(u"Language for OCR"))
|
||||
OCRBox = wx.StaticBox(self, label=_(u"&Language for OCR"))
|
||||
self.ocr_lang = wx.ListBox(self, -1, choices=ocr_languages)
|
||||
self.ocr_lang.SetSize(self.ocr_lang.GetBestSize())
|
||||
ocrLanguageSizer = wx.StaticBoxSizer(OCRBox, wx.HORIZONTAL)
|
||||
@@ -167,9 +167,9 @@ class configurationDialog(baseDialog.BaseWXDialog):
|
||||
def realize(self):
|
||||
self.sizer.Add(self.notebook, 0, wx.ALL, 5)
|
||||
ok_cancel_box = wx.BoxSizer(wx.HORIZONTAL)
|
||||
ok = wx.Button(self.panel, wx.ID_OK, _(u"Save"))
|
||||
ok = wx.Button(self.panel, wx.ID_OK, _(u"&Save"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"))
|
||||
cancel = wx.Button(self.panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
self.SetEscapeId(cancel.GetId())
|
||||
ok_cancel_box.Add(ok, 0, wx.ALL, 5)
|
||||
ok_cancel_box.Add(cancel, 0, wx.ALL, 5)
|
||||
|
Reference in New Issue
Block a user