Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-29 Thread Bernie Innocenti
On Thu, 2010-07-29 at 01:12 +0530, anishmangal2002 wrote: This patch adds an icon to the frame, whose palette menu displays the memory and cpu resources. For computing free memory, the code reads the /proc/meminfo file (thanks quozl) and for computing cpu usage, the code reads the /proc/stat

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-28 Thread Anish Mangal
Thank you for reviewing this patch. However, after receiving feedback from Py. I've modified some of its functionality. The two patches attached implement that functionality. I've updated the parallel thread [DESIGN] Displaying the current status of system resources (such as memory, cpu) to

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-28 Thread Anish Mangal
Sorry! I thought the attachments would remain as is. I'll git send-email this. On Thu, Jul 29, 2010 at 1:09 AM, Anish Mangal anishmangal2...@gmail.com wrote: Thank you for reviewing this patch. However, after receiving feedback from Py. I've modified some of its functionality. The two patches

[Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-28 Thread anishmangal2002
This patch adds an icon to the frame, whose palette menu displays the memory and cpu resources. For computing free memory, the code reads the /proc/meminfo file (thanks quozl) and for computing cpu usage, the code reads the /proc/stat file. The frame icon is updated after every 5 seconds if

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-11 Thread James Cameron
On Sat, Jul 10, 2010 at 01:04:37PM +0530, anishmangal2002 wrote: This patch adds an icon to the frame, whose palette menu displays the memory and cpu resources. For computing free memory, the code reads the /proc/meminfo file (thanks quozl) and for computing cpu usage, the code reads the

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-10 Thread Anish Mangal
Thanks for reviewing this patch. I think I have addressed all issues raised by tomeu, silbe and quozl. Additionally, I've put the portion of code that accesses the /proc/stat and /proc/meminfo files in a try...except block. When an exception occurs, all the widgets barring _cpu_text are removed

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-05 Thread Tomeu Vizoso
Some comments on top of Sascha's excellent review: On Fri, Jul 2, 2010 at 12:03, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.org wrote: Excerpts from anishmangal2002's message of Thu Jul 01 15:03:16 + 2010: +        gobject.timeout_add(1000, self.__timer_cb) The use of polling (i.e. a

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-02 Thread Sascha Silbe
Excerpts from anishmangal2002's message of Thu Jul 01 15:03:16 + 2010: [class DeviceView(TrayIcon)] +def __init__(self): +icon_name = 'computer' + +client = gconf.client_get_default() +color = XoColor(client.get_string('/desktop/sugar/user/color')) +

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-02 Thread Tim McNamara
On 2 July 2010 22:03, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.orgwrote: +def create_palette(self): +palette = ResourcePalette(_('System Resources')) Should Resources be lower case instead? (Question to native english speakers) Title Case is often used in headings, but use

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-02 Thread Paul Fox
i know people don't like to think about queues, and load averages, but the unix load average numbers give a much better picture of how hard your system is being asked to work than instantaneous CPU utilization. CPU utilization makes for pretty bar graphs though, so i suppose it will always win.

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-02 Thread Sascha Silbe
Excerpts from Paul Fox's message of Fri Jul 02 12:36:43 + 2010: i know people don't like to think about queues, and load averages, but the unix load average numbers give a much better picture of how hard your system is being asked to work than instantaneous CPU utilization. In my

[Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-02 Thread anishmangal2002
This patch adds an icon to the frame, whose palette menu displays the memory and cpu resources. For computing free memory, the code reads the /proc/meminfo file (thanks quozl) and for computing cpu usage, the code reads the /proc/stat file. The palette menu entries are only updated (in one second

Re: [Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-07-02 Thread James Cameron
On Fri, Jul 02, 2010 at 08:47:28PM +0530, anishmangal2002 wrote: +def __timer_cb(self): +# Get free CPU resources [...] +# Get free memory resources [...] +# Update CPU and Memory labels and progressbars [...] + +# Keep invoking this method if we are

[Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame

2010-06-28 Thread anishmangal2002
This patch adds an icon to the frame, whose palette menu displays the memory and cpu resources. For computing free memory, the code reads the /proc/meminfo file (thanks quozl) and for computing cpu usage, the code reads the /proc/stat file. The palette menu entries are only updated (in one second