Re: Stock menu items



Chris Seaton wrote:

My program has File menu that contains an Open item. For this I'm
using the stock item GTK_STOCK_OPEN. I'm using the item factory.

My program also has a Notes menu however, and that also contains an
Open item. I want that to have the open icon, but not the shortcut
keys (they can't both have the same shortcut keys).

I'm not sure whether it is accomplishable with GtkItemFactory (I don't
use that), but in general there's certainly a way for it.

For instance, have a look at Glade. It distinguishes between a *stock
ITEM* and a *stock ICON* for menu items. While the stock ITEM implicits
all parameters, including an icon, a stock ICON doesn't. It's just a
stock icon to be used for arbitrary items with arbitrary shortcuts.

I recommend you to build a simple menu using Glade, export it either as
C source or XML (depending on whether you use libglade or not) and see
how this is accomplished. Not by an Itemfactory, I'm afraid.



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