From 6259b83dbff009ad77b8567d5ca35addaa54f2c2 Mon Sep 17 00:00:00 2001 From: "(null)" <(null)> Date: Wed, 17 Sep 2008 13:38:10 +0200 Subject: [PATCH] Cleanning code --- src/google-map-type.gob | 10 ++-------- src/osm-map-type.gob | 12 +++--------- src/terraserver-map-type.gob | 4 ++-- src/vik-map-type.gob | 3 ++- 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/google-map-type.gob b/src/google-map-type.gob index 670bd2d7..708ad2e9 100644 --- a/src/google-map-type.gob +++ b/src/google-map-type.gob @@ -215,15 +215,9 @@ class Google:Map:Type from Vik:Map:Type { public GObject * new_with_id (guint8 id, GoogleType type) { - GObject *ret = GET_NEW; + GoogleMapType *ret = GET_NEW; VIK_MAP_TYPE(ret)->uniq_id = id; - GOOGLE_MAP_TYPE(ret)->_priv->type = type; - return G_OBJECT (ret); - } - - public GObject * - new (void) { - GObject *ret = GET_NEW; + ret->_priv->type = type; return G_OBJECT (ret); } diff --git a/src/osm-map-type.gob b/src/osm-map-type.gob index 34ef6c6b..817769b1 100644 --- a/src/osm-map-type.gob +++ b/src/osm-map-type.gob @@ -69,16 +69,10 @@ class Osm:Map:Type from Vik:Map:Type { public GObject * new_with_id (guint8 id, const gchar *hostname, const gchar *url) { - GObject *ret = GET_NEW; + OsmMapType *ret = GET_NEW; VIK_MAP_TYPE(ret)->uniq_id = id; - OSM_MAP_TYPE(ret)->_priv->hostname = g_strdup(hostname); - OSM_MAP_TYPE(ret)->_priv->url = g_strdup(url); - return G_OBJECT (ret); - } - - public GObject * - new (void) { - GObject *ret = GET_NEW; + ret->_priv->hostname = g_strdup(hostname); + ret->_priv->url = g_strdup(url); return G_OBJECT (ret); } diff --git a/src/terraserver-map-type.gob b/src/terraserver-map-type.gob index 8a64850e..f50712cc 100644 --- a/src/terraserver-map-type.gob +++ b/src/terraserver-map-type.gob @@ -71,9 +71,9 @@ class Terraserver:Map:Type from Vik:Map:Type { public GObject * new_with_id (guint8 id, int type) { - GObject *ret = GET_NEW; + TerraserverMapType *ret = GET_NEW; VIK_MAP_TYPE(ret)->uniq_id = id; - TERRASERVER_MAP_TYPE(ret)->_priv->type = type; + ret->_priv->type = type; return G_OBJECT (ret); } diff --git a/src/vik-map-type.gob b/src/vik-map-type.gob index d28caccd..801bbe88 100644 --- a/src/vik-map-type.gob +++ b/src/vik-map-type.gob @@ -3,6 +3,7 @@ #include "config.h" #endif +#include "vikviewport.h" #include "vikcoord.h" #include "mapcoord.h" %} @@ -11,7 +12,7 @@ public guint8 uniq_id; public guint16 tilesize_x; public guint16 tilesize_y; - public guint drawmode; + public VikViewportDrawMode drawmode; virtual public gboolean coord_to_mapcoord ( self, const VikCoord *src, gdouble xzoom, gdouble yzoom, MapCoord *dest ) { return FALSE; -- 2.39.5