Browse Source

Context menu add 'Open destination'

doc-issue-template
MrS0m30n3 8 years ago
parent
commit
d26f428733
2 changed files with 12 additions and 2 deletions
  1. 1
      TODO
  2. 13
      youtube_dl_gui/mainframe.py

1
TODO

@ -1,7 +1,6 @@
NEW_LAYOUT
==========
* Create new button widget (groups, auto width)
* Context menu 'Open destination folder'
* Context menu 'Rename'
* Swap some of the Error messages with Info
* Add clear list button ? (Or use 'delete' button with no selections for that)

13
youtube_dl_gui/mainframe.py

@ -245,7 +245,8 @@ class MainFrame(wx.Frame):
statuslist_menu_data = (
(_("Get url"), self._on_geturl),
(_("Get command"), self._on_getcmd)
(_("Get command"), self._on_getcmd),
(_("Open destination"), self._on_open_dest)
)
# Create options frame
@ -340,6 +341,16 @@ class MainFrame(wx.Frame):
if selected != -1:
self.PopupMenu(self._statuslist_menu)
def _on_open_dest(self, event):
selected = self._status_list.get_selected()
if selected != -1:
object_id = self._status_list.GetItemData(selected)
download_item = self._download_list.get_item(object_id)
if download_item.stage == "Completed" and download_item.path:
open_file(download_item.path)
def _on_geturl(self, event):
selected = self._status_list.get_selected()

Loading…
Cancel
Save