rhythmbox r5669 - in trunk: . shell
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5669 - in trunk: . shell
- Date: Tue, 8 Apr 2008 13:40:39 +0100 (BST)
Author: jmatthew
Date: Tue Apr 8 13:40:38 2008
New Revision: 5669
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5669&view=rev
Log:
2008-04-08 Jonathan Matthew <jonathan d14n org>
patch by: Thomas Zander <thomas e zander googlemail com>
* backends/gstreamer/rb-player-gst-xfade.c: (emit_stream_error),
(actually_start_stream):
* shell/rb-shell-player.c: (rb_shell_player_do_previous),
(rb_shell_player_cmd_previous):
Apply the same logic used for the 'previous' action (restart the
current track if more than 3s in) any time we're asked to go to
the previous track. Fixes #521329.
Modified:
trunk/ChangeLog
trunk/shell/rb-shell-player.c
Modified: trunk/shell/rb-shell-player.c
==============================================================================
--- trunk/shell/rb-shell-player.c (original)
+++ trunk/shell/rb-shell-player.c Tue Apr 8 13:40:38 2008
@@ -1815,6 +1815,18 @@
return FALSE;
}
+ /* If we're in the first 3 seconds go to the previous song,
+ * else restart the current one.
+ */
+ if (player->priv->current_playing_source != NULL
+ && rb_source_can_pause (player->priv->source)
+ && rb_player_get_time (player->priv->mmplayer) > 3) {
+ rb_debug ("after 3 second previous, restarting song");
+ rb_player_set_time (player->priv->mmplayer, 0);
+ rb_header_sync_time (player->priv->header_widget);
+ return TRUE;
+ }
+
rb_debug ("going to previous");
if (player->priv->queue_play_order) {
@@ -1951,33 +1963,13 @@
return rb_shell_player_do_next_internal (player, FALSE, TRUE, error);
}
-static gboolean
-rb_shell_player_do_previous_or_seek (RBShellPlayer *player,
- GError **error)
-{
- rb_debug ("previous");
- /* If we're in the first 3 seconds go to the previous song,
- * else restart the current one.
- */
- if (player->priv->current_playing_source != NULL
- && rb_source_can_pause (player->priv->source)
- && rb_player_get_time (player->priv->mmplayer) > 3) {
- rb_debug ("after 3 second previous, restarting song");
- rb_player_set_time (player->priv->mmplayer, 0);
- rb_header_sync_time (player->priv->header_widget);
- return TRUE;
- }
-
- return rb_shell_player_do_previous (player, error);
-}
-
static void
rb_shell_player_cmd_previous (GtkAction *action,
RBShellPlayer *player)
{
GError *error = NULL;
- if (!rb_shell_player_do_previous_or_seek (player, &error)) {
+ if (!rb_shell_player_do_previous (player, &error)) {
if (error->domain != RB_SHELL_PLAYER_ERROR ||
error->code != RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST)
g_warning ("cmd_previous: Unhandled error: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]