Mercurial > pidgin
changeset 29493:7f7ce73365eb
The official GTK+ version of CellRendererProgress uses "value" which is an
int from 0 to 100 and not "percentage" (double from 0.0 to 1.0).
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 28 Feb 2010 01:11:19 +0000 |
parents | 0d3151a41134 |
children | 1a9977557dc9 |
files | pidgin/gtkft.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkft.c Sat Feb 27 03:49:32 2010 +0000 +++ b/pidgin/gtkft.c Sun Feb 28 01:11:19 2010 +0000 @@ -575,7 +575,7 @@ /* Build the tree model */ /* Transfer type, Progress Bar, Filename, Size, Remaining */ - model = gtk_list_store_new(NUM_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_DOUBLE, + model = gtk_list_store_new(NUM_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); dialog->model = model; @@ -609,7 +609,7 @@ /* Progress bar column */ renderer = gtk_cell_renderer_progress_new(); column = gtk_tree_view_column_new_with_attributes(_("Progress"), renderer, - "percentage", COLUMN_PROGRESS, NULL); + "value", COLUMN_PROGRESS, NULL); gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); @@ -906,7 +906,7 @@ lfilename = utf8; gtk_list_store_set(dialog->model, &data->iter, COLUMN_STATUS, pixbuf, - COLUMN_PROGRESS, 0.0, + COLUMN_PROGRESS, 0, COLUMN_FILENAME, (type == PURPLE_XFER_RECEIVE) ? purple_xfer_get_filename(xfer) : lfilename, @@ -1039,7 +1039,7 @@ remaining_str = purple_str_size_to_units(purple_xfer_get_bytes_remaining(xfer)); gtk_list_store_set(xfer_dialog->model, &data->iter, - COLUMN_PROGRESS, purple_xfer_get_progress(xfer), + COLUMN_PROGRESS, (gint)(purple_xfer_get_progress(xfer) * 100), COLUMN_SIZE, size_str, COLUMN_REMAINING, remaining_str, -1);