F1 key binding for help

This commit is contained in:
Pan7 2017-03-08 21:52:06 +01:00
parent d91edda475
commit 5414eba3e9
1 changed files with 3 additions and 1 deletions

View File

@ -297,6 +297,7 @@ SCommandInfo g_Commands[] =
{"LoadPointfile", 'L', RAD_SHIFT, ID_FILE_POINTFILE, "menu_load_pointfile"}, {"LoadPointfile", 'L', RAD_SHIFT, ID_FILE_POINTFILE, "menu_load_pointfile"},
{"TextureWindowScaledown", GDK_Insert, RAD_ALT, ID_TEXTUREWINDOW_SCALEDOWN, "menu_texturewindow_scaledown"}, {"TextureWindowScaledown", GDK_Insert, RAD_ALT, ID_TEXTUREWINDOW_SCALEDOWN, "menu_texturewindow_scaledown"},
{"TextureWindowScaleup", GDK_Delete, RAD_ALT, ID_TEXTUREWINDOW_SCALEUP, "menu_texturewindow_scaleup"}, {"TextureWindowScaleup", GDK_Delete, RAD_ALT, ID_TEXTUREWINDOW_SCALEUP, "menu_texturewindow_scaleup"},
{"Help", GDK_KEY_F1, 0, ID_HELP, "menu_help"},
}; };
int g_nCommandCount = sizeof( g_Commands ) / sizeof( SCommandInfo ); int g_nCommandCount = sizeof( g_Commands ) / sizeof( SCommandInfo );
@ -1595,7 +1596,8 @@ void MainFrame::create_main_menu( GtkWidget *window, GtkWidget *vbox ){
item = create_menu_item_with_mnemonic( menu, _( "GtkRadiant Manual" ), item = create_menu_item_with_mnemonic( menu, _( "GtkRadiant Manual" ),
GTK_SIGNAL_FUNC( HandleCommand ), ID_HELP ); GTK_SIGNAL_FUNC( HandleCommand ), ID_HELP );
gtk_widget_add_accelerator( item, "activate", accel, GDK_F1, (GdkModifierType)0, GTK_ACCEL_VISIBLE ); // does not work, using g_Commands for the key binding
//gtk_widget_add_accelerator( item, "activate", accel, GDK_F1, (GdkModifierType)0, GTK_ACCEL_VISIBLE );
// this creates all the per-game drop downs for the game pack helps // this creates all the per-game drop downs for the game pack helps
// it will take care of hooking the Sys_OpenURL calls etc. // it will take care of hooking the Sys_OpenURL calls etc.