summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/totem.schemas.in14
-rw-r--r--src/totem-object.c2
-rw-r--r--src/totem-preferences.c16
-rw-r--r--src/totem-private.h1
4 files changed, 32 insertions, 1 deletions
diff --git a/data/totem.schemas.in b/data/totem.schemas.in
index cc1454c15..9af719bd9 100644
--- a/data/totem.schemas.in
+++ b/data/totem.schemas.in
@@ -292,7 +292,7 @@
</schema>
<schema>
- <key>/schemas/apps/disable_user_plugins</key>
+ <key>/schemas/apps/totem/disable_user_plugins</key>
<applyto>/apps/totem/disable_user_plugins</applyto>
<owner>totem</owner>
<type>bool</type>
@@ -304,6 +304,18 @@
</schema>
<schema>
+ <key>/schemas/apps/disable_keyboard_shortcuts</key>
+ <applyto>/apps/totem/disable_keyboard_shortcuts</applyto>
+ <owner>totem</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Whether to disable the keyboard shortcuts</short>
+ <long>Whether to disable the keyboard shortcuts</long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/totem/autoload_subtitles</key>
<applyto>/apps/totem/autoload_subtitles</applyto>
<owner>totem</owner>
diff --git a/src/totem-object.c b/src/totem-object.c
index 9260ef383..2e4bd62a3 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3818,6 +3818,8 @@ window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, Totem *totem)
{
if (totem_sidebar_is_focused (totem) != FALSE)
return FALSE;
+ if (totem->disable_kbd_shortcuts != FALSE)
+ return FALSE;
/* Special case Eject, Open, Open URI and
* seeking keyboard shortcuts */
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index b60cfc976..3198eae2f 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -285,6 +285,16 @@ show_vfx_changed_cb (GConfClient *client, guint cnxn_id,
}
static void
+disable_kbd_shortcuts_changed_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ Totem *totem)
+{
+ totem->disable_kbd_shortcuts = gconf_client_get_bool (totem->gc,
+ GCONF_PREFIX"/disable_keyboard_shortcuts", NULL);
+}
+
+static void
lock_screensaver_on_audio_changed_cb (GConfClient *client, guint cnxn_id,
GConfEntry *entry, Totem *totem)
{
@@ -730,6 +740,12 @@ totem_setup_preferences (Totem *totem)
(GConfClientNotifyFunc) encoding_changed_cb,
totem, NULL, NULL);
+ /* Disable keyboard shortcuts */
+ totem->disable_kbd_shortcuts = gconf_client_get_bool (totem->gc,
+ GCONF_PREFIX"/disable_keyboard_shortcuts", NULL);
+ gconf_client_notify_add (totem->gc, GCONF_PREFIX"/disable_keyboard_shortcuts",
+ (GConfClientNotifyFunc) disable_kbd_shortcuts_changed_cb,
+ totem, NULL, NULL);
}
void
diff --git a/src/totem-private.h b/src/totem-private.h
index 22e5c58d3..43abc266c 100644
--- a/src/totem-private.h
+++ b/src/totem-private.h
@@ -162,6 +162,7 @@ struct TotemObject {
TotemStates state;
TotemOpenLocation *open_location;
gboolean remember_position;
+ gboolean disable_kbd_shortcuts;
/* Stored source_window of GdkDragContext from a video drag,
* used to detect when the video is dropped on itself. */