Mercurial > audlegacy
changeset 2610:2c41c0ef0c36 trunk
[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
author | giacomo |
---|---|
date | Mon, 05 Mar 2007 17:30:33 -0800 |
parents | fe33bdd3d5ad |
children | dd7a24edc9f6 |
files | ChangeLog src/audacious/build_stamp.c src/audacious/ui_fileinfopopup.c |
diffstat | 3 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 <hansmi@forkbomb.ch> + 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
--- 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 <glib.h> -const gchar *svn_stamp = "20070305-4226"; +const gchar *svn_stamp = "20070306-4228";
--- 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");