Binary prefixes for memory, swap

Asked by Abhishek

Gnome system monitor shows both memory/swap and network bandwidth with binary prefixes. There should be an option for this in the applet as well.

While for network bandwidth decimal prefixes are fine but for memory/swap the default should be binary prefixes.

Can this be supported in the applet?

Question information

Language:
English Edit question
Status:
Solved
For:
System Load Indicator Edit question
Assignee:
No assignee Edit question
Solved by:
Michael Hofmann
Solved:
Last query:
Last reply:
Revision history for this message
Best Michael Hofmann (mh21) said :
#1

Hi Abhishek,

yes this could be supported.

I don't have time to work on this, but the implementation should be straightforward. The applet uses the size() function defined in src/function.vala and src/utils.vala. Since gtk 2.30, g_format_size_for_display has been replaced by g_format_size, which supports both base 2 and base 10. So it should be easily to implement a function size2() that uses base 2.

Cheers
  Michael

Revision history for this message
Abhishek (rawcoder) said :
#2

Thanks for the response!

I'll read the code and try to implement it.

Revision history for this message
Abhishek (rawcoder) said :
#3

Thanks Michael Hofmann, that solved my question.