[totem/gnome-2-32] Simplify unsupported schemes avoidance in chapters
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [totem/gnome-2-32] Simplify unsupported schemes avoidance in chapters
- Date: Sat,  4 Sep 2010 00:32:06 +0000 (UTC)
commit 3b592214b46f8062c18b238aee15ac8fe20c9ac1
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Sep 4 01:28:54 2010 +0100
    Simplify unsupported schemes avoidance in chapters
 src/plugins/chapters/totem-chapters.c    |    4 +---
 src/plugins/chapters/totem-cmml-parser.c |    3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/chapters/totem-chapters.c b/src/plugins/chapters/totem-chapters.c
index d2176e5..f1bf8b3 100644
--- a/src/plugins/chapters/totem-chapters.c
+++ b/src/plugins/chapters/totem-chapters.c
@@ -400,9 +400,7 @@ totem_file_opened_async_cb (TotemObject			*totem,
 	g_return_if_fail (TOTEM_IS_CHAPTERS_PLUGIN (plugin));
 	g_return_if_fail (uri != NULL);
 
-	if (g_str_has_prefix (uri, "http") != FALSE ||
-	    g_str_has_prefix (uri, "rtsp") != FALSE ||
-	    g_str_has_prefix (uri, "rtmp") != FALSE)
+	if (g_str_has_prefix (uri, "http") != FALSE)
 		return;
 
 	cmml_file = totem_change_file_extension (uri, "cmml");
diff --git a/src/plugins/chapters/totem-cmml-parser.c b/src/plugins/chapters/totem-cmml-parser.c
index d8eea27..2925928 100644
--- a/src/plugins/chapters/totem-cmml-parser.c
+++ b/src/plugins/chapters/totem-cmml-parser.c
@@ -536,7 +536,8 @@ totem_cmml_read_file_result (GObject		*source_object,
 
 	if (G_UNLIKELY (error != NULL)) {
 		g_warning ("chapters: failed to load CMML file %s: %s", data->file, error->message);
-		if (g_error_matches (error, g_io_error_quark(), G_IO_ERROR_NOT_FOUND)) {
+		if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND) ||
+		    g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
 			/* it's ok if file doesn't exist */
 			data->successful = TRUE;
 			data->is_exists = FALSE;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]