# HG changeset patch # User giacomo # Date 1173144633 28800 # Node ID 2c41c0ef0c36a263272792d258d2933ee396c468 # Parent fe33bdd3d5ad0cbb3a891b233c159d3376a1acca [svn] - made progress bar in fileinfo popup work again; it's ok to do code cleaning/beautifying but please, do ensure and test that things work as they should diff -r fe33bdd3d5ad -r 2c41c0ef0c36 ChangeLog --- a/ChangeLog Mon Mar 05 16:28:45 2007 -0800 +++ b/ChangeLog Mon Mar 05 17:30:33 2007 -0800 @@ -1,3 +1,11 @@ +2007-03-06 00:28:45 +0000 Michael Hanselmann + revision [4228] + Prevent double free() by strdup'ing value. + + trunk/src/audacious/util.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + + 2007-03-05 21:50:32 +0000 Michael Farber <01mf02@gmail.com> revision [4226] - Remove even more duplicate code diff -r fe33bdd3d5ad -r 2c41c0ef0c36 src/audacious/build_stamp.c --- a/src/audacious/build_stamp.c Mon Mar 05 16:28:45 2007 -0800 +++ b/src/audacious/build_stamp.c Mon Mar 05 17:30:33 2007 -0800 @@ -1,2 +1,2 @@ #include -const gchar *svn_stamp = "20070305-4226"; +const gchar *svn_stamp = "20070306-4228"; diff -r fe33bdd3d5ad -r 2c41c0ef0c36 src/audacious/ui_fileinfopopup.c --- a/src/audacious/ui_fileinfopopup.c Mon Mar 05 16:28:45 2007 -0800 +++ b/src/audacious/ui_fileinfopopup.c Mon Mar 05 17:30:33 2007 -0800 @@ -139,7 +139,7 @@ static gboolean audacious_fileinfopopup_progress_check_active(GtkWidget *filepopup_win) { - if (g_object_get_data(G_OBJECT(filepopup_win), "progress_sid") == NULL) + if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(filepopup_win),"progress_sid")) == 0) return FALSE; return TRUE; } @@ -147,7 +147,7 @@ static void audacious_fileinfopopup_progress_init(GtkWidget *filepopup_win) { - g_object_set_data(G_OBJECT(filepopup_win), "progress_sid", NULL); + g_object_set_data( G_OBJECT(filepopup_win) , "progress_sid" , GINT_TO_POINTER(0) ); } static void @@ -168,7 +168,7 @@ if (sid != 0) { g_source_remove(sid); - g_object_set_data(G_OBJECT(filepopup_win), "progress_sid", NULL); + g_object_set_data(G_OBJECT(filepopup_win),"progress_sid",GINT_TO_POINTER(0)); } } @@ -385,6 +385,11 @@ "label_tracklen", "header_tracklen"); g_free(length_string); + if ( tuple->length > 0 ) + g_object_set_data( G_OBJECT(filepopup_win), "length" , GINT_TO_POINTER(tuple->length) ); + else + g_object_set_data( G_OBJECT(filepopup_win), "length" , GINT_TO_POINTER(-1) ); + gchar *year_string = (tuple->year == 0) ? NULL : g_strdup_printf("%d", tuple->year); audacious_fileinfopupup_update_data(filepopup_win, year_string, "label_year", "header_year");