changeset 542:d58404ba9af9 trunk

[svn] - made popup window use audacious_fileinfopopup_show_from_title if track_name and song length is not available
author giacomo
date Tue, 23 Jan 2007 16:44:29 -0800
parents db5f05be1752
children 282bede45eef
files ChangeLog src/statusicon/si_ui.c
diffstat 2 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jan 23 09:21:15 2007 -0800
+++ b/ChangeLog	Tue Jan 23 16:44:29 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-23 17:21:15 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1168]
+  - portability fixes for solaris
+  
+  trunk/mk/objective.mk |   16 ++++++++--------
+  1 file changed, 8 insertions(+), 8 deletions(-)
+
+
 2007-01-23 14:25:58 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1166]
   - handle OV_HOLE gracefully
--- a/src/statusicon/si_ui.c	Tue Jan 23 09:21:15 2007 -0800
+++ b/src/statusicon/si_ui.c	Tue Jan 23 16:44:29 2007 -0800
@@ -30,6 +30,7 @@
 #include <audacious/i18n.h>
 #include <glib.h>
 #include <gdk/gdk.h>
+#include <gdk/gdkx.h>
 #include <gtk/gtk.h>
 
 
@@ -99,7 +100,16 @@
     GtkWidget *popup = g_object_get_data( G_OBJECT(evbox) , "popup" );
 
     tuple = playlist_get_tuple( pl_active , pos );
-    audacious_fileinfopopup_show_from_tuple( popup , tuple );
+    if (( tuple == NULL ) || (( tuple->track_name == NULL ) && ( tuple->length < 1 )))
+    {
+      gchar *title = playlist_get_songtitle( pl_active , pos );
+      audacious_fileinfopopup_show_from_title( popup , title );
+      g_free( title );
+    }
+    else
+    {
+      audacious_fileinfopopup_show_from_tuple( popup , tuple );
+    }
 
     g_object_set_data( G_OBJECT(evbox) , "popup_active" , GINT_TO_POINTER(1) );
   }