/*
- * Copyright (C) 2008 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
+ * Copyright (C) 2008, 2009 Pierre-Luc Beaudoin <pierre-luc@pierlux.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
GParamSpec *pspec)
{
ChamplainNetworkMapSource *network_map_source = CHAMPLAIN_NETWORK_MAP_SOURCE(object);
- ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+ ChamplainNetworkMapSourcePrivate *priv = network_map_source->priv;
switch(prop_id)
{
GParamSpec *pspec)
{
ChamplainNetworkMapSource *network_map_source = CHAMPLAIN_NETWORK_MAP_SOURCE(object);
- ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+ ChamplainNetworkMapSourcePrivate *priv = network_map_source->priv;
switch(prop_id)
{
champlain_network_map_source_finalize (GObject *object)
{
ChamplainNetworkMapSource *network_map_source = CHAMPLAIN_NETWORK_MAP_SOURCE (object);
- ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+ ChamplainNetworkMapSourcePrivate *priv = network_map_source->priv;
g_free (priv->proxy_uri);
g_free (priv->uri_format);
priv->proxy_uri = g_strdup ("");
priv->uri_format = NULL;
+ champlainMapSource->priv = priv;
}
ChamplainNetworkMapSource*
gint y,
gint z)
{
- ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+ ChamplainNetworkMapSourcePrivate *priv = network_map_source->priv;
gchar **tokens;
gchar *token;
champlain_network_map_source_set_tile_uri (ChamplainNetworkMapSource *network_map_source,
const gchar *uri_format)
{
- ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+ ChamplainNetworkMapSourcePrivate *priv = network_map_source->priv;
g_free (priv->uri_format);
priv->uri_format = g_strdup (uri_format);
ChamplainZoomLevel *level,
ChamplainTile *tile)
{
- //ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+ //ChamplainNetworkMapSourcePrivate *priv = network_map_source->priv;
return g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s" G_DIR_SEPARATOR_S
"%s" G_DIR_SEPARATOR_S "%d" G_DIR_SEPARATOR_S
"%d" G_DIR_SEPARATOR_S "%d.png", g_get_user_cache_dir (),
gboolean use_cache = FALSE;
ChamplainNetworkMapSource *network_map_source = CHAMPLAIN_NETWORK_MAP_SOURCE (map_source);
- ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (network_map_source);
+ ChamplainNetworkMapSourcePrivate *priv = network_map_source->priv;
/* Ref the tile as it may be freeing during the loading
* Unref when the loading is done.