Multiupload attempt #1

This commit is contained in:
2019-12-04 12:45:47 -06:00
parent f3aeb9f61b
commit d91c4f4cf2
5 changed files with 51 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ class audioMenu(wx.Menu):
self.play = self.Append(wx.NewId(), _("&Play"))
self.library = self.Append(wx.NewId(), _("&Add to library"))
self.move = self.Append(wx.NewId(), _("Move to album"))
# self.open_in_browser = self.Append(wx.NewId(), _("Open in vk.com"))
self.download = self.Append(wx.NewId(), _("Download"))
class peopleMenu(wx.Menu):
def __init__(self, is_request=False, is_subscriber=False, not_friend=False, *args, **kwargs):

View File

@@ -8,7 +8,7 @@ class homeTab(wx.Panel):
def create_list(self):
self.lbl = wx.StaticText(self, wx.NewId(), _("Po&sts"))
self.list = widgetUtils.list(self, *[_("User"), _("Text"), _("Date")], style=wx.LC_REPORT)
self.list = widgetUtils.list(self, *[_("User"), _("Text"), _("Date")], style=wx.LC_REPORT, name=_("Posts"))
self.list.set_windows_size(0, 200)
self.list.set_windows_size(1, 300)
self.list.set_windows_size(2, 250)
@@ -64,7 +64,7 @@ class communityTab(feedTab):
class audioTab(homeTab):
def create_list(self):
self.lbl = wx.StaticText(self, wx.NewId(), _("Mu&sic"))
self.list = widgetUtils.multiselectionList(self, *[_("Title"), _("Artist"), _("Duration")], style=wx.LC_REPORT)
self.list = widgetUtils.multiselectionList(self, *[_("Title"), _("Artist"), _("Duration")], style=wx.LC_REPORT, name=_("Music"))
self.list.set_windows_size(0, 160)
self.list.set_windows_size(1, 380)
self.list.set_windows_size(2, 80)
@@ -87,6 +87,15 @@ class audioTab(homeTab):
return None
return openFileDialog.GetPath()
def get_download_path(self, filename="", multiple=False):
if multiple == False:
d = wx.FileDialog(self, _("Save this file"), "", filename, _("Audio Files(*.mp3)|*.mp3"), wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
else:
d = wx.DirDialog(None, _("Select a folder to save all files"))
if d.ShowModal() == wx.ID_OK:
return d.GetPath()
d.Destroy()
class audioAlbumTab(audioTab):
def create_post_buttons(self):