Re: [gtk-list] Saving menu short cuts
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Saving menu short cuts
- Date: Fri, 14 May 1999 08:16:51 +0200 (CEST)
On 14 May 1999, Anders Melchiorsen wrote:
> I want my application to read any short cuts that the user has defined
> in my menus (by simply pressing a key when a menu item is
> highlighted).
>
> Also, I want to save them in a file and set them in the menus once the
> program is restarted.
>
> Any pointers to how I might do that?
> --
> Mvh. Anders
create your menus with the item factory (the tutorial has a section on that).
after gtk_init(), you need to read in the menu entries:
gtk_item_factory_parse_rc ("/home/anders/.myapp-menurc");
and upon program exit, e.g. after gtk_main() you need to dump the file again:
gtk_item_factory_dump_rc ("/home/anders/.myapp-menurc", NULL, TRUE);
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]