Skip to content
Snippets Groups Projects
Commit 8391724d authored by rds's avatar rds
Browse files

Added accelerator code to help remind users of shortcuts

parent e115d45b
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,9 @@
* choosers, GTK notebooks and utility functions.
*
* HISTORY:
* Last edited: Jun 3 14:47 2008 (rds)
* Last edited: Nov 3 13:08 2008 (rds)
* Created: Fri Nov 4 16:59:52 2005 (edgrif)
* CVS info: $Id: zmapUtilsGUI.h,v 1.34 2008-06-03 14:11:30 rds Exp $
* CVS info: $Id: zmapUtilsGUI.h,v 1.35 2008-11-03 14:16:49 rds Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_UTILS_GUI_H
......@@ -110,6 +110,9 @@ typedef struct
ZMapGUIMenuItemCallbackFunc callback_func ; /*!< Function to call when this item
is selected. */
gpointer callback_data ; /*!< Data to pass to callback function. */
/* accelerator is at the end, because I'm lazy... */
char *accelerator; /*!< an accelerator for the menu option... */
} ZMapGUIMenuItemStruct, *ZMapGUIMenuItem ;
......
......@@ -27,9 +27,9 @@
*
* Exported functions: See zmapUtilsGUI.h
* HISTORY:
* Last edited: Jun 28 10:20 2006 (edgrif)
* Last edited: Nov 3 13:14 2008 (rds)
* Created: Thu Jan 12 10:59:24 2006 (edgrif)
* CVS info: $Id: zmapGUImenus.c,v 1.9 2006-11-08 09:24:46 edgrif Exp $
* CVS info: $Id: zmapGUImenus.c,v 1.10 2008-11-03 14:18:13 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -258,6 +258,8 @@ void zMapGUIMakeMenu(char *menu_title, GList *menu_item_sets, GdkEventButton *bu
&& menu_items[i].type != ZMAPGUI_MENU_RADIOACTIVE))
radio_title = NULL ;
if(menu_items[i].accelerator)
item->accelerator = menu_items[i].accelerator;
item++ ;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment