[9854] in The GTK GIMP ToolKit mailing list archive

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

[gtk-list] Re: Accelerator text in menuitem

daemon@ATHENA.MIT.EDU (Tim Janik)
Wed Nov 4 15:39:40 1998

From: Tim Janik <timj@gtk.org>
Date: Wed, 4 Nov 1998 20:17:34 +0100 (CET)
To: Gtk List <gtk-list@redhat.com>
cc: Conrad Steenberg <conrad@srl.caltech.edu>, Gert Scholten <gs2@dds.nl>
In-Reply-To: <364083C2.85209DFC@sig.bsh.com>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

On Wed, 4 Nov 1998, Manni Wood wrote:

> 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?

you can't. the 1.0.x line simply doesn't support non-apha accelerators.
the development branch uses a slightly different system for accelerator
handling and supports all available keys.

> 
> Thanks,
> 
> -Manni
> -- 

---
ciaoTJ

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


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