pidgin: 5b319e84: The official GTK+ version of CellRendere...

qulogic at pidgin.im qulogic at pidgin.im
Sun Feb 28 00:52:41 EST 2010


-----------------------------------------------------------------
Revision: 5b319e84369e67258a74a6da61a551b50ea72421
Ancestor: 43ae15bb3b5dce0516c4f3da6efc5f7b7a88868d
Author: qulogic at pidgin.im
Date: 2010-02-28T01:11:19
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5b319e84369e67258a74a6da61a551b50ea72421

Modified files:
        pidgin/gtkft.c

ChangeLog: 

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).

-------------- next part --------------
============================================================
--- pidgin/gtkft.c	8ac9323d28d3d493bfff8458ca819a9cda9200fd
+++ pidgin/gtkft.c	926d5cf420f4aa1b04b470c1b495433c8ce991b9
@@ -575,7 +575,7 @@ setup_tree(PidginXferDialog *dialog)
 
 	/* 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 @@ setup_tree(PidginXferDialog *dialog)
 	/* 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 @@ pidgin_xfer_dialog_add_xfer(PidginXferDi
 	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 @@ pidgin_xfer_dialog_update_xfer(PidginXfe
 	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);


More information about the Commits mailing list