PDA

View Full Version : Need some help writing a gnome panel applet



Promit
April 23rd, 2005, 05:19 AM
I'm writing a gnome panel applet, and I need to construct a menu at runtime that can pop up on a left click. I can't seem to really find info on doing this; the only things I've found are for making the static context menu. Basically I have a std::vector<std::string> and I want to create a menu with all of the elements in that vector. And when one of those elements is clicked, I want the string of which menu (or an index that I can line up with the vector) that tells me what was selected.

(In case it wasn't obvious, this is in C++.)

Thanks.

Promit
April 23rd, 2005, 05:44 AM
Oh, I forgot to mention, I'd also like to highlight or put a check mark beside a certain menu item.

Laterix
April 4th, 2007, 03:09 PM
I would like to know how to write static menus. Could you give me a tip or link to some tutorial?