Merge pull request #12 from codeofdusk/next-gen

Ready sound/message toggles, string cleanup, and sounds tutorial menu moving.
This commit is contained in:
Manuel Cortez 2015-04-18 04:35:58 -05:00
commit be0253815f
10 changed files with 52 additions and 39 deletions

View File

@ -34,7 +34,7 @@ lists = list(default=list())
favourites_timelines = list(default=list()) favourites_timelines = list(default=list())
trending_topic_buffers = list(default=list()) trending_topic_buffers = list(default=list())
muted_buffers = list(default=list()) muted_buffers = list(default=list())
autoread_buffers = list(default=list()) autoread_buffers = list(default=list(mentions, direct_messages, events))
[mysc] [mysc]
spelling_language = string(default="") spelling_language = string(default="")

View File

@ -8,7 +8,9 @@ language = string(default="system")
hide_gui = boolean(default=False) hide_gui = boolean(default=False)
voice_enabled = boolean(default=False) voice_enabled = boolean(default=False)
ask_at_exit = boolean(default=True) ask_at_exit = boolean(default=True)
use_invisible_keyboard_shorcuts = boolean(default=False) use_invisible_keyboard_shorcuts = boolean(default=True)
play_ready_sound = boolean(default=True)
speak_ready_msg = boolean(default=True)
log_level = string(default="error") log_level = string(default="error")
[keymap] [keymap]

View File

@ -242,8 +242,10 @@ class Controller(object):
for i in session_.sessions: for i in session_.sessions:
if session_.sessions[i].is_logged == False: continue if session_.sessions[i].is_logged == False: continue
self.start_buffers(session_.sessions[i]) self.start_buffers(session_.sessions[i])
session_.sessions[session_.sessions.keys()[0]].sound.play("ready.ogg") if config.app["app-settings"]["play_ready_sound"] == True:
output.speak(_(u"Ready")) session_.sessions[session_.sessions.keys()[0]].sound.play("ready.ogg")
if config.app["app-settings"]["speak_ready_msg"] == True:
output.speak(_(u"Ready"))
def create_ignored_session_buffer(self, session): def create_ignored_session_buffer(self, session):
self.accounts.append(session.settings["twitter"]["user_name"]) self.accounts.append(session.settings["twitter"]["user_name"])

View File

@ -31,6 +31,8 @@ class globalSettingsController(object):
self.dialog.create_general(langs) self.dialog.create_general(langs)
self.dialog.general.language.SetSelection(id) self.dialog.general.language.SetSelection(id)
self.dialog.set_value("general", "ask_at_exit", config.app["app-settings"]["ask_at_exit"]) self.dialog.set_value("general", "ask_at_exit", config.app["app-settings"]["ask_at_exit"])
self.dialog.set_value("general", "play_ready_sound", config.app["app-settings"]["play_ready_sound"])
self.dialog.set_value("general", "speak_ready_msg", config.app["app-settings"]["speak_ready_msg"])
self.dialog.set_value("general", "use_invisible_shorcuts", config.app["app-settings"]["use_invisible_keyboard_shorcuts"]) self.dialog.set_value("general", "use_invisible_shorcuts", config.app["app-settings"]["use_invisible_keyboard_shorcuts"])
self.dialog.set_value("general", "disable_sapi5", config.app["app-settings"]["voice_enabled"]) self.dialog.set_value("general", "disable_sapi5", config.app["app-settings"]["voice_enabled"])
self.dialog.set_value("general", "hide_gui", config.app["app-settings"]["hide_gui"]) self.dialog.set_value("general", "hide_gui", config.app["app-settings"]["hide_gui"])
@ -48,6 +50,8 @@ class globalSettingsController(object):
config.app["app-settings"]["voice_enabled"] = self.dialog.get_value("general", "disable_sapi5") config.app["app-settings"]["voice_enabled"] = self.dialog.get_value("general", "disable_sapi5")
config.app["app-settings"]["hide_gui"] = self.dialog.get_value("general", "hide_gui") config.app["app-settings"]["hide_gui"] = self.dialog.get_value("general", "hide_gui")
config.app["app-settings"]["ask_at_exit"] = self.dialog.get_value("general", "ask_at_exit") config.app["app-settings"]["ask_at_exit"] = self.dialog.get_value("general", "ask_at_exit")
config.app["app-settings"]["play_ready_sound"] = self.dialog.get_value("general", "play_ready_sound")
config.app["app-settings"]["speak_ready_msg"] = self.dialog.get_value("general", "speak_ready_msg")
config.app.write() config.app.write()
class accountSettingsController(globalSettingsController): class accountSettingsController(globalSettingsController):

