[totem] opensubtitles: Add a keyboard shortcut



commit 1dcd91d9f292c581fc8fd9e830ec2918e345a9c1
Author: Mathieu Bridon <bochecha daitauha fr>
Date:   Thu Nov 13 21:58:20 2014 +0100

    opensubtitles: Add a keyboard shortcut
    
    This allows opening the subtitle download dialog with ctrl+shift+s
    
    https://bugzilla.gnome.org/show_bug.cgi?id=740082

 help/C/index.docbook                       |    7 +++++--
 src/plugins/opensubtitles/opensubtitles.py |    2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/help/C/index.docbook b/help/C/index.docbook
index b568aff..fe61319 100644
--- a/help/C/index.docbook
+++ b/help/C/index.docbook
@@ -895,8 +895,11 @@ subtitles, and more.</para>
       <para>The <guilabel>Subtitle Downloader</guilabel> plugin allows you to find and download subtitle 
files from the
         <ulink type="http" url="http://www.opensubtitles.org/en";>OpenSubtitles</ulink> service.</para>
       <para>Subtitles can only be downloaded for local movies; not audio files, DVDs, DVB streams, VCDs or 
HTTP streams. To search for subtitles for
-        the currently playing movie, choose <menuchoice><guimenu>View</guimenu><guimenuitem>Download Movie 
Subtitles</guimenuitem></menuchoice>, which
-        will display the <application>Download Movie Subtitles</application> dialog.</para>
+        the currently playing movie, choose
+        <menuchoice>
+          
<shortcut><keycombo><keycap>Ctrl</keycap><keycap>Shift</keycap><keycap>s</keycap></keycombo></shortcut>
+          <guimenu>View</guimenu><guimenuitem>Download Movie Subtitles</guimenuitem></menuchoice>,
+        which will display the <application>Download Movie Subtitles</application> dialog.</para>
       <para>Select the language in which you wish to have your subtitles from the drop-down list at the top 
of the dialog, then click on the
         <guibutton>Find</guibutton> button to search for subtitles for the current movie. Subtitles are 
found on the basis of the movie's content,
         rather than its filename or tags.</para>
diff --git a/src/plugins/opensubtitles/opensubtitles.py b/src/plugins/opensubtitles/opensubtitles.py
index 6dab82a..d23171f 100644
--- a/src/plugins/opensubtitles/opensubtitles.py
+++ b/src/plugins/opensubtitles/opensubtitles.py
@@ -517,6 +517,8 @@ class OpenSubtitles (GObject.Object, # pylint: disable-msg=R0902
         self._action = Gio.SimpleAction.new ("opensubtitles", None)
         self._action.connect ('activate', self._show_dialog)
         self._totem.add_action (self._action)
+        self._totem.set_accels_for_action ("app.opensubtitles",
+                                           ["<Primary><Shift>s"])
 
         menu = self._totem.get_menu_section ("subtitle-download-placeholder")
         menu.append (_(u'_Download Movie Subtitles…'), "app.opensubtitles")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]