[libchamplain] Remove unnecessary member variable
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Remove unnecessary member variable
- Date: Wed, 9 Feb 2011 08:40:50 +0000 (UTC)
commit 8ca1b926e9f7ffb1029e442884e4010af4226535
Author: JiÅ?Ã Techet <techet gmail com>
Date: Tue Feb 8 22:26:26 2011 +0100
Remove unnecessary member variable
champlain/champlain-view.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index ae89fb8..68d1bd3 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -136,7 +136,6 @@ struct _ChamplainViewPrivate
{
ClutterActor *stage;
- ChamplainMapSourceFactory *factory; /* The map source factory */
ChamplainMapSource *map_source; /* Current map tile source */
gboolean kinetic_mode;
guint zoom_level; /* Holds the current zoom level number */
@@ -496,12 +495,6 @@ champlain_view_dispose (GObject *object)
ChamplainView *view = CHAMPLAIN_VIEW (object);
ChamplainViewPrivate *priv = view->priv;
- if (priv->factory != NULL)
- {
- g_object_unref (priv->factory);
- priv->factory = NULL;
- }
-
if (priv->map_source != NULL)
{
g_object_unref (priv->map_source);
@@ -903,14 +896,15 @@ champlain_view_init (ChamplainView *view)
DEBUG_LOG ()
ChamplainViewPrivate *priv = GET_PRIVATE (view);
+ ChamplainMapSourceFactory *factory;
ChamplainMapSource *source;
champlain_debug_set_flags (g_getenv ("CHAMPLAIN_DEBUG"));
view->priv = priv;
- priv->factory = champlain_map_source_factory_dup_default ();
- source = champlain_map_source_factory_create_cached_source (priv->factory, CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK);
+ factory = champlain_map_source_factory_dup_default ();
+ source = champlain_map_source_factory_create_cached_source (factory, CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK);
priv->map_source = CHAMPLAIN_MAP_SOURCE (source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]