Mercurial > pidgin.yaz
comparison finch/libgnt/gntmenu.h @ 21212:b65f1bff6412
Allow binding key-shortcuts to menuitems.
For example, to bind ctrl+m to the 'Options -> Send IM...' menu, you would add:
[buddylist::menu]
c-m = send-im
in ~/.gntrc
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 03 Oct 2007 06:51:26 +0000 |
parents | 44b4e8bd759b |
children | d275275a011c |
comparison
equal
deleted
inserted
replaced
21210:5a12b881ac39 | 21212:b65f1bff6412 |
---|---|
84 }; | 84 }; |
85 | 85 |
86 G_BEGIN_DECLS | 86 G_BEGIN_DECLS |
87 | 87 |
88 /** | 88 /** |
89 * | 89 * @return The GType for GntMenu. |
90 * | |
91 * @return | |
92 */ | 90 */ |
93 GType gnt_menu_get_gtype(void); | 91 GType gnt_menu_get_gtype(void); |
94 | 92 |
95 /** | 93 /** |
96 * | 94 * Create a new menu. |
97 * @param type | |
98 * | 95 * |
99 * @return | 96 * @param type The type of the menu, whether it's a toplevel menu or a popup menu. |
97 * | |
98 * @return The newly created menu. | |
100 */ | 99 */ |
101 GntWidget * gnt_menu_new(GntMenuType type); | 100 GntWidget * gnt_menu_new(GntMenuType type); |
102 | 101 |
103 /** | 102 /** |
104 * | 103 * Add an item to the menu. |
105 * @param menu | 104 * |
106 * @param item | 105 * @param menu The menu. |
106 * @param item The item to add to the menu. | |
107 */ | 107 */ |
108 void gnt_menu_add_item(GntMenu *menu, GntMenuItem *item); | 108 void gnt_menu_add_item(GntMenu *menu, GntMenuItem *item); |
109 | |
110 /** | |
111 * Get the GntMenuItem with the given ID. | |
112 * | |
113 * @param menu The menu. | |
114 * @param id The ID for an item. | |
115 * | |
116 * @return The menuitem with the given ID, or @c NULL. | |
117 */ | |
118 GntMenuItem *gnt_menu_get_item(GntMenu *menu, const char *id); | |
109 | 119 |
110 G_END_DECLS | 120 G_END_DECLS |
111 | 121 |
112 #endif /* GNT_MENU_H */ | 122 #endif /* GNT_MENU_H */ |