[9843] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Accelerator text in menuitem

daemon@ATHENA.MIT.EDU (Manni Wood)
Wed Nov 4 11:43:10 1998

Date: Wed, 04 Nov 1998 11:41:38 -0500
From: Manni Wood <mwood@sig.bsh.com>
To: Gtk List <gtk-list@redhat.com>
CC: Conrad Steenberg <conrad@srl.caltech.edu>, Gert Scholten <gs2@dds.nl>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Hi.

I've been trying to find a way to get gtk+ 1.0.6 to show a non-alpha
accelerator in a menuitem.

I'm using the Del key as a shortcut to nuke items from a top-level
clist, so I'd like the corresponding menuitem to say:

Delete item    Del

In the same way that I have 

New item       Ctrl+N

I originally thought I may be able to realloc menuitem->accelerator_key,
but accelerator_key is just a gchar, not a gchar* as I'd originally
hoped.

I also tried gtk_menu_item_new_with_label("Delete item    Del"),
but found that the resulting menuitems aligned like so:

New item          Ctrl+N
Delete item    Del
Edit item         Ctrl+E

The "Del" is not right justified as the "real" accelerators are.

Does anyone know how I can directly manipulate the accelerator text of a
menuitem under gtk+ 1.0.6?

Thanks,

-Manni
-- 
------------------------------------------------------------------
Manni Wood, Senior Programmer/Analyst, Strategic Interactive Group
800 Boylston Street, Boston, MA, 02199
ph 617 867 1881 . fx 617 867 1111 . mwood@sig.bsh.com

    "A journey of a thousand miles must begin with a single step."
                                                         -- Lao-zi

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post