Commit e67d3fc0 authored by Philip Withnall's avatar Philip Withnall Committed by Philip Withnall

Rejigger keyboard shortcuts (Closes: #480664)

2007-10-08  Philip Withnall  <pwithnall@svn.gnome.org>

	* README:
	* data/totem.ui:
	* src/plugins/gromit/totem-gromit.c: 
(on_window_key_press_event):
	* src/plugins/skipto/totem-skipto-plugin.c:
	(on_window_key_press_event), (impl_activate):
	* src/totem.c: (totem_action_handle_key_press),
	(window_key_press_event_cb): Rejigger keyboard shortcuts
	(Closes: #480664)


svn path=/trunk/; revision=4760
parent 4288df89
2007-10-08 Philip Withnall <pwithnall@svn.gnome.org>
* README:
* data/totem.ui:
* src/plugins/gromit/totem-gromit.c: (on_window_key_press_event):
* src/plugins/skipto/totem-skipto-plugin.c:
(on_window_key_press_event), (impl_activate):
* src/totem.c: (totem_action_handle_key_press),
(window_key_press_event_cb): Rejigger keyboard shortcuts
(Closes: #480664)
2007-10-08 Bastien Nocera <hadess@hadess.net>
* src/plparse/totem-pl-parser-podcast.c: (parse_rss_item),
......
......@@ -32,17 +32,17 @@ gromit 20041213, for the Telestrator mode:
Controls
========
H:
Ctrl+H:
Hide/Show controls in windowed mode
I:
Ctrl+I:
Switch deinterlacing on and off
P, Space (fullscreen only):
P, Ctrl+Space:
Play/Pause
Escape (in full screen mode):
Switch to windowed mode
F:
Ctrl+F:
Toggle full screen
0/½,1,2:
Ctr+0/½, Ctrl+1, Ctrl+2:
Zoom respectively to 50%, 100% and 200% of the video's original size
Left arrow:
Go back 15 seconds
......@@ -68,19 +68,19 @@ Keypad Left / Keypad 4:
DVD Action Left
Keypad Right / Keypad 6:
DVD Action Right
B:
B, Alt+Left arrow:
Previous stream (Back)
N:
N, Alt+Right arrow:
Next stream (Next)
Q:
Ctrl+Q:
Quit
R, T:
Ctrl+R, Ctrl+T:
Zoom in and zoom out, respectively
S:
Ctrl+K:
Show the "Skip to" dialog
D:
Ctrl+D:
Toggle drawing using Gromit
E:
Ctrl+E:
Erase drawing using Gromit
Mouse button 1 double-click:
Toggle full screen
......
......@@ -52,7 +52,7 @@
<property name="tooltip">Play or pause the movie</property>
<signal name="activate" handler="play_action_callback"/>
</object>
<accelerator key="P"/>
<accelerator key="space" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="quit">
......@@ -76,7 +76,7 @@
<property name="tooltip">Take a screenshot</property>
<signal name="activate" handler="take_screenshot_action_callback"/>
</object>
<accelerator key="S" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="S" modifiers="GDK_SHIFT_MASK"/>
</child>
<child>
<object class="GtkAction" id="clear-playlist">
......@@ -111,7 +111,7 @@
<property name="tooltip">Switch to fullscreen</property>
<signal name="activate" handler="fullscreen_action_callback"/>
</object>
<accelerator key="F"/>
<accelerator key="F11"/>
</child>
<child>
<object class="GtkAction" id="zoom-window-menu">
......@@ -124,7 +124,7 @@
<property name="tooltip">Resize to half the original video size</property>
<signal name="activate" handler="zoom_1_2_action_callback"/>
</object>
<accelerator key="0"/>
<accelerator key="0" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="zoom-1-1">
......@@ -132,7 +132,7 @@
<property name="tooltip">Resize to the original video size</property>
<signal name="activate" handler="zoom_1_1_action_callback"/>
</object>
<accelerator key="1"/>
<accelerator key="1" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="zoom-2-1">
......@@ -140,7 +140,7 @@
<property name="tooltip">Resize to double the original video size</property>
<signal name="activate" handler="zoom_2_1_action_callback"/>
</object>
<accelerator key="2"/>
<accelerator key="2" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="aspect-ratio-menu">
......@@ -153,7 +153,7 @@
<property name="tooltip">Switch camera angles</property>
<signal name="activate" handler="next_angle_action_callback"/>
</object>
<accelerator key="G"/>
<accelerator key="G" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
......@@ -168,7 +168,7 @@
<property name="tooltip">Go to the DVD menu</property>
<signal name="activate" handler="dvd_root_menu_action_callback"/>
</object>
<accelerator key="m"/>
<accelerator key="M" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="dvd-title-menu">
......@@ -198,7 +198,7 @@
<property name="tooltip">Go to the chapter menu</property>
<signal name="activate" handler="dvd_chapter_menu_action_callback"/>
</object>
<accelerator key="c"/>
<accelerator key="C" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="next-chapter">
......@@ -207,7 +207,7 @@
<property name="tooltip">Next chapter or movie</property>
<signal name="activate" handler="next_chapter_action_callback"/>
</object>
<accelerator key="n"/>
<accelerator key="Right" modifiers="GDK_MOD1_MASK"/>
</child>
<child>
<object class="GtkAction" id="previous-chapter">
......@@ -216,7 +216,7 @@
<property name="tooltip">Previous chapter or movie</property>
<signal name="activate" handler="previous_chapter_action_callback"/>
</object>
<accelerator key="b"/>
<accelerator key="Left" modifiers="GDK_MOD1_MASK"/>
</child>
<child>
......@@ -288,7 +288,7 @@
<property name="active">False</property>
<signal name="activate" handler="deinterlace_action_callback"/>
</object>
<accelerator key="I"/>
<accelerator key="I" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkToggleAction" id="show-controls">
......@@ -297,7 +297,7 @@
<property name="active">TRUE</property>
<signal name="activate" handler="show_controls_action_callback"/>
</object>
<accelerator key="H"/>
<accelerator key="H" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkToggleAction" id="sidebar">
......@@ -374,7 +374,7 @@
<property name="tooltip">Zoom in</property>
<signal name="activate" handler="zoom_in_action_callback"/>
</object>
<accelerator key="R"/>
<accelerator key="R" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="zoom-reset">
......@@ -391,7 +391,7 @@
<property name="tooltip">Zoom out</property>
<signal name="activate" handler="zoom_out_action_callback"/>
</object>
<accelerator key="T"/>
<accelerator key="T" modifiers="GDK_CONTROL_MASK"/>
</child>
</object>
</child>
......
......@@ -246,12 +246,7 @@ totem_gromit_clear (TotemGromitPlugin *plugin, gboolean now)
static gboolean
on_window_key_press_event (GtkWidget *window, GdkEventKey *event, TotemGromitPlugin *plugin)
{
if (event->state != 0
&& ((event->state & GDK_CONTROL_MASK)
|| (event->state & GDK_MOD1_MASK)
|| (event->state & GDK_MOD3_MASK)
|| (event->state & GDK_MOD4_MASK)
|| (event->state & GDK_MOD5_MASK)))
if (event->state == 0 || !(event->state & GDK_CONTROL_MASK))
return FALSE;
switch (event->keyval) {
......
......@@ -186,17 +186,12 @@ static gboolean
on_window_key_press_event (GtkWidget *window, GdkEventKey *event, TotemSkiptoPlugin *plugin)
{
if (event->state != 0
&& ((event->state & GDK_CONTROL_MASK)
|| (event->state & GDK_MOD1_MASK)
|| (event->state & GDK_MOD3_MASK)
|| (event->state & GDK_MOD4_MASK)
|| (event->state & GDK_MOD5_MASK)))
if (event->state == 0 || !(event->state & GDK_CONTROL_MASK))
return FALSE;
switch (event->keyval) {
case GDK_s:
case GDK_S:
case GDK_k:
case GDK_K:
run_skip_to_dialog (plugin);
break;
default:
......@@ -218,7 +213,7 @@ impl_activate (TotemPlugin *plugin,
char *builder_path;
const GtkActionEntry menu_entries[] = {
{ "skip-to", GTK_STOCK_JUMP_TO, N_("_Skip to..."), "s", N_("Skip to a specific time"), G_CALLBACK (skip_to_action_callback) }
{ "skip-to", GTK_STOCK_JUMP_TO, N_("_Skip to..."), "<Control>K", N_("Skip to a specific time"), G_CALLBACK (skip_to_action_callback) }
};
builder_path = totem_plugin_find_file (TOTEM_PLUGIN (plugin), "skipto.ui");
......
......@@ -2266,14 +2266,7 @@ totem_action_handle_seek (Totem *totem, GdkEventKey *event, gboolean is_forward)
static gboolean
totem_action_handle_key_press (Totem *totem, GdkEventKey *event)
{
gboolean retval = TRUE, playlist_focused = FALSE;
GtkWidget *focused;
focused = gtk_window_get_focus (GTK_WINDOW (totem->win));
if (focused != NULL && gtk_widget_is_ancestor
(focused, GTK_WIDGET (totem->playlist)) != FALSE) {
playlist_focused = TRUE;
}
gboolean retval = TRUE;
switch (event->keyval) {
case GDK_A:
......@@ -2404,18 +2397,12 @@ totem_action_handle_key_press (Totem *totem, GdkEventKey *event)
totem_action_fullscreen (totem, FALSE);
break;
case GDK_Left:
if (playlist_focused != FALSE)
return FALSE;
if (gtk_widget_get_direction (totem->win) == GTK_TEXT_DIR_RTL)
totem_action_handle_seek (totem, event, TRUE);
else
totem_action_handle_seek (totem, event, FALSE);
break;
case GDK_Right:
if (playlist_focused != FALSE)
return FALSE;
if (gtk_widget_get_direction (totem->win) == GTK_TEXT_DIR_RTL)
totem_action_handle_seek (totem, event, FALSE);
else
......@@ -2428,13 +2415,9 @@ totem_action_handle_key_press (Totem *totem, GdkEventKey *event)
retval = FALSE;
break;
case GDK_Up:
if (playlist_focused != FALSE)
return FALSE;
totem_action_volume_relative (totem, VOLUME_UP_OFFSET);
break;
case GDK_Down:
if (playlist_focused != FALSE)
return FALSE;
totem_action_volume_relative (totem, VOLUME_DOWN_OFFSET);
break;
case GDK_0:
......@@ -2453,13 +2436,9 @@ totem_action_handle_key_press (Totem *totem, GdkEventKey *event)
totem_action_set_scale_ratio (totem, 2);
break;
case GDK_Menu:
if (playlist_focused != FALSE)
return FALSE;
totem_action_menu_popup (totem, 0);
break;
case GDK_F10:
if (playlist_focused != FALSE)
return FALSE;
if (!(event->state & GDK_SHIFT_MASK))
return FALSE;
......@@ -2534,6 +2513,14 @@ totem_action_handle_scroll (Totem *totem, GdkScrollDirection direction)
int
window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, Totem *totem)
{
GtkWidget *focused;
focused = gtk_window_get_focus (GTK_WINDOW (totem->win));
if (focused != NULL && gtk_widget_is_ancestor
(focused, GTK_WIDGET (totem->sidebar)) != FALSE) {
return FALSE;
}
/* Special case Eject, Open, Open URI and
* seeking keyboard shortcuts */
if (event->state != 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment