summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Bridon <bochecha@daitauha.fr>2014-11-13 21:58:20 +0100
committerMathieu Bridon <bochecha@daitauha.fr>2014-11-13 22:58:24 +0100
commit1dcd91d9f292c581fc8fd9e830ec2918e345a9c1 (patch)
treefc68f707183a961ff2a9824405313e55145e6e6f
parent504c84a3bef61b1870e75b46739a5fff3e333461 (diff)
downloadtotem-1dcd91d9f292c581fc8fd9e830ec2918e345a9c1.tar.gz
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
-rw-r--r--help/C/index.docbook7
-rw-r--r--src/plugins/opensubtitles/opensubtitles.py2
2 files changed, 7 insertions, 2 deletions
diff --git a/help/C/index.docbook b/help/C/index.docbook
index b568aff7b..fe6131922 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 6dab82ae3..d23171fa4 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")