[pitivi] Document our keyboard shortcuts and allow contextual help
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Document our keyboard shortcuts and allow contextual help
- Date: Wed, 5 Sep 2012 03:06:27 +0000 (UTC)
commit 94d7d6b036b11f6e44c1130b6cb6cb5903e02641
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Sun Sep 2 13:57:11 2012 -0400
Document our keyboard shortcuts and allow contextual help
Create a cheatsheet mallard page in the user manual.
Show a "Keyboard shortcuts" button in the welcome dialog.
Change the timeline keyframe shortcuts to be more useful.
data/ui/startupwizard.ui | 44 +++++++++++++++++++-------
help/C/cheatsheet.page | 64 +++++++++++++++++++++++++++++++++++++++
help/Makefile.am | 1 +
pitivi/dialogs/startupwizard.py | 4 ++
pitivi/timeline/timeline.py | 4 +-
pitivi/utils/misc.py | 8 ++++-
6 files changed, 110 insertions(+), 15 deletions(-)
---
diff --git a/data/ui/startupwizard.ui b/data/ui/startupwizard.ui
index af14d92..7e255b1 100644
--- a/data/ui/startupwizard.ui
+++ b/data/ui/startupwizard.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <requires lib="gtk+" version="3.4"/>
+ <!-- interface-requires gtk+ 3.4 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Welcome</property>
@@ -72,8 +72,9 @@
<property name="spacing">6</property>
<property name="layout_style">start</property>
<child>
- <object class="GtkButton" id="button1">
+ <object class="GtkButton" id="new_button">
<property name="label">gtk-new</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -83,13 +84,30 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button7">
+ <object class="GtkButton" id="open_button">
+ <property name="label" translatable="yes">Browse projects...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <signal name="clicked" handler="_onBrowseButtonClickedCb" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help_button">
<property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -99,28 +117,30 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button8">
- <property name="label" translatable="yes">Browse projects...</property>
+ <object class="GtkButton" id="cheatsheet_button">
+ <property name="label" translatable="yes">Keyboard shortcuts</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
- <signal name="clicked" handler="_onBrowseButtonClickedCb" swapped="no"/>
+ <signal name="clicked" handler="_cheatsheetCb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="missing_deps_button">
<property name="label" translatable="yes">Missing dependencies...</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -130,7 +150,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</object>
diff --git a/help/C/cheatsheet.page b/help/C/cheatsheet.page
new file mode 100644
index 0000000..c22a607
--- /dev/null
+++ b/help/C/cheatsheet.page
@@ -0,0 +1,64 @@
+<page xmlns="http://projectmallard.org/1.0/"
+ xmlns:e="http://projectmallard.org/experimental/"
+ type="topic"
+ id="cheatsheet">
+
+ <info>
+ <link type="topic" xref="index"/>
+ <link type="seealso" xref="movearoundtimeline"/>
+ <link type="seealso" xref="trimming"/>
+ <revision pkgversion="0.16" version="0.1" date="2012-09-03" status="complete"/>
+ <credit type="author">
+ <name>Jean-FranÃois Fortin Tam</name>
+ <email>nekohayo gmail com</email>
+ </credit>
+ <license>
+ <p>Creative Commons Share Alike 3.0</p>
+ </license>
+ </info>
+
+ <title>Keyboard shortcuts and cheatsheet</title>
+
+ <p>This page is a list of important shortcuts to access commonly used or hidden features. Take the time to get familiar with them as they will improve your productivity tremendously.</p>
+
+ <section>
+ <title>General</title>
+ <list>
+ <item><p><key>Ctrl+N</key>: Create a new project</p></item>
+ <item><p><key>Ctrl+O</key>: Open a project file</p></item>
+ <item><p><key>Ctrl+S</key>: Save the current project</p></item>
+ <item><p><key>Ctrl+Q</key>: Quit the application</p></item>
+ <item><p><key>Ctrl+Z</key>: Undo</p></item>
+ <item><p><key>Ctrl+Y</key>: Redo</p></item>
+ <item><p><key>F11</key>: Toggle fullscreen mode</p></item>
+ <item><p><key>F1</key>: Show the user manual</p></item>
+ </list>
+ </section>
+
+ <section>
+ <title>Media Library</title>
+ <list>
+ <item><p><key>Enter</key>: Preview (playback) the selected clip</p></item>
+ <item><p><key>Insert</key>: Insert the selected clips into the timeline</p></item>
+ <item><p><key>Ctrl+Delete</key>: Remove the selected clips from the project</p></item>
+ </list>
+ </section>
+
+ <section>
+ <title>Timeline</title>
+ <list>
+ <item><p><key>Spacebar</key>: Toggle playback.</p></item>
+ <item><p><key>S</key>: Split the clips at the current playhead position. If there are selected clips, only those will be split.</p></item>
+ <item><p><key>Delete</key>: Remove selected clips from the timeline.</p></item>
+ <item><p><key>â</key> and <key>â</key>: Seek one frame backwards or forwards. This depends on your project framerate.</p></item>
+ <item><p><key>Ctrl+â</key> and <key>Ctrl+â</key>: Seek one clip backwards or forwards.</p></item>
+ <item><p><key>Shift+â</key> and <key>Shift+â</key>: Seek one second backwards or forwards.</p></item>
+ <item><p><key>Ctrl++</key> and <key>Ctrl+-</key>: Zoom in or zoom out. You can also use <key>Ctrl</key> with the mouse wheel to control the zoom more efficiently.</p></item>
+ <item><p><key>Ctrl+0</key>: Adjust the zoom to fit the timeline.</p></item>
+ <item><p><key>Shift</key>+drag: Ripple edit.</p></item>
+ <item><p><key>Ctrl</key>+drag: Roll edit.</p></item>
+ <item><p><key>K</key>: Add a property keyframe at the current playhead position.</p></item>
+ <item><p><key>.</key> and <key>,</key>: Go to the next or previous property keyframe.</p></item>
+ </list>
+ </section>
+</page>
diff --git a/help/Makefile.am b/help/Makefile.am
index 1d6cf42..b6f89c0 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -24,6 +24,7 @@ DOC_FIGURES = \
DOC_PAGES = \
about.page \
+ cheatsheet.page \
codecscontainers.page \
crossfading.page \
effects.page \
diff --git a/pitivi/dialogs/startupwizard.py b/pitivi/dialogs/startupwizard.py
index 55c8590..4e02bb6 100644
--- a/pitivi/dialogs/startupwizard.py
+++ b/pitivi/dialogs/startupwizard.py
@@ -105,6 +105,10 @@ class StartUpWizard(object):
"""Handle a click on the Help button."""
show_user_manual()
+ def _cheatsheetCb(self, unused_button):
+ """Show the cheatsheet section of the user manual"""
+ show_user_manual("cheatsheet")
+
def _deleteCb(self, unused_widget, event):
"""Handle a click on the X button of the dialog."""
self.app.projectManager.newBlankProject()
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index c7a844a..c31a6bc 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1118,10 +1118,10 @@ class Timeline(Gtk.Table, Loggable, Zoomable):
"K", KEYFRAME, self.keyframe),
("Prevkeyframe", None, _("_Previous Keyframe"),
- "E", PREVKEYFRAME, self._previousKeyframeCb),
+ "comma", PREVKEYFRAME, self._previousKeyframeCb),
("Nextkeyframe", None, _("_Next Keyframe"),
- "R", NEXTKEYFRAME, self._nextKeyframeCb),
+ "period", NEXTKEYFRAME, self._nextKeyframeCb),
)
actiongroup = Gtk.ActionGroup("timelinepermanent")
diff --git a/pitivi/utils/misc.py b/pitivi/utils/misc.py
index 4b2f582..ddb050b 100644
--- a/pitivi/utils/misc.py
+++ b/pitivi/utils/misc.py
@@ -406,9 +406,15 @@ def same(seq):
return first
-def show_user_manual():
+def show_user_manual(page=None):
+ """
+ Display the user manual with Yelp.
+ Optional: for contextual help, a page ID can be specified.
+ """
time_now = int(time.time())
for uri in (APPMANUALURL_OFFLINE, APPMANUALURL_ONLINE):
+ if page is not None:
+ uri += "#" + page
try:
Gtk.show_uri(None, uri, time_now)
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]