#include <math.h>
#include <glib.h>
+#include <glib/gi18n.h>
#include "latlon.h"
#include "osm.h"
DEG_FORMAT_TEXT[DDPDDDDD_NSEW] = "dd.ddddd° S";
DEG_FORMAT_TEXT[DD_MMPMMM_NSEW] = "dd°mm.mmm' S";
DEG_FORMAT_TEXT[DD_MM_SSPS_NSEW] = "dd°mm'ss.s\" S";
+
+UNITS_TEXT[UNITS_KM] = _("km");
+UNITS_TEXT[UNITS_MI] = _("mi.");
+UNITS_TEXT[UNITS_NM] = _("n.m.");
}
static inline gdouble
} DegFormat;
gchar *DEG_FORMAT_TEXT[DEG_FORMAT_ENUM_COUNT];
+/** This enum defines the possible units we can use. */
+typedef enum {
+ UNITS_KM,
+ UNITS_MI,
+ UNITS_NM,
+ UNITS_ENUM_COUNT
+} UnitType;
+gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
+
+/* UNITS_CONVERTS, when multiplied, converts from NM. */
+#define EARTH_RADIUS (3440.06479f)
+gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
+
+UnitType _units;
+
#define lat_format(F, A, B) deg_format((F),(A), (B), 'S', 'N')
#define lon_format(F, A, B) deg_format((F),(A), (B), 'W', 'E')
MAP_MODES
} MapMode;
+/** Possible center modes. The "WAS" modes imply no current center mode;
+ * they only hint at what the last center mode was, so that it can be
+ * recalled. */
+typedef enum {
+ CENTER_WAS_LATLON = -2,
+ CENTER_WAS_LEAD = -1,
+ CENTER_MANUAL =0,
+ CENTER_LEAD = 1,
+ CENTER_LATLON = 2
+} CenterMode;
+
/** VARIABLES FOR MAINTAINING STATE OF THE CURRENT VIEW. */
/** The "zoom" level defines the resolution of a pixel, from 0 to MAX_ZOOM.
guint _focus_unitheight;
guint _world_size_tiles;
+gint _show_tracks;
+gboolean _show_scale;
+gboolean _show_velvec;
+gboolean _show_poi;
+
+guint _lead_ratio;
+guint _center_ratio;
+guint _draw_width;
+
guint _key_zoom_new;
guint _key_zoom_timeout_sid;
osm_location map_loc;
+CenterMode _center_mode;
+
/** The widget that provides the visual display of the map. */
GtkWidget *_map_widget;
REPOTYPE_WMS /* "service=wms" */
} RepoType;
-/** Possible center modes. The "WAS" modes imply no current center mode;
- * they only hint at what the last center mode was, so that it can be
- * recalled. */
-typedef enum {
- CENTER_WAS_LATLON = -2,
- CENTER_WAS_LEAD = -1,
- CENTER_MANUAL =0,
- CENTER_LEAD = 1,
- CENTER_LATLON = 2
-} CenterMode;
-
/* Route list */
typedef enum {
ROUTE_LATLON,
CAT_NUM_COLUMNS
} CategoryList;
-/** This enum defines the possible units we can use. */
-typedef enum {
- UNITS_KM,
- UNITS_MI,
- UNITS_NM,
- UNITS_ENUM_COUNT
-} UnitType;
-gchar *UNITS_TEXT[UNITS_ENUM_COUNT];
-
-/* UNITS_CONVERTS, when multiplied, converts from NM. */
-#define EARTH_RADIUS (3440.06479f)
-gfloat UNITS_CONVERT[UNITS_ENUM_COUNT];
-
/** This enum defines the possible font sizes. */
typedef enum {
INFO_FONT_XXSMALL,
static void
variables_init(void)
{
-UNITS_TEXT[UNITS_KM] = _("km");
-UNITS_TEXT[UNITS_MI] = _("mi.");
-UNITS_TEXT[UNITS_NM] = _("n.m.");
-
INFO_FONT_TEXT[INFO_FONT_XXSMALL] = "xx-small";
INFO_FONT_TEXT[INFO_FONT_XSMALL] = "x-small";
INFO_FONT_TEXT[INFO_FONT_SMALL] = "small";
gboolean _always_keep_on;
gboolean _fullscreen;
+
gboolean _enable_gps;
gboolean _gps_info;
+gboolean _satdetails_on;
-gint _show_tracks;
-gboolean _show_scale;
-gboolean _show_velvec;
-gboolean _show_poi;
gboolean _auto_download;
-guint _lead_ratio;
-guint _center_ratio;
-guint _draw_width;
-
gboolean _enable_voice;
guint _announce_notice_ratio;
guint _voice_speed;
gboolean _speed_excess;
guint _speed_limit;
-gboolean _satdetails_on;
-
gchar *_http_proxy_host;
gint _http_proxy_port;
GtkListStore *_loc_model;
CustomAction _action[CUSTOM_KEY_ENUM_COUNT];
-CenterMode _center_mode;
-UnitType _units;
guint _degformat;
SpeedLocation _speed_location;
InfoFontSize _info_font_size;