Added shorcuts to most common actions in GUI elements

This commit is contained in:
2016-03-22 11:21:35 -06:00
parent c73703f618
commit 4df86aa8a4
6 changed files with 30 additions and 30 deletions

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)