Fixes for the V 9.4 snapshot

This commit is contained in:
Manuel Cortez 2015-06-11 16:09:46 -05:00
parent 4b882d8586
commit aa5977f324
7 changed files with 25 additions and 14 deletions

View File

@ -5,7 +5,7 @@ if snapshot == False:
version = "0.80" version = "0.80"
update_url = 'http://twblue.es/updates/twblue_ngen.json' update_url = 'http://twblue.es/updates/twblue_ngen.json'
else: else:
version = "9.2" version = "9.4"
update_url = 'http://twblue.es/updates/snapshots_ngen.json' update_url = 'http://twblue.es/updates/snapshots_ngen.json'
author = u"Manuel Cortéz, Bill Dengler" author = u"Manuel Cortéz, Bill Dengler"
authorEmail = "manuel@manuelcortez.net" authorEmail = "manuel@manuelcortez.net"

View File

@ -100,9 +100,9 @@ class bufferController(object):
output.speak(_(u"Opening media..."), True) output.speak(_(u"Opening media..."), True)
if sound.URLPlayer.is_playable(url=url, play=True, volume=self.session.settings["sound"]["volume"]) == False: if sound.URLPlayer.is_playable(url=url, play=True, volume=self.session.settings["sound"]["volume"]) == False:
return webbrowser.open_new_tab(url) return webbrowser.open_new_tab(url)
else: # else:
output.speak(_(u"Not actionable."), True) # output.speak(_(u"Not actionable."), True)
self.session.sound.play("error.ogg") # self.session.sound.play("error.ogg")
def start_stream(self): def start_stream(self):
pass pass
@ -556,6 +556,15 @@ class listBufferController(baseBufferController):
self.users.append(i["id"]) self.users.append(i["id"])
next_cursor = users["next_cursor"] next_cursor = users["next_cursor"]
def remove_buffer(self):
dlg = commonMessageDialogs.remove_buffer()
if dlg == widgetUtils.YES:
if self.name[:-5] in self.session.settings["other_buffers"]["lists"]:
self.session.settings["other_buffers"]["lists"].remove(self.name[:-5])
return True
elif dlg == widgetUtils.NO:
return False
class eventsBufferController(bufferController): class eventsBufferController(bufferController):
def __init__(self, parent, name, session, account, *args, **kwargs): def __init__(self, parent, name, session, account, *args, **kwargs):
super(eventsBufferController, self).__init__(parent, *args, **kwargs) super(eventsBufferController, self).__init__(parent, *args, **kwargs)

View File

@ -305,7 +305,7 @@ class Controller(object):
self.buffers.append(blocks) self.buffers.append(blocks)
self.view.insert_buffer(blocks.buffer, name=_(u"Blocked users"), pos=self.view.search(session.db["user_name"], session.db["user_name"])) self.view.insert_buffer(blocks.buffer, name=_(u"Blocked users"), pos=self.view.search(session.db["user_name"], session.db["user_name"]))
elif i == 'muted': elif i == 'muted':
muted = buffersController.peopleBufferController(self.view.nb, "get_muted_users_list", "muted", session, session.db["user_name"]) muted = buffersController.peopleBufferController(self.view.nb, "list_mutes", "muted", session, session.db["user_name"])
self.buffers.append(muted) self.buffers.append(muted)
self.view.insert_buffer(muted.buffer, name=_(u"Muted users"), pos=self.view.search(session.db["user_name"], session.db["user_name"])) self.view.insert_buffer(muted.buffer, name=_(u"Muted users"), pos=self.view.search(session.db["user_name"], session.db["user_name"]))
elif i == 'events': elif i == 'events':

View File

@ -2,6 +2,7 @@
import wx import wx
import widgetUtils import widgetUtils
import application import application
class autocompletionSettingsDialog(widgetUtils.BaseDialog): class autocompletionSettingsDialog(widgetUtils.BaseDialog):
def __init__(self): def __init__(self):
super(autocompletionSettingsDialog, self).__init__(parent=None, id=-1, title=_(u"Autocomplete users settings")) super(autocompletionSettingsDialog, self).__init__(parent=None, id=-1, title=_(u"Autocomplete users settings"))

View File

@ -24,10 +24,10 @@ def call_threaded(func, *args, **kwargs):
def stream_threaded(func, *args, **kwargs): def stream_threaded(func, *args, **kwargs):
def new_func(*a, **k): def new_func(*a, **k):
# try: try:
func(**k) func(**k)
# except: except:
# pub.sendMessage("streamError", session=a[0]) pub.sendMessage("streamError", session=a[0])
thread = threading.Thread(target=new_func, args=args, kwargs=kwargs) thread = threading.Thread(target=new_func, args=args, kwargs=kwargs)
thread.daemon = True thread.daemon = True
thread.start() thread.start()

View File

@ -8,8 +8,8 @@ import output
logger = logging.getLogger("updater") logger = logging.getLogger("updater")
def do_update(): def do_update():
try: # try:
return update.perform_update(endpoint=application.update_url, current_version=application.version, app_name=application.name, update_available_callback=available_update_dialog, progress_callback=progress_callback, update_complete_callback=update_finished) return update.perform_update(endpoint=application.update_url, current_version=application.version, app_name=application.name, update_available_callback=available_update_dialog, progress_callback=progress_callback, update_complete_callback=update_finished)
except: # except:
logger.exception("Update failed.") # logger.exception("Update failed.")
output.speak("An exception occurred while attempting to update " + application.name + ". If this message persists, contact the " + application.name + " developers. More information about the exception has been written to the error log.",True) # output.speak("An exception occurred while attempting to update " + application.name + ". If this message persists, contact the " + application.name + " developers. More information about the exception has been written to the error log.",True)

View File

@ -6,6 +6,7 @@ import application
from multiplatform_widgets import widgets from multiplatform_widgets import widgets
import output import output
import config import config
class general(wx.Panel, baseDialog.BaseWXDialog): class general(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent, languages,keymaps): def __init__(self, parent, languages,keymaps):
super(general, self).__init__(parent) super(general, self).__init__(parent)