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 Sun 20 Apr 2014, 22:24
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
gtrayicon right clic menu separator? [SOLVED]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
Argolance


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Fri 25 Oct 2013, 04:21    Post subject:  gtrayicon right clic menu separator? [SOLVED]  

Bonjour,
Do anyone know how to get a separator or delimiter inside a gtrayicon right click menu?
This is how menu file looks like:
Code:
[main]
default=command,/usr/local/apps/2Pfx/user.png
essai=command,/usr/local/apps/2Pfx/user.png
test=command,/usr/local/apps/2Pfx/user.png
2Pfx=command,/usr/local/apps/2Pfx/2Pfx32.png

Thanks.

Cordialement.
131025_102354_3200x1200_easyshot.png
 Description   
 Filesize   11.86 KB
 Viewed   253 Time(s)

131025_102354_3200x1200_easyshot.png


_________________


Last edited by Argolance on Thu 31 Oct 2013, 05:44; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Mon 28 Oct 2013, 18:57    Post subject:  

you can use my simple icon tray:
http://www.murga-linux.com/puppy/viewtopic.php?t=76431
then use a gtkdialog/yad/xdialog/whatever app for the left/right-click actions

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


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Tue 29 Oct 2013, 05:57    Post subject:  

Bonjour,
technosaurus wrote:
you can use my simple icon tray:

You are right, and it is what I do now in a latest script that need a tray icon...
I am actually working on an older one that uses gtrayicon and, though I think sit or yad would be much better, I admit I have obviously no courage to redo it all. Embarassed
So, just now, I would like to find the solution.

Thank you.

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Tue 29 Oct 2013, 23:26    Post subject:  

maybe
_____=command,/usr/local/apps/2Pfx/divider.png

where divider.png is just a flat rectangle image of the height/width you need.

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


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Wed 30 Oct 2013, 10:54    Post subject:  

Thanks technosaurus,
... I tried many things like that but without being really convinced by the result... Confused

Cordialement.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Wed 30 Oct 2013, 14:17    Post subject:  

other than that, I could only suggest hacking the glade file or patching the source to allow separators. If you post the code, it may be easier to suggest something (more likely with some english comments Smile ).
untested but patch would look like this (uncomment my added line):
Code:

      for(key_pos = 0; key_pos < keys_size; key_pos++) {
         values = g_key_file_get_string_list(keyfile, groups[group_pos], keys[key_pos], &values_size, NULL);
// if (values_size == 0) item=gtk_separator_menu_item_new ();
         if (values_size == 1) { /* no icon */
            item = gtk_menu_item_new_with_label(keys[key_pos]);
         } else if (values_size == 2) { /* command and icon */
            item = gtk_image_menu_item_new_with_label(keys[key_pos])

so if you wanted a separator, just put nothing after =

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


Joined: 06 Jan 2008
Posts: 1780
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Thu 31 Oct 2013, 05:41    Post subject:  

Bonjour technosaurus,
Very Happy Very Happy Wink
(a picture says more than a 1000 words)
Thank you so much!

Cordialement.
131031_104910_3200x1200_easyshot.png
 Description   
 Filesize   10.14 KB
 Viewed   97 Time(s)

131031_104910_3200x1200_easyshot.png


_________________

Back to top
View user's profile Send private message Visit poster's website 
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 » Off-Topic Area » Programming
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.0501s ][ Queries: 13 (0.0052s) ][ GZIP on ]