totem r5386 - in trunk: . src
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5386 - in trunk: . src
- Date: Sat, 3 May 2008 16:49:42 +0100 (BST)
Author: hadess
Date: Sat May 3 15:49:42 2008
New Revision: 5386
URL: http://svn.gnome.org/viewvc/totem?rev=5386&view=rev
Log:
2008-05-03 Bastien Nocera <hadess hadess net>
* src/totem.c (reset_seek_status), (totem_action_error),
(totem_action_error_and_exit), (totem_action_seek):
When an async error occurs during seeking, reset the seeking status
to avoid being stuck seeking (this already worked for the xine-lib
backend as the seeking is synchronous, GStreamer's is async)
Modified:
trunk/ChangeLog
trunk/src/totem.c
Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c (original)
+++ trunk/src/totem.c Sat May 3 15:49:42 2008
@@ -121,6 +121,21 @@
gtk_main_iteration ();
}
+static void
+reset_seek_status (Totem *totem)
+{
+ /* Release the lock and reset everything so that we
+ * avoid being "stuck" seeking on errors */
+
+ if (totem->seek_lock != FALSE) {
+ totem_statusbar_set_seeking (TOTEM_STATUSBAR (totem->statusbar), FALSE);
+ totem_time_label_set_seeking (TOTEM_TIME_LABEL (totem->fs->time_label), FALSE);
+ totem->seek_lock = FALSE;
+ bacon_video_widget_seek (totem->bvw, 0, NULL);
+ totem_action_stop (totem);
+ }
+}
+
/**
* totem_action_error:
* @title: the error dialog title
@@ -133,6 +148,7 @@
void
totem_action_error (const char *title, const char *reason, Totem *totem)
{
+ reset_seek_status (totem);
totem_interface_error (title, reason,
GTK_WINDOW (totem->win));
}
@@ -141,6 +157,7 @@
totem_action_error_and_exit (const char *title,
const char *reason, Totem *totem)
{
+ reset_seek_status (totem);
totem_interface_error_blocking (title, reason,
GTK_WINDOW (totem->win));
totem_action_exit (totem);
@@ -439,13 +456,7 @@
msg = g_strdup_printf(_("Totem could not play '%s'."), disp);
g_free (disp);
- /* Release the lock and reset everything so that we
- * avoid being "stuck" seeking */
- totem_statusbar_set_seeking (TOTEM_STATUSBAR (totem->statusbar), FALSE);
- totem_time_label_set_seeking (TOTEM_TIME_LABEL (totem->fs->time_label), FALSE);
- totem->seek_lock = FALSE;
- bacon_video_widget_seek (totem->bvw, 0, NULL);
- totem_action_stop (totem);
+ reset_seek_status (totem);
totem_action_error (msg, err->message, totem);
g_free (msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]