Added context menu for tracks and file downloads
This commit is contained in:
@@ -69,4 +69,10 @@ class mainWindow(wx.Frame):
|
||||
return t
|
||||
|
||||
def get_item(self):
|
||||
return self.list.GetSelection()
|
||||
return self.list.GetSelection()
|
||||
|
||||
def get_destination_path(self, filename):
|
||||
saveFileDialog = wx.FileDialog(self, _(u"Save this file"), "", filename, _(u"Audio Files(*.mp3)|*.mp3"), wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
|
||||
if saveFileDialog.ShowModal() == wx.ID_OK:
|
||||
return saveFileDialog.GetPath()
|
||||
saveFileDialog.Destroy()
|
10
src/wxUI/menus.py
Normal file
10
src/wxUI/menus.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import wx
|
||||
|
||||
class contextMenu(wx.Menu):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(contextMenu, self).__init__(*args, **kwargs)
|
||||
self.play = wx.MenuItem(self, wx.NewId(), _("Play"))
|
||||
self.AppendItem(self.play)
|
||||
self.download = wx.MenuItem(self, wx.NewId(), _("Download"))
|
||||
self.AppendItem(self.download)
|
Reference in New Issue
Block a user