gnome-system-monitor shows squashed key in resources graphs

Bug #68620 reported by toby dacre
28
Affects Status Importance Assigned to Milestone
Gnome System Monitor
Fix Released
Medium
gnome-system-monitor (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-system-monitor

version 2.16.1

the key (100% - 0%) on the graph get squashed and is unreadable when gnome-system-monitor is at default size

this is new to edgy

i'll try to add a screenshot

Revision history for this message
toby dacre (toby-junk) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug. I've forwarded it upstream: http://bugzilla.gnome.org/show_bug.cgi?id=367016

Changed in gnome-system-monitor:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in gnome-system-monitor:
status: Unknown → Unconfirmed
Changed in gnome-system-monitor:
status: Unconfirmed → Confirmed
Revision history for this message
Rajeev Nair (rajeev) wrote :

Hi

I have same problem with feisty beta

On maximising the screen , the values arrange properly

Revision history for this message
toby dacre (toby-junk) wrote :
Download full text (4.2 KiB)

Sebastien,

After upgrading to fiesty this bug still exists and seeing how it looks like it'll still be here in gutsy I have decided to do something about it (this is after all the point of all this open source stuff)

I've written a patch that fixes the problem by changing the number of lines shown as the graph re sizes (see the screenshot attached)

I'm not sure the best way to provide the patch but here is the output of diff. If you want a better format let me know and i'll try to provide it.
Could you also pass this upstream as I don't have a bugzilla account

the file is trunck/src/load-graph.cpp

this is the diff between my patch and the current ubuntu
i think the #include <gtkmm.h> is an error (not part of my patch) as I've been working from 2.18.1.1 as I can't get 2.19.4 to configure but I've done the diff against 2.19.4

diff ./src/load-graph.cpp ../gnome-system-monitor-2.19.4/src/load-graph.cpp

1a2,4
>
> #include <gtkmm.h>
>
96d98
< int num_bars;
114,131c116,117
< /* work out how many lines across the graph (plus one)*/
< num_bars =(g->draw_height) / (fontsize + 5);
< switch (num_bars){
< case 1:
< break;
< case 2:
< case 3:
< num_bars=2;
< break;
< case 4:
< num_bars=4;
< break;
< default:
< num_bars=5;
< }
<
< dely = (g->draw_height) / num_bars; /* round to int to avoid AA blur */
< real_draw_height = dely * num_bars;
---
> dely = (g->draw_height) / 5; /* round to int to avoid AA blur */
> real_draw_height = dely * 5;
133c119
< for (i = 0; i <= num_bars; ++i) {
---
> for (i = 0; i <= 5; ++i) {
137c123,127
< if (i==num_bars)
---
> switch (i) {
> case 0:
> y = 0.5 + fontsize / 2.0;
> break;
> case 5:
139,143c129,132
< else {
< if (i==0)
< y = 0.5 +(i * dely) + (fontsize / 2.0);
< else
< y = (i * dely) + (fontsize / 2.0);
---
> break;
> default:
> y = i * dely + fontsize / 2.0;
> break;
147c136
< caption = g_strdup_printf("%3d %%", 100 - i * (100/num_bars));
---
> caption = g_strdup_printf("%3d %%", 100 - i * 20);

--------------------------------------------------------------------
this is the diff against the current upstream svn trunk

99d98
< int num_bars;
117,131c116,117
< /* work out how many lines across the graph (plus one)*/
< num_bars =(g->draw_height) / (fontsize + 3);
< switch (num_bars){
< case 1:
< break;
< case 2:
< case 3:
< num_bars=2;
< break;
< case 4:
< num_bars=4;
< break;
< default:
< num_bars=5;...

Read more...

Revision history for this message
toby dacre (toby-junk) wrote : launchpad ate my formatting :)

here it is again with some indentation

Revision history for this message
toby dacre (toby-junk) wrote :

This should be in a better format diff -rup

The patch it's the same for ubuntu and upstream

Revision history for this message
Sebastien Bacher (seb128) wrote :

toby, thank you for your work on the bug, I've attach your patch upstream and will update launchpad when they add comments about ittoby dacre

Revision history for this message
Sebastien Bacher (seb128) wrote :

upstream has used the patch and the bug is fixed to SVN now

Changed in gnome-system-monitor:
status: Confirmed → Fix Committed
Changed in gnome-system-monitor:
status: Confirmed → Fix Released
Revision history for this message
Marco Rodrigues (gothicx) wrote :

Fix released on v2.16.x

Changed in gnome-system-monitor:
status: Fix Committed → Fix Released
Revision history for this message
sebastian-s (sebastian-s) wrote :

on my live system of hardy beta I still get unreadable key ressources. Is this related to the same bug or a new one as the "graphengine" is new?

Revision history for this message
toby dacre (toby-junk) wrote :

Yep, this is a different bug.

http://bugzilla.gnome.org/show_bug.cgi?id=521930

although it is called 'g-s-m charts are totally broken in punjabi locale' it is locale independent

Changed in gnome-system-monitor:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.