View File

@ -1,25 +1,26 @@
# -*- coding: utf-8 -*- #-*- coding: utf-8 -*-
import reverse_sort import reverse_sort
import application
actions = reverse_sort.reverse_sort([ ("audio", _(u"Audio tweet.")), actions = reverse_sort.reverse_sort([ ("audio", _(u"Audio tweet.")),
("create_timeline", _(u"User-defined buffer created.")), ("create_timeline", _(u"User-defined buffer created.")),
("delete_timeline", _(u"User-defined buffer destroied.")), ("delete_timeline", _(u"User-defined buffer destroied.")),
("dm_received", _(u"Direct message received.")), ("dm_received", _(u"Direct message received.")),
("dm_sent", _(u"Direct message sent.")), ("dm_sent", _(u"Direct message sent.")),
("error", _(u"Error.")), ("error", _(u"Error.")),
("favourite", _(u"You favorited a tweet.")), ("favourite", _(u"Tweet favorited.")),
("favourites_timeline_updated", _(u"Someone's favourites have been updated.")), ("favourites_timeline_updated", _(u"Someone's favourites have been updated.")),
("geo", _(u"Geotweet.")), ("geo", _(u"Geotweet.")),
("limit", _(u"Boundary reached.")), ("limit", _(u"Boundary reached.")),
("list_tweet", _(u"List updated.")), ("list_tweet", _(u"List updated.")),
("max_length", _(u"Too many characters.")), ("max_length", _(u"Too many characters.")),
("mention_received", _(u"You've been mentioned.")), ("mention_received", _(u"Mension received.")),
("new_event", _(u"New event.")), ("new_event", _(u"New event.")),
("ready", _(u"Application is ready.")), ("ready", _(unicode(application.name+" is ready."))),
("reply_send", _(u"You've replied publicly.")), ("reply_send", _(u"Mention sent.")),
("retweet_send", _(u"You've retweeted.")), ("retweet_send", _(u"Tweet retweeted.")),
("search_updated", _(u"A search buffer has been updated.")), ("search_updated", _(u"A search buffer has been updated.")),
("tweet_received", _(u"New tweet in home buffer.")), ("tweet_received", _(u"Tweet received.")),
("tweet_send", _(u"You've sent a tweet.")), ("tweet_send", _(u"Tweet sent.")),
("trends_updated", _(u"A trending topic buffer has been updated.")), ("trends_updated", _(u"A trending topic buffer has been updated.")),
("tweet_timeline", _(u"New tweet in user-defined buffer.")), ("tweet_timeline", _(u"New tweet in user-defined buffer.")),
("update_followers", _(u"New follower.")), ("update_followers", _(u"New follower.")),

View File

@ -2,13 +2,13 @@
import wx import wx
import widgetUtils import widgetUtils
from multiplatform_widgets import widgets from multiplatform_widgets import widgets
import application
class autocompletionManageDialog(widgetUtils.BaseDialog): class autocompletionManageDialog(widgetUtils.BaseDialog):
def __init__(self): def __init__(self):
super(autocompletionManageDialog, self).__init__(parent=None, id=-1, title=_(u"Manage Autocomplete users database")) super(autocompletionManageDialog, self).__init__(parent=None, id=-1, title=_(u"Manage Autocompletion database"))
panel = wx.Panel(self) panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
label = wx.StaticText(panel, -1, _(u"Editing TWBlue users database")) label = wx.StaticText(panel, -1, _(u"Editing " + application.name + " users database"))
self.users = widgets.list(panel, _(u"Username"), _(u"Name"), style=wx.LC_REPORT) self.users = widgets.list(panel, _(u"Username"), _(u"Name"), style=wx.LC_REPORT)
sizer.Add(label, 0, wx.ALL, 5) sizer.Add(label, 0, wx.ALL, 5)
sizer.Add(self.users.list, 0, wx.ALL, 5) sizer.Add(self.users.list, 0, wx.ALL, 5)

View File

@ -11,7 +11,7 @@ class autocompletionSettingsDialog(widgetUtils.BaseDialog):
self.friends_buffer = wx.CheckBox(panel, -1, _(u"Add users from friends buffer")) self.friends_buffer = wx.CheckBox(panel, -1, _(u"Add users from friends buffer"))
sizer.Add(self.followers_buffer, 0, wx.ALL, 5) sizer.Add(self.followers_buffer, 0, wx.ALL, 5)
sizer.Add(self.friends_buffer, 0, wx.ALL, 5) sizer.Add(self.friends_buffer, 0, wx.ALL, 5)
self.viewList = wx.Button(panel, -1, _(u"See the users list")) self.viewList = wx.Button(panel, -1, _(u"Manage database..."))
sizer.Add(self.viewList, 0, wx.ALL, 5) sizer.Add(self.viewList, 0, wx.ALL, 5)
ok = wx.Button(panel, wx.ID_OK) ok = wx.Button(panel, wx.ID_OK)
cancel = wx.Button(panel, wx.ID_CANCEL) cancel = wx.Button(panel, wx.ID_CANCEL)

View File

@ -27,13 +27,12 @@ class mainFrame(Gtk.Window):
self.trends = Gtk.MenuItem(label="View trending topics") self.trends = Gtk.MenuItem(label="View trending topics")
self.trends.add_accelerator("activate", self.accel_group, ord("T"), Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE) self.trends.add_accelerator("activate", self.accel_group, ord("T"), Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE)
self.lists = Gtk.MenuItem(label="Lists manager") self.lists = Gtk.MenuItem(label="Lists manager")
self.sounds_tutorial = Gtk.MenuItem(label="Sounds tutorial")
self.keystrokes_editor = None self.keystrokes_editor = None
self.account_settings = Gtk.MenuItem(label="Account settings") self.account_settings = Gtk.MenuItem(label="Account settings")
self.prefs = Gtk.MenuItem(label="Global settings") self.prefs = Gtk.MenuItem(label="Global settings")
self.close = Gtk.MenuItem(label="Close") self.close = Gtk.MenuItem(label="Close")
self.close.add_accelerator("activate", self.accel_group, ord("Q"), Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE) self.close.add_accelerator("activate", self.accel_group, ord("Q"), Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE)
self.append_to_menu(app, self.manage_accounts, self.updateProfile, self.menuitem_search, self.trends, self.lists, self.sounds_tutorial, self.account_settings, self.prefs, self.close) self.append_to_menu(app, self.manage_accounts, self.updateProfile, self.menuitem_search, self.trends, self.lists, self.account_settings, self.prefs, self.close)
app_menu = Gtk.MenuItem(label="Application") app_menu = Gtk.MenuItem(label="Application")
app_menu.add_accelerator("activate", self.accel_group, ord("a"), Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE) app_menu.add_accelerator("activate", self.accel_group, ord("a"), Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE)
@ -96,12 +95,13 @@ class mainFrame(Gtk.Window):
# Help Menu # Help Menu
help = Gtk.Menu() help = Gtk.Menu()
self.doc = Gtk.MenuItem(label="Documentation") self.doc = Gtk.MenuItem(label="Documentation")
self.sounds_tutorial = Gtk.MenuItem(label="Sounds tutorial")
self.changelog = Gtk.MenuItem(label="What's new in this version?") self.changelog = Gtk.MenuItem(label="What's new in this version?")
self.check_for_updates = Gtk.MenuItem(label="Check for updates") self.check_for_updates = Gtk.MenuItem(label="Check for updates")
self.reportError = Gtk.MenuItem(label="Report an error") self.reportError = Gtk.MenuItem(label="Report an error")
self.visit_website = Gtk.MenuItem(label="TWBlue's website") self.visit_website = Gtk.MenuItem(label="TWBlue's website")
self.about = Gtk.MenuItem(label="ABout TWBlue") self.about = Gtk.MenuItem(label="ABout TWBlue")
self.append_to_menu(help, self.doc, self.changelog, self.check_for_updates, self.reportError, self.visit_website, self.about) self.append_to_menu(help, self.doc, self.sounds_tutorial, self.changelog, self.check_for_updates, self.reportError, self.visit_website, self.about)
help_menu = Gtk.MenuItem(label="Help") help_menu = Gtk.MenuItem(label="Help")
help_menu.set_submenu(help) help_menu.set_submenu(help)
menuBar.append(help_menu) menuBar.append(help_menu)

View File

@ -2,7 +2,7 @@
import baseDialog import baseDialog
import wx import wx
import logging as original_logger import logging as original_logger
import application
class general(wx.Panel, baseDialog.BaseWXDialog): class general(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent, languages): def __init__(self, parent, languages):
super(general, self).__init__(parent) super(general, self).__init__(parent)
@ -14,13 +14,17 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
langBox.Add(language, 0, wx.ALL, 5) langBox.Add(language, 0, wx.ALL, 5)
langBox.Add(self.language, 0, wx.ALL, 5) langBox.Add(self.language, 0, wx.ALL, 5)
sizer.Add(langBox, 0, wx.ALL, 5) sizer.Add(langBox, 0, wx.ALL, 5)
self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting TwBlue?")) self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting "+application.name))
sizer.Add(self.ask_at_exit, 0, wx.ALL, 5) sizer.Add(self.ask_at_exit, 0, wx.ALL, 5)
self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shorcuts on the GUI")) self.play_ready_sound = wx.CheckBox(self, -1, _(U"Play a sound when "+application.name+" launches"))
sizer.Add(self.play_ready_sound, 0, wx.ALL, 5)
self.speak_ready_msg = wx.CheckBox(self, -1, _(U"Speak a message when "+application.name+" launches"))
sizer.Add(self.speak_ready_msg, 0, wx.ALL, 5)
self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shortcuts while GUI is visible"))
sizer.Add(self.use_invisible_shorcuts, 0, wx.ALL, 5) sizer.Add(self.use_invisible_shorcuts, 0, wx.ALL, 5)
self.disable_sapi5 = wx.CheckBox(self, -1, _(u"Activate Sapi5 when any other screen reader is not being run")) self.disable_sapi5 = wx.CheckBox(self, -1, _(u"Activate Sapi5 when any other screen reader is not being run"))
sizer.Add(self.disable_sapi5, 0, wx.ALL, 5) sizer.Add(self.disable_sapi5, 0, wx.ALL, 5)
self.hide_gui = wx.CheckBox(self, -1, _(u"Activate the auto-start of the invisible interface")) self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch"))
sizer.Add(self.hide_gui, 0, wx.ALL, 5) sizer.Add(self.hide_gui, 0, wx.ALL, 5)
self.SetSizer(sizer) self.SetSizer(sizer)
@ -28,12 +32,12 @@ class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent): def __init__(self, parent):
super(generalAccount, self).__init__(parent) super(generalAccount, self).__init__(parent)
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
self.au = wx.Button(self, wx.NewId(), _(u"Set the autocomplete function")) self.au = wx.Button(self, wx.NewId(), _(u"Autocompletion settings..."))
sizer.Add(self.au, 0, wx.ALL, 5) sizer.Add(self.au, 0, wx.ALL, 5)
self.relative_time = wx.CheckBox(self, wx.NewId(), _(U"Relative times")) self.relative_time = wx.CheckBox(self, wx.NewId(), _(U"Relative timestamps"))
sizer.Add(self.relative_time, 0, wx.ALL, 5) sizer.Add(self.relative_time, 0, wx.ALL, 5)
apiCallsBox = wx.BoxSizer(wx.HORIZONTAL) apiCallsBox = wx.BoxSizer(wx.HORIZONTAL)
apiCallsBox.Add(wx.StaticText(self, -1, _(u"API calls when the stream is started (One API call equals to 200 tweetts, two API calls equals 400 tweets, etc):")), 0, wx.ALL, 5) apiCallsBox.Add(wx.StaticText(self, -1, _(u"API calls (One API call = 200 tweets, two API calls = 400 tweets, etc):")), 0, wx.ALL, 5)
self.apiCalls = wx.SpinCtrl(self, wx.NewId()) self.apiCalls = wx.SpinCtrl(self, wx.NewId())
self.apiCalls.SetRange(1, 10) self.apiCalls.SetRange(1, 10)
self.apiCalls.SetSize(self.apiCalls.GetBestSize()) self.apiCalls.SetSize(self.apiCalls.GetBestSize())
@ -46,9 +50,9 @@ class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
self.itemsPerApiCall.SetSize(self.itemsPerApiCall.GetBestSize()) self.itemsPerApiCall.SetSize(self.itemsPerApiCall.GetBestSize())
tweetsPerCallBox.Add(self.itemsPerApiCall, 0, wx.ALL, 5) tweetsPerCallBox.Add(self.itemsPerApiCall, 0, wx.ALL, 5)
sizer.Add(tweetsPerCallBox, 0, wx.ALL, 5) sizer.Add(tweetsPerCallBox, 0, wx.ALL, 5)
self.reverse_timelines = wx.CheckBox(self, wx.NewId(), _(u"Inverted buffers: The newest tweets will be shown at the beginning of the lists while the oldest at the end")) self.reverse_timelines = wx.CheckBox(self, wx.NewId(), _(u"Inverted buffers: The newest tweets will be shown at the beginning while the oldest at the end"))
sizer.Add(self.reverse_timelines, 0, wx.ALL, 5) sizer.Add(self.reverse_timelines, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"Retweets mode")) lbl = wx.StaticText(self, wx.NewId(), _(u"Retweet mode"))
self.retweet_mode = wx.ComboBox(self, wx.NewId(), choices=[_(u"Ask"), _(u"Retweet without comments"), _(u"Retweet with comments")], style=wx.CB_READONLY) self.retweet_mode = wx.ComboBox(self, wx.NewId(), choices=[_(u"Ask"), _(u"Retweet without comments"), _(u"Retweet with comments")], style=wx.CB_READONLY)
rMode = wx.BoxSizer(wx.HORIZONTAL) rMode = wx.BoxSizer(wx.HORIZONTAL)
rMode.Add(lbl, 0, wx.ALL, 5) rMode.Add(lbl, 0, wx.ALL, 5)
@ -149,7 +153,7 @@ class audioServicesPanel(wx.Panel):
def __init__(self, parent): def __init__(self, parent):
super(audioServicesPanel, self).__init__(parent) super(audioServicesPanel, self).__init__(parent)
mainSizer = wx.BoxSizer(wx.VERTICAL) mainSizer = wx.BoxSizer(wx.VERTICAL)
apiKeyLabel = wx.StaticText(self, -1, _(u"If you've got a SndUp account, enter your API Key here. Whether the API Key is wrong, the App will fail to upload anything to the server. Whether there's no API Key here, then the audio files will be uploaded anonimously")) apiKeyLabel = wx.StaticText(self, -1, _(u"If you have a SndUp account, enter your API Key here. If your API Key is invalid, " + application.name + " will fail to upload. If there is no API Key here, " + application.name + " will upload annonymously."))
self.apiKey = wx.TextCtrl(self, -1) self.apiKey = wx.TextCtrl(self, -1)
dc = wx.WindowDC(self.apiKey) dc = wx.WindowDC(self.apiKey)
dc.SetFont(self.apiKey.GetFont()) dc.SetFont(self.apiKey.GetFont())
@ -171,7 +175,7 @@ class audioServicesPanel(wx.Panel):
self.dropbox.SetLabel(_(u"Link your Dropbox account")) self.dropbox.SetLabel(_(u"Link your Dropbox account"))
def show_dialog(self): def show_dialog(self):
wx.MessageDialog(self, _(u"The authorisation request will be shown on your browser. Copy the code tat Dropbox will provide and, in the text box that will appear on TW Blue, paste it. This code is necessary to continue. You only need to do it once."), _(u"Authorisation"), wx.OK).ShowModal() wx.MessageDialog(self, _(u"Dropbox will open in your browser. After you log into Dropbox, an authorization code will be generated. Please paste it into the field which will appear. You only need to do this once."), _(u"Authorization"), wx.OK).ShowModal()
def get_response(self): def get_response(self):
dlg = wx.TextEntryDialog(self, _(u"Enter the code here."), _(u"Verification code")) dlg = wx.TextEntryDialog(self, _(u"Enter the code here."), _(u"Verification code"))
@ -180,7 +184,7 @@ class audioServicesPanel(wx.Panel):
return dlg.GetValue() return dlg.GetValue()
def show_error(self): def show_error(self):
wx.MessageDialog(self, _(u"Error during authorisation. Try again later."), _(u"Error!"), wx.ICON_ERROR).ShowModal() wx.MessageDialog(self, _(u"Error during authorization. Try again later."), _(u"Error!"), wx.ICON_ERROR).ShowModal()
def get_dropbox(self): def get_dropbox(self):
return self.dropbox.GetLabel() return self.dropbox.GetLabel()
@ -193,7 +197,7 @@ class configurationDialog(baseDialog.BaseWXDialog):
def __init__(self): def __init__(self):
super(configurationDialog, self).__init__(None, -1) super(configurationDialog, self).__init__(None, -1)
self.panel = wx.Panel(self) self.panel = wx.Panel(self)
self.SetTitle(_(u"TW Blue's preferences")) self.SetTitle(_(unicode(application.name + " preferences")))
self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer = wx.BoxSizer(wx.VERTICAL)
self.notebook = wx.Notebook(self.panel) self.notebook = wx.Notebook(self.panel)
@ -209,7 +213,7 @@ class configurationDialog(baseDialog.BaseWXDialog):
def create_other_buffers(self): def create_other_buffers(self):
self.buffers = other_buffers(self.notebook) self.buffers = other_buffers(self.notebook)
self.notebook.AddPage(self.buffers, _(u"Show other buffers")) self.notebook.AddPage(self.buffers, _(u"Buffers"))
def create_ignored_clients(self, ignored_clients_list): def create_ignored_clients(self, ignored_clients_list):
self.ignored_clients = ignoredClients(self.notebook, ignored_clients_list) self.ignored_clients = ignoredClients(self.notebook, ignored_clients_list)

