]> err.no Git - mapper/commitdiff
Move some variables and enums around
authorKaj-Michael Lang <milang@onion.tal.org>
Mon, 25 Feb 2008 11:09:58 +0000 (13:09 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Mon, 25 Feb 2008 11:09:58 +0000 (13:09 +0200)
14 files changed:
src/cb.c
src/config-gconf.c
src/config-gconf.h
src/map-download.c
src/map-download.h
src/map-poi.c
src/map-repo.c
src/map-repo.h [new file with mode: 0644]
src/mapper-types.h
src/osm-db.h
src/poi-gui.c
src/poi.h
src/settings.h
src/ui-common.c

index e01851a3a5413f5dedb1a53a72969f42cd635337..41cd62e7e4f37f69b71b7238f9125e90c2214e99 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
@@ -62,6 +62,7 @@
 #include "dialogs.h"
 #include "filter-gui.h"
 #include "help.h"
+#include "map-repo.h"
 
 static void
 track_tree_view_update_store(GtkWidget *tree_view, Path *track)
index ad5bb59bd0333e98b67aeff8175d223f01ed718a..8c02c6f54406396277dd884728953ff7ee68cb53 100644 (file)
@@ -54,6 +54,7 @@
 #include "settings.h"
 #include "gpx.h"
 #include "filter.h"
+#include "dialogs.h"
 
 #define PROXY_PORT (8080)
 
index f48d9a47b42c50c47fdc547654cc28d2deac8ad7..0175c0a2b8e8810afd255c5c352c2e52b5f0ca14 100644 (file)
@@ -4,6 +4,7 @@
 #include <gconf/gconf-client.h>
 #include "filter.h"
 #include "mapper-types.h"
+#include "map-repo.h"
 
 GConfClient *gconf_client;
 
index bc84afb93e9b32686e8af086f56f1d9ed145c307..77264c5ecfc2e4ff22bda4074844880ada46d8c4 100644 (file)
@@ -57,6 +57,7 @@
 #include "gpx.h"
 #include "map-download.h"
 #include "iap.h"
+#include "map-repo.h"
 
 static guint _num_downloads=0;
 static guint _curr_download=0;
index 075217b57fd7c7673acd6b82a3df4ff80816cbae..f5634e1898dbcba8fa6b7a9256a95bc44254236a 100644 (file)
@@ -6,6 +6,7 @@
 #include <curl/multi.h>
 #include <glib.h>
 #include "mapper-types.h"
+#include "map-repo.h"
 
 #define INITIAL_DOWNLOAD_RETRIES (3)
 
index b9a18daf273a411d2ea5df97dffd4ccc9ee4613e..318f2ee4c6a52b550d5f1d4cfc527176caaf030d 100644 (file)
@@ -36,6 +36,7 @@
 #include "ui-common.h"
 #include "map-poi.h"
 #include "latlon.h"
+#include "osm-db.h"
 
 #define POI_FONT_SIZE_BIG (10)
 #define POI_FONT_SIZE_SMALL (8)
index 083d34a5727765f5d91fc7171050de85176d01f2..db804047eb3dfb132ab3e498579d8409fbe42f73 100644 (file)
@@ -49,6 +49,7 @@
 #include "ui-common.h"
 #include "dialogs.h"
 #include "help.h"
+#include "map-repo.h"
 
 #define MAP_REPO_LIST_URL "http://www.gnuite.com/nokia770/maemo-mapper/repos.txt"
 
diff --git a/src/map-repo.h b/src/map-repo.h
new file mode 100644 (file)
index 0000000..b4b843c
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef _MAP_REPO_H
+#define _MAP_REPO_H
+
+/** This enumerated type defines the supported types of repositories. */
+typedef enum {
+       REPOTYPE_NONE,          /* No URL set. */
+       REPOTYPE_XYZ,           /* x=%d, y=%d, and zoom=%d */
+       REPOTYPE_XYZ_INV,       /* zoom=%0d, x=%d, y=%d */
+       REPOTYPE_QUAD_QRST,     /* t=%s   (%s = {qrst}*) */
+       REPOTYPE_QUAD_ZERO,     /* t=%0s  (%0s = {0123}*) */
+       REPOTYPE_WMS            /* "service=wms" */
+} RepoType;
+
+/** Data regarding a map repository. */
+typedef struct _RepoData RepoData;
+struct _RepoData {
+       gchar *name;
+       gchar *url;
+       gchar *cache_dir;
+       guint dl_zoom_steps;
+       guint view_zoom_steps;
+       gboolean double_size;
+       gboolean nextable;
+       RepoType type;
+       GtkWidget *menu_item;
+};
+
+/** Data used during the asynchronous progress update phase of automatic map
+ * downloading. */
+typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
+struct _ProgressUpdateInfo {
+       gchar *src_str;
+       gchar *dest_str;
+       RepoData *repo;
+       guint tilex, tiley, zoom;       /* for refresh. */
+       gint retries;           /* if equal to zero, it means we're DELETING maps. */
+       guint priority;
+       FILE *file;
+};
+
+GList *_repo_list;
+RepoData *_curr_repo;
+
+#endif
index 914290bb30cd58c119d878ef07cc795e10c203ee..1be33ac53de0ed5114e1d48f9078a559dcc48af4 100644 (file)
@@ -7,32 +7,6 @@
 #include <gtk/gtk.h>
 #include <curl/multi.h>
 
-/** Generic search item list indexes */
-typedef enum {
-       ITEM_ID,
-       ITEM_CATID,
-       ITEM_LAT,
-       ITEM_LON,
-       ITEM_DIST,
-       ITEM_LATLON,
-       ITEM_LABEL,
-       ITEM_DESC,
-       ITEM_CATLAB,
-       ITEM_ICON,
-       ITEM_COLOR,
-       ITEM_NUM_COLUMNS
-} item_list_id;
-
-/** This enumerated type defines the supported types of repositories. */
-typedef enum {
-       REPOTYPE_NONE,          /* No URL set. */
-       REPOTYPE_XYZ,           /* x=%d, y=%d, and zoom=%d */
-       REPOTYPE_XYZ_INV,       /* zoom=%0d, x=%d, y=%d */
-       REPOTYPE_QUAD_QRST,     /* t=%s   (%s = {qrst}*) */
-       REPOTYPE_QUAD_ZERO,     /* t=%0s  (%0s = {0123}*) */
-       REPOTYPE_WMS            /* "service=wms" */
-} RepoType;
-
 /* Route list */
 typedef enum {
        ROUTE_LATLON,
@@ -43,17 +17,6 @@ typedef enum {
        ROUTE_NUM_COLUMNS
 } RouteList;
 
-/** Category list **/
-typedef enum {
-       CAT_ID,
-       CAT_ENABLED,
-       CAT_LABEL,
-       CAT_DESC,
-       CAT_POI_CNT,
-       CAT_ICON,
-       CAT_NUM_COLUMNS
-} CategoryList;
-
 /** This enum defines the possible font sizes. */
 typedef enum {
        INFO_FONT_XXSMALL,
@@ -136,33 +99,6 @@ typedef enum {
 } SpeedLocation;
 gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
 
-/** Data regarding a map repository. */
-typedef struct _RepoData RepoData;
-struct _RepoData {
-       gchar *name;
-       gchar *url;
-       gchar *cache_dir;
-       guint dl_zoom_steps;
-       guint view_zoom_steps;
-       gboolean double_size;
-       gboolean nextable;
-       RepoType type;
-       GtkWidget *menu_item;
-};
-
-/** Data used during the asynchronous progress update phase of automatic map
- * downloading. */
-typedef struct _ProgressUpdateInfo ProgressUpdateInfo;
-struct _ProgressUpdateInfo {
-       gchar *src_str;
-       gchar *dest_str;
-       RepoData *repo;
-       guint tilex, tiley, zoom;       /* for refresh. */
-       gint retries;           /* if equal to zero, it means we're DELETING maps. */
-       guint priority;
-       FILE *file;
-};
-
 typedef struct _RouteDownloadData RouteDownloadData;
 struct _RouteDownloadData {
        gchar *bytes;
index 6da5f702542d755d8465263e0f455109dab3a48a..2ef777d6c5b88fc65a604b6322c7adcf950f8cd2 100644 (file)
 
 #define OSM_RANGE_WAY (20000)
 
+/** Generic search item list indexes */
+typedef enum {
+       ITEM_ID,
+       ITEM_CATID,
+       ITEM_LAT,
+       ITEM_LON,
+       ITEM_DIST,
+       ITEM_LATLON,
+       ITEM_LABEL,
+       ITEM_DESC,
+       ITEM_CATLAB,
+       ITEM_ICON,
+       ITEM_COLOR,
+       ITEM_NUM_COLUMNS
+} item_list_id;
+
 typedef enum {
         OSM_NODE_NEXT,
         OSM_NODE_PREV,
index 8a385184740ebd98313b5e9e67793d7aab9decc4..a8e6c08da7fa042f6d9fb7eaa16c2c14c96e0cf4 100644 (file)
@@ -27,6 +27,7 @@
 #include "settings.h"
 #include "poi-gui.h"
 #include "osm.h"
+#include "osm-db.h"
 
 #include "help.h"
 
index 1dca4c1e82642136dd991cc0478963d2c420f73f..e488e78858c0cbd43688ffa44428abc3253ad15e 100644 (file)
--- a/src/poi.h
+++ b/src/poi.h
 
 #include "osm.h"
 
+/** Category list **/
+typedef enum {
+       CAT_ID,
+       CAT_ENABLED,
+       CAT_LABEL,
+       CAT_DESC,
+       CAT_POI_CNT,
+       CAT_ICON,
+       CAT_NUM_COLUMNS
+} CategoryList;
+
 typedef enum {
        POI_TYPE_POINT=0,
        POI_TYPE_LANDMARK=1,
index 3b01d13cf8488098dbd09a432aef2afcae74697e..8058c03f8ac5c72becb2847ffe9225d3999760f5 100644 (file)
@@ -45,7 +45,4 @@ guint _degformat;
 SpeedLocation _speed_location;
 InfoFontSize _info_font_size;
 
-GList *_repo_list;
-RepoData *_curr_repo;
-
 #endif
index 7d8039d04c3195745766f10793f9c61561583324..e1affdda941dfcc52db748c97c4f4582d99c69be 100644 (file)
@@ -35,6 +35,7 @@
 #include "filter.h"
 #include "dialogs.h"
 #include "settings-gui.h"
+#include "map-repo.h"
 
 /* Callbacks */
 #include "cb.h"