[Goodies-commits] r6138 - in xfce4-xmms-plugin/trunk: . panel-plugin

Kemal Eroglu ilgar at xfce.org
Thu Nov 20 21:12:58 CET 2008


Author: ilgar
Date: 2008-11-20 20:12:58 +0000 (Thu, 20 Nov 2008)
New Revision: 6138

Modified:
   xfce4-xmms-plugin/trunk/ChangeLog
   xfce4-xmms-plugin/trunk/INSTALL
   xfce4-xmms-plugin/trunk/configure.in.in
   xfce4-xmms-plugin/trunk/panel-plugin/preferences.c
   xfce4-xmms-plugin/trunk/panel-plugin/xmms_plugin.c
Log:
Version 0.5.2

Modified: xfce4-xmms-plugin/trunk/ChangeLog
===================================================================
--- xfce4-xmms-plugin/trunk/ChangeLog	2008-11-19 07:11:25 UTC (rev 6137)
+++ xfce4-xmms-plugin/trunk/ChangeLog	2008-11-20 20:12:58 UTC (rev 6138)
@@ -1,4 +1,8 @@
-2007-01-16  Kemal Ilgar Eroglu <kieroglu at math.washington.edu
+2008-11-20 Kemal Ilgar Eroglu <ilgar_eroglu at yahoo.com>
+	* Version 0.5.2
+	* Fix crash with invalid UTF-8 song titles (when using simple title format)
+
+2007-01-16  Kemal Ilgar Eroglu <kieroglu at math.washington.edu>
 	* Bump version to 0.5.1 (hopefully) final for XFCE 4.4.0
 	* Applied Martti Kuparinen's patch to the configure script.
 	* Applied Dan Kao's patches (song # fix and + Open/Add file dialogs.

Modified: xfce4-xmms-plugin/trunk/INSTALL
===================================================================
--- xfce4-xmms-plugin/trunk/INSTALL	2008-11-19 07:11:25 UTC (rev 6137)
+++ xfce4-xmms-plugin/trunk/INSTALL	2008-11-20 20:12:58 UTC (rev 6138)
@@ -1,13 +1,16 @@
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
-Foundation, Inc.
+Installation Instructions
+*************************
 
-   This file is free documentation; the Free Software Foundation gives
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+These are generic installation instructions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -67,9 +70,9 @@
 Compilers and Options
 =====================
 
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
@@ -82,7 +85,7 @@
 Compiling For Multiple Architectures
 ====================================
 
-   You can compile the package for more than one kind of computer at the
+You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
 own directory.  To do this, you must use a version of `make' that
 supports the `VPATH' variable, such as GNU `make'.  `cd' to the
@@ -99,19 +102,19 @@
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
 you can set and what kinds of files go in them.
 
@@ -122,7 +125,7 @@
 Optional Features
 =================
 
-   Some packages pay attention to `--enable-FEATURE' options to
+Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -137,11 +140,11 @@
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -156,7 +159,7 @@
 need to know the machine type.
 
    If you are _building_ compiler tools for cross-compiling, you should
-use the `--target=TYPE' option to select the type of system they will
+use the option `--target=TYPE' to select the type of system they will
 produce code for.
 
    If you want to _use_ a cross compiler, that generates code for a
@@ -167,9 +170,9 @@
 Sharing Defaults
 ================
 
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -178,7 +181,7 @@
 Defining Variables
 ==================
 
-   Variables not defined in a site shell script can be set in the
+Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -186,14 +189,18 @@
 
      ./configure CC=/usr/local2/bin/gcc
 
