Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 19 Dec 2014, 20:55
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
freememapplet_tray - a different approach
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
gyro

Joined: 28 Oct 2008
Posts: 543
Location: Brisbane, Australia

PostPosted: Mon 01 Dec 2014, 11:38    Post subject:  freememapplet_tray - a different approach
Subject description: A test program that does it all in C.
 

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:
    //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
main.c.gz
Description  gunzip it to produce the source file.
gz

 Download 
Filename  main.c.gz 
Filesize  907 Bytes 
Downloaded  15 Time(s) 
freememapp.gz
Description  gunzip it to produce the binary file.
gz

 Download 
Filename  freememapp.gz 
Filesize  2.25 KB 
Downloaded  21 Time(s) 
Back to top
View user's profile Send private message 
Keef


Joined: 20 Dec 2007
Posts: 649
Location: Staffordshire

PostPosted: Mon 01 Dec 2014, 14:53    Post subject:  

lupusuper2 5.2.8.7 k3.2.48 beta (with Luci_SaveDir-6.pet)

Code:
# ./freememapp
11G personal storage, free space 1.9G


No problems here.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Mon 01 Dec 2014, 15:11    Post subject:  

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)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 543
Location: Brisbane, Australia

PostPosted: Mon 01 Dec 2014, 16:05    Post subject:  

@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
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9026

PostPosted: Mon 01 Dec 2014, 16:35    Post subject:  

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
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Mon 01 Dec 2014, 18:14    Post subject:  

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...
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 543
Location: Brisbane, Australia

PostPosted: Wed 03 Dec 2014, 07:34    Post subject:  

I'm going to leave this now as a suggestion to the maintainer of "freememapplet_tray.c".

gyro
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0660s ][ Queries: 12 (0.0165s) ][ GZIP on ]