View File

@ -19,7 +19,6 @@ class mainFrame(wx.Frame):
self.trends = app.Append(wx.NewId(), _(u"View &trending topics")) self.trends = app.Append(wx.NewId(), _(u"View &trending topics"))
self.lists = app.Append(wx.NewId(), _(u"&Lists manager")) self.lists = app.Append(wx.NewId(), _(u"&Lists manager"))
self.lists.Enable(False) self.lists.Enable(False)
self.sounds_tutorial = app.Append(wx.NewId(), _(u"Sounds &tutorial"))
self.keystroke_editor = app.Append(wx.NewId(), _(u"&Edit keystrokes")) self.keystroke_editor = app.Append(wx.NewId(), _(u"&Edit keystrokes"))
self.account_settings = app.Append(wx.NewId(), _(u"Account se&ttings")) self.account_settings = app.Append(wx.NewId(), _(u"Account se&ttings"))
self.prefs = app.Append(wx.ID_PREFERENCES, _(u"&Global settings")) self.prefs = app.Append(wx.ID_PREFERENCES, _(u"&Global settings"))
@ -70,12 +69,13 @@ class mainFrame(wx.Frame):
help = wx.Menu() help = wx.Menu()
self.doc = help.Append(-1, _(u"&Documentation")) self.doc = help.Append(-1, _(u"&Documentation"))
self.doc.Enable(False) self.doc.Enable(False)
self.sounds_tutorial = help.Append(wx.NewId(), _(u"Sounds &tutorial"))
self.changelog = help.Append(wx.NewId(), _(u"&What's new in this version?")) self.changelog = help.Append(wx.NewId(), _(u"&What's new in this version?"))
self.changelog.Enable(False) self.changelog.Enable(False)
self.check_for_updates = help.Append(wx.NewId(), _(u"&Check for updates")) self.check_for_updates = help.Append(wx.NewId(), _(u"&Check for updates"))
self.reportError = help.Append(wx.NewId(), _(u"&Report an error")) self.reportError = help.Append(wx.NewId(), _(u"&Report an error"))
self.visit_website = help.Append(-1, _(u"TW Blue's &website")) self.visit_website = help.Append(-1, _(unicode(application.name+"'s &website")))
self.about = help.Append(-1, _(u"About &TW Blue")) self.about = help.Append(-1, _(u"About &"+application.name))
# Add all to the menu Bar # Add all to the menu Bar
menuBar.Append(app, _(u"&Application")) menuBar.Append(app, _(u"&Application"))
@ -110,10 +110,10 @@ class mainFrame(wx.Frame):
### MAIN ### MAIN
def __init__(self): def __init__(self):
""" Main function of this class.""" """ Main function of this class."""
super(mainFrame, self).__init__(None, -1, "TW Blue", size=(1600, 1600)) super(mainFrame, self).__init__(None, -1, application.name, size=(1600, 1600))
self.panel = wx.Panel(self) self.panel = wx.Panel(self)
self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer = wx.BoxSizer(wx.VERTICAL)
self.SetTitle("TW Blue") self.SetTitle(application.name)
self.SetMenuBar(self.makeMenus()) self.SetMenuBar(self.makeMenus())
self.nb = wx.Treebook(self.panel, wx.NewId()) self.nb = wx.Treebook(self.panel, wx.NewId())
self.buffers = {} self.buffers = {}
@ -189,4 +189,4 @@ class mainFrame(wx.Frame):
getattr(self, menuitem).Check(check) getattr(self, menuitem).Check(check)
def no_update_available(): def no_update_available():
wx.MessageDialog(None, _(u"Your TW Blue version is up to date"), _(u"Update"), style=wx.OK).ShowModal() wx.MessageDialog(None, _(u"Your "+application.name+" version is up to date"), _(u"Update"), style=wx.OK).ShowModal()