Page 1 of 1

freememapplet_tray - a different approach

Posted: Mon 01 Dec 2014, 15:38
by gyro
This is not a replacement for 'freememapplet_tray'.
Currently it's just a proof of concept test console program called 'freememapp'. Run it in a console and it will display the appropriate 'freememapplet_tray' tooltip message on the console.

When working on 'freememapplet_tray' for the 'savefolder using symbolic links' project, I was intrigued by the following comment in the code:

Code: Select all

    //read free personal storage...
    //would prefer to do this entirely in C code...
So that's what I've done.

I hope others might test running this under different puppies and in different pupmodes.

Its compiled on Dpup Exprimo 5.X.3.4.12, but it runs successfully on all my other puppies.

Note: I'm not trying to become the maintainer of 'freememapplet_tray'. I just want to let the appropriate person know that there is another way.

gyro

Posted: Mon 01 Dec 2014, 18:53
by Keef
lupusuper2 5.2.8.7 k3.2.48 beta (with Luci_SaveDir-6.pet)

Code: Select all

# ./freememapp 
11G personal storage, free space 1.9G
No problems here.

Posted: Mon 01 Dec 2014, 19:11
by technosaurus
There is already a tool to use the tooltip in a tray applet... you could use the data to select/generate an image and choose/write a gtkdialog app to run on left/right click.

Its called
SIT (Simple Icon Tray)

Posted: Mon 01 Dec 2014, 20:05
by gyro
@Keef,
Thanks for the feed back.

@technosaurus,
Sorry, I don't understand your comment. If I was trying to make a 'tool', it would be a replacement for 'freememapplet_tray'.
The question here is if the algorithm used in this code is a suitable replacement for the algorithm used in 'frememapplet_tray' v2.5?

So, the questions are:
1) Does it run successfully?
2) Does it's numbers match those of current 'freememapplet_tray'?

gyro

Posted: Mon 01 Dec 2014, 20:35
by mikeb
Good idea...there are a few functions in puppy that could benefit from some c programming...I can only slowly hack the stuff unfortunately.

I use older xfce4 on puppy and it comes with a space monitor which I point at '/' and that works a treat... changes colour as space gets low and pops up warnings...all with non existent cpu usage....again its a c applet like yours.

Those drive icons had a c replacement written...works great on lucid...the scripts mike yuccy and significant cpu spikes on older machines .

mike

Posted: Mon 01 Dec 2014, 22:14
by technosaurus
gyro wrote:@technosaurus,
Sorry, I don't understand your comment. If I was trying to make a 'tool', it would be a replacement for 'freememapplet_tray'.
The question here is if the algorithm used in this code is a suitable replacement for the algorithm used in 'frememapplet_tray' v2.5?
with the algorithm separated out there is no need for a separate freememapplettray at all. SIT automatically handles updating icons and tooltips for many "applets" in a single gtk2 process...

Posted: Wed 03 Dec 2014, 11:34
by gyro
I'm going to leave this now as a suggestion to the maintainer of "freememapplet_tray.c".

gyro