damienhaynes / moving-pictures

Moving Pictures is a movies plug-in for the MediaPortal media center application. The goal of the plug-in is to create a very focused and refined experience that requires minimal user interaction. The plug-in emphasizes usability and ease of use in managing a movie collection consisting of ripped DVDs, and movies reencoded in common video formats supported by MediaPortal.
12 stars 6 forks source link

Delete from GUI using shortcut key #1011

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Would it be possible to add a shortcut key to delete movies from the GUI 
without having to go through the context menu.  TV-Series (and My Videos) use 
'0' as a shortcut key.

I understand that '0' would interfere with Remote Control Filtering, which is 
why it could be a user's choice (selected in the config) as to which key 
triggers a delete dialog.

Here's a rough sample code for MovingPicturesGUI.cs:

public override void OnAction(MediaPortal.GUI.Library.Action action) {
...
case MediaPortal.GUI.Library.Action.ActionType.ACTION_KEY_PRESSED:
...
else if (MovingPicturesCore.Settings.AllowDelete &&
  (char)action.m_key.KeyChar == MovingPicturesCore.Settings.DeleteKey)
  {
     int selectedIndex = browser.SelectedIndex;
     deleteMovie(browser.SelectedMovie);
     browser.SelectedIndex = selectedIndex;
  }

Original issue reported on code.google.com by dst...@gmail.com on 13 May 2011 at 10:00