#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHAMPLAIN_TYPE_NETWORK_MAP_SOURCE, ChamplainNetworkMapSourcePrivate))
#define CACHE_SUBDIR "champlain"
-static SoupSession * soup_session;
+static SoupSession * soup_session = NULL;
struct _ChamplainNetworkMapSourcePrivate
{
priv->offline = g_value_get_boolean (value);
break;
case PROP_PROXY_URI:
+ if (priv->proxy_uri)
+ g_free (priv->proxy_uri);
+
priv->proxy_uri = g_value_dup_string (value);
+ if (soup_session)
+ g_object_set (G_OBJECT (soup_session), "proxy-uri",
+ soup_uri_new (priv->proxy_uri), NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
"Offline",
"Offline",
FALSE,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_OFFLINE, pspec);
/**
"Proxy URI",
"The proxy URI to use to access network",
"",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_PROXY_URI, pspec);
}
{
ChamplainNetworkMapSourcePrivate *priv = GET_PRIVATE (champlainMapSource);
- priv->proxy_uri = NULL;
+ priv->proxy_uri = "";
}
ChamplainNetworkMapSource*