From: Kaj-Michael Lang Date: Fri, 7 Sep 2007 08:02:57 +0000 (+0300) Subject: Add some keyboard shortcuts for common operations. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a601f85ae81dd6aaa409c54b51d1d3bc9abcdd0;p=mapper Add some keyboard shortcuts for common operations. --- diff --git a/src/ui-common.c b/src/ui-common.c index 0c7cafc..830a55b 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -171,12 +171,12 @@ static GtkActionEntry ui_entries[] = { {"file", NULL, N_("_File"), NULL, NULL, NULL }, {"file_settings", GTK_STOCK_PREFERENCES, N_("_Settings..."), NULL, NULL, G_CALLBACK(menu_cb_settings) }, {"file_help", GTK_STOCK_HELP, N_("_Help"), NULL, NULL, G_CALLBACK(menu_cb_help) }, - {"file_about", GTK_STOCK_ABOUT, N_("_About"), "A", NULL, G_CALLBACK(menu_cb_about) }, + {"file_about", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK(menu_cb_about) }, {"file_quit", GTK_STOCK_QUIT, N_("_Quit"), "Q", NULL, G_CALLBACK(gtk_main_quit) }, {"track", NULL, N_("_Track"), NULL, NULL, NULL }, {"track_open", GTK_STOCK_OPEN, N_("_Open..."), NULL, NULL, G_CALLBACK(menu_cb_track_open) }, - {"track_save", GTK_STOCK_SAVE, N_("_Save..."), NULL, NULL, G_CALLBACK(menu_cb_track_save) }, + {"track_save", GTK_STOCK_SAVE, N_("_Save..."), "S", NULL, G_CALLBACK(menu_cb_track_save) }, {"track_clear", GTK_STOCK_CLEAR, N_("_Clear"), NULL, NULL, G_CALLBACK(menu_cb_track_clear) }, {"track_insert_break", NULL, N_("Insert Break"), NULL, NULL, G_CALLBACK(menu_cb_track_insert_break) }, {"track_insert_mark", NULL, N_("Insert Mark..."), NULL, NULL, G_CALLBACK(menu_cb_track_insert_mark) }, @@ -196,8 +196,8 @@ static GtkActionEntry ui_entries[] = { {"poi", NULL, N_("_Poi"), NULL, NULL, NULL }, {"poi_categories", GTK_STOCK_INDEX, N_("_Categories"), NULL, NULL, G_CALLBACK(menu_cb_category) }, {"poi_settings", GTK_STOCK_PREFERENCES, N_("_Settings..."), NULL, NULL, NULL }, - {"poi_add", GTK_STOCK_ADD, N_("Add"), NULL, NULL, G_CALLBACK(cb_add_poi) }, - {"poi_quick_add", GTK_STOCK_ABOUT, N_("Quick Add"), NULL, NULL, G_CALLBACK(cb_add_poi) }, + {"poi_add", GTK_STOCK_ADD, N_("Add"), "A", NULL, G_CALLBACK(cb_add_poi) }, + {"poi_quick_add", GTK_STOCK_ABOUT, N_("Quick Add"), "E", NULL, G_CALLBACK(cb_add_poi) }, {"poi_search", GTK_STOCK_FIND, N_("Search"), NULL, NULL, NULL }, {"map", NULL, N_("_Map"), NULL, NULL, NULL }, @@ -207,16 +207,16 @@ static GtkActionEntry ui_entries[] = { {"autocenter", NULL, N_("Autocenter"), NULL, NULL, NULL }, {"view", NULL, N_("_View"), NULL, NULL, NULL }, - {"view_zoom_in", GTK_STOCK_ZOOM_IN, N_("Zoom in"), NULL, NULL, G_CALLBACK(cb_zoomin) }, - {"view_zoom_out", GTK_STOCK_ZOOM_OUT, N_("Zoom out"), NULL, NULL, G_CALLBACK(cb_zoomout) }, - {"view_zoom_normal", GTK_STOCK_ZOOM_100, N_("Zoom normal"), NULL, NULL, G_CALLBACK(cb_zoom_base) }, + {"view_zoom_in", GTK_STOCK_ZOOM_IN, N_("Zoom in"), "+", NULL, G_CALLBACK(cb_zoomin) }, + {"view_zoom_out", GTK_STOCK_ZOOM_OUT, N_("Zoom out"), "-", NULL, G_CALLBACK(cb_zoomout) }, + {"view_zoom_normal", GTK_STOCK_ZOOM_100, N_("Zoom normal"), "0", NULL, G_CALLBACK(cb_zoom_base) }, {"view_items", NULL, N_("Features"), NULL, NULL, NULL }, {"goto", NULL, N_("_Go"), NULL, NULL, NULL }, - {"goto_home", GTK_STOCK_HOME, N_("_Home"), NULL, NULL, G_CALLBACK(menu_cb_goto_home) }, - {"goto_destination", GTK_STOCK_JUMP_TO, N_("_Destination"), NULL, NULL, G_CALLBACK(menu_cb_goto_destination) }, - {"goto_gps", NULL, N_("_GPS"), NULL, NULL, G_CALLBACK(menu_cb_goto_gps) }, + {"goto_home", GTK_STOCK_HOME, N_("_Home"), "H", NULL, G_CALLBACK(menu_cb_goto_home) }, + {"goto_destination", GTK_STOCK_JUMP_TO, N_("_Destination"), "J", NULL, G_CALLBACK(menu_cb_goto_destination) }, + {"goto_gps", NULL, N_("_GPS"), "G", NULL, G_CALLBACK(menu_cb_goto_gps) }, {"goto_address", GTK_STOCK_FIND, N_("Address..."), NULL, NULL, NULL }, {"goto_latlon", NULL, N_("Lat/Lon"), NULL, NULL, G_CALLBACK(menu_cb_goto_latlon) }, {"goto_nextway", NULL, N_("Next Waypoint"), NULL, NULL, G_CALLBACK(menu_cb_goto_nextway) }, @@ -236,7 +236,7 @@ static GtkToggleActionEntry ui_toggle_entries[] = { #if 0 {"view_fullscreen", GTK_STOCK_FULLSCREEN, N_("Fullscreen"), NULL, NULL, G_CALLBACK(cb_fullscreen), FALSE}, #else - {"view_fullscreen", NULL, N_("Fullscreen"), NULL, NULL, G_CALLBACK(cb_fullscreen), FALSE}, + {"view_fullscreen", NULL, N_("Fullscreen"), "F11", NULL, G_CALLBACK(cb_fullscreen), FALSE}, #endif {"view_scale", NULL, N_("Scale"), NULL, NULL, G_CALLBACK(menu_cb_show_scale), TRUE}, {"view_route", NULL, N_("Route"), NULL, NULL, G_CALLBACK(menu_cb_show_routes), TRUE}, @@ -247,9 +247,9 @@ static GtkToggleActionEntry ui_toggle_entries[] = { static guint n_ui_toggle_entries = G_N_ELEMENTS (ui_toggle_entries); static GtkRadioActionEntry ui_autocenter_entries[] = { - { "autocenter_latlon", NULL, "Lat/Lon", NULL, NULL, CENTER_LATLON }, - { "autocenter_lead", NULL, "Lead", NULL, NULL, CENTER_LEAD }, - { "autocenter_none", NULL, "None", NULL, NULL, CENTER_MANUAL }, + { "autocenter_latlon", NULL, "Lat/Lon", "1", NULL, CENTER_LATLON }, + { "autocenter_lead", NULL, "Lead", "2", NULL, CENTER_LEAD }, + { "autocenter_none", NULL, "None", "3", NULL, CENTER_MANUAL }, }; static guint n_ui_autocenter_entries = G_N_ELEMENTS (ui_autocenter_entries);