gtrayicon right clic menu separator? [SOLVED]

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

gtrayicon right clic menu separator? [SOLVED]

#1 Post by Argolance »

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: Select all

[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.
Attachments
131025_102354_3200x1200_easyshot.png
(11.86 KiB) Downloaded 360 times
Last edited by Argolance on Thu 31 Oct 2013, 09:44, edited 1 time in total.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

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
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#3 Post by Argolance »

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. :oops:
So, just now, I would like to find the solution.

Thank you.

Cordialement.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#4 Post by technosaurus »

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

where divider.png is just a flat rectangle image of the height/width you need.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#5 Post by Argolance »

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

Cordialement.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#6 Post by technosaurus »

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 :) ).
untested but patch would look like this (uncomment my added line):

Code: Select all

		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 =
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#7 Post by Argolance »

Bonjour technosaurus,
:D :D :wink:
(a picture says more than a 1000 words)
Thank you so much!

Cordialement.
Attachments
131031_104910_3200x1200_easyshot.png
(10.14 KiB) Downloaded 213 times

Post Reply