Focus is handled in Gtk, accelerators and some menu items work

This commit is contained in:
2015-04-04 21:25:52 -06:00
parent d8581f47d2
commit 48e918adb0
11 changed files with 92 additions and 38 deletions

View File

@@ -4,6 +4,9 @@ from multiplatform_widgets import widgets
class basePanel(wx.Panel):
def set_focus_function(self, f):
self.list.list.Bind(wx.EVT_LIST_ITEM_FOCUSED, f)
def create_list(self):
self.list = widgets.list(self, _(u"User"), _(u"Text"), _(u"Date"), _(u"Client"), style=wx.LC_REPORT|wx.LC_SINGLE_SEL|wx.LC_VRULES)
self.list.set_windows_size(0, 60)

View File

@@ -7,8 +7,8 @@ def retweet_question(parent):
def delete_tweet_dialog(parent):
return wx.MessageDialog(parent, _(u"Do you really want to delete this message? It will be eliminated from Twitter as well."), _(u"Delete"), wx.ICON_QUESTION|wx.YES_NO).ShowModal()
def exit_dialog():
dlg = wx.MessageDialog(None, _(u"Do you really want to close TW Blue?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION)
def exit_dialog(parent):
dlg = wx.MessageDialog(parent, _(u"Do you really want to close TW Blue?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION)
return dlg.ShowModal()
def needs_restart():
@@ -43,4 +43,4 @@ def protected_user():
return wx.MessageDialog(None, _(u"This is a protected Twitter user. It means you can not open a timeline using the Streaming API. The user's tweets will not update due to a twitter policy. Do you want to continue?"), _(u"Warning"), wx.ICON_WARNING|wx.YES_NO).ShowModal()
def no_following():
return wx.MessageDialog(None, _(u"This is a protected user account, you need follow to this user for viewing your tweets or favourites."), _(u"Error"), wx.ICON_ERROR).ShowModal()
return wx.MessageDialog(None, _(u"This is a protected user account, you need follow to this user for viewing your tweets or favourites."), _(u"Error"), wx.ICON_ERROR).ShowModal()

View File

@@ -12,7 +12,7 @@ class mainFrame(wx.Frame):
# Application menu
app = wx.Menu()
self.manage_accounts = app.Append(wx.NewId(), _(u"Manage accounts"))
self.manage_accounts = app.Append(wx.NewId(), _(u"&Manage accounts"))
self.updateProfile = app.Append(wx.NewId(), _(u"&Update profile"))
self.show_hide = app.Append(wx.NewId(), _(u"&Hide window"))
self.menuitem_search = app.Append(wx.NewId(), _(u"&Search"))