! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Progress bars don't show anything
Status:
RESOLVED: FIXED
Product:
Xfce4-diskperf-plugin
Component:
General

Comments

Description Peter Tribble 2012-05-13 23:23:47 CEST
As of 2.5.3, the progress bars don't show anything unless we're over 100% (100% busy, or exceeding the configured transfer rate).

The problem is the following function signature

static void UpdateProgressBars(struct diskperf_t *p_poPlugin, uint64_t rw, uint64_t r, uint64_t w) {

however, gtk_progress_bar_set_fraction is expecting a double, and that is the actual type of the arguments that it's called with, so that the correct function signature would be:

static void UpdateProgressBars(struct diskperf_t *p_poPlugin, double rw, double r, double w) {

(I think that on my Solaris system the compiler is doing the conversion from double to uint64_t and normally getting zero. With the above change, the plugin behaves correctly for me.)
Comment 1 Harald Judt 2012-05-21 23:17:04 CEST
Created attachment 4450 
xfce4-diskperf-plugin-use-double-for-progress-bars.patch

I confirm changing the types into doubles fixes this. Patch attached.
Comment 2 Landry Breuil editbugs 2012-05-22 09:59:16 CEST
Applied in 315e54ec

Bug #8882

Reported by:
Peter Tribble
Reported on: 2012-05-13
Last modified on: 2012-05-22

People

Assignee:
Landry Breuil
CC List:
2 users

Version

Attachments

Additional information