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 31 Oct 2014, 00:29
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 Posts_count  
Author Message
Argolance


Joined: 06 Jan 2008
Posts: 1840
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   276 Time(s)

131025_102354_3200x1200_easyshot.png


_________________


Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

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: 1840
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_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

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: 1840
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_website 
technosaurus


Joined: 18 May 2008
Posts: 4353

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: 1840
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   123 Time(s)

131031_104910_3200x1200_easyshot.png


_________________

Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0659s ][ Queries: 13 (0.0090s) ][ GZIP on ]