-static GtkItemFactoryEntry menu_items[] = {
- { "/_File", NULL, NULL, 0, "<Branch>" },
- { "/File/_New", "<control>N", newwindow_cb, 0, "<StockItem>", GTK_STOCK_NEW },
- { "/File/_Open", "<control>O", load_file, TRUE, "<StockItem>", GTK_STOCK_OPEN },
- { "/File/A_ppend File", NULL, load_file, FALSE, "<Item>" },
- { "/File/_Save", "<control>S", (GtkItemFactoryCallback) save_file, 0, "<StockItem>", GTK_STOCK_SAVE },
- { "/File/Save _As", NULL, (GtkItemFactoryCallback) save_file_as, 0, "<StockItem>", GTK_STOCK_SAVE_AS },
- { "/File/sep1", NULL, NULL, 0, "<Separator>" },
- { "/File/_Generate Image File", NULL, draw_to_image_file_cb, 0, "<Item>" },
- { "/File/Generate Directory of Images", NULL, draw_to_image_dir_cb, 0, "<Item>" },
- { "/File/sep1", NULL, NULL, 0, "<Separator>" },
- { "/File/_Close", "<CTRL>W", window_close, 0, "<StockItem>", GTK_STOCK_QUIT },
- { "/_View", NULL, NULL, 0, "<Branch>" },
- { "/View/_UTM Mode", "<ctrl>u", (GtkItemFactoryCallback) window_change_coord_mode, VIK_VIEWPORT_DRAWMODE_UTM, "<RadioItem>" },
- { "/View/_Expedia Mode", "<ctrl>e", (GtkItemFactoryCallback) window_change_coord_mode, VIK_VIEWPORT_DRAWMODE_EXPEDIA, "/View/UTM Mode" },
- { "/View/_Google Mode", "<ctrl>g", (GtkItemFactoryCallback) window_change_coord_mode, VIK_VIEWPORT_DRAWMODE_GOOGLE, "/View/UTM Mode" },
- { "/View/_KH\\/Flat LatLon Mode", "<ctrl>k", (GtkItemFactoryCallback) window_change_coord_mode, VIK_VIEWPORT_DRAWMODE_KH, "/View/UTM Mode" },
- { "/View/_Mercator (New Google)", "<ctrl>m", (GtkItemFactoryCallback) window_change_coord_mode, VIK_VIEWPORT_DRAWMODE_MERCATOR, "/View/UTM Mode" },
- { "/View/sep1", NULL, NULL, 0, "<Separator>" },
- { "/View/_Go to Lat\\/Lon...", NULL, draw_goto, 1, "<Item>" },
- { "/View/Go to UTM...", NULL, draw_goto, 2, "<Item>" },
- { "/View/sep1", NULL, NULL, 0, "<Separator>" },
- { "/View/Set Background Color...", NULL, set_bg_color, 0, "<StockItem>", GTK_STOCK_SELECT_COLOR },
- { "/View/sep1", NULL, NULL, 0, "<Separator>" },
- { "/View/Zoom _In", "<ctrl>plus", draw_zoom, -3, "<StockItem>", GTK_STOCK_ZOOM_IN },
- { "/View/Zoom _Out", "<ctrl>minus", draw_zoom, -4, "<StockItem>", GTK_STOCK_ZOOM_OUT },
- { "/View/Zoom To...", "<ctrl><shift>Z", zoom_to, 0, "<Item>" },
- { "/View/_Zoom", NULL, NULL, 0, "<Branch>" },
- { "/View/Zoom/0.25", "<ctrl>1", draw_zoom, -2, "<Item>" },
- { "/View/Zoom/0.5", "<ctrl>2", draw_zoom, -1, "<Item>" },
- { "/View/Zoom/1", "<ctrl>3", draw_zoom, 1, "<Item>" },
- { "/View/Zoom/2", "<ctrl>4", draw_zoom, 2, "<Item>" },
- { "/View/Zoom/4", "<ctrl>5", draw_zoom, 4, "<Item>" },
- { "/View/Zoom/8", "<ctrl>6", draw_zoom, 8, "<Item>" },
- { "/View/Zoom/16", "<ctrl>7", draw_zoom, 16, "<Item>" },
- { "/View/Zoom/32", "<ctrl>8", draw_zoom, 32, "<Item>" },
- { "/View/Zoom/64", "<ctrl>9", draw_zoom, 64, "<Item>" },
- { "/View/Zoom/128", "<ctrl>0", draw_zoom, 64, "<Item>" },
- { "/View/sep1", NULL, NULL, 0, "<Separator>" },
- { "/View/Background _Jobs...", "<ctrl>j", (GtkItemFactoryCallback) a_background_show_window, 0, "<Item>" },
-
- { "/_Layers", NULL, NULL, 0, "<Branch>" },
- { "/Layers/Cu_t", NULL, menu_cut_layer_cb, -1, "<StockItem>", GTK_STOCK_CUT },
- { "/Layers/_Copy", NULL, menu_copy_layer_cb, -1, "<StockItem>", GTK_STOCK_COPY },
- { "/Layers/_Paste", NULL, menu_paste_layer_cb, -1, "<StockItem>", GTK_STOCK_PASTE },
- { "/Layers/sep1", NULL, NULL, 0, "<Separator>" },
- { "/Layers/_Properties", NULL, menu_properties_cb, -1, "<StockItem>", GTK_STOCK_PROPERTIES },
- { "/Layers/_Delete", NULL, menu_delete_layer_cb, -1, "<StockItem>", GTK_STOCK_DELETE },
- { "/Layers/Delete All", NULL, clear_cb, 0, "<StockItem>", GTK_STOCK_CLEAR },
- { "/Layers/sep1", NULL, NULL, 0, "<Separator>" },
- /* Plus Dynamic */
-
- { "/_Tools", NULL, NULL, 0, "<Branch>" },
- { "/Tools/sep1", NULL, NULL, 0, "<Tearoff>" },
- { "/Tools/_Zoom", "<ctrl><shift>Z", draw_set_current_tool, TOOL_ZOOM, "<Item>" },
- { "/Tools/_Ruler", "<ctrl><shift>R", draw_set_current_tool, TOOL_RULER, "<Item>" },
- /* Plus Dynamic */
+
+
+/***********************************************************************************************
+ ** GUI Creation
+ ***********************************************************************************************/
+
+static GtkActionEntry entries[] = {
+ { "File", NULL, N_("_File"), 0, 0, 0 },
+ { "Edit", NULL, N_("_Edit"), 0, 0, 0 },
+ { "View", NULL, N_("_View"), 0, 0, 0 },
+ { "SetZoom", NULL, N_("_Zoom"), 0, 0, 0 },
+ { "SetPan", NULL, N_("_Pan"), 0, 0, 0 },
+ { "Layers", NULL, N_("_Layers"), 0, 0, 0 },
+ { "Tools", NULL, N_("_Tools"), 0, 0, 0 },
+ { "Exttools", NULL, N_("_Webtools"), 0, 0, 0 },
+ { "Help", NULL, N_("_Help"), 0, 0, 0 },
+
+ { "New", GTK_STOCK_NEW, N_("_New"), "<control>N", N_("New file"), (GCallback)newwindow_cb },
+ { "Open", GTK_STOCK_OPEN, N_("_Open"), "<control>O", N_("Open a file"), (GCallback)load_file },
+ { "OpenRecentFile", NULL, N_("Open _Recent file"), NULL, NULL, (GCallback)NULL },
+ { "Append", GTK_STOCK_ADD, N_("A_ppend File"), NULL, N_("Append data from a different file"), (GCallback)load_file },
+ { "Acquire", NULL, N_("A_cquire"), 0, 0, 0 },
+ { "AcquireGPS", NULL, N_("From _GPS"), NULL, N_("Transfer data from a GPS device"), (GCallback)acquire_from_gps },
+ { "AcquireGoogle", NULL, N_("Google _Directions"), NULL, N_("Get driving directions from Google"), (GCallback)acquire_from_google },
+#ifdef VIK_CONFIG_GEOCACHES
+ { "AcquireGC", NULL, N_("Geo_caches"), NULL, N_("Get Geocaches from geocaching.com"), (GCallback)acquire_from_gc },
+#endif
+ { "Save", GTK_STOCK_SAVE, N_("_Save"), "<control>S", N_("Save the file"), (GCallback)save_file },
+ { "SaveAs", GTK_STOCK_SAVE_AS, N_("Save _As"), NULL, N_("Save the file under different name"), (GCallback)save_file_as },
+ { "GenImg", GTK_STOCK_CLEAR, N_("_Generate Image File"), NULL, N_("Save a snapshot of the workspace into a file"), (GCallback)draw_to_image_file_cb },
+ { "GenImgDir", GTK_STOCK_DND_MULTIPLE, N_("Generate _Directory of Images"), NULL, N_("FIXME:IMGDIR"), (GCallback)draw_to_image_dir_cb },
+
+#if GTK_CHECK_VERSION(2,10,0)
+ { "Print", GTK_STOCK_PRINT, N_("_Print..."), NULL, N_("Print maps"), (GCallback)print_cb },
+#endif
+
+ { "Exit", GTK_STOCK_QUIT, N_("E_xit"), "<control>W", N_("Exit the program"), (GCallback)window_close },
+ { "SaveExit", GTK_STOCK_QUIT, N_("Save and Exit"), NULL, N_("Save and Exit the program"), (GCallback)save_file_and_exit },
+
+ { "GotoSearch", GTK_STOCK_JUMP_TO, N_("Go To location"), NULL, N_("Go to address/place using text search"), (GCallback)goto_address },
+ { "GotoLL", GTK_STOCK_QUIT, N_("_Go to Lat\\/Lon..."), NULL, N_("Go to arbitrary lat\\/lon coordinate"), (GCallback)draw_goto_cb },
+ { "GotoUTM", GTK_STOCK_QUIT, N_("Go to UTM..."), NULL, N_("Go to arbitrary UTM coordinate"), (GCallback)draw_goto_cb },
+ { "SetBGColor",GTK_STOCK_SELECT_COLOR, N_("Set Background Color..."), NULL, NULL, (GCallback)set_bg_color },
+ { "ZoomIn", GTK_STOCK_ZOOM_IN, N_("Zoom _In"), "<control>plus", NULL, (GCallback)draw_zoom_cb },
+ { "ZoomOut", GTK_STOCK_ZOOM_OUT, N_("Zoom _Out"), "<control>minus", NULL, (GCallback)draw_zoom_cb },
+ { "ZoomTo", GTK_STOCK_ZOOM_FIT, N_("Zoom _To"), "<control>Z", NULL, (GCallback)zoom_to_cb },
+ { "Zoom0.25", NULL, N_("0.25"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom0.5", NULL, N_("0.5"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom1", NULL, N_("1"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom2", NULL, N_("2"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom4", NULL, N_("4"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom8", NULL, N_("8"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom16", NULL, N_("16"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom32", NULL, N_("32"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom64", NULL, N_("64"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "Zoom128", NULL, N_("128"), NULL, NULL, (GCallback)draw_zoom_cb },
+ { "PanNorth", NULL, N_("Pan North"), "<control>Up", NULL, (GCallback)draw_pan_cb },
+ { "PanEast", NULL, N_("Pan East"), "<control>Right", NULL, (GCallback)draw_pan_cb },
+ { "PanSouth", NULL, N_("Pan South"), "<control>Down", NULL, (GCallback)draw_pan_cb },
+ { "PanWest", NULL, N_("Pan West"), "<control>Left", NULL, (GCallback)draw_pan_cb },
+ { "BGJobs", GTK_STOCK_EXECUTE, N_("Background _Jobs"), NULL, NULL, (GCallback)a_background_show_window },
+
+ { "Cut", GTK_STOCK_CUT, N_("Cu_t"), NULL, NULL, (GCallback)menu_cut_layer_cb },
+ { "Copy", GTK_STOCK_COPY, N_("_Copy"), NULL, NULL, (GCallback)menu_copy_layer_cb },
+ { "Paste", GTK_STOCK_PASTE, N_("_Paste"), NULL, NULL, (GCallback)menu_paste_layer_cb },
+ { "Delete", GTK_STOCK_DELETE, N_("_Delete"), NULL, NULL, (GCallback)menu_delete_layer_cb },
+ { "DeleteAll", NULL, N_("Delete All"), NULL, NULL, (GCallback)clear_cb },
+ { "MapCacheFlush",NULL, N_("Flush Map cache"), NULL, NULL, (GCallback)mapcache_flush_cb },
+ { "Preferences",GTK_STOCK_PREFERENCES, N_("_Preferences..."), NULL, NULL, (GCallback)preferences_cb },
+ { "Properties",GTK_STOCK_PROPERTIES, N_("_Properties"), NULL, NULL, (GCallback)menu_properties_cb },
+
+ { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, (GCallback)help_about_cb },
+};
+
+/* Radio items */
+static GtkRadioActionEntry mode_entries[] = {
+ { "ModeUTM", NULL, N_("_UTM Mode"), "<control>u", NULL, 0 },
+ { "ModeExpedia", NULL, N_("_Expedia Mode"), "<control>e", NULL, 1 },
+ { "ModeMercator", NULL, N_("_Mercator Mode"), "<control>g", NULL, 4 }
+};
+
+static GtkRadioActionEntry tool_entries[] = {
+ { "Pan", "vik-icon-pan", N_("_Pan"), "<control><shift>P", N_("Pan Tool"), 0 },
+ { "Zoom", "vik-icon-zoom", N_("_Zoom"), "<control><shift>Z", N_("Zoom Tool"), 1 },
+ { "Ruler", "vik-icon-ruler", N_("_Ruler"), "<control><shift>R", N_("Ruler Tool"), 2 }