summaryrefslogtreecommitdiff
path: root/src/plugins/lirc
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2008-08-21 12:45:30 +0000
committerBastien Nocera <hadess@src.gnome.org>2008-08-21 12:45:30 +0000
commitf66e73093b8cf0db420ac51b10dd519fc4a0dfa6 (patch)
treea20aed7f1940a988d2fd84b505fcb5d9784d4003 /src/plugins/lirc
parentf90033493e9f30938ce1e9d4bd20e00428a7d9b5 (diff)
downloadtotem-f66e73093b8cf0db420ac51b10dd519fc4a0dfa6.tar.gz
Add support for the stop remote control key, will stop the playback and go
2008-08-21 Bastien Nocera <hadess@hadess.net> * src/plugins/lirc/totem-lirc.c (totem_lirc_to_command): * src/plugins/lirc/totem_lirc_default: * src/totem.c (totem_action_remote): * src/totem.h: Add support for the stop remote control key, will stop the playback and go back to the beginning of the playlist (as the stop button on a CD player would do) * src/backend/bacon-video-widget-gst-0.10.c (got_time_tick), (bacon_video_widget_stop): Don't print out warnings when trying to stop a stream but nothing is opened See http://bugzilla.gnome.org/show_bug.cgi?id=470672#c3 svn path=/trunk/; revision=5589
Diffstat (limited to 'src/plugins/lirc')
-rw-r--r--src/plugins/lirc/totem-lirc.c3
-rw-r--r--src/plugins/lirc/totem_lirc_default8
2 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/lirc/totem-lirc.c b/src/plugins/lirc/totem-lirc.c
index 7b3e29b95..3a5382c6d 100644
--- a/src/plugins/lirc/totem-lirc.c
+++ b/src/plugins/lirc/totem-lirc.c
@@ -67,6 +67,7 @@ typedef struct
/* strings that we recognize as commands from lirc */
#define TOTEM_IR_COMMAND_PLAY "play"
#define TOTEM_IR_COMMAND_PAUSE "pause"
+#define TOTEM_IR_COMMAND_STOP "stop"
#define TOTEM_IR_COMMAND_NEXT "next"
#define TOTEM_IR_COMMAND_PREVIOUS "previous"
#define TOTEM_IR_COMMAND_SEEK_FORWARD "seek_forward"
@@ -133,6 +134,8 @@ totem_lirc_to_command (const gchar *str)
return TOTEM_REMOTE_COMMAND_PAUSE;
else if (strcmp (str, TOTEM_IR_COMMAND_PLAYPAUSE) == 0)
return TOTEM_REMOTE_COMMAND_PLAYPAUSE;
+ else if (strcmp (str, TOTEM_IR_COMMAND_STOP) == 0)
+ return TOTEM_REMOTE_COMMAND_STOP;
else if (strcmp (str, TOTEM_IR_COMMAND_NEXT) == 0)
return TOTEM_REMOTE_COMMAND_NEXT;
else if (strcmp (str, TOTEM_IR_COMMAND_PREVIOUS) == 0)
diff --git a/src/plugins/lirc/totem_lirc_default b/src/plugins/lirc/totem_lirc_default
index 2bdc08d92..37764f88c 100644
--- a/src/plugins/lirc/totem_lirc_default
+++ b/src/plugins/lirc/totem_lirc_default
@@ -20,6 +20,14 @@ end
begin
prog = Totem
remote = *
+ button = KEY_STOP
+ repeat = 0
+ config = stop
+end
+
+begin
+ prog = Totem
+ remote = *
button = KEY_FASTFORWARD
repeat = 1
config = seek_forward