[Xfce4-commits] <parole:master> Remove svn version tag+check for if media type is local before enabling tag changes

Ali Abdallah aliov at xfce.org
Wed Aug 19 12:16:01 CEST 2009


Updating branch refs/heads/master
         to 825b9093f5019583bca4c7df109ea3479dd01798 (commit)
       from 6cdc73eaae8edccd1c9795ec7eadc6acb630937d (commit)

commit 825b9093f5019583bca4c7df109ea3479dd01798
Author: Ali Abdallah <aliov at xfce.org>
Date:   Mon Aug 17 21:11:07 2009 +0200

    Remove svn version tag+check for if media type is local before enabling tag changes

 autogen.sh                             |   56 ++++++++++++++++----------------
 configure.ac.in                        |    4 +-
 plugins/properties/stream-properties.c |   29 ++++++++++-------
 po/LINGUAS                             |    1 +
 4 files changed, 48 insertions(+), 42 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 170897e..8133da6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,24 +1,35 @@
 #!/bin/sh
 #
-# $Id: autogen.sh 23241 2006-09-29 19:05:15Z kelnos $
-#
-# Copyright (c) 2002-2005
-#         The Xfce development team. All rights reserved.
-#
-# Written for Xfce by Benedikt Meurer <benny at xfce.org>.
-#
+# vi:set et ai sw=2 sts=2 ts=2: */
+# 
+# Copyright (c) 2007-2009 Jannis Pohlmann <jannis at xfce.org>
+# 
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+# 
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+# GNU Library General Public License for more details.
+# 
+# You should have received a copy of the GNU Library General 
+# Public License along with this library; if not, write to the 
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
 
 (type xdt-autogen) >/dev/null 2>&1 || {
   cat >&2 <<EOF
 autogen.sh: You don't seem to have the Xfce development tools installed on
             your system, which are required to build this software.
-            Please install the xfce4-dev-tools package first, available from
-            http://xfce.org/~benny/projects/xfce4-dev-tools/.
+            Please install the xfce4-dev-tools package first, it is available
+            from http://www.xfce.org/.
 EOF
   exit 1
 }
 
-# verify that po/LINGUAS is present
+# Verify that po/LINGUAS is present
 (test -f po/LINGUAS) >/dev/null 2>&1 || {
   cat >&2 <<EOF
 autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
@@ -27,27 +38,16 @@ EOF
   exit 1
 }
 
-echo 'dnl *** This file is automatically generated from configure.ac.in ***' \
-	>configure.ac
-echo 'dnl *** DO NOT EDIT! ***' >>configure.ac
-echo >>configure.ac
-
-# substitute revision and linguas
-linguas=$(sed -e '/^#/d' po/LINGUAS)
-if [ -d .git/svn ]; then
-    revision=$(git svn find-rev trunk 2>/dev/null ||
-               git svn find-rev origin/trunk 2>/dev/null ||
-               git svn find-rev HEAD 2>/dev/null ||
-               git svn find-rev master 2>/dev/null)
-elif [ -d .svn ]; then
-    revision=$(LC_ALL=C svn info $0 | awk '/^Revision: / {printf "%05d\n", $2}')
+# Substitute revision and linguas
+linguas=`sed -e '/^#/d' po/LINGUAS`
+if test -d .git; then
+  revision=$(git rev-parse --short HEAD 2>/dev/null)
 else
-    revision=UNKNOWN
+  revision="Unknown"
 fi
 sed -e "s/@LINGUAS@/${linguas}/g" \
     -e "s/@REVISION@/${revision}/g" \
-    < "configure.ac.in" >> "configure.ac"
+    < "configure.ac.in" > "configure.ac"
 
-xdt-autogen $@
+exec xdt-autogen $@
 
-# vi:set ts=2 sw=2 et ai:
diff --git a/configure.ac.in b/configure.ac.in
index 7ac3e5b..3ef2144 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -5,8 +5,8 @@ m4_define([parole_version_major],  [0])
 m4_define([parole_version_minor],  [1])
 m4_define([parole_version_micro],  [90])
 m4_define([parole_version_build],  [r at REVISION@])
-m4_define([parole_version_tag], [])
-m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [svn], [parole_version_tag().parole_version_build()], [parole_version_tag()])])
+m4_define([parole_version_tag], [git])
+m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])])
 
 AC_INIT([parole], [parole_version], [aliov at xfce.org])
 AC_PREREQ(2.59c)
diff --git a/plugins/properties/stream-properties.c b/plugins/properties/stream-properties.c
index 1d07e98..5cb6cc7 100644
--- a/plugins/properties/stream-properties.c
+++ b/plugins/properties/stream-properties.c
@@ -367,6 +367,7 @@ tag_message_cb (ParolePlugin *plugin, const ParoleStream *stream, PluginData *da
 {
     gchar *str = NULL;
 #ifdef HAVE_TAGLIBC
+    ParoleMediaType media_type;
     gchar *uri = NULL;
     GError *error = NULL;
 #endif
@@ -375,6 +376,7 @@ tag_message_cb (ParolePlugin *plugin, const ParoleStream *stream, PluginData *da
 		  "title", &str,
 #ifdef HAVE_TAGLIBC
 		  "uri", &uri,
+		  "media-type", &media_type,
 #endif
 		  NULL);
     
@@ -391,22 +393,25 @@ tag_message_cb (ParolePlugin *plugin, const ParoleStream *stream, PluginData *da
 	data->tag_file = NULL;
     }
     
-    data->filename = g_filename_from_uri (uri, NULL, &error);
-    
-    if ( G_UNLIKELY (error) )
-    {
-	g_critical ("Unablet to convert uri : %s to filename : %s", uri, error->message);
-	g_error_free (error);
-	disable_tag_save (data->save);
-    }
-    else
+    if ( media_type == PAROLE_MEDIA_TYPE_LOCAL_FILE )
     {
-	data->tag_file = taglib_file_new (data->filename);
+	data->filename = g_filename_from_uri (uri, NULL, &error);
 	
-	if ( !data->tag_file )
+	if ( G_UNLIKELY (error) )
+	{
+	    g_critical ("Unablet to convert uri : %s to filename : %s", uri, error->message);
+	    g_error_free (error);
 	    disable_tag_save (data->save);
+	}
 	else
-	    enable_tag_save (data->save);
+	{
+	    data->tag_file = taglib_file_new (data->filename);
+	    
+	    if ( !data->tag_file )
+		disable_tag_save (data->save);
+	    else
+		enable_tag_save (data->save);
+	}
     }
 #endif
 
diff --git a/po/LINGUAS b/po/LINGUAS
index a0f7499..3ca7a9e 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1 +1,2 @@
 # set of available languages (in alphabetic order)
+sk



More information about the Xfce4-commits mailing list