[Xfce4-commits] <parole:master> Handle non local file from the command line.

Ali Abdallah noreply at xfce.org
Sun Dec 6 19:00:01 CET 2009


Updating branch refs/heads/master
         to 3b3de184bcd90404004ffb1aecbb008c3a86898e (commit)
       from f9cede941604d828acc72ea71a5cbb2554f30faa (commit)

commit 3b3de184bcd90404004ffb1aecbb008c3a86898e
Author: Ali Abdallah <aliov at xfce.org>
Date:   Sun Dec 6 14:10:18 2009 +0100

    Handle non local file from the command line.

 src/parole-medialist.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/parole-medialist.c b/src/parole-medialist.c
index c4ec814..2c13d88 100644
--- a/src/parole-medialist.c
+++ b/src/parole-medialist.c
@@ -1300,7 +1300,14 @@ gboolean parole_media_list_add_files (ParoleMediaList *list, gchar **filenames)
     
     for ( i = 0; filenames && filenames[i] != NULL; i++)
     {
-	added += parole_media_list_add_by_path (list, filenames[i], i == 0 ? TRUE : FALSE);
+	if ( g_str_has_prefix (filenames[i], "file:/") )
+	    added += parole_media_list_add_by_path (list, filenames[i], i == 0 ? TRUE : FALSE);
+	else
+	{
+	    ParoleFile *file;
+	    file = parole_file_new (filenames[i]);
+	    parole_media_list_add (list, file, i == 0 ? TRUE : FALSE, i == 0 ? TRUE : FALSE);
+	}
     }
     
     return added == i;



More information about the Xfce4-commits mailing list