Added shorcuts to most common actions in GUI elements
This commit is contained in:
parent
c73703f618
commit
4df86aa8a4
@ -24,25 +24,25 @@ class spellCheckerDialog(wx.Dialog):
|
||||
super(spellCheckerDialog, self).__init__(None, 1)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
word = wx.StaticText(panel, -1, _(u"Misspelled word"))
|
||||
word = wx.StaticText(panel, -1, _(u"&Misspelled word"))
|
||||
self.word = wx.TextCtrl(panel, -1)
|
||||
wordBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
wordBox.Add(word, 0, wx.ALL, 5)
|
||||
wordBox.Add(self.word, 0, wx.ALL, 5)
|
||||
context = wx.StaticText(panel, -1, _(u"Context"))
|
||||
context = wx.StaticText(panel, -1, _(u"Con&text"))
|
||||
self.context = wx.TextCtrl(panel, -1)
|
||||
contextBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
contextBox.Add(context, 0, wx.ALL, 5)
|
||||
contextBox.Add(self.context, 0, wx.ALL, 5)
|
||||
suggest = wx.StaticText(panel, -1, _(u"Suggestions"))
|
||||
suggest = wx.StaticText(panel, -1, _(u"&Suggestions"))
|
||||
self.suggestions = wx.ListBox(panel, -1, choices=[], style=wx.LB_SINGLE)
|
||||
suggestionsBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
suggestionsBox.Add(suggest, 0, wx.ALL, 5)
|
||||
suggestionsBox.Add(self.suggestions, 0, wx.ALL, 5)
|
||||
self.ignore = wx.Button(panel, -1, _(u"Ignore"))
|
||||
self.ignoreAll = wx.Button(panel, -1, _(u"Ignore all"))
|
||||
self.replace = wx.Button(panel, -1, _(u"Replace"))
|
||||
self.replaceAll = wx.Button(panel, -1, _(u"Replace all"))
|
||||
self.ignore = wx.Button(panel, -1, _(u"&Ignore"))
|
||||
self.ignoreAll = wx.Button(panel, -1, _(u"Ignore &all"))
|
||||
self.replace = wx.Button(panel, -1, _(u"&Replace"))
|
||||
self.replaceAll = wx.Button(panel, -1, _(u"Replace a&ll"))
|
||||
close = wx.Button(panel, wx.ID_CANCEL)
|
||||
btnBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
btnBox.Add(self.ignore, 0, wx.ALL, 5)
|
||||
|
@ -25,10 +25,10 @@ class translateDialog(widgetUtils.BaseDialog):
|
||||
super(translateDialog, self).__init__(None, -1, title=_(u"Translate message"))
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
staticSource = wx.StaticText(panel, -1, _(u"Source language"))
|
||||
staticSource = wx.StaticText(panel, -1, _(u"&Source language"))
|
||||
self.source_lang = wx.ComboBox(panel, -1, choices=[x[1] for x in translator.available_languages()], style = wx.CB_READONLY)
|
||||
self.source_lang.SetFocus()
|
||||
staticDest = wx.StaticText(panel, -1, _(u"Target language"))
|
||||
staticDest = wx.StaticText(panel, -1, _(u"&Target language"))
|
||||
self.source_lang.SetSelection(0)
|
||||
self.dest_lang = wx.ComboBox(panel, -1, choices=[x[1] for x in translator.available_languages()], style = wx.CB_READONLY)
|
||||
listSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
@ -9,9 +9,9 @@ class newSessionDialog(widgetUtils.BaseDialog):
|
||||
def __init__(self):
|
||||
super(newSessionDialog, self).__init__(parent=None, id=wx.NewId(), title=_(u"Authorise VK"))
|
||||
panel = wx.Panel(self)
|
||||
lbl1 = wx.StaticText(panel, -1, _(u"Email address"))
|
||||
lbl1 = wx.StaticText(panel, -1, _(u"&Email address"))
|
||||
self.email = wx.TextCtrl(panel, -1)
|
||||
lbl2 = wx.StaticText(panel, -1, _(u"Password"))
|
||||
lbl2 = wx.StaticText(panel, -1, _(u"&Password"))
|
||||
self.passw = wx.TextCtrl(panel, -1, style=wx.TE_PASSWORD)
|
||||
sizer = wx.BoxSizer()
|
||||
b1 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
@ -16,7 +16,7 @@ class textMessage(widgetUtils.BaseDialog):
|
||||
self.textBox.Add(self.text, 0, wx.ALL, 5)
|
||||
|
||||
def create_privacy_box(self):
|
||||
lbl = wx.StaticText(self.panel, wx.NewId(), _(u"Privacy"))
|
||||
lbl = wx.StaticText(self.panel, wx.NewId(), _(u"&Privacy"))
|
||||
self.privacy = wx.ComboBox(self.panel, wx.NewId(), choices=[_(u"All users"), _(u"Friends of friends"),], value=_(u"All users"), style=wx.CB_READONLY)
|
||||
self.privacyBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.privacyBox.Add(lbl, 0, wx.ALL, 5)
|
||||
@ -58,10 +58,10 @@ class post(textMessage):
|
||||
self.mainBox.Add(self.textBox, 0, wx.ALL, 5)
|
||||
self.create_privacy_box()
|
||||
self.mainBox.Add(self.privacyBox, 0, wx.ALL, 5)
|
||||
self.upload_image = wx.Button(self.panel, -1, _(u"Upload a picture"), size=wx.DefaultSize)
|
||||
self.upload_image = wx.Button(self.panel, -1, _(u"Upload a &picture"), size=wx.DefaultSize)
|
||||
self.upload_image.Enable(False)
|
||||
self.spellcheck = wx.Button(self.panel, -1, _("Spelling correction"), size=wx.DefaultSize)
|
||||
self.translateButton = wx.Button(self.panel, -1, _(u"Translate message"), size=wx.DefaultSize)
|
||||
self.spellcheck = wx.Button(self.panel, -1, _("Spelling &correction"), size=wx.DefaultSize)
|
||||
self.translateButton = wx.Button(self.panel, -1, _(u"&Translate message"), size=wx.DefaultSize)
|
||||
self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), size=wx.DefaultSize)
|
||||
self.okButton.SetDefault()
|
||||
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _(u"Close"), size=wx.DefaultSize)
|
||||
|
@ -108,40 +108,40 @@ class audio(widgetUtils.BaseDialog):
|
||||
super(audio, self).__init__(parent=None, *args, **kwargs)
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
lbl_list = wx.StaticText(panel, wx.NewId(), _(u"Audio files"))
|
||||
lbl_list = wx.StaticText(panel, wx.NewId(), _(u"Audio &files"))
|
||||
self.list = wx.ListBox(panel, wx.NewId())
|
||||
listS = wx.BoxSizer(wx.HORIZONTAL)
|
||||
listS.Add(lbl_list, 0, wx.ALL, 5)
|
||||
listS.Add(self.list, 0, wx.ALL, 5)
|
||||
sizer.Add(listS, 0, wx.ALL, 5)
|
||||
lbl_title = wx.StaticText(panel, wx.NewId(), _(u"Title"))
|
||||
lbl_title = wx.StaticText(panel, wx.NewId(), _(u"&Title"))
|
||||
self.title = wx.TextCtrl(panel, wx.NewId(), size=(413, -1), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
titleBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
titleBox.Add(lbl_title, 0, wx.ALL, 5)
|
||||
titleBox.Add(self.title, 0, wx.ALL, 5)
|
||||
sizer.Add(titleBox, 0, wx.ALL, 5)
|
||||
lbl_artist = wx.StaticText(panel, wx.NewId(), _(u"Artist"))
|
||||
lbl_artist = wx.StaticText(panel, wx.NewId(), _(u"&Artist"))
|
||||
self.artist = wx.TextCtrl(panel, wx.NewId(), size=(413, -1), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
artistBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
artistBox.Add(lbl_artist, 0, wx.ALL, 5)
|
||||
artistBox.Add(self.artist, 0, wx.ALL, 5)
|
||||
sizer.Add(artistBox, 0, wx.ALL, 5)
|
||||
lbl_duration = wx.StaticText(panel, wx.NewId(), _(u"Duration"))
|
||||
lbl_duration = wx.StaticText(panel, wx.NewId(), _(u"&Duration"))
|
||||
self.duration = wx.TextCtrl(panel, wx.NewId(), size=(413, -1), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
durationBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
durationBox.Add(lbl_duration, 0, wx.ALL, 5)
|
||||
durationBox.Add(self.duration, 0, wx.ALL, 5)
|
||||
sizer.Add(durationBox, 0, wx.ALL, 5)
|
||||
lbl_lyrics = wx.StaticText(panel, wx.NewId(), _(u"Lyric"))
|
||||
lbl_lyrics = wx.StaticText(panel, wx.NewId(), _(u"&Lyric"))
|
||||
self.lyric = wx.TextCtrl(panel, wx.NewId(), size=(500, 500), style=wx.TE_READONLY|wx.TE_MULTILINE)
|
||||
lbox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
lbox.Add(lbl_lyrics, 0, wx.ALL, 5)
|
||||
lbox.Add(self.lyric, 0, wx.ALL, 5)
|
||||
sizer.Add(lbox, 0, wx.ALL, 5)
|
||||
self.play = wx.Button(panel, wx.NewId(), _(u"Play"))
|
||||
self.download = wx.Button(panel, wx.NewId(), _(u"Download"))
|
||||
self.add = wx.Button(panel, wx.NewId(), _(u"Add to your library"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _(u"Remove from your library"))
|
||||
self.play = wx.Button(panel, wx.NewId(), _(u"&Play"))
|
||||
self.download = wx.Button(panel, wx.NewId(), _(u"&Download"))
|
||||
self.add = wx.Button(panel, wx.NewId(), _(u"&Add to your library"))
|
||||
self.remove = wx.Button(panel, wx.NewId(), _(u"&Remove from your library"))
|
||||
self.add.Enable(False)
|
||||
self.remove.Enable(False)
|
||||
close = wx.Button(panel, wx.ID_CANCEL)
|
||||
|
@ -6,7 +6,7 @@ from pubsub import pub
|
||||
class homeTab(wx.Panel):
|
||||
|
||||
def create_list(self):
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Posts"))
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Po&sts"))
|
||||
self.list = widgetUtils.list(self, *[_(u"User"), _(u"Text"), _(u"Date")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 80)
|
||||
self.list.set_windows_size(1, 190)
|
||||
@ -15,7 +15,7 @@ class homeTab(wx.Panel):
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.post = wx.Button(self, -1, _(u"Post"))
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
|
||||
@ -49,7 +49,7 @@ class feedTab(homeTab):
|
||||
|
||||
class audioTab(homeTab):
|
||||
def create_list(self):
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Music"))
|
||||
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Mu&sic"))
|
||||
self.list = widgetUtils.list(self, *[_(u"Title"), _(u"Artist"), _(u"Duration")], style=wx.LC_REPORT)
|
||||
self.list.set_windows_size(0, 80)
|
||||
self.list.set_windows_size(1, 190)
|
||||
@ -58,9 +58,9 @@ class audioTab(homeTab):
|
||||
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
|
||||
|
||||
def create_post_buttons(self):
|
||||
self.post = wx.Button(self, -1, _(u"Post"))
|
||||
self.play = wx.Button(self, -1, _(u"Play"))
|
||||
self.play_all = wx.Button(self, -1, _(u"Play All"))
|
||||
self.post = wx.Button(self, -1, _(u"&Post"))
|
||||
self.play = wx.Button(self, -1, _(u"P&lay"))
|
||||
self.play_all = wx.Button(self, -1, _(u"Play &All"))
|
||||
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.postBox.Add(self.post, 0, wx.ALL, 5)
|
||||
self.postBox.Add(self.play, 0, wx.ALL, 5)
|
||||
|
Loading…
Reference in New Issue
Block a user