Laca:
As I mentioned in previous e-mail, the display file is written in XML
style language and only can insert very simple python style script in,
the part I modified in this patch are those initial
value of the widget to better work with Solaris, and user can always
easy to reconfigure to whatever they want.
for example
<page label="CPU">
<title label="Refresh"/>
<integer label="Refresh rate in milliseconds:" min="50" max="5000"
bind="r
efresh"/>
<title label="Colors"/>
<color label="CPU load label" bind="Dsp.cpu_load.color"/>
<!-- bug in gDesklets; doesn't work! color label="CPU gauge"
bind="Dsp.cpu
_gauge.bg_color"/ -->
<color label="CPU plotter" bind="Dsp.plot_load.color"/>
<color label="CPU information" bind="Dsp.lbl_cpu.color"/>
<color label="CPU details" bind="Dsp.lbl_cpu_info.color"/>
<title label="Fonts"/>
<font label="CPU load label" bind="Dsp.cpu_load.font"/>
<font label="CPU information" bind="Dsp.lbl_cpu.font"/>
<font label="CPU details" bind="Dsp.lbl_cpu_info.font"/>
</page>
</prefs>
<script uri="candy.script"/>
<script><![CDATA[
FADING_STEPS = 5
DOM = Dsp.icon.dom
cpu_top = DOM.get("Chip_Top")
refresh = 500
This code is use to set the refresh frequency of cpu desklets to
retrieve CPU load by calling libgtop, the original setting is 500ms, and
we think to adjust to 5sec (which seem to prstat) can
save more resource on Solaris. So I made a patch to change it. I do
believe this should only keep internally.
In this part of code in cpu.display
def show_cpu_info(show):
Dsp.lbl_cpu_info.visible = show
Dsp.gauge_load.visible = Dsp.plot_load.visible = not show
if (show):
Dsp.lbl_cpu_info.value = "Bogomips: %.2f\n%s (%dkB cache)" % \
(sys.cpu_bogomips, sys.cpu_model,
sys.cpu_cache)
this script is use to display information in the widget, as you can see,
it displays Bogomips info in the widget which is not available in
Solaris, so I remove the display of bogomips. and I do
think this is should be a internal patch.
The other two fix, one typo and the fix of WeeklyCalendar, I have talked
to the module owner to put upstream.
Wish this could be helpful.
Chris
Laszlo (Laca) Peter wrote:
> On Tue, 2007-02-13 at 19:24 +0800, C Wang wrote:
>
>> This is a branding patch, I modify the widget to have better
>> performance and other issue,
>> e.g remove the information of bogomips which is not in Solaris.
>>
>
> Neither of these are branding. Please get these fixed
> upstream.
>
> Laca
>
>
>