Load libvlccore.dll before importing the sound module

This commit is contained in:
Jose Manuel Delicado 2018-08-12 13:38:39 +02:00
parent 7883413210
commit f4e20f8ed4
12 changed files with 128 additions and 126 deletions

View File

@ -6,7 +6,7 @@ import widgetUtils
class UploadDialog(widgetUtils.BaseDialog): class UploadDialog(widgetUtils.BaseDialog):
def __init__(self, filename, *args, **kwargs): def __init__(self, filename, *args, **kwargs):
super(UploadDialog, self).__init__(parent=None, id=wx.NewId(), *args, **kwargs) super(UploadDialog, self).__init__(parent=None, id=wx.ID_ANY, *args, **kwargs)
self.pane = wx.Panel(self) self.pane = wx.Panel(self)
self.progress_bar = wx.Gauge(parent=self.pane) self.progress_bar = wx.Gauge(parent=self.pane)
fileBox = wx.BoxSizer(wx.HORIZONTAL) fileBox = wx.BoxSizer(wx.HORIZONTAL)

View File

@ -10,7 +10,7 @@ class menu(wx.Menu):
def append_options(self, options): def append_options(self, options):
for i in options: for i in options:
item = wx.MenuItem(self, wx.NewId(), "%s (@%s)" % (i[1], i[0])) item = wx.MenuItem(self, wx.ID_ANY, "%s (@%s)" % (i[1], i[0]))
self.AppendItem(item) self.AppendItem(item)
self.Bind(wx.EVT_MENU, lambda evt, temp=i[0]: self.select_text(evt, temp), item) self.Bind(wx.EVT_MENU, lambda evt, temp=i[0]: self.select_text(evt, temp), item)

View File

@ -19,14 +19,12 @@ if os.path.exists(paths.app_path(u"Uninstall.exe")):
paths.mode="installed" paths.mode="installed"
import commandline import commandline
import config import config
import sound
import output import output
import logging import logging
import application import application
import keys import keys
from mysc.thread_utils import call_threaded from mysc.thread_utils import call_threaded
import fixes import fixes
#extra variables to control the temporary stdout and stderr, while the final files are opened. We understand that some errors could happen while all outputs are closed, so let's try to avoid it.
import widgetUtils import widgetUtils
import webbrowser import webbrowser
from wxUI import commonMessageDialogs from wxUI import commonMessageDialogs
@ -47,14 +45,18 @@ if system == "Windows":
arch="x86" arch="x86"
if platform.architecture()[0][:2] == "64": if platform.architecture()[0][:2] == "64":
arch="x64" arch="x64"
os.environ['PYTHON_VLC_MODULE_PATH']=paths.app_path("..", "windows-dependencies", arch, "plugins") os.environ['PYTHON_VLC_MODULE_PATH']=os.path.abspath(paths.app_path("..", "windows-dependencies", arch))
os.environ['PYTHON_VLC_LIB_PATH']=paths.app_path("..", "windows-dependencies", arch, "libvlc.dll") os.environ['PYTHON_VLC_LIB_PATH']=os.path.abspath(paths.app_path("..", "windows-dependencies", arch, "libvlc.dll"))
# I don't know why libvlccore.dll needs to be loaded first, but it works when doing it
from ctypes import CDLL
CDLL(os.path.abspath(paths.app_path("..", "windows-dependencies", arch, "libvlccore.dll")))
#the final log files have been opened succesfully, let's close the temporary files #the final log files have been opened succesfully, let's close the temporary files
stdout_temp.close() stdout_temp.close()
stderr_temp.close() stderr_temp.close()
#finally, remove the temporal files. TW Blue doesn't need them anymore, and we will get more free space on the harddrive #finally, remove the temporary files. TW Blue doesn't need them anymore, and we will get more free space on the harddrive
os.remove(stdout_temp.name) os.remove(stdout_temp.name)
os.remove(stderr_temp.name) os.remove(stderr_temp.name)
import sound
if system == "Linux": if system == "Linux":
from gi.repository import Gdk, GObject, GLib from gi.repository import Gdk, GObject, GLib

View File

@ -9,15 +9,15 @@ class attachDialog(widgetUtils.BaseDialog):
super(attachDialog, self).__init__(None, title=_(u"Add an attachment")) super(attachDialog, self).__init__(None, title=_(u"Add an attachment"))
panel = wx.Panel(self) panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
lbl1 = wx.StaticText(panel, wx.NewId(), _(u"Attachments")) lbl1 = wx.StaticText(panel, wx.ID_ANY, _(u"Attachments"))
self.attachments = widgets.list(panel, _(u"Type"), _(u"Title"), style=wx.LC_REPORT) self.attachments = widgets.list(panel, _(u"Type"), _(u"Title"), style=wx.LC_REPORT)
box = wx.BoxSizer(wx.HORIZONTAL) box = wx.BoxSizer(wx.HORIZONTAL)
box.Add(lbl1, 0, wx.ALL, 5) box.Add(lbl1, 0, wx.ALL, 5)
box.Add(self.attachments.list, 0, wx.ALL, 5) box.Add(self.attachments.list, 0, wx.ALL, 5)
sizer.Add(box, 0, wx.ALL, 5) sizer.Add(box, 0, wx.ALL, 5)
static = wx.StaticBox(panel, label=_(u"Add attachments")) static = wx.StaticBox(panel, label=_(u"Add attachments"))
self.photo = wx.Button(panel, wx.NewId(), _(u"&Photo")) self.photo = wx.Button(panel, wx.ID_ANY, _(u"&Photo"))
self.remove = wx.Button(panel, wx.NewId(), _(u"Remove attachment")) self.remove = wx.Button(panel, wx.ID_ANY, _(u"Remove attachment"))
self.remove.Enable(False) self.remove.Enable(False)
btnsizer = wx.StaticBoxSizer(static, wx.HORIZONTAL) btnsizer = wx.StaticBoxSizer(static, wx.HORIZONTAL)
btnsizer.Add(self.photo, 0, wx.ALL, 5) btnsizer.Add(self.photo, 0, wx.ALL, 5)

View File

@ -26,7 +26,7 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
sizer.Add(self.no_streaming, 0, wx.ALL, 5) sizer.Add(self.no_streaming, 0, wx.ALL, 5)
updatePeriodBox = wx.BoxSizer(wx.HORIZONTAL) updatePeriodBox = wx.BoxSizer(wx.HORIZONTAL)
updatePeriodBox.Add(wx.StaticText(self, -1, _(u"Buffer update interval, in minutes")), 0, wx.ALL, 5) updatePeriodBox.Add(wx.StaticText(self, -1, _(u"Buffer update interval, in minutes")), 0, wx.ALL, 5)
self.update_period = wx.SpinCtrl(self, wx.NewId()) self.update_period = wx.SpinCtrl(self, wx.ID_ANY)
self.update_period.SetRange(1, 30) self.update_period.SetRange(1, 30)
self.update_period.SetSize(self.update_period.GetBestSize()) self.update_period.SetSize(self.update_period.GetBestSize())
updatePeriodBox.Add(self.update_period, 0, wx.ALL, 5) updatePeriodBox.Add(self.update_period, 0, wx.ALL, 5)
@ -41,7 +41,7 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
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"Hide GUI on launch")) 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.handle_longtweets = wx.CheckBox(self, wx.NewId(), _(u"Use Codeofdusk's longtweet handlers (may decrease client performance)")) self.handle_longtweets = wx.CheckBox(self, wx.ID_ANY, _(u"Use Codeofdusk's longtweet handlers (may decrease client performance)"))
sizer.Add(self.handle_longtweets, 0, wx.ALL, 5) sizer.Add(self.handle_longtweets, 0, wx.ALL, 5)
self.remember_mention_and_longtweet = wx.CheckBox(self, -1, _(u"Remember state for mention all and long tweet")) self.remember_mention_and_longtweet = wx.CheckBox(self, -1, _(u"Remember state for mention all and long tweet"))
sizer.Add(self.remember_mention_and_longtweet, 0, wx.ALL, 5) sizer.Add(self.remember_mention_and_longtweet, 0, wx.ALL, 5)
@ -61,33 +61,33 @@ class proxy(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent, proxyTypes): def __init__(self, parent, proxyTypes):
super(proxy, self).__init__(parent) super(proxy, self).__init__(parent)
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
type=wx.StaticText(self, wx.NewId(), _(u"Proxy type: ")) type=wx.StaticText(self, wx.ID_ANY, _(u"Proxy type: "))
self.type=wx.ComboBox(self, -1, choices=proxyTypes, style=wx.CB_READONLY) self.type=wx.ComboBox(self, -1, choices=proxyTypes, style=wx.CB_READONLY)
self.type.SetSize(self.type.GetBestSize()) self.type.SetSize(self.type.GetBestSize())
typeBox = wx.BoxSizer(wx.HORIZONTAL) typeBox = wx.BoxSizer(wx.HORIZONTAL)
typeBox.Add(type, 0, wx.ALL, 5) typeBox.Add(type, 0, wx.ALL, 5)
typeBox.Add(self.type, 0, wx.ALL, 5) typeBox.Add(self.type, 0, wx.ALL, 5)
sizer.Add(typeBox, 0, wx.ALL, 5) sizer.Add(typeBox, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"Proxy server: ")) lbl = wx.StaticText(self, wx.ID_ANY, _(u"Proxy server: "))
self.server = wx.TextCtrl(self, -1) self.server = wx.TextCtrl(self, -1)
serverBox = wx.BoxSizer(wx.HORIZONTAL) serverBox = wx.BoxSizer(wx.HORIZONTAL)
serverBox.Add(lbl, 0, wx.ALL, 5) serverBox.Add(lbl, 0, wx.ALL, 5)
serverBox.Add(self.server, 0, wx.ALL, 5) serverBox.Add(self.server, 0, wx.ALL, 5)
sizer.Add(serverBox, 0, wx.ALL, 5) sizer.Add(serverBox, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"Port: ")) lbl = wx.StaticText(self, wx.ID_ANY, _(u"Port: "))
self.port = wx.TextCtrl(self, wx.NewId()) self.port = wx.TextCtrl(self, wx.ID_ANY)
portBox = wx.BoxSizer(wx.HORIZONTAL) portBox = wx.BoxSizer(wx.HORIZONTAL)
portBox.Add(lbl, 0, wx.ALL, 5) portBox.Add(lbl, 0, wx.ALL, 5)
portBox.Add(self.port, 0, wx.ALL, 5) portBox.Add(self.port, 0, wx.ALL, 5)
sizer.Add(portBox, 0, wx.ALL, 5) sizer.Add(portBox, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"User: ")) lbl = wx.StaticText(self, wx.ID_ANY, _(u"User: "))
self.user = wx.TextCtrl(self, wx.NewId()) self.user = wx.TextCtrl(self, wx.ID_ANY)
userBox = wx.BoxSizer(wx.HORIZONTAL) userBox = wx.BoxSizer(wx.HORIZONTAL)
userBox.Add(lbl, 0, wx.ALL, 5) userBox.Add(lbl, 0, wx.ALL, 5)
userBox.Add(self.user, 0, wx.ALL, 5) userBox.Add(self.user, 0, wx.ALL, 5)
sizer.Add(userBox, 0, wx.ALL, 5) sizer.Add(userBox, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"Password: ")) lbl = wx.StaticText(self, wx.ID_ANY, _(u"Password: "))
self.password = wx.TextCtrl(self, wx.NewId(), style=wx.TE_PASSWORD) self.password = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_PASSWORD)
passwordBox = wx.BoxSizer(wx.HORIZONTAL) passwordBox = wx.BoxSizer(wx.HORIZONTAL)
passwordBox.Add(lbl, 0, wx.ALL, 5) passwordBox.Add(lbl, 0, wx.ALL, 5)
passwordBox.Add(self.password, 0, wx.ALL, 5) passwordBox.Add(self.password, 0, wx.ALL, 5)
@ -98,34 +98,34 @@ 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"Autocompletion settings...")) self.au = wx.Button(self, wx.ID_ANY, _(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 timestamps")) self.relative_time = wx.CheckBox(self, wx.ID_ANY, _(U"Relative timestamps"))
sizer.Add(self.relative_time, 0, wx.ALL, 5) sizer.Add(self.relative_time, 0, wx.ALL, 5)
if application.streaming_lives(): if application.streaming_lives():
apiCallsBox = wx.BoxSizer(wx.HORIZONTAL) apiCallsBox = wx.BoxSizer(wx.HORIZONTAL)
apiCallsBox.Add(wx.StaticText(self, -1, _(u"API calls (One API call = 200 tweets, two API calls = 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.ID_ANY)
self.apiCalls.SetRange(1, 10) self.apiCalls.SetRange(1, 10)
self.apiCalls.SetSize(self.apiCalls.GetBestSize()) self.apiCalls.SetSize(self.apiCalls.GetBestSize())
apiCallsBox.Add(self.apiCalls, 0, wx.ALL, 5) apiCallsBox.Add(self.apiCalls, 0, wx.ALL, 5)
sizer.Add(apiCallsBox, 0, wx.ALL, 5) sizer.Add(apiCallsBox, 0, wx.ALL, 5)
tweetsPerCallBox = wx.BoxSizer(wx.HORIZONTAL) tweetsPerCallBox = wx.BoxSizer(wx.HORIZONTAL)
tweetsPerCallBox.Add(wx.StaticText(self, -1, _(u"Items on each API call")), 0, wx.ALL, 5) tweetsPerCallBox.Add(wx.StaticText(self, -1, _(u"Items on each API call")), 0, wx.ALL, 5)
self.itemsPerApiCall = wx.SpinCtrl(self, wx.NewId()) self.itemsPerApiCall = wx.SpinCtrl(self, wx.ID_ANY)
self.itemsPerApiCall.SetRange(0, 200) self.itemsPerApiCall.SetRange(0, 200)
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 while the oldest at the end")) self.reverse_timelines = wx.CheckBox(self, wx.ID_ANY, _(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"Retweet mode")) lbl = wx.StaticText(self, wx.ID_ANY, _(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.ID_ANY, 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)
rMode.Add(self.retweet_mode, 0, wx.ALL, 5) rMode.Add(self.retweet_mode, 0, wx.ALL, 5)
sizer.Add(rMode, 0, wx.ALL, 5) sizer.Add(rMode, 0, wx.ALL, 5)
self.show_screen_names = wx.CheckBox(self, wx.NewId(), _(U"Show screen names instead of full names")) self.show_screen_names = wx.CheckBox(self, wx.ID_ANY, _(U"Show screen names instead of full names"))
sizer.Add(self.show_screen_names, 0, wx.ALL, 5) sizer.Add(self.show_screen_names, 0, wx.ALL, 5)
PersistSizeLabel = wx.StaticText(self, -1, _(u"Number of items per buffer to cache in database (0 to disable caching, blank for unlimited)")) PersistSizeLabel = wx.StaticText(self, -1, _(u"Number of items per buffer to cache in database (0 to disable caching, blank for unlimited)"))
self.persist_size = wx.TextCtrl(self, -1) self.persist_size = wx.TextCtrl(self, -1)
@ -137,9 +137,9 @@ class reporting(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent): def __init__(self, parent):
super(reporting, self).__init__(parent) super(reporting, self).__init__(parent)
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
self.speech_reporting = wx.CheckBox(self, wx.NewId(), _(U"Enable automatic speech feedback")) self.speech_reporting = wx.CheckBox(self, wx.ID_ANY, _(U"Enable automatic speech feedback"))
sizer.Add(self.speech_reporting, 0, wx.ALL, 5) sizer.Add(self.speech_reporting, 0, wx.ALL, 5)
self.braille_reporting = wx.CheckBox(self, wx.NewId(), _(U"Enable automatic Braille feedback")) self.braille_reporting = wx.CheckBox(self, wx.ID_ANY, _(U"Enable automatic Braille feedback"))
sizer.Add(self.braille_reporting, 0, wx.ALL, 5) sizer.Add(self.braille_reporting, 0, wx.ALL, 5)
self.SetSizer(sizer) self.SetSizer(sizer)
@ -326,7 +326,7 @@ class extrasPanel(wx.Panel):
ocrLanguageSizer = wx.StaticBoxSizer(OCRBox, wx.HORIZONTAL) ocrLanguageSizer = wx.StaticBoxSizer(OCRBox, wx.HORIZONTAL)
ocrLanguageSizer.Add(self.ocr_lang, 0, wx.ALL, 5) ocrLanguageSizer.Add(self.ocr_lang, 0, wx.ALL, 5)
mainSizer.Add(ocrLanguageSizer, 0, wx.ALL, 5) mainSizer.Add(ocrLanguageSizer, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"API Key for SndUp")) lbl = wx.StaticText(self, wx.ID_ANY, _(u"API Key for SndUp"))
self.sndup_apiKey = wx.TextCtrl(self, -1) self.sndup_apiKey = wx.TextCtrl(self, -1)
sndupBox = wx.BoxSizer(wx.HORIZONTAL) sndupBox = wx.BoxSizer(wx.HORIZONTAL)
sndupBox.Add(lbl, 0, wx.ALL, 5) sndupBox.Add(lbl, 0, wx.ALL, 5)

View File

@ -11,7 +11,7 @@ class filterDialog(baseDialog.BaseWXDialog):
panel = wx.Panel(self) panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
self.SetTitle(_(u"Create a filter for this buffer")) self.SetTitle(_(u"Create a filter for this buffer"))
label = wx.StaticText(panel, wx.NewId(), _(u"Filter title")) label = wx.StaticText(panel, wx.ID_ANY, _(u"Filter title"))
self.title = wx.TextCtrl(panel, -1, value) self.title = wx.TextCtrl(panel, -1, value)
dc = wx.WindowDC(self.title) dc = wx.WindowDC(self.title)
dc.SetFont(self.title.GetFont()) dc.SetFont(self.title.GetFont())
@ -32,9 +32,9 @@ class filterDialog(baseDialog.BaseWXDialog):
dc = wx.WindowDC(self.term) dc = wx.WindowDC(self.term)
dc.SetFont(self.term.GetFont()) dc.SetFont(self.term.GetFont())
self.term.SetSize(dc.GetTextExtent("0"*40)) self.term.SetSize(dc.GetTextExtent("0"*40))
self.allow_rts = wx.CheckBox(panel, wx.NewId(), _(u"Allow retweets")) self.allow_rts = wx.CheckBox(panel, wx.ID_ANY, _(u"Allow retweets"))
self.allow_quotes = wx.CheckBox(panel, wx.NewId(), _(u"Allow quoted tweets")) self.allow_quotes = wx.CheckBox(panel, wx.ID_ANY, _(u"Allow quoted tweets"))
self.allow_replies = wx.CheckBox(panel, wx.NewId(), _(u"Allow replies")) self.allow_replies = wx.CheckBox(panel, wx.ID_ANY, _(u"Allow replies"))
self.allow_rts.SetValue(True) self.allow_rts.SetValue(True)
self.allow_quotes.SetValue(True) self.allow_quotes.SetValue(True)
self.allow_replies.SetValue(True) self.allow_replies.SetValue(True)
@ -42,7 +42,7 @@ class filterDialog(baseDialog.BaseWXDialog):
bsizer.Add(label, 0, wx.ALL, 5) bsizer.Add(label, 0, wx.ALL, 5)
bsizer.Add(self.term, 0, wx.ALL, 5) bsizer.Add(self.term, 0, wx.ALL, 5)
sizer.Add(bsizer, 0, wx.ALL, 5) sizer.Add(bsizer, 0, wx.ALL, 5)
self.regexp = wx.CheckBox(panel, wx.NewId(), _(u"Use this term as a regular expression")) self.regexp = wx.CheckBox(panel, wx.ID_ANY, _(u"Use this term as a regular expression"))
sizer.Add(self.regexp, 0, wx.ALL, 5) sizer.Add(self.regexp, 0, wx.ALL, 5)
staticbox = wx.StaticBox(panel, label=_(u"Filter by language")) staticbox = wx.StaticBox(panel, label=_(u"Filter by language"))
self.load_language = wx.RadioButton(panel, -1, _(u"Load tweets in the following languages"), style=wx.RB_GROUP) self.load_language = wx.RadioButton(panel, -1, _(u"Load tweets in the following languages"), style=wx.RB_GROUP)
@ -63,13 +63,13 @@ class filterDialog(baseDialog.BaseWXDialog):
langsSizer = wx.BoxSizer() langsSizer = wx.BoxSizer()
langsSizer.Add(langsLabel, 0, wx.ALL, 5) langsSizer.Add(langsLabel, 0, wx.ALL, 5)
langsSizer.Add(self.cb, 0, wx.ALL, 5) langsSizer.Add(self.cb, 0, wx.ALL, 5)
self.add = wx.Button(panel, wx.NewId(), _(u"Add selected language to filter")) self.add = wx.Button(panel, wx.ID_ANY, _(u"Add selected language to filter"))
self.add.Bind(wx.EVT_BUTTON, self.add_lang) self.add.Bind(wx.EVT_BUTTON, self.add_lang)
langsSizer.Add(self.add, 0, wx.ALL, 5) langsSizer.Add(self.add, 0, wx.ALL, 5)
sizer.Add(langsSizer, 0, wx.ALL, 5) sizer.Add(langsSizer, 0, wx.ALL, 5)
lbl = wx.StaticText(panel, wx.NewId(), _(u"Selected languages")) lbl = wx.StaticText(panel, wx.ID_ANY, _(u"Selected languages"))
self.langs = wx.ListBox(panel, -1) self.langs = wx.ListBox(panel, -1)
self.remove = wx.Button(panel, wx.NewId(), _(u"Remove")) self.remove = wx.Button(panel, wx.ID_ANY, _(u"Remove"))
self.remove.Bind(wx.EVT_BUTTON, self.remove_lang) self.remove.Bind(wx.EVT_BUTTON, self.remove_lang)
selectionSizer = wx.BoxSizer(wx.HORIZONTAL) selectionSizer = wx.BoxSizer(wx.HORIZONTAL)
selectionSizer.Add(lbl, 0, wx.ALL, 5) selectionSizer.Add(lbl, 0, wx.ALL, 5)
@ -125,9 +125,9 @@ class filterManagerDialog(widgetUtils.BaseDialog):
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(label) sizer.Add(label)
sizer.Add(self.filters.list) sizer.Add(self.filters.list)
self.edit = wx.Button(panel, wx.NewId(), _(u"Edit")) self.edit = wx.Button(panel, wx.ID_ANY, _(u"Edit"))
self.edit.Enable(False) self.edit.Enable(False)
self.delete = wx.Button(panel, wx.NewId(), _(u"Remove")) self.delete = wx.Button(panel, wx.ID_ANY, _(u"Remove"))
self.cancel = wx.Button(panel, wx.ID_CANCEL) self.cancel = wx.Button(panel, wx.ID_CANCEL)
btnSizer = wx.BoxSizer() btnSizer = wx.BoxSizer()
btnSizer.Add(self.edit, 0, wx.ALL, 5) btnSizer.Add(self.edit, 0, wx.ALL, 5)

View File

@ -15,7 +15,7 @@ class listViewer(widgetUtils.BaseDialog):
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(label) sizer.Add(label)
sizer.Add(self.lista.list) sizer.Add(self.lista.list)
self.createBtn = wx.Button(panel, wx.NewId(), _(u"Create a new list")) self.createBtn = wx.Button(panel, wx.ID_ANY, _(u"Create a new list"))
self.editBtn = wx.Button(panel, -1, _(u"Edit")) self.editBtn = wx.Button(panel, -1, _(u"Edit"))
self.deleteBtn = wx.Button(panel, -1, _(u"Remove")) self.deleteBtn = wx.Button(panel, -1, _(u"Remove"))
self.view = wx.Button(panel, -1, _(u"Open in buffer")) self.view = wx.Button(panel, -1, _(u"Open in buffer"))

View File

@ -98,7 +98,7 @@ class tweet(textLimited):
self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 10) self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 10)
self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 10) self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 10)
self.mainBox.Add(self.ok_cancelSizer) self.mainBox.Add(self.ok_cancelSizer)
selectId = wx.NewId() selectId = wx.ID_ANY
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId) self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)
self.accel_tbl = wx.AcceleratorTable([ self.accel_tbl = wx.AcceleratorTable([
(wx.ACCEL_CTRL, ord('A'), selectId), (wx.ACCEL_CTRL, ord('A'), selectId),
@ -157,7 +157,7 @@ class retweet(tweet):
self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 10) self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 10)
self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 10) self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 10)
self.mainBox.Add(self.ok_cancelSizer) self.mainBox.Add(self.ok_cancelSizer)
selectId = wx.NewId() selectId = wx.ID_ANY
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId) self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)
self.accel_tbl = wx.AcceleratorTable([ self.accel_tbl = wx.AcceleratorTable([
(wx.ACCEL_CTRL, ord('A'), selectId), (wx.ACCEL_CTRL, ord('A'), selectId),
@ -279,7 +279,7 @@ class reply(textLimited):
self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 10) self.ok_cancelSizer.Add(self.okButton, 0, wx.ALL, 10)
self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 10) self.ok_cancelSizer.Add(cancelButton, 0, wx.ALL, 10)
self.mainBox.Add(self.ok_cancelSizer, 0, wx.ALL, 10) self.mainBox.Add(self.ok_cancelSizer, 0, wx.ALL, 10)
selectId = wx.NewId() selectId = wx.ID_ANY
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId) self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)
self.accel_tbl = wx.AcceleratorTable([ self.accel_tbl = wx.AcceleratorTable([
(wx.ACCEL_CTRL, ord('A'), selectId), (wx.ACCEL_CTRL, ord('A'), selectId),
@ -356,7 +356,7 @@ class viewTweet(widgetUtils.BaseDialog):
buttonsBox.Add(self.translateButton, 0, wx.ALL, 5) buttonsBox.Add(self.translateButton, 0, wx.ALL, 5)
buttonsBox.Add(cancelButton, 0, wx.ALL, 5) buttonsBox.Add(cancelButton, 0, wx.ALL, 5)
mainBox.Add(buttonsBox, 0, wx.ALL, 5) mainBox.Add(buttonsBox, 0, wx.ALL, 5)
selectId = wx.NewId() selectId = wx.ID_ANY
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId) self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)
self.accel_tbl = wx.AcceleratorTable([ self.accel_tbl = wx.AcceleratorTable([
(wx.ACCEL_CTRL, ord('A'), selectId), (wx.ACCEL_CTRL, ord('A'), selectId),
@ -418,7 +418,7 @@ class viewNonTweet(widgetUtils.BaseDialog):
buttonsBox.Add(self.translateButton, 0, wx.ALL, 5) buttonsBox.Add(self.translateButton, 0, wx.ALL, 5)
buttonsBox.Add(cancelButton, 0, wx.ALL, 5) buttonsBox.Add(cancelButton, 0, wx.ALL, 5)
mainBox.Add(buttonsBox, 0, wx.ALL, 5) mainBox.Add(buttonsBox, 0, wx.ALL, 5)
selectId = wx.NewId() selectId = wx.ID_ANY
self.Bind(wx.EVT_MENU, self.onSelect, id=selectId) self.Bind(wx.EVT_MENU, self.onSelect, id=selectId)
self.accel_tbl = wx.AcceleratorTable([ self.accel_tbl = wx.AcceleratorTable([
(wx.ACCEL_CTRL, ord('A'), selectId), (wx.ACCEL_CTRL, ord('A'), selectId),

View File

@ -4,7 +4,7 @@ import baseDialog
class showUserProfile(baseDialog.BaseWXDialog): class showUserProfile(baseDialog.BaseWXDialog):
def __init__(self): def __init__(self):
super(showUserProfile, self).__init__(parent=None, id=wx.NewId()) super(showUserProfile, self).__init__(parent=None, id=wx.ID_ANY)
panel = wx.Panel(self) panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
static = wx.StaticText(panel, -1, _(u"Details")) static = wx.StaticText(panel, -1, _(u"Details"))

View File

@ -21,7 +21,7 @@ import baseDialog
class selectUserDialog(baseDialog.BaseWXDialog): class selectUserDialog(baseDialog.BaseWXDialog):
def __init__(self, title, users): def __init__(self, title, users):
super(selectUserDialog, self).__init__(parent=None, id=wx.NewId(), title=title) super(selectUserDialog, self).__init__(parent=None, id=wx.ID_ANY, title=title)
panel = wx.Panel(self) panel = wx.Panel(self)
userSizer = wx.BoxSizer() userSizer = wx.BoxSizer()
self.cb = wx.ComboBox(panel, -1, choices=users, value=users[0], size=wx.DefaultSize) self.cb = wx.ComboBox(panel, -1, choices=users, value=users[0], size=wx.DefaultSize)

View File

@ -4,94 +4,94 @@ import wx
class basePanelMenu(wx.Menu): class basePanelMenu(wx.Menu):
def __init__(self): def __init__(self):
super(basePanelMenu, self).__init__() super(basePanelMenu, self).__init__()
self.retweet = wx.MenuItem(self, wx.NewId(), _(u"&Retweet")) self.retweet = wx.MenuItem(self, wx.ID_ANY, _(u"&Retweet"))
self.Append(self.retweet) self.Append(self.retweet)
self.reply = wx.MenuItem(self, wx.NewId(), _(u"Re&ply")) self.reply = wx.MenuItem(self, wx.ID_ANY, _(u"Re&ply"))
self.Append(self.reply) self.Append(self.reply)
self.fav = wx.MenuItem(self, wx.NewId(), _(u"&Like")) self.fav = wx.MenuItem(self, wx.ID_ANY, _(u"&Like"))
self.Append(self.fav) self.Append(self.fav)
self.unfav = wx.MenuItem(self, wx.NewId(), _(u"&Unlike")) self.unfav = wx.MenuItem(self, wx.ID_ANY, _(u"&Unlike"))
self.Append(self.unfav) self.Append(self.unfav)
self.openUrl = wx.MenuItem(self, wx.NewId(), _(u"&Open URL")) self.openUrl = wx.MenuItem(self, wx.ID_ANY, _(u"&Open URL"))
self.Append(self.openUrl) self.Append(self.openUrl)
self.play = wx.MenuItem(self, wx.NewId(), _(u"&Play audio")) self.play = wx.MenuItem(self, wx.ID_ANY, _(u"&Play audio"))
self.Append(self.play) self.Append(self.play)
self.view = wx.MenuItem(self, wx.NewId(), _(u"&Show tweet")) self.view = wx.MenuItem(self, wx.ID_ANY, _(u"&Show tweet"))
self.Append(self.view) self.Append(self.view)
self.copy = wx.MenuItem(self, wx.NewId(), _(u"&Copy to clipboard")) self.copy = wx.MenuItem(self, wx.ID_ANY, _(u"&Copy to clipboard"))
self.Append(self.copy) self.Append(self.copy)
self.remove = wx.MenuItem(self, wx.NewId(), _(u"&Delete")) self.remove = wx.MenuItem(self, wx.ID_ANY, _(u"&Delete"))
self.Append(self.remove) self.Append(self.remove)
self.userActions = wx.MenuItem(self, wx.NewId(), _(u"&User actions...")) self.userActions = wx.MenuItem(self, wx.ID_ANY, _(u"&User actions..."))
self.Append(self.userActions) self.Append(self.userActions)
class dmPanelMenu(wx.Menu): class dmPanelMenu(wx.Menu):
def __init__(self): def __init__(self):
super(dmPanelMenu, self).__init__() super(dmPanelMenu, self).__init__()
self.reply = wx.MenuItem(self, wx.NewId(), _(u"Re&ply")) self.reply = wx.MenuItem(self, wx.ID_ANY, _(u"Re&ply"))
self.Append(self.reply) self.Append(self.reply)
self.openUrl = wx.MenuItem(self, wx.NewId(), _(u"&Open URL")) self.openUrl = wx.MenuItem(self, wx.ID_ANY, _(u"&Open URL"))
self.Append(self.openUrl) self.Append(self.openUrl)
self.play = wx.MenuItem(self, wx.NewId(), _(u"&Play audio")) self.play = wx.MenuItem(self, wx.ID_ANY, _(u"&Play audio"))
self.Append(self.play) self.Append(self.play)
self.view = wx.MenuItem(self, wx.NewId(), _(u"&Show direct message")) self.view = wx.MenuItem(self, wx.ID_ANY, _(u"&Show direct message"))
self.Append(self.view) self.Append(self.view)
self.copy = wx.MenuItem(self, wx.NewId(), _(u"&Copy to clipboard")) self.copy = wx.MenuItem(self, wx.ID_ANY, _(u"&Copy to clipboard"))
self.Append(self.copy) self.Append(self.copy)
self.remove = wx.MenuItem(self, wx.NewId(), _(u"&Delete")) self.remove = wx.MenuItem(self, wx.ID_ANY, _(u"&Delete"))
self.Append(self.remove) self.Append(self.remove)
self.userActions = wx.MenuItem(self, wx.NewId(), _(u"&User actions...")) self.userActions = wx.MenuItem(self, wx.ID_ANY, _(u"&User actions..."))
self.Append(self.userActions) self.Append(self.userActions)
class sentPanelMenu(wx.Menu): class sentPanelMenu(wx.Menu):
def __init__(self): def __init__(self):
super(sentPanelMenu, self).__init__() super(sentPanelMenu, self).__init__()
self.openUrl = wx.MenuItem(self, wx.NewId(), _(u"&Open URL")) self.openUrl = wx.MenuItem(self, wx.ID_ANY, _(u"&Open URL"))
self.Append(self.openUrl) self.Append(self.openUrl)
self.play = wx.MenuItem(self, wx.NewId(), _(u"&Play audio")) self.play = wx.MenuItem(self, wx.ID_ANY, _(u"&Play audio"))
self.Append(self.play) self.Append(self.play)
self.view = wx.MenuItem(self, wx.NewId(), _(u"&Show tweet")) self.view = wx.MenuItem(self, wx.ID_ANY, _(u"&Show tweet"))
self.Append(self.view) self.Append(self.view)
self.copy = wx.MenuItem(self, wx.NewId(), _(u"&Copy to clipboard")) self.copy = wx.MenuItem(self, wx.ID_ANY, _(u"&Copy to clipboard"))
self.Append(self.copy) self.Append(self.copy)
self.remove = wx.MenuItem(self, wx.NewId(), _(u"&Delete")) self.remove = wx.MenuItem(self, wx.ID_ANY, _(u"&Delete"))
self.Append(self.remove) self.Append(self.remove)
class eventsPanelMenu(wx.Menu): class eventsPanelMenu(wx.Menu):
def __init__(self): def __init__(self):
super(eventsPanelMenu, self).__init__() super(eventsPanelMenu, self).__init__()
self.view = wx.MenuItem(self, wx.NewId(), _(u"&Show event")) self.view = wx.MenuItem(self, wx.ID_ANY, _(u"&Show event"))
self.Append(self.view) self.Append(self.view)
self.copy = wx.MenuItem(self, wx.NewId(), _(u"&Copy to clipboard")) self.copy = wx.MenuItem(self, wx.ID_ANY, _(u"&Copy to clipboard"))
self.Append(self.copy) self.Append(self.copy)
self.remove = wx.MenuItem(self, wx.NewId(), _(u"&Delete")) self.remove = wx.MenuItem(self, wx.ID_ANY, _(u"&Delete"))
self.Append(self.remove) self.Append(self.remove)
class peoplePanelMenu(wx.Menu): class peoplePanelMenu(wx.Menu):
def __init__(self): def __init__(self):
super(peoplePanelMenu, self).__init__() super(peoplePanelMenu, self).__init__()
self.reply = wx.MenuItem(self, wx.NewId(), _(u"Direct &message")) self.reply = wx.MenuItem(self, wx.ID_ANY, _(u"Direct &message"))
self.Append(self.reply) self.Append(self.reply)
self.lists = wx.MenuItem(self, wx.NewId(), _(u"&View lists")) self.lists = wx.MenuItem(self, wx.ID_ANY, _(u"&View lists"))
self.Append(self.lists) self.Append(self.lists)
self.lists.Enable(False) self.lists.Enable(False)
self.details = wx.MenuItem(self, wx.NewId(), _(u"Show user &profile")) self.details = wx.MenuItem(self, wx.ID_ANY, _(u"Show user &profile"))
self.Append(self.details) self.Append(self.details)
self.view = wx.MenuItem(self, wx.NewId(), _(u"&Show user")) self.view = wx.MenuItem(self, wx.ID_ANY, _(u"&Show user"))
self.Append(self.view) self.Append(self.view)
self.copy = wx.MenuItem(self, wx.NewId(), _(u"&Copy to clipboard")) self.copy = wx.MenuItem(self, wx.ID_ANY, _(u"&Copy to clipboard"))
self.Append(self.copy) self.Append(self.copy)
self.userActions = wx.MenuItem(self, wx.NewId(), _(u"&User actions...")) self.userActions = wx.MenuItem(self, wx.ID_ANY, _(u"&User actions..."))
self.Append(self.userActions) self.Append(self.userActions)
class trendsPanelMenu(wx.Menu): class trendsPanelMenu(wx.Menu):
def __init__(self): def __init__(self):
super(trendsPanelMenu, self).__init__() super(trendsPanelMenu, self).__init__()
self.search_topic = wx.MenuItem(self, wx.NewId(), _(u"Search topic")) self.search_topic = wx.MenuItem(self, wx.ID_ANY, _(u"Search topic"))
self.Append(self.search_topic) self.Append(self.search_topic)
self.tweetThisTrend = wx.MenuItem(self, wx.NewId(), _(u"&Tweet about this trend")) self.tweetThisTrend = wx.MenuItem(self, wx.ID_ANY, _(u"&Tweet about this trend"))
self.Append(self.tweetThisTrend) self.Append(self.tweetThisTrend)
self.view = wx.MenuItem(self, wx.NewId(), _(u"&Show item")) self.view = wx.MenuItem(self, wx.ID_ANY, _(u"&Show item"))
self.Append(self.view) self.Append(self.view)
self.copy = wx.MenuItem(self, wx.NewId(), _(u"&Copy to clipboard")) self.copy = wx.MenuItem(self, wx.ID_ANY, _(u"&Copy to clipboard"))
self.Append(self.copy) self.Append(self.copy)

View File

@ -13,66 +13,66 @@ class mainFrame(wx.Frame):
# Application menu # Application menu
app = wx.Menu() app = wx.Menu()
self.manage_accounts = app.Append(wx.NewId(), _(u"&Manage accounts")) self.manage_accounts = app.Append(wx.ID_ANY, _(u"&Manage accounts"))
self.updateProfile = app.Append(wx.NewId(), _(u"&Update profile")) self.updateProfile = app.Append(wx.ID_ANY, _(u"&Update profile"))
self.show_hide = app.Append(wx.NewId(), _(u"&Hide window")) self.show_hide = app.Append(wx.ID_ANY, _(u"&Hide window"))
self.menuitem_search = app.Append(wx.NewId(), _(u"&Search")) self.menuitem_search = app.Append(wx.ID_ANY, _(u"&Search"))
self.lists = app.Append(wx.NewId(), _(u"&Lists manager")) self.lists = app.Append(wx.ID_ANY, _(u"&Lists manager"))
self.keystroke_editor = app.Append(wx.NewId(), _(u"&Edit keystrokes")) self.keystroke_editor = app.Append(wx.ID_ANY, _(u"&Edit keystrokes"))
self.account_settings = app.Append(wx.NewId(), _(u"Account se&ttings")) self.account_settings = app.Append(wx.ID_ANY, _(u"Account se&ttings"))
self.prefs = app.Append(wx.ID_PREFERENCES, _(u"&Global settings")) self.prefs = app.Append(wx.ID_PREFERENCES, _(u"&Global settings"))
self.close = app.Append(wx.ID_EXIT, _(u"E&xit")) self.close = app.Append(wx.ID_EXIT, _(u"E&xit"))
# Tweet menu # Tweet menu
tweet = wx.Menu() tweet = wx.Menu()
self.compose = tweet.Append(wx.NewId(), _(u"&Tweet")) self.compose = tweet.Append(wx.ID_ANY, _(u"&Tweet"))
self.reply = tweet.Append(wx.NewId(), _(u"Re&ply")) self.reply = tweet.Append(wx.ID_ANY, _(u"Re&ply"))
self.retweet = tweet.Append(wx.NewId(), _(u"&Retweet")) self.retweet = tweet.Append(wx.ID_ANY, _(u"&Retweet"))
self.fav = tweet.Append(wx.NewId(), _(u"&Like")) self.fav = tweet.Append(wx.ID_ANY, _(u"&Like"))
self.unfav = tweet.Append(wx.NewId(), _(u"&Unlike")) self.unfav = tweet.Append(wx.ID_ANY, _(u"&Unlike"))
self.view = tweet.Append(wx.NewId(), _(u"&Show tweet")) self.view = tweet.Append(wx.ID_ANY, _(u"&Show tweet"))
self.view_coordinates = tweet.Append(wx.NewId(), _(u"View &address")) self.view_coordinates = tweet.Append(wx.ID_ANY, _(u"View &address"))
self.view_conversation = tweet.Append(wx.NewId(), _(u"View conversa&tion")) self.view_conversation = tweet.Append(wx.ID_ANY, _(u"View conversa&tion"))
self.ocr = tweet.Append(wx.NewId(), _(u"Read text in picture")) self.ocr = tweet.Append(wx.ID_ANY, _(u"Read text in picture"))
self.delete = tweet.Append(wx.NewId(), _(u"&Delete")) self.delete = tweet.Append(wx.ID_ANY, _(u"&Delete"))
# User menu # User menu
user = wx.Menu() user = wx.Menu()
self.follow = user.Append(wx.NewId(), _(u"&Actions...")) self.follow = user.Append(wx.ID_ANY, _(u"&Actions..."))
self.timeline = user.Append(wx.NewId(), _(u"&View timeline...")) self.timeline = user.Append(wx.ID_ANY, _(u"&View timeline..."))
self.dm = user.Append(wx.NewId(), _(u"Direct me&ssage")) self.dm = user.Append(wx.ID_ANY, _(u"Direct me&ssage"))
self.addToList = user.Append(wx.NewId(), _(u"&Add to list")) self.addToList = user.Append(wx.ID_ANY, _(u"&Add to list"))
self.removeFromList = user.Append(wx.NewId(), _(u"R&emove from list")) self.removeFromList = user.Append(wx.ID_ANY, _(u"R&emove from list"))
self.viewLists = user.Append(wx.NewId(), _(u"&View lists")) self.viewLists = user.Append(wx.ID_ANY, _(u"&View lists"))
self.details = user.Append(wx.NewId(), _(u"Show user &profile")) self.details = user.Append(wx.ID_ANY, _(u"Show user &profile"))
self.favs = user.Append(wx.NewId(), _(u"V&iew likes")) self.favs = user.Append(wx.ID_ANY, _(u"V&iew likes"))
# buffer menu # buffer menu
buffer = wx.Menu() buffer = wx.Menu()
self.update_buffer = buffer.Append(wx.NewId(), _(u"&Update buffer")) self.update_buffer = buffer.Append(wx.ID_ANY, _(u"&Update buffer"))
self.trends = buffer.Append(wx.NewId(), _(u"New &trending topics buffer...")) self.trends = buffer.Append(wx.ID_ANY, _(u"New &trending topics buffer..."))
self.filter = buffer.Append(wx.NewId(), _(u"Create a &filter")) self.filter = buffer.Append(wx.ID_ANY, _(u"Create a &filter"))
self.manage_filters = buffer.Append(wx.NewId(), _(u"&Manage filters")) self.manage_filters = buffer.Append(wx.ID_ANY, _(u"&Manage filters"))
self.find = buffer.Append(wx.NewId(), _(u"Find a string in the currently focused buffer...")) self.find = buffer.Append(wx.ID_ANY, _(u"Find a string in the currently focused buffer..."))
self.load_previous_items = buffer.Append(wx.NewId(), _(u"&Load previous items")) self.load_previous_items = buffer.Append(wx.ID_ANY, _(u"&Load previous items"))
buffer.AppendSeparator() buffer.AppendSeparator()
self.mute_buffer = buffer.AppendCheckItem(wx.NewId(), _(u"&Mute")) self.mute_buffer = buffer.AppendCheckItem(wx.ID_ANY, _(u"&Mute"))
self.autoread = buffer.AppendCheckItem(wx.NewId(), _(u"&Autoread")) self.autoread = buffer.AppendCheckItem(wx.ID_ANY, _(u"&Autoread"))
self.clear = buffer.Append(wx.NewId(), _(u"&Clear buffer")) self.clear = buffer.Append(wx.ID_ANY, _(u"&Clear buffer"))
self.deleteTl = buffer.Append(wx.NewId(), _(u"&Destroy")) self.deleteTl = buffer.Append(wx.ID_ANY, _(u"&Destroy"))
# audio menu # audio menu
audio = wx.Menu() audio = wx.Menu()
self.seekLeft = audio.Append(wx.NewId(), _(u"&Seek back 5 seconds")) self.seekLeft = audio.Append(wx.ID_ANY, _(u"&Seek back 5 seconds"))
self.seekRight = audio.Append(wx.NewId(), _(u"&Seek forward 5 seconds")) self.seekRight = audio.Append(wx.ID_ANY, _(u"&Seek forward 5 seconds"))
# Help Menu # Help Menu
help = wx.Menu() help = wx.Menu()
self.doc = help.Append(-1, _(u"&Documentation")) self.doc = help.Append(-1, _(u"&Documentation"))
self.sounds_tutorial = help.Append(wx.NewId(), _(u"Sounds &tutorial")) self.sounds_tutorial = help.Append(wx.ID_ANY, _(u"Sounds &tutorial"))
self.changelog = help.Append(wx.NewId(), _(u"&What's new in this version?")) self.changelog = help.Append(wx.ID_ANY, _(u"&What's new in this version?"))
self.check_for_updates = help.Append(wx.NewId(), _(u"&Check for updates")) self.check_for_updates = help.Append(wx.ID_ANY, _(u"&Check for updates"))
self.reportError = help.Append(wx.NewId(), _(u"&Report an error")) self.reportError = help.Append(wx.ID_ANY, _(u"&Report an error"))
self.visit_website = help.Append(-1, _(u"{0}'s &website").format(application.name,)) self.visit_website = help.Append(-1, _(u"{0}'s &website").format(application.name,))
self.about = help.Append(-1, _(u"About &{0}").format(application.name,)) self.about = help.Append(-1, _(u"About &{0}").format(application.name,))
@ -115,7 +115,7 @@ class mainFrame(wx.Frame):
self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer = wx.BoxSizer(wx.VERTICAL)
self.SetTitle(application.name) 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.ID_ANY)
self.buffers = {} self.buffers = {}
def get_buffer_count(self): def get_buffer_count(self):