mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Add hotkeys for some dialogs, making navigation much faster
This commit is contained in:
parent
da8009aea0
commit
c79e659b74
@ -35,4 +35,5 @@ Anibal Hernández
|
||||
Sussan Leiva
|
||||
Brian Hartgen
|
||||
PEDRO REINA COLOBON
|
||||
Moora-Moora Arrilla
|
||||
Moora-Moora Arrilla
|
||||
Blake Oliver
|
@ -68,20 +68,20 @@ class tweet(textLimited):
|
||||
self.mainBox = wx.BoxSizer(wx.VERTICAL)
|
||||
self.createTextArea(message, text)
|
||||
self.mainBox.Add(self.textBox, 0, wx.ALL, 5)
|
||||
self.long_tweet = wx.CheckBox(self.panel, -1, _(u"Long tweet"))
|
||||
self.long_tweet = wx.CheckBox(self.panel, -1, _(u"&Long tweet"))
|
||||
self.long_tweet.SetValue(True)
|
||||
self.upload_image = wx.Button(self.panel, -1, _(u"Upload image..."), size=wx.DefaultSize)
|
||||
self.spellcheck = wx.Button(self.panel, -1, _("Check spelling..."), size=wx.DefaultSize)
|
||||
self.attach = wx.Button(self.panel, -1, _(u"Attach audio..."), size=wx.DefaultSize)
|
||||
self.shortenButton = wx.Button(self.panel, -1, _(u"Shorten URL"), size=wx.DefaultSize)
|
||||
self.unshortenButton = wx.Button(self.panel, -1, _(u"Expand URL"), size=wx.DefaultSize)
|
||||
self.upload_image = wx.Button(self.panel, -1, _(u"&Upload image..."), size=wx.DefaultSize)
|
||||
self.spellcheck = wx.Button(self.panel, -1, _("Check &spelling..."), size=wx.DefaultSize)
|
||||
self.attach = wx.Button(self.panel, -1, _(u"&Attach audio..."), size=wx.DefaultSize)
|
||||
self.shortenButton = wx.Button(self.panel, -1, _(u"Sh&orten URL"), size=wx.DefaultSize)
|
||||
self.unshortenButton = wx.Button(self.panel, -1, _(u"&Expand URL"), size=wx.DefaultSize)
|
||||
self.shortenButton.Disable()
|
||||
self.unshortenButton.Disable()
|
||||
self.translateButton = wx.Button(self.panel, -1, _(u"Translate..."), size=wx.DefaultSize)
|
||||
self.translateButton = wx.Button(self.panel, -1, _(u"&Translate..."), size=wx.DefaultSize)
|
||||
self.autocompletionButton = wx.Button(self.panel, -1, _(u"&Autocomplete users"))
|
||||
self.okButton = wx.Button(self.panel, wx.ID_OK, _(u"Send"), 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)
|
||||
cancelButton = wx.Button(self.panel, wx.ID_CANCEL, _(u"&Close"), size=wx.DefaultSize)
|
||||
self.buttonsBox1 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
self.buttonsBox1.Add(self.upload_image, 0, wx.ALL, 10)
|
||||
self.buttonsBox1.Add(self.spellcheck, 0, wx.ALL, 10)
|
||||
|
@ -10,7 +10,7 @@ class searchDialog(baseDialog.BaseWXDialog):
|
||||
panel = wx.Panel(self)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetTitle(_(u"Search on Twitter"))
|
||||
label = wx.StaticText(panel, -1, _(u"Search"))
|
||||
label = wx.StaticText(panel, -1, _(u"&Search"))
|
||||
self.term = wx.TextCtrl(panel, -1, value)
|
||||
dc = wx.WindowDC(self.term)
|
||||
dc.SetFont(self.term.GetFont())
|
||||
@ -25,7 +25,7 @@ class searchDialog(baseDialog.BaseWXDialog):
|
||||
radioSizer.Add(self.tweets, 0, wx.ALL, 5)
|
||||
radioSizer.Add(self.users, 0, wx.ALL, 5)
|
||||
sizer.Add(radioSizer, 0, wx.ALL, 5)
|
||||
lang = wx.StaticText(panel, -1, _(u"Language for results: "))
|
||||
lang = wx.StaticText(panel, -1, _(u"&Language for results: "))
|
||||
langs = [x[1] for x in translator.translator.available_languages()]
|
||||
langs[:] = langs[1:]
|
||||
langs.insert(0, _(u"any"))
|
||||
@ -34,15 +34,15 @@ class searchDialog(baseDialog.BaseWXDialog):
|
||||
langBox.Add(lang, 0, wx.ALL, 5)
|
||||
langBox.Add(self.lang, 0, wx.ALL, 5)
|
||||
sizer.Add(langBox, 0, wx.ALL, 5)
|
||||
resulttype = wx.StaticText(panel, -1, _(U"Results type: "))
|
||||
resulttype = wx.StaticText(panel, -1, _(U"Results &type: "))
|
||||
self.resultstype = wx.ComboBox(panel, -1, choices=[_(u"Mixed"), _(u"Recent"), _(u"Popular")], value=_(u"Mixed"), style=wx.CB_READONLY)
|
||||
rBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
rBox.Add(resulttype, 0, wx.ALL, 5)
|
||||
rBox.Add(self.resultstype, 0, wx.ALL, 5)
|
||||
sizer.Add(rBox, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
|
@ -12,9 +12,9 @@ class showUserProfile(baseDialog.BaseWXDialog):
|
||||
self.text = wx.TextCtrl(panel, -1, style=wx.TE_MULTILINE|wx.TE_READONLY, size=(350, 250))
|
||||
self.text.SetFocus()
|
||||
sizer.Add(self.text, 0, wx.ALL|wx.EXPAND, 5)
|
||||
self.url = wx.Button(panel, -1, _(u"Go to URL"), size=wx.DefaultSize)
|
||||
self.url = wx.Button(panel, -1, _(u"&Go to URL"), size=wx.DefaultSize)
|
||||
self.url.Disable()
|
||||
close = wx.Button(panel, wx.ID_CANCEL, _(u"Close"))
|
||||
close = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
btnSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
btnSizer.Add(self.url, 0, wx.ALL, 5)
|
||||
btnSizer.Add(close, 0, wx.ALL, 5)
|
||||
|
@ -17,15 +17,15 @@ class trendingTopicsDialog(baseDialog.BaseWXDialog):
|
||||
radioSizer.Add(self.country, 0, wx.ALL, 5)
|
||||
radioSizer.Add(self.city, 0, wx.ALL, 5)
|
||||
sizer.Add(radioSizer, 0, wx.ALL, 5)
|
||||
label = wx.StaticText(panel, -1, _(u"Location"))
|
||||
label = wx.StaticText(panel, -1, _(u"&Location"))
|
||||
self.location = wx.ListBox(panel, -1, choices=[], style=wx.CB_READONLY)
|
||||
locationBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
locationBox.Add(label, 0, wx.ALL, 5)
|
||||
locationBox.Add(self.location, 0, wx.ALL, 5)
|
||||
sizer.Add(locationBox, 0, wx.ALL, 5)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok, 0, wx.ALL, 5)
|
||||
btnsizer.Add(cancel, 0, wx.ALL, 5)
|
||||
|
@ -7,32 +7,32 @@ class updateProfileDialog(baseDialog.BaseWXDialog):
|
||||
super(updateProfileDialog, self).__init__(parent=None, id=-1)
|
||||
self.SetTitle(_(u"Update your profile"))
|
||||
panel = wx.Panel(self)
|
||||
labelName = wx.StaticText(panel, -1, _(u"Name (20 characters maximum)"))
|
||||
labelName = wx.StaticText(panel, -1, _(u"&Name (20 characters maximum)"))
|
||||
self.name = wx.TextCtrl(panel, -1)
|
||||
self.name.SetFocus()
|
||||
dc = wx.WindowDC(self.name)
|
||||
dc.SetFont(self.name.GetFont())
|
||||
self.name.SetSize(dc.GetTextExtent("0"*20))
|
||||
labelLocation = wx.StaticText(panel, -1, _(u"Location"))
|
||||
labelLocation = wx.StaticText(panel, -1, _(u"&Location"))
|
||||
self.location = wx.TextCtrl(panel, -1)
|
||||
dc = wx.WindowDC(self.location)
|
||||
dc.SetFont(self.location.GetFont())
|
||||
self.location.SetSize(dc.GetTextExtent("0"*35))
|
||||
labelUrl = wx.StaticText(panel, -1, _(u"Website"))
|
||||
labelUrl = wx.StaticText(panel, -1, _(u"&Website"))
|
||||
self.url = wx.TextCtrl(panel, -1)
|
||||
dc = wx.WindowDC(self.url)
|
||||
dc.SetFont(self.url.GetFont())
|
||||
self.url.SetSize(dc.GetTextExtent("0"*22))
|
||||
labelDescription = wx.StaticText(panel, -1, _(u"Bio (160 characters maximum)"))
|
||||
labelDescription = wx.StaticText(panel, -1, _(u"&Bio (160 characters maximum)"))
|
||||
self.description = wx.TextCtrl(panel, -1, size=(400, 400))
|
||||
dc = wx.WindowDC(self.description)
|
||||
dc.SetFont(self.description.GetFont())
|
||||
self.description.SetSize(dc.GetTextExtent("0"*160))
|
||||
self.image = None
|
||||
self.upload_image = wx.Button(panel, -1, _(u"Upload a picture"))
|
||||
self.ok = wx.Button(panel, wx.ID_OK, _(u"Update profile"))
|
||||
self.upload_image = wx.Button(panel, -1, _(u"Upload a &picture"))
|
||||
self.ok = wx.Button(panel, wx.ID_OK, _(u"&Update profile"))
|
||||
self.ok.SetDefault()
|
||||
close = wx.Button(panel, wx.ID_CANCEL, _("Close"))
|
||||
close = wx.Button(panel, wx.ID_CANCEL, _("&Close"))
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
nameBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||
nameBox.Add(labelName, 0, wx.ALL, 5)
|
||||
|
@ -7,7 +7,7 @@ class UserActionsDialog(wx.Dialog):
|
||||
panel = wx.Panel(self)
|
||||
userSizer = wx.BoxSizer()
|
||||
self.SetTitle(_(u"Action"))
|
||||
userLabel = wx.StaticText(panel, -1, _(u"User"))
|
||||
userLabel = wx.StaticText(panel, -1, _(u"&User"))
|
||||
self.cb = wx.ComboBox(panel, -1, choices=users, value=users[0])
|
||||
self.cb.SetFocus()
|
||||
self.autocompletion = wx.Button(panel, -1, _(u"&Autocomplete users"))
|
||||
@ -16,14 +16,14 @@ class UserActionsDialog(wx.Dialog):
|
||||
userSizer.Add(self.autocompletion, 0, wx.ALL, 5)
|
||||
actionSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
label2 = wx.StaticText(panel, -1, _(u"Action"))
|
||||
self.follow = wx.RadioButton(panel, -1, _(u"Follow"), style=wx.RB_GROUP)
|
||||
self.unfollow = wx.RadioButton(panel, -1, _(u"Unfollow"))
|
||||
self.mute = wx.RadioButton(panel, -1, _(u"Mute"))
|
||||
self.unmute = wx.RadioButton(panel, -1, _(u"Unmute"))
|
||||
self.block = wx.RadioButton(panel, -1, _(u"Block"))
|
||||
self.unblock = wx.RadioButton(panel, -1, _(u"Unblock"))
|
||||
self.reportSpam = wx.RadioButton(panel, -1, _(u"Report as spam"))
|
||||
self.ignore_client = wx.RadioButton(panel, -1, _(u"Ignore tweets from this client"))
|
||||
self.follow = wx.RadioButton(panel, -1, _(u"&Follow"), style=wx.RB_GROUP)
|
||||
self.unfollow = wx.RadioButton(panel, -1, _(u"U&nfollow"))
|
||||
self.mute = wx.RadioButton(panel, -1, _(u"&Mute"))
|
||||
self.unmute = wx.RadioButton(panel, -1, _(u"Unmu&te"))
|
||||
self.block = wx.RadioButton(panel, -1, _(u"&Block"))
|
||||
self.unblock = wx.RadioButton(panel, -1, _(u"Unbl&ock"))
|
||||
self.reportSpam = wx.RadioButton(panel, -1, _(u"&Report as spam"))
|
||||
self.ignore_client = wx.RadioButton(panel, -1, _(u"&Ignore tweets from this client"))
|
||||
self.setup_default(default)
|
||||
hSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
hSizer.Add(label2, 0, wx.ALL, 5)
|
||||
@ -37,9 +37,9 @@ class UserActionsDialog(wx.Dialog):
|
||||
actionSizer.Add(self.ignore_client, 0, wx.ALL, 5)
|
||||
hSizer.Add(actionSizer, 0, wx.ALL, 5)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok)
|
||||
btnsizer.Add(cancel)
|
||||
|
@ -16,10 +16,10 @@ class selectUserDialog(wx.Dialog):
|
||||
userSizer.Add(self.autocompletion, 0, wx.ALL, 5)
|
||||
actionSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
label2 = wx.StaticText(panel, -1, _(u"Buffer type"))
|
||||
self.tweets = wx.RadioButton(panel, -1, _(u"Tweets"), style=wx.RB_GROUP)
|
||||
self.favourites = wx.RadioButton(panel, -1, _(u"Likes"))
|
||||
self.followers = wx.RadioButton(panel, -1, _(u"Followers"))
|
||||
self.friends = wx.RadioButton(panel, -1, _(u"Friends"))
|
||||
self.tweets = wx.RadioButton(panel, -1, _(u"&Tweets"), style=wx.RB_GROUP)
|
||||
self.favourites = wx.RadioButton(panel, -1, _(u"&Likes"))
|
||||
self.followers = wx.RadioButton(panel, -1, _(u"&Followers"))
|
||||
self.friends = wx.RadioButton(panel, -1, _(u"F&riends"))
|
||||
self.setup_default(default)
|
||||
hSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
hSizer.Add(label2, 0, wx.ALL, 5)
|
||||
@ -29,9 +29,9 @@ class selectUserDialog(wx.Dialog):
|
||||
actionSizer.Add(self.friends, 0, wx.ALL, 5)
|
||||
hSizer.Add(actionSizer, 0, wx.ALL, 5)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"OK"))
|
||||
ok = wx.Button(panel, wx.ID_OK, _(u"&OK"))
|
||||
ok.SetDefault()
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"Close"))
|
||||
cancel = wx.Button(panel, wx.ID_CANCEL, _(u"&Close"))
|
||||
btnsizer = wx.BoxSizer()
|
||||
btnsizer.Add(ok)
|
||||
btnsizer.Add(cancel)
|
||||
|
Loading…
Reference in New Issue
Block a user