From 4e5957274f0b89121da85249f2f165e045a8106b Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Mar 04 2010 11:21:56 +0000 Subject: - Update icon popup patch for new playlist API to also fix a double-free (which made the popup crash with streaming audio). --- diff --git a/audacious-plugins-2.2-status.patch b/audacious-plugins-2.2-status.patch index 6747911..56576b6 100644 --- a/audacious-plugins-2.2-status.patch +++ b/audacious-plugins-2.2-status.patch @@ -1,6 +1,6 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2.2-status/src/statusicon/si_ui.c --- audacious-plugins-2.2-orig/src/statusicon/si_ui.c 2009-11-22 23:49:53.000000000 +0100 -+++ audacious-plugins-2.2-status/src/statusicon/si_ui.c 2010-03-02 20:02:43.000000000 +0100 ++++ audacious-plugins-2.2-status/src/statusicon/si_ui.c 2010-03-04 12:18:39.000000000 +0100 @@ -38,9 +38,13 @@ static void si_ui_statusicon_popup_timer_stop ( GtkStatusIcon * ); static void si_ui_statusicon_smallmenu_show ( gint x, gint y, guint button, guint32 time , gpointer ); @@ -15,7 +15,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. /* this stuff required to make titlechange hook work properly */ -@@ -161,30 +165,51 @@ +@@ -161,30 +165,50 @@ static gboolean si_ui_statusicon_popup_show ( gpointer icon ) { @@ -49,7 +49,6 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. + if ( ( tuple == NULL ) || ( aud_tuple_get_int(tuple, FIELD_LENGTH, NULL) < 1 ) ) { + gchar *title = (gchar*) aud_playlist_entry_get_title( pl_active , pos ); + audacious_fileinfopopup_show_from_title( popup , title ); -+ g_free( title ); + } + else { + audacious_fileinfopopup_show_from_tuple( popup , tuple ); @@ -90,7 +89,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. } -@@ -204,6 +229,7 @@ +@@ -204,6 +228,7 @@ si_ui_statusicon_popup_timer_start ( GtkStatusIcon * icon ) { gint timer_id = g_timeout_add( 500 , si_ui_statusicon_popup_show , icon ); @@ -98,7 +97,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. g_object_set_data( G_OBJECT(icon) , "timer_id" , GINT_TO_POINTER(timer_id) ); g_object_set_data( G_OBJECT(icon) , "timer_active" , GINT_TO_POINTER(1) ); return; -@@ -222,6 +248,19 @@ +@@ -222,6 +247,19 @@ } @@ -118,7 +117,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. static void si_ui_statusicon_cb_aud_hook_pbstart ( gpointer plentry_gp , gpointer icon ) { -@@ -238,8 +277,8 @@ +@@ -238,8 +276,8 @@ si_ui_statusicon_cb_aud_hook_tchange ( gpointer plentry_gp , gpointer prevs_gp ) { si_aud_hook_tchange_prevs_t *prevs = prevs_gp; @@ -128,7 +127,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. gboolean upd_pop = FALSE; if (pl_entry >= 0) -@@ -267,6 +306,7 @@ +@@ -267,6 +305,7 @@ /* if filename changes, reset title as well */ g_free(prevs->title); prevs->title = g_strdup(pl_entry_title); @@ -136,7 +135,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. } } else -@@ -409,7 +449,10 @@ +@@ -409,7 +448,10 @@ G_CALLBACK(si_ui_statusicon_cb_btpress) , NULL ); g_signal_connect( G_OBJECT(si_applet) , "scroll-event" , G_CALLBACK(si_ui_statusicon_cb_btscroll) , NULL ); @@ -147,7 +146,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. gtk_status_icon_set_visible(si_applet, TRUE); /* small menu that can be used in place of the audacious standard one */ -@@ -421,7 +464,7 @@ +@@ -421,7 +463,7 @@ si_aud_hook_tchange_prevs->title = NULL; si_aud_hook_tchange_prevs->filename = NULL; si_aud_hook_tchange_prevs->applet = si_applet; @@ -156,7 +155,7 @@ diff -Nur audacious-plugins-2.2-orig/src/statusicon/si_ui.c audacious-plugins-2. return; } -@@ -432,7 +475,7 @@ +@@ -432,7 +474,7 @@ GtkWidget *si_smenu = g_object_get_data( G_OBJECT(si_applet) , "smenu" ); si_ui_statusicon_popup_timer_stop( si_applet ); /* just in case the timer is active */ aud_hook_dissociate( "playback begin" , si_ui_statusicon_cb_aud_hook_pbstart ); diff --git a/audacious-plugins.spec b/audacious-plugins.spec index 3263898..f044d95 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -5,7 +5,7 @@ Name: audacious-plugins Version: 2.2 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia URL: http://audacious-media-player.org/ @@ -308,6 +308,10 @@ update-desktop-database &> /dev/null || : %changelog +* Thu Mar 4 2010 Michael Schwendt - 2.2-25 +- Update icon popup patch for new playlist API to also fix a double-free + (which made the popup crash with streaming audio). + * Tue Mar 2 2010 Michael Schwendt - 2.2-24 - Patch notification area status icon (fix popup and title changes).