Added audio buffers creation

This commit is contained in:
Manuel Cortez 2016-04-12 15:59:22 -05:00
parent 69f4964158
commit ae47bea567
2 changed files with 12 additions and 3 deletions

View File

@ -205,8 +205,14 @@ class Controller(object):
user = a.get_user() user = a.get_user()
buffertype = a.get_buffer_type() buffertype = a.get_buffer_type()
user_id = "" user_id = ""
print user
for i in d: for i in d:
if i[1] == user: if i[1] == user:
user_id = i[0] user_id = i[0]
print user_id if user_id == None:
commonMessages.no_user_exist()
return
if buffertype == "audio":
audio = buffers.audioBuffer(parent=self.window.tb, name="{0}_audio".format(user_id,), composefunc="compose_audio", session=self.session, endpoint="get", parent_endpoint="audio", full_list=True, count=self.session.settings["buffers"]["count_for_audio_buffers"], user_id=user_id)
self.buffers.append(audio)
self.window.insert_buffer(audio.tab, _(u"{0}'s audios").format(user,), self.window.search("audios"))
call_threaded(audio.get_items)

View File

@ -9,4 +9,7 @@ def no_update_available():
return wx.MessageDialog(None, _(u"Your {0} version is up to date").format(application.name,), _(u"Update"), style=wx.OK).ShowModal() return wx.MessageDialog(None, _(u"Your {0} version is up to date").format(application.name,), _(u"Update"), style=wx.OK).ShowModal()
def remove_buffer(): def remove_buffer():
return wx.MessageDialog(None, _(u"Do you really want to dismiss this buffer?"), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal() return wx.MessageDialog(None, _(u"Do you really want to dismiss this buffer?"), _(u"Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
def no_user_exist():
wx.MessageDialog(None, _(u"This user does not exist"), _(u"Error"), style=wx.ICON_ERROR).ShowModal()