-will cause the specified gcc to be used as the C compiler (unless it is
-overridden in the site shell script).
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
 
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
 `configure' Invocation
 ======================
 
-   `configure' recognizes the following options to control how it
-operates.
+`configure' recognizes the following options to control how it operates.
 
 `--help'
 `-h'

Modified: xfce4-xmms-plugin/trunk/configure.in.in
===================================================================
--- xfce4-xmms-plugin/trunk/configure.in.in	2008-11-19 07:11:25 UTC (rev 6137)
+++ xfce4-xmms-plugin/trunk/configure.in.in	2008-11-20 20:12:58 UTC (rev 6138)
@@ -8,7 +8,7 @@
 dnl version info
 m4_define([xfce4_xmms_version_major], [0])
 m4_define([xfce4_xmms_version_minor], [5])
-m4_define([xfce4_xmms_version_micro], [1])
+m4_define([xfce4_xmms_version_micro], [2])
 m4_define([xfce4_xmms_version_build], [@REVISION@])
 m4_define([xfce4_xmms_version_tag], [svn])
 m4_define([xfce4_xmms_version], [xfce4_xmms_version_major().xfce4_xmms_version_minor().xfce4_xmms_version_micro()ifelse(xfce4_xmms_version_tag(), [svn], [xfce4_xmms_version_tag()-xfce4_xmms_version_build()], [xfce4_xmms_version_tag()])])

Modified: xfce4-xmms-plugin/trunk/panel-plugin/preferences.c
===================================================================
--- xfce4-xmms-plugin/trunk/panel-plugin/preferences.c	2008-11-19 07:11:25 UTC (rev 6137)
+++ xfce4-xmms-plugin/trunk/panel-plugin/preferences.c	2008-11-20 20:12:58 UTC (rev 6138)
@@ -270,7 +270,7 @@
 	}
 	if (player_control_has_library("audacious")) {
 		gtk_list_store_append(store, &iter);
-		gtk_list_store_set(store, &iter, 0, PLAYER_AUDACIOUS, 1, "Audacious", -1);
+		gtk_list_store_set(store, &iter, 0, PLAYER_AUDACIOUS, 1, "Audacious (<=1.3.x)", -1);
 		if (pd->player == PLAYER_AUDACIOUS)
 			gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo), &iter);
 	}

Modified: xfce4-xmms-plugin/trunk/panel-plugin/xmms_plugin.c
===================================================================
--- xfce4-xmms-plugin/trunk/panel-plugin/xmms_plugin.c	2008-11-19 07:11:25 UTC (rev 6137)
+++ xfce4-xmms-plugin/trunk/panel-plugin/xmms_plugin.c	2008-11-20 20:12:58 UTC (rev 6138)
@@ -280,14 +280,27 @@
 /* Set song title in tooltip and scrolled label */
 /************************************************/
 void set_song_title(plugin_data *pd) {
-	gchar    *title, *tooltip, *label;
+	gchar    *title, *title_orig, *tooltip, *label;
 	gint     pos, time;
 	gboolean running = pd->pctrl->player_is_running(pd->xmms_session);
+	gboolean valid;
 
 	if (running) {
 		pos        = pd->pctrl->player_get_playlist_pos(pd->xmms_session);
 		time       = pd->pctrl->player_get_playlist_time(pd->xmms_session, pos) / 1000;
-		title      = pd->pctrl->player_get_playlist_title(pd->xmms_session, pos);
+		title_orig = pd->pctrl->player_get_playlist_title(pd->xmms_session, pos);
+		
+		/* Fix for invalid UTF-8 strings crashing the plugin when using simple title format*/
+		title = g_locale_to_utf8 (title_orig, -1, NULL, NULL, NULL);
+
+		/*valid = g_utf8_validate (title_orig, -1, NULL);
+		
+		if (!valid) {
+			title=" ";
+		} else {
+			title = title_orig;
+		}*/
+		
 		if (pd->simple_title)
 			tooltip = g_strdup_printf("%s", title);
 		else
@@ -303,7 +316,8 @@
 	pd->labelattr->end_index      = strlen(label);
 	gtk_label_set_attributes(GTK_LABEL(pd->label), pd->labelattrlist);
 	gtk_label_set_text(GTK_LABEL(pd->label), label);
-	//g_free(title);
+	g_free(title_orig);
+	g_free(title);
 	g_free(tooltip);
 	g_free(label);
 }




More information about the Goodies-commits mailing list