Re: Stock items - first version of a patch



Michael Meeks <michael ximian com> writes:

>         Secondly, it is important that we can put the stockid onto the    
> command so we can do:

Hi Michael,

this already works :-)

====
    char simplea [] =
	"<Root>\n"
	"<commands>\n"
	"	<cmd name=\"FileExit\" stockid=\"gtk-quit\"/>\n"
	"	<cmd name=\"MyStock\"  stockid=\"gtk-open\"/>\n"
	"</commands>\n"
	"<dockitem name=\"Toolbar\" look=\"both\" behavior=\"exclusive\">\n"
	"	<toolitem name=\"Foo\" verb=\"MyStock\"/>\n"
	"	<toolitem name=\"Bar\" stockid=\"gtk-close\"/>\n"
	"</dockitem>\n"
	"<menu>\n"
	"	<submenu name=\"File\" _label=\"_File\">\n"
	"		<menuitem name=\"foo\" verb=\"FileExit\"/>\n"
	"	</submenu>\n"
	"	<submenu name=\"Test\" _label=\"_Test\">\n"
	"		<menuitem name=\"toggle\" type=\"toggle\" id=\"MyFoo\" _label=\"_ToggleMe\" _tip=\"a\" accel=\"*Control*t\"/>\n"
	"	</submenu>\n"
	"</menu>\n"
	"</Root>";
====

>         etc. I don't know if GtkStock has included accelerators in the    
> label texts for menu items ? - if so we need some way to get rid of them  
> for the toolbars ... Hmm.

It has underscores in the labels "_Close", but it's easy to parse them out.

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]