[libchamplain] Coding style fixes
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Coding style fixes
- Date: Tue, 23 Mar 2010 14:43:21 +0000 (UTC)
commit 43321a4149ede0c888e699d6ab0f6e563a1b21e9
Author: JiÅ?Ã Techet <techet gmail com>
Date: Sat Mar 20 02:17:28 2010 +0100
Coding style fixes
The most boring hour in my life...
Signed-off-by: JiÅ?Ã Techet <techet gmail com>
champlain/champlain-base-marker.c | 12 ++--
champlain/champlain-bounding-box.c | 3 +-
champlain/champlain-error-tile-source.c | 6 +-
champlain/champlain-file-cache.c | 140 +++++++++++++++--------------
champlain/champlain-map-source-chain.c | 20 +++--
champlain/champlain-map-source-chain.h | 3 +-
champlain/champlain-map-source-factory.c | 7 +-
champlain/champlain-map-source.c | 44 +++++-----
champlain/champlain-map-source.h | 10 +-
champlain/champlain-marker.c | 12 ++--
champlain/champlain-memphis-tile-source.c | 100 ++++++++++-----------
champlain/champlain-network-tile-source.c | 106 +++++++++++-----------
champlain/champlain-polygon.c | 10 ++-
champlain/champlain-polygon.h | 10 ++-
champlain/champlain-tile-cache.c | 24 +++---
champlain/champlain-tile-cache.h | 24 +++--
champlain/champlain-tile-source.c | 126 +++++++++++++-------------
champlain/champlain-tile-source.h | 8 +-
champlain/champlain-tile.c | 6 +-
champlain/champlain-tile.h | 6 +-
champlain/champlain-view.c | 80 ++++++++++-------
champlain/champlain-view.h | 15 ++-
22 files changed, 409 insertions(+), 363 deletions(-)
---
diff --git a/champlain/champlain-base-marker.c b/champlain/champlain-base-marker.c
index d00e79b..97725db 100644
--- a/champlain/champlain-base-marker.c
+++ b/champlain/champlain-base-marker.c
@@ -71,9 +71,9 @@ G_DEFINE_TYPE (ChamplainBaseMarker, champlain_base_marker, CLUTTER_TYPE_GROUP);
static void
champlain_base_marker_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ChamplainBaseMarker *base_marker = CHAMPLAIN_BASE_MARKER (object);
ChamplainBaseMarkerPrivate *priv = CHAMPLAIN_BASE_MARKER_GET_PRIVATE (base_marker);
@@ -96,9 +96,9 @@ champlain_base_marker_get_property (GObject *object,
static void
champlain_base_marker_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ChamplainBaseMarker *base_marker = CHAMPLAIN_BASE_MARKER (object);
ChamplainBaseMarkerPrivate *priv = CHAMPLAIN_BASE_MARKER_GET_PRIVATE (base_marker);
diff --git a/champlain/champlain-bounding-box.c b/champlain/champlain-bounding-box.c
index 5b1a026..0dd4353 100644
--- a/champlain/champlain-bounding-box.c
+++ b/champlain/champlain-bounding-box.c
@@ -3,7 +3,7 @@
*
* This file is inspired by clutter-color.c which is
* Copyright (C) 2006 OpenedHand, and has the same license.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@@ -90,7 +90,6 @@ champlain_bounding_box_copy (const ChamplainBoundingBox *bbox)
void
champlain_bounding_box_free (ChamplainBoundingBox *bbox)
{
-
if (G_UNLIKELY (bbox == NULL))
return;
diff --git a/champlain/champlain-error-tile-source.c b/champlain/champlain-error-tile-source.c
index b100823..f5561af 100644
--- a/champlain/champlain-error-tile-source.c
+++ b/champlain/champlain-error-tile-source.c
@@ -39,7 +39,8 @@ struct _ChamplainErrorTileSourcePrivate
ClutterActor *error_actor;
};
-static void fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile);
+static void fill_tile (ChamplainMapSource *map_source,
+ ChamplainTile *tile);
static void
champlain_error_tile_source_dispose (GObject *object)
@@ -90,7 +91,8 @@ ChamplainErrorTileSource* champlain_error_tile_source_new_full (guint tile_size)
}
static void
-fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile)
+fill_tile (ChamplainMapSource *map_source,
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_ERROR_TILE_SOURCE (map_source));
g_return_if_fail (CHAMPLAIN_IS_TILE (tile));
diff --git a/champlain/champlain-file-cache.c b/champlain/champlain-file-cache.c
index 74855fa..6c3f5a0 100644
--- a/champlain/champlain-file-cache.c
+++ b/champlain/champlain-file-cache.c
@@ -66,28 +66,33 @@ struct _ChamplainFileCachePrivate
static void finalize_sql (ChamplainFileCache *file_cache);
static void delete_temp_cache (ChamplainFileCache *file_cache);
static void init_cache (ChamplainFileCache *file_cache);
-static gchar *get_filename (ChamplainFileCache *file_cache, ChamplainTile *tile);
-static gboolean tile_is_expired (ChamplainFileCache *file_cache, ChamplainTile *tile);
-static void delete_tile (ChamplainFileCache *file_cache, const gchar *filename);
+static gchar *get_filename (ChamplainFileCache *file_cache,
+ ChamplainTile *tile);
+static gboolean tile_is_expired (ChamplainFileCache *file_cache,
+ ChamplainTile *tile);
+static void delete_tile (ChamplainFileCache *file_cache,
+ const gchar *filename);
static void delete_dir_recursive (GFile *parent);
static gboolean create_cache_dir (const gchar *dir_name);
static void fill_tile (ChamplainMapSource *map_source,
- ChamplainTile *tile);
+ ChamplainTile *tile);
static void store_tile (ChamplainTileCache *tile_cache,
- ChamplainTile *tile,
- const gchar *contents,
- gsize size);
-static void refresh_tile_time (ChamplainTileCache *tile_cache, ChamplainTile *tile);
-static void on_tile_filled (ChamplainTileCache *tile_cache, ChamplainTile *tile);
+ ChamplainTile *tile,
+ const gchar *contents,
+ gsize size);
+static void refresh_tile_time (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile);
+static void on_tile_filled (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile);
static void clean (ChamplainTileCache *tile_cache);
static void
champlain_file_cache_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ChamplainFileCache *file_cache = CHAMPLAIN_FILE_CACHE (object);
@@ -106,9 +111,9 @@ champlain_file_cache_get_property (GObject *object,
static void
champlain_file_cache_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ChamplainFileCache *file_cache = CHAMPLAIN_FILE_CACHE (object);
ChamplainFileCachePrivate *priv = GET_PRIVATE (object);
@@ -263,9 +268,9 @@ init_cache (ChamplainFileCache *file_cache)
}
sqlite3_exec (priv->db,
- "PRAGMA synchronous=OFF;"
- "PRAGMA count_changes=OFF;",
- NULL, NULL, &error_msg);
+ "PRAGMA synchronous=OFF;"
+ "PRAGMA count_changes=OFF;",
+ NULL, NULL, &error_msg);
if (error_msg != NULL)
{
DEBUG ("Set PRAGMA: %s", error_msg);
@@ -274,12 +279,12 @@ init_cache (ChamplainFileCache *file_cache)
}
sqlite3_exec (priv->db,
- "CREATE TABLE IF NOT EXISTS tiles ("
- "filename TEXT PRIMARY KEY, "
- "etag TEXT, "
- "popularity INT DEFAULT 1, "
- "size INT DEFAULT 0)",
- NULL, NULL, &error_msg);
+ "CREATE TABLE IF NOT EXISTS tiles ("
+ "filename TEXT PRIMARY KEY, "
+ "etag TEXT, "
+ "popularity INT DEFAULT 1, "
+ "size INT DEFAULT 0)",
+ NULL, NULL, &error_msg);
if (error_msg != NULL)
{
DEBUG ("Creating table 'tiles' failed: %s", error_msg);
@@ -294,18 +299,18 @@ init_cache (ChamplainFileCache *file_cache)
{
priv->stmt_select = NULL;
DEBUG ("Failed to prepare the select Etag statement, error:%d: %s",
- error, sqlite3_errmsg (priv->db));
+ error, sqlite3_errmsg (priv->db));
return;
}
error = sqlite3_prepare_v2 (priv->db,
- "UPDATE tiles SET popularity = popularity + 1 WHERE filename = ?", -1,
- &priv->stmt_update, NULL);
+ "UPDATE tiles SET popularity = popularity + 1 WHERE filename = ?", -1,
+ &priv->stmt_update, NULL);
if (error != SQLITE_OK)
{
priv->stmt_update = NULL;
DEBUG ("Failed to prepare the update popularity statement, error: %s",
- sqlite3_errmsg (priv->db));
+ sqlite3_errmsg (priv->db));
return;
}
@@ -327,8 +332,8 @@ champlain_file_cache_constructed (GObject *object)
priv->cache_dir = g_strdup ("/home/user/MyDocs/.Maps/");
#else
priv->cache_dir = g_build_path (G_DIR_SEPARATOR_S,
- g_get_user_cache_dir (),
- "champlain", NULL);
+ g_get_user_cache_dir (),
+ "champlain", NULL);
#endif
}
else
@@ -367,12 +372,12 @@ champlain_file_cache_class_init (ChamplainFileCacheClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_uint ("size-limit",
- "Size Limit",
- "The cache's size limit (Mb)",
- 1,
- G_MAXINT,
- 100000000,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
+ "Size Limit",
+ "The cache's size limit (Mb)",
+ 1,
+ G_MAXINT,
+ 100000000,
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_SIZE_LIMIT, pspec);
/**
@@ -383,10 +388,10 @@ champlain_file_cache_class_init (ChamplainFileCacheClass *klass)
* Since: 0.6
*/
pspec = g_param_spec_string ("cache-dir",
- "Cache Directory",
- "The directory of the cache",
- cache_dir,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
+ "Cache Directory",
+ "The directory of the cache",
+ cache_dir,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_CACHE_DIR, pspec);
tile_cache_class->store_tile = store_tile;
@@ -442,11 +447,12 @@ ChamplainFileCache* champlain_file_cache_new (void)
* Since: 0.6
*/
ChamplainFileCache* champlain_file_cache_new_full (guint size_limit,
- const gchar *cache_dir, gboolean persistent)
+ const gchar *cache_dir,
+ gboolean persistent)
{
ChamplainFileCache * cache;
cache = g_object_new (CHAMPLAIN_TYPE_FILE_CACHE, "size-limit", size_limit,
- "cache-dir", cache_dir, "persistent-cache", persistent, NULL);
+ "cache-dir", cache_dir, "persistent-cache", persistent, NULL);
return cache;
}
@@ -499,7 +505,7 @@ champlain_file_cache_get_cache_dir (ChamplainFileCache *file_cache)
*/
void
champlain_file_cache_set_size_limit (ChamplainFileCache *file_cache,
- guint size_limit)
+ guint size_limit)
{
g_return_if_fail (CHAMPLAIN_IS_FILE_CACHE (file_cache));
@@ -510,7 +516,8 @@ champlain_file_cache_set_size_limit (ChamplainFileCache *file_cache,
}
static gchar *
-get_filename (ChamplainFileCache *file_cache, ChamplainTile *tile)
+get_filename (ChamplainFileCache *file_cache,
+ ChamplainTile *tile)
{
ChamplainFileCachePrivate *priv = GET_PRIVATE (file_cache);
@@ -533,7 +540,8 @@ get_filename (ChamplainFileCache *file_cache, ChamplainTile *tile)
}
static gboolean
-tile_is_expired (ChamplainFileCache *file_cache, ChamplainTile *tile)
+tile_is_expired (ChamplainFileCache *file_cache,
+ ChamplainTile *tile)
{
g_return_val_if_fail (CHAMPLAIN_FILE_CACHE (file_cache), FALSE);
g_return_val_if_fail (CHAMPLAIN_TILE (tile), FALSE);
@@ -564,8 +572,8 @@ typedef struct
static void
tile_loaded_cb (ClutterTexture *texture,
- const GError *error,
- TileLoadedCallbackData *user_data)
+ const GError *error,
+ TileLoadedCallbackData *user_data)
{
ChamplainMapSource *map_source = user_data->map_source;
gchar *filename = user_data->filename;
@@ -604,8 +612,8 @@ tile_loaded_cb (ClutterTexture *texture,
/* Retrieve modification time */
file = g_file_new_for_path (filename);
info = g_file_query_info (file,
- G_FILE_ATTRIBUTE_TIME_MODIFIED,
- G_FILE_QUERY_INFO_NONE, NULL, NULL);
+ G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ G_FILE_QUERY_INFO_NONE, NULL, NULL);
if (info)
{
g_file_info_get_modification_time (info, &modified_time);
@@ -628,7 +636,7 @@ tile_loaded_cb (ClutterTexture *texture,
if (sql_rc == SQLITE_ERROR)
{
DEBUG ("Failed to prepare the SQL query for finding the Etag of '%s', error: %s",
- filename, sqlite3_errmsg (priv->db));
+ filename, sqlite3_errmsg (priv->db));
goto load_next;
}
@@ -641,13 +649,13 @@ tile_loaded_cb (ClutterTexture *texture,
else if (sql_rc == SQLITE_DONE)
{
DEBUG ("'%s' does't have an etag",
- filename);
+ filename);
goto load_next;
}
else if (sql_rc == SQLITE_ERROR)
{
DEBUG ("Failed to finding the Etag of '%s', %d error: %s",
- filename, sql_rc, sqlite3_errmsg (priv->db));
+ filename, sql_rc, sqlite3_errmsg (priv->db));
goto load_next;
}
@@ -677,7 +685,7 @@ cleanup:
static void
fill_tile (ChamplainMapSource *map_source,
- ChamplainTile *tile)
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_FILE_CACHE (map_source));
g_return_if_fail (CHAMPLAIN_IS_TILE (tile));
@@ -717,7 +725,8 @@ fill_tile (ChamplainMapSource *map_source,
}
static void
-refresh_tile_time (ChamplainTileCache *tile_cache, ChamplainTile *tile)
+refresh_tile_time (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_FILE_CACHE (tile_cache));
@@ -756,9 +765,9 @@ refresh_tile_time (ChamplainTileCache *tile_cache, ChamplainTile *tile)
static void
store_tile (ChamplainTileCache *tile_cache,
- ChamplainTile *tile,
- const gchar *contents,
- gsize size)
+ ChamplainTile *tile,
+ const gchar *contents,
+ gsize size)
{
g_return_if_fail (CHAMPLAIN_IS_FILE_CACHE (tile_cache));
@@ -815,9 +824,9 @@ store_tile (ChamplainTileCache *tile_cache,
g_object_unref (ostream);
query = sqlite3_mprintf ("REPLACE INTO tiles (filename, etag, size) VALUES (%Q, %Q, %d)",
- filename,
- champlain_tile_get_etag (tile),
- size);
+ filename,
+ champlain_tile_get_etag (tile),
+ size);
sqlite3_exec (priv->db, query, NULL, NULL, &error);
if (error != NULL)
{
@@ -828,9 +837,7 @@ store_tile (ChamplainTileCache *tile_cache,
store_next:
if (CHAMPLAIN_IS_TILE_CACHE(next_source))
- {
- store_tile (CHAMPLAIN_TILE_CACHE(next_source), tile, contents, size);
- }
+ store_tile (CHAMPLAIN_TILE_CACHE(next_source), tile, contents, size);
g_free (filename);
g_free (path);
@@ -838,7 +845,8 @@ store_next:
}
static void
-on_tile_filled (ChamplainTileCache *tile_cache, ChamplainTile *tile)
+on_tile_filled (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_FILE_CACHE (tile_cache));
g_return_if_fail (CHAMPLAIN_IS_TILE (tile));
@@ -871,9 +879,7 @@ on_tile_filled (ChamplainTileCache *tile_cache, ChamplainTile *tile)
call_next:
if (CHAMPLAIN_IS_TILE_CACHE(next_source))
- {
- on_tile_filled (CHAMPLAIN_TILE_CACHE(next_source), tile);
- }
+ on_tile_filled (CHAMPLAIN_TILE_CACHE(next_source), tile);
}
static void
diff --git a/champlain/champlain-map-source-chain.c b/champlain/champlain-map-source-chain.c
index 84e15c6..dcae9ea 100644
--- a/champlain/champlain-map-source-chain.c
+++ b/champlain/champlain-map-source-chain.c
@@ -57,8 +57,8 @@ static guint get_tile_size (ChamplainMapSource *map_source);
static void fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile);
static void on_set_next_source (ChamplainMapSource *map_source,
- ChamplainMapSource *old_next_source,
- ChamplainMapSource *new_next_source);
+ ChamplainMapSource *old_next_source,
+ ChamplainMapSource *new_next_source);
static void
champlain_map_source_chain_dispose (GObject *object)
@@ -211,7 +211,7 @@ get_tile_size (ChamplainMapSource *map_source)
static void
fill_tile (ChamplainMapSource *map_source,
- ChamplainTile *tile)
+ ChamplainTile *tile)
{
ChamplainMapSourceChain *source_chain = CHAMPLAIN_MAP_SOURCE_CHAIN (map_source);
g_return_if_fail (source_chain);
@@ -224,8 +224,8 @@ fill_tile (ChamplainMapSource *map_source,
static void
on_set_next_source (ChamplainMapSource *map_source,
- ChamplainMapSource *old_next_source,
- ChamplainMapSource *new_next_source)
+ ChamplainMapSource *old_next_source,
+ ChamplainMapSource *new_next_source)
{
ChamplainMapSourceChain *source_chain = CHAMPLAIN_MAP_SOURCE_CHAIN (map_source);
ChamplainMapSourceChainPrivate *priv = GET_PRIVATE(source_chain);
@@ -238,8 +238,8 @@ on_set_next_source (ChamplainMapSource *map_source,
static void
assign_cache_of_next_source_sequence (ChamplainMapSourceChain *source_chain,
- ChamplainMapSource *start_map_source,
- ChamplainTileCache *tile_cache)
+ ChamplainMapSource *start_map_source,
+ ChamplainTileCache *tile_cache)
{
ChamplainMapSource *map_source = start_map_source;
ChamplainMapSource *chain_next_source = champlain_map_source_get_next_source (CHAMPLAIN_MAP_SOURCE(source_chain));
@@ -258,7 +258,8 @@ assign_cache_of_next_source_sequence (ChamplainMapSourceChain *source_chain,
}
static void
-reload_tiles_cb (ChamplainMapSource *map_source, ChamplainMapSourceChain *source_chain)
+reload_tiles_cb (ChamplainMapSource *map_source,
+ ChamplainMapSourceChain *source_chain)
{
/* propagate the signal from the chain that is inside champlain_map_source_chain */
g_signal_emit_by_name (source_chain, "reload-tiles", NULL);
@@ -274,7 +275,8 @@ reload_tiles_cb (ChamplainMapSource *map_source, ChamplainMapSourceChain *source
* Since: 0.6
*/
void
-champlain_map_source_chain_push (ChamplainMapSourceChain *source_chain, ChamplainMapSource *map_source)
+champlain_map_source_chain_push (ChamplainMapSourceChain *source_chain,
+ ChamplainMapSource *map_source)
{
ChamplainMapSourceChainPrivate *priv = GET_PRIVATE(source_chain);
gboolean is_cache = FALSE;
diff --git a/champlain/champlain-map-source-chain.h b/champlain/champlain-map-source-chain.h
index 986424a..1af6476 100644
--- a/champlain/champlain-map-source-chain.h
+++ b/champlain/champlain-map-source-chain.h
@@ -53,7 +53,8 @@ GType champlain_map_source_chain_get_type (void);
ChamplainMapSourceChain* champlain_map_source_chain_new (void);
-void champlain_map_source_chain_push (ChamplainMapSourceChain *source_chain, ChamplainMapSource *map_source);
+void champlain_map_source_chain_push (ChamplainMapSourceChain *source_chain,
+ ChamplainMapSource *map_source);
void champlain_map_source_chain_pop (ChamplainMapSourceChain *source_chain);
G_END_DECLS
diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c
index 575c6f7..31dd0ef 100644
--- a/champlain/champlain-map-source-factory.c
+++ b/champlain/champlain-map-source-factory.c
@@ -76,7 +76,7 @@ struct _ChamplainMapSourceFactoryPrivate
};
static ChamplainMapSource * champlain_map_source_new_generic (
- ChamplainMapSourceDesc *desc, gpointer data);
+ ChamplainMapSourceDesc *desc, gpointer data);
static ChamplainMapSource * champlain_map_source_new_memphis (
ChamplainMapSourceDesc *desc, gpointer user_data);
@@ -426,7 +426,8 @@ ChamplainMapSource * champlain_map_source_factory_create_cached_source (Champlai
*/
gboolean
champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
- ChamplainMapSourceDesc *desc, ChamplainMapSourceConstructor constructor,
+ ChamplainMapSourceDesc *desc,
+ ChamplainMapSourceConstructor constructor,
gpointer data)
{
@@ -439,7 +440,7 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
static ChamplainMapSource *
champlain_map_source_new_generic (
- ChamplainMapSourceDesc *desc, gpointer user_data)
+ ChamplainMapSourceDesc *desc, gpointer user_data)
{
return CHAMPLAIN_MAP_SOURCE (champlain_network_tile_source_new_full (
desc->id,
diff --git a/champlain/champlain-map-source.c b/champlain/champlain-map-source.c
index c3dc82e..e52717b 100644
--- a/champlain/champlain-map-source.c
+++ b/champlain/champlain-map-source.c
@@ -84,14 +84,14 @@ struct _ChamplainMapSourcePrivate
static void reload_tiles_cb (ChamplainMapSource *orig, ChamplainMapSource *self);
static void on_set_next_source (ChamplainMapSource *map_source,
- ChamplainMapSource *old_next_source,
- ChamplainMapSource *new_next_source);
+ ChamplainMapSource *old_next_source,
+ ChamplainMapSource *new_next_source);
static void
champlain_map_source_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ChamplainMapSourcePrivate *priv = GET_PRIVATE(object);
@@ -107,9 +107,9 @@ champlain_map_source_get_property (GObject *object,
static void
champlain_map_source_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ChamplainMapSource *map_source = CHAMPLAIN_MAP_SOURCE(object);
@@ -244,8 +244,8 @@ void reload_tiles_cb (ChamplainMapSource *orig, ChamplainMapSource *self)
static void
on_set_next_source (ChamplainMapSource *map_source,
- ChamplainMapSource *old_next_source,
- ChamplainMapSource *new_next_source)
+ ChamplainMapSource *old_next_source,
+ ChamplainMapSource *new_next_source)
{
ChamplainMapSourcePrivate *priv = GET_PRIVATE(map_source);
if (old_next_source)
@@ -272,7 +272,7 @@ on_set_next_source (ChamplainMapSource *map_source,
*/
void
champlain_map_source_set_next_source (ChamplainMapSource *map_source,
- ChamplainMapSource *next_source)
+ ChamplainMapSource *next_source)
{
g_return_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source));
@@ -454,8 +454,8 @@ champlain_map_source_get_projection (ChamplainMapSource *map_source)
*/
guint
champlain_map_source_get_x (ChamplainMapSource *map_source,
- guint zoom_level,
- gdouble longitude)
+ guint zoom_level,
+ gdouble longitude)
{
g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), 0);
@@ -478,8 +478,8 @@ champlain_map_source_get_x (ChamplainMapSource *map_source,
*/
guint
champlain_map_source_get_y (ChamplainMapSource *map_source,
- guint zoom_level,
- gdouble latitude)
+ guint zoom_level,
+ gdouble latitude)
{
g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), 0);
@@ -504,8 +504,8 @@ champlain_map_source_get_y (ChamplainMapSource *map_source,
*/
gdouble
champlain_map_source_get_longitude (ChamplainMapSource *map_source,
- guint zoom_level,
- guint x)
+ guint zoom_level,
+ guint x)
{
g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), 0);
//ChamplainMapSourcePrivate *priv = map_source->priv;
@@ -529,8 +529,8 @@ champlain_map_source_get_longitude (ChamplainMapSource *map_source,
*/
gdouble
champlain_map_source_get_latitude (ChamplainMapSource *map_source,
- guint zoom_level,
- guint y)
+ guint zoom_level,
+ guint y)
{
g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), 0);
//ChamplainMapSourcePrivate *priv = map_source->priv;
@@ -553,7 +553,7 @@ champlain_map_source_get_latitude (ChamplainMapSource *map_source,
*/
guint
champlain_map_source_get_row_count (ChamplainMapSource *map_source,
- guint zoom_level)
+ guint zoom_level)
{
g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), 0);
@@ -576,7 +576,7 @@ champlain_map_source_get_row_count (ChamplainMapSource *map_source,
*/
guint
champlain_map_source_get_column_count (ChamplainMapSource *map_source,
- guint zoom_level)
+ guint zoom_level)
{
g_return_val_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source), 0);
@@ -632,7 +632,7 @@ champlain_map_source_get_meters_per_pixel (ChamplainMapSource *map_source,
*/
void
champlain_map_source_fill_tile (ChamplainMapSource *map_source,
- ChamplainTile *tile)
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_MAP_SOURCE (map_source));
diff --git a/champlain/champlain-map-source.h b/champlain/champlain-map-source.h
index c7fd308..ab5bc3a 100644
--- a/champlain/champlain-map-source.h
+++ b/champlain/champlain-map-source.h
@@ -84,11 +84,11 @@ guint champlain_map_source_get_tile_size (ChamplainMapSource *map_source);
ChamplainMapProjection champlain_map_source_get_projection (ChamplainMapSource *map_source);
guint champlain_map_source_get_x (ChamplainMapSource *map_source,
- guint zoom_level,
- gdouble longitude);
+ guint zoom_level,
+ gdouble longitude);
guint champlain_map_source_get_y (ChamplainMapSource *map_source,
- guint zoom_level,
- gdouble latitude);
+ guint zoom_level,
+ gdouble latitude);
gdouble champlain_map_source_get_longitude (ChamplainMapSource *map_source,
guint zoom_level,
guint x);
@@ -105,7 +105,7 @@ gdouble champlain_map_source_get_meters_per_pixel (ChamplainMapSource *map_sourc
gdouble longitude);
void champlain_map_source_fill_tile (ChamplainMapSource *map_source,
- ChamplainTile *tile);
+ ChamplainTile *tile);
G_END_DECLS
diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c
index b9d8cea..9aef7a2 100644
--- a/champlain/champlain-marker.c
+++ b/champlain/champlain-marker.c
@@ -178,9 +178,9 @@ champlain_marker_get_highlight_text_color ()
static void
champlain_marker_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ChamplainMarkerPrivate *priv = GET_PRIVATE (object);
@@ -229,9 +229,9 @@ champlain_marker_get_property (GObject *object,
static void
champlain_marker_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ChamplainMarker *marker = CHAMPLAIN_MARKER (object);
//ChamplainMarkerPrivate *priv = marker->priv;
diff --git a/champlain/champlain-memphis-tile-source.c b/champlain/champlain-memphis-tile-source.c
index 7062241..b52f5f8 100644
--- a/champlain/champlain-memphis-tile-source.c
+++ b/champlain/champlain-memphis-tile-source.c
@@ -101,14 +101,16 @@ struct _WorkerThreadData
/* lock to protect the renderer state while rendering */
GStaticRWLock MemphisLock = G_STATIC_RW_LOCK_INIT;
-static void fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile);
+static void fill_tile (ChamplainMapSource *map_source,
+ ChamplainTile *tile);
static void reload_tiles (ChamplainMemphisTileSource *tile_source);
static void memphis_worker_thread (gpointer data, gpointer user_data);
static void map_data_changed_cb (ChamplainMapDataSource *map_data_source,
- GParamSpec *gobject,
- ChamplainMemphisTileSource *tile_source);
-void argb_to_rgba (guchar *data, guint size);
+ GParamSpec *gobject,
+ ChamplainMemphisTileSource *tile_source);
+void argb_to_rgba (guchar *data,
+ guint size);
static void
champlain_memphis_tile_source_get_property (GObject *object,
@@ -219,12 +221,12 @@ champlain_memphis_tile_source_class_init (ChamplainMemphisTileSourceClass *klass
* Since: 0.6
*/
g_object_class_install_property (object_class,
- PROP_MAP_DATA_SOURCE,
- g_param_spec_object ("map-data-source",
- "Map data source",
- "The data source of the renderer",
- CHAMPLAIN_TYPE_MAP_DATA_SOURCE,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+ PROP_MAP_DATA_SOURCE,
+ g_param_spec_object ("map-data-source",
+ "Map data source",
+ "The data source of the renderer",
+ CHAMPLAIN_TYPE_MAP_DATA_SOURCE,
+ G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
}
static void
@@ -239,12 +241,12 @@ champlain_memphis_tile_source_init (ChamplainMemphisTileSource *tile_source)
priv->rules = memphis_rule_set_new ();
memphis_rule_set_load_from_data (priv->rules, default_rules,
- strlen (default_rules));
+ strlen (default_rules));
priv->renderer = memphis_renderer_new_full (priv->rules, memphis_map_new ());
priv->thpool = g_thread_pool_new (memphis_worker_thread, tile_source,
- MAX_THREADS, FALSE, NULL);
+ MAX_THREADS, FALSE, NULL);
}
/**
@@ -276,22 +278,22 @@ ChamplainMemphisTileSource* champlain_memphis_tile_source_new_full (const gchar
g_return_val_if_fail (CHAMPLAIN_IS_MAP_DATA_SOURCE (map_data_source), NULL);
return g_object_new (CHAMPLAIN_TYPE_MEMPHIS_TILE_SOURCE,
- "id", id,
- "name", name,
- "license", license,
- "license-uri", license_uri,
- "min-zoom-level", min_zoom_level,
- "max-zoom-level", max_zoom_level,
- "tile-size", tile_size,
- "projection", projection,
- "map-data-source", map_data_source,
- NULL);
+ "id", id,
+ "name", name,
+ "license", license,
+ "license-uri", license_uri,
+ "min-zoom-level", min_zoom_level,
+ "max-zoom-level", max_zoom_level,
+ "tile-size", tile_size,
+ "projection", projection,
+ "map-data-source", map_data_source,
+ NULL);
}
static void
map_data_changed_cb (ChamplainMapDataSource *map_data_source,
- GParamSpec *gobject,
- ChamplainMemphisTileSource *tile_source)
+ GParamSpec *gobject,
+ ChamplainMemphisTileSource *tile_source)
{
g_assert (CHAMPLAIN_IS_MAP_DATA_SOURCE (map_data_source) &&
CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source));
@@ -326,7 +328,8 @@ map_data_changed_cb (ChamplainMapDataSource *map_data_source,
Transform ARGB (Cairo) to RGBA (GdkPixbuf). RGBA is actualy reversed in
memory, so the transformation is ARGB -> ABGR (i.e. swapping B and R)
*/
-void argb_to_rgba (guchar *data, guint size)
+void argb_to_rgba (guchar *data,
+ guint size)
{
guint32 *ptr;
guint32 *endptr = (guint32 *)data + size / 4;
@@ -386,22 +389,14 @@ tile_loaded_cb (gpointer worker_data)
/* modify directly the buffer of cairo surface - we don't use it any more
and we close the surface anyway */
argb_to_rgba (cairo_image_surface_get_data (cst),
- cairo_image_surface_get_stride (cst) * cairo_image_surface_get_height (cst));
+ cairo_image_surface_get_stride (cst) * cairo_image_surface_get_height (cst));
pixbuf = gdk_pixbuf_new_from_data (cairo_image_surface_get_data (cst),
- GDK_COLORSPACE_RGB,
- TRUE,
- 8,
- size,
- size,
- cairo_image_surface_get_stride (cst),
- NULL,
- NULL);
+ GDK_COLORSPACE_RGB, TRUE, 8, size, size,
+ cairo_image_surface_get_stride (cst), NULL, NULL);
if (gdk_pixbuf_save_to_buffer (pixbuf, &buffer, &buffer_size, "png", &error, NULL))
- {
- champlain_tile_cache_store_tile (tile_cache, tile, buffer, buffer_size);
- }
+ champlain_tile_cache_store_tile (tile_cache, tile, buffer, buffer_size);
g_free (buffer);
g_object_unref (pixbuf);
@@ -419,7 +414,8 @@ cleanup:
}
static void
-memphis_worker_thread (gpointer worker_data, gpointer user_data)
+memphis_worker_thread (gpointer worker_data,
+ gpointer user_data)
{
WorkerThreadData *data = (WorkerThreadData *)worker_data;
ChamplainMapSource *map_source = data->map_source;
@@ -453,7 +449,8 @@ memphis_worker_thread (gpointer worker_data, gpointer user_data)
}
static void
-fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile)
+fill_tile (ChamplainMapSource *map_source,
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (map_source));
@@ -564,8 +561,8 @@ champlain_memphis_tile_source_load_rules (
*/
void
champlain_memphis_tile_source_set_map_data_source (
- ChamplainMemphisTileSource *tile_source,
- ChamplainMapDataSource *map_data_source)
+ ChamplainMemphisTileSource *tile_source,
+ ChamplainMapDataSource *map_data_source)
{
g_return_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source) &&
CHAMPLAIN_IS_MAP_DATA_SOURCE (map_data_source));
@@ -579,7 +576,7 @@ champlain_memphis_tile_source_set_map_data_source (
priv->map_data_source = g_object_ref_sink (map_data_source);
g_signal_connect (priv->map_data_source, "notify::state",
- G_CALLBACK (map_data_changed_cb), tile_source);
+ G_CALLBACK (map_data_changed_cb), tile_source);
map = champlain_map_data_source_get_map_data (priv->map_data_source);
if (map == NULL)
@@ -605,7 +602,7 @@ champlain_memphis_tile_source_set_map_data_source (
*/
ChamplainMapDataSource *
champlain_memphis_tile_source_get_map_data_source (
- ChamplainMemphisTileSource *tile_source)
+ ChamplainMemphisTileSource *tile_source)
{
g_return_val_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source), NULL);
@@ -622,8 +619,9 @@ champlain_memphis_tile_source_get_map_data_source (
*
* Since: 0.6
*/
-ClutterColor * champlain_memphis_tile_source_get_background_color (
- ChamplainMemphisTileSource *tile_source)
+ClutterColor *
+champlain_memphis_tile_source_get_background_color (
+ ChamplainMemphisTileSource *tile_source)
{
g_return_val_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source), NULL);
@@ -653,8 +651,8 @@ ClutterColor * champlain_memphis_tile_source_get_background_color (
*/
void
champlain_memphis_tile_source_set_background_color (
- ChamplainMemphisTileSource *tile_source,
- const ClutterColor *color)
+ ChamplainMemphisTileSource *tile_source,
+ const ClutterColor *color)
{
g_return_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source));
@@ -680,7 +678,7 @@ champlain_memphis_tile_source_set_background_color (
*/
void
champlain_memphis_tile_source_set_rule (ChamplainMemphisTileSource *tile_source,
- MemphisRule *rule)
+ MemphisRule *rule)
{
g_return_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source) &&
MEMPHIS_RULE (rule));
@@ -705,7 +703,7 @@ champlain_memphis_tile_source_set_rule (ChamplainMemphisTileSource *tile_source,
*/
MemphisRule *
champlain_memphis_tile_source_get_rule (ChamplainMemphisTileSource *tile_source,
- const gchar *id)
+ const gchar *id)
{
g_return_val_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source) &&
id != NULL, NULL);
@@ -756,8 +754,8 @@ champlain_memphis_tile_source_get_rule_ids (ChamplainMemphisTileSource *tile_sou
* Since: 0.6
*/
void champlain_memphis_tile_source_remove_rule (
- ChamplainMemphisTileSource *tile_source,
- const gchar *id)
+ ChamplainMemphisTileSource *tile_source,
+ const gchar *id)
{
g_return_if_fail (CHAMPLAIN_IS_MEMPHIS_TILE_SOURCE (tile_source));
diff --git a/champlain/champlain-network-tile-source.c b/champlain/champlain-network-tile-source.c
index 6184a87..dd9c415 100644
--- a/champlain/champlain-network-tile-source.c
+++ b/champlain/champlain-network-tile-source.c
@@ -99,9 +99,9 @@ static void fill_tile (ChamplainMapSource *map_source,
static gchar *
get_tile_uri (ChamplainNetworkTileSource *source,
- gint x,
- gint y,
- gint z);
+ gint x,
+ gint y,
+ gint z);
static void
champlain_network_tile_source_get_property (GObject *object,
@@ -208,10 +208,10 @@ champlain_network_tile_source_class_init (ChamplainNetworkTileSourceClass *klass
* Since: 0.4
*/
pspec = g_param_spec_string ("uri-format",
- "URI Format",
- "The URI format",
- "",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "URI Format",
+ "The URI format",
+ "",
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_URI_FORMAT, pspec);
/**
@@ -222,10 +222,10 @@ champlain_network_tile_source_class_init (ChamplainNetworkTileSourceClass *klass
* Since: 0.4
*/
pspec = g_param_spec_boolean ("offline",
- "Offline",
- "Offline",
- FALSE,
- G_PARAM_READWRITE);
+ "Offline",
+ "Offline",
+ FALSE,
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_OFFLINE, pspec);
/**
@@ -236,10 +236,10 @@ champlain_network_tile_source_class_init (ChamplainNetworkTileSourceClass *klass
* Since: 0.4
*/
pspec = g_param_spec_string ("proxy-uri",
- "Proxy URI",
- "The proxy URI to use to access network",
- "",
- G_PARAM_READWRITE);
+ "Proxy URI",
+ "The proxy URI to use to access network",
+ "",
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_PROXY_URI, pspec);
}
@@ -259,8 +259,8 @@ champlain_network_tile_source_init (ChamplainNetworkTileSource *tile_source)
#endif
NULL);
g_object_set (G_OBJECT (priv->soup_session),
- "user-agent", "libchamplain/" CHAMPLAIN_VERSION_S,
- "max-conns-per-host", 2, NULL); // This is as required by OSM
+ "user-agent", "libchamplain/" CHAMPLAIN_VERSION_S,
+ "max-conns-per-host", 2, NULL); // This is as required by OSM
}
@@ -284,21 +284,21 @@ champlain_network_tile_source_init (ChamplainNetworkTileSource *tile_source)
*/
ChamplainNetworkTileSource*
champlain_network_tile_source_new_full (const gchar *id,
- const gchar *name,
- const gchar *license,
- const gchar *license_uri,
- guint min_zoom,
- guint max_zoom,
- guint tile_size,
- ChamplainMapProjection projection,
- const gchar *uri_format)
+ const gchar *name,
+ const gchar *license,
+ const gchar *license_uri,
+ guint min_zoom,
+ guint max_zoom,
+ guint tile_size,
+ ChamplainMapProjection projection,
+ const gchar *uri_format)
{
ChamplainNetworkTileSource * source;
source = g_object_new (CHAMPLAIN_TYPE_NETWORK_TILE_SOURCE, "id", id,
- "name", name, "license", license, "license-uri", license_uri,
- "min-zoom-level", min_zoom, "max-zoom-level", max_zoom,
- "tile-size", tile_size, "projection", projection,
- "uri-format", uri_format, NULL);
+ "name", name, "license", license, "license-uri", license_uri,
+ "min-zoom-level", min_zoom, "max-zoom-level", max_zoom,
+ "tile-size", tile_size, "projection", projection,
+ "uri-format", uri_format, NULL);
return source;
}
@@ -449,9 +449,9 @@ champlain_network_tile_source_set_offline (ChamplainNetworkTileSource *tile_sour
#define SIZE 8
static gchar *
get_tile_uri (ChamplainNetworkTileSource *source,
- gint x,
- gint y,
- gint z)
+ gint x,
+ gint y,
+ gint z)
{
ChamplainNetworkTileSourcePrivate *priv = GET_PRIVATE(source);
@@ -495,7 +495,8 @@ get_tile_uri (ChamplainNetworkTileSource *source,
}
static void
-tile_destroyed_cb (ChamplainTile *tile, TileDestroyedCbData *data)
+tile_destroyed_cb (ChamplainTile *tile,
+ TileDestroyedCbData *data)
{
if (data->map_source && data->msg)
{
@@ -507,7 +508,8 @@ tile_destroyed_cb (ChamplainTile *tile, TileDestroyedCbData *data)
}
static void
-destroy_cb_data (TileDestroyedCbData *data, GClosure *closure)
+destroy_cb_data (TileDestroyedCbData *data,
+ GClosure *closure)
{
if (data->map_source)
g_object_remove_weak_pointer(G_OBJECT (data->map_source), (gpointer*)&data->map_source);
@@ -517,8 +519,8 @@ destroy_cb_data (TileDestroyedCbData *data, GClosure *closure)
static void
tile_loaded_cb (SoupSession *session,
- SoupMessage *msg,
- gpointer user_data)
+ SoupMessage *msg,
+ gpointer user_data)
{
TileLoadedCallbackData *callback_data = (TileLoadedCallbackData *)user_data;
ChamplainMapSource *map_source = callback_data->map_source;
@@ -605,14 +607,14 @@ tile_loaded_cb (SoupSession *session,
GdkPixbuf* pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
actor = clutter_texture_new ();
if (!clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (actor),
- gdk_pixbuf_get_pixels (pixbuf),
- gdk_pixbuf_get_has_alpha (pixbuf),
- gdk_pixbuf_get_width (pixbuf),
- gdk_pixbuf_get_height (pixbuf),
- gdk_pixbuf_get_rowstride (pixbuf),
- gdk_pixbuf_get_bits_per_sample (pixbuf) *
- gdk_pixbuf_get_n_channels (pixbuf) / 8,
- 0, &error))
+ gdk_pixbuf_get_pixels (pixbuf),
+ gdk_pixbuf_get_has_alpha (pixbuf),
+ gdk_pixbuf_get_width (pixbuf),
+ gdk_pixbuf_get_height (pixbuf),
+ gdk_pixbuf_get_rowstride (pixbuf),
+ gdk_pixbuf_get_bits_per_sample (pixbuf) *
+ gdk_pixbuf_get_n_channels (pixbuf) / 8,
+ 0, &error))
{
if (error)
{
@@ -634,9 +636,7 @@ load_next_cleanup:
load_next:
if (next_source)
- {
- champlain_map_source_fill_tile (next_source, tile);
- }
+ champlain_map_source_fill_tile (next_source, tile);
g_object_unref (map_source);
return;
@@ -647,7 +647,7 @@ finish:
static void
fill_tile (ChamplainMapSource *map_source,
- ChamplainTile *tile)
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_NETWORK_TILE_SOURCE (map_source));
g_return_if_fail (CHAMPLAIN_IS_TILE (tile));
@@ -683,13 +683,13 @@ fill_tile (ChamplainMapSource *map_source,
{
DEBUG("If-None-Match: %s", etag);
soup_message_headers_append (msg->request_headers,
- "If-None-Match", etag);
+ "If-None-Match", etag);
}
else if (date)
{
DEBUG("If-Modified-Since %s", date);
soup_message_headers_append (msg->request_headers,
- "If-Modified-Since", date);
+ "If-Modified-Since", date);
}
g_free (date);
@@ -703,7 +703,7 @@ fill_tile (ChamplainMapSource *map_source,
g_object_add_weak_pointer (G_OBJECT (map_source), (gpointer*)&tile_destroyed_cb_data->map_source);
g_signal_connect_data (tile, "destroy", G_CALLBACK (tile_destroyed_cb),
- tile_destroyed_cb_data, (GClosureNotify) destroy_cb_data, 0);
+ tile_destroyed_cb_data, (GClosureNotify) destroy_cb_data, 0);
callback_data = g_new (TileLoadedCallbackData, 1);
callback_data->tile = tile;
@@ -713,8 +713,8 @@ fill_tile (ChamplainMapSource *map_source,
g_object_ref (map_source);
soup_session_queue_message (priv->soup_session, msg,
- tile_loaded_cb,
- callback_data);
+ tile_loaded_cb,
+ callback_data);
}
else
{
diff --git a/champlain/champlain-polygon.c b/champlain/champlain-polygon.c
index 64db997..74fa33c 100644
--- a/champlain/champlain-polygon.c
+++ b/champlain/champlain-polygon.c
@@ -742,10 +742,12 @@ champlain_polygon_hide (ChamplainPolygon *polygon)
void
champlain_polygon_draw_polygon (ChamplainPolygon *polygon,
- ChamplainMapSource *map_source,
- guint zoom_level,
- gfloat width, gfloat height,
- gfloat shift_x, gfloat shift_y)
+ ChamplainMapSource *map_source,
+ guint zoom_level,
+ gfloat width,
+ gfloat height,
+ gfloat shift_x,
+ gfloat shift_y)
{
ChamplainPolygonPrivate *priv = GET_PRIVATE (polygon);
ClutterActor *cairo_texture;
diff --git a/champlain/champlain-polygon.h b/champlain/champlain-polygon.h
index 2488b4f..9f9422a 100644
--- a/champlain/champlain-polygon.h
+++ b/champlain/champlain-polygon.h
@@ -101,10 +101,12 @@ void champlain_polygon_show (ChamplainPolygon *polygon);
void champlain_polygon_hide (ChamplainPolygon *polygon);
void champlain_polygon_draw_polygon (ChamplainPolygon *polygon,
- ChamplainMapSource *map_source,
- guint zoom_level,
- gfloat width, gfloat height,
- gfloat shift_x, gfloat shift_y);
+ ChamplainMapSource *map_source,
+ guint zoom_level,
+ gfloat width,
+ gfloat height,
+ gfloat shift_x,
+ gfloat shift_y);
G_END_DECLS
diff --git a/champlain/champlain-tile-cache.c b/champlain/champlain-tile-cache.c
index 60159f7..68698b4 100644
--- a/champlain/champlain-tile-cache.c
+++ b/champlain/champlain-tile-cache.c
@@ -55,9 +55,9 @@ static ChamplainMapProjection get_projection (ChamplainMapSource *map_source);
static void
champlain_tile_cache_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ChamplainTileCache *tile_cache = CHAMPLAIN_TILE_CACHE (object);
@@ -73,9 +73,9 @@ champlain_tile_cache_get_property (GObject *object,
static void
champlain_tile_cache_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ChamplainTileCachePrivate *priv = GET_PRIVATE (object);
@@ -195,9 +195,9 @@ champlain_tile_cache_get_persistent (ChamplainTileCache *tile_cache)
*/
void
champlain_tile_cache_store_tile (ChamplainTileCache *tile_cache,
- ChamplainTile *tile,
- const gchar *contents,
- gsize size)
+ ChamplainTile *tile,
+ const gchar *contents,
+ gsize size)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_CACHE (tile_cache));
@@ -214,7 +214,8 @@ champlain_tile_cache_store_tile (ChamplainTileCache *tile_cache,
* Since: 0.6
*/
void
-champlain_tile_cache_refresh_tile_time (ChamplainTileCache *tile_cache, ChamplainTile *tile)
+champlain_tile_cache_refresh_tile_time (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_CACHE (tile_cache));
@@ -237,7 +238,8 @@ champlain_tile_cache_refresh_tile_time (ChamplainTileCache *tile_cache, Champlai
* Since: 0.6
*/
void
-champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache, ChamplainTile *tile)
+champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_CACHE (tile_cache));
diff --git a/champlain/champlain-tile-cache.h b/champlain/champlain-tile-cache.h
index de2530c..6dac00f 100644
--- a/champlain/champlain-tile-cache.h
+++ b/champlain/champlain-tile-cache.h
@@ -48,11 +48,13 @@ struct _ChamplainTileCacheClass
ChamplainMapSourceClass parent_class;
void (*store_tile) (ChamplainTileCache *tile_cache,
- ChamplainTile *tile,
- const gchar *contents,
- gsize size);
- void (*refresh_tile_time) (ChamplainTileCache *tile_cache, ChamplainTile *tile);
- void (*on_tile_filled) (ChamplainTileCache *tile_cache, ChamplainTile *tile);
+ ChamplainTile *tile,
+ const gchar *contents,
+ gsize size);
+ void (*refresh_tile_time) (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile);
+ void (*on_tile_filled) (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile);
void (*clean) (ChamplainTileCache *tile_cache);
};
@@ -61,11 +63,13 @@ GType champlain_tile_cache_get_type (void);
gboolean champlain_tile_cache_get_persistent (ChamplainTileCache *tile_cache);
void champlain_tile_cache_store_tile (ChamplainTileCache *tile_cache,
- ChamplainTile *tile,
- const gchar *contents,
- gsize size);
-void champlain_tile_cache_refresh_tile_time (ChamplainTileCache *tile_cache, ChamplainTile *tile);
-void champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache, ChamplainTile *tile);
+ ChamplainTile *tile,
+ const gchar *contents,
+ gsize size);
+void champlain_tile_cache_refresh_tile_time (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile);
+void champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache,
+ ChamplainTile *tile);
void champlain_tile_cache_clean (ChamplainTileCache *tile_cache);
G_END_DECLS
diff --git a/champlain/champlain-tile-source.c b/champlain/champlain-tile-source.c
index 5ca364a..871c369 100644
--- a/champlain/champlain-tile-source.c
+++ b/champlain/champlain-tile-source.c
@@ -72,9 +72,9 @@ static ChamplainMapProjection get_projection (ChamplainMapSource *map_source);
static void
champlain_tile_source_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ChamplainTileSourcePrivate *priv = GET_PRIVATE(object);
@@ -114,9 +114,9 @@ champlain_tile_source_get_property (GObject *object,
static void
champlain_tile_source_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ChamplainTileSource *tile_source = CHAMPLAIN_TILE_SOURCE(object);
@@ -124,18 +124,18 @@ champlain_tile_source_set_property (GObject *object,
{
case PROP_ID:
champlain_tile_source_set_id (tile_source,
- g_value_get_string (value));
+ g_value_get_string (value));
case PROP_NAME:
champlain_tile_source_set_name (tile_source,
- g_value_get_string (value));
+ g_value_get_string (value));
break;
case PROP_LICENSE:
champlain_tile_source_set_license (tile_source,
- g_value_get_string (value));
+ g_value_get_string (value));
break;
case PROP_LICENSE_URI:
champlain_tile_source_set_license_uri (tile_source,
- g_value_get_string (value));
+ g_value_get_string (value));
break;
case PROP_MIN_ZOOM_LEVEL:
champlain_tile_source_set_min_zoom_level (tile_source,
@@ -147,15 +147,15 @@ champlain_tile_source_set_property (GObject *object,
break;
case PROP_TILE_SIZE:
champlain_tile_source_set_tile_size (tile_source,
- g_value_get_uint (value));
+ g_value_get_uint (value));
break;
case PROP_MAP_PROJECTION:
champlain_tile_source_set_projection (tile_source,
- g_value_get_enum (value));
+ g_value_get_enum (value));
break;
case PROP_CACHE:
champlain_tile_source_set_cache (tile_source,
- g_value_get_object (value));
+ g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@ -230,10 +230,10 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_string ("id",
- "Id",
- "The id of the tile source",
- "",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "Id",
+ "The id of the tile source",
+ "",
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_ID, pspec);
/**
@@ -244,10 +244,10 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_string ("name",
- "Name",
- "The name of the tile source",
- "",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "Name",
+ "The name of the tile source",
+ "",
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_NAME, pspec);
/**
@@ -258,10 +258,10 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_string ("license",
- "License",
- "The usage license of the tile source",
- "",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "License",
+ "The usage license of the tile source",
+ "",
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_LICENSE, pspec);
/**
@@ -272,10 +272,10 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_string ("license-uri",
- "License-uri",
- "The usage license's uri for more information",
- "",
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "License-uri",
+ "The usage license's uri for more information",
+ "",
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_LICENSE_URI, pspec);
/**
@@ -286,12 +286,12 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_uint ("min-zoom-level",
- "Minimum Zoom Level",
- "The minimum zoom level",
- 0,
- 50,
- 0,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "Minimum Zoom Level",
+ "The minimum zoom level",
+ 0,
+ 50,
+ 0,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_MIN_ZOOM_LEVEL, pspec);
/**
@@ -302,12 +302,12 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_uint ("max-zoom-level",
- "Maximum Zoom Level",
- "The maximum zoom level",
- 0,
- 50,
- 18,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "Maximum Zoom Level",
+ "The maximum zoom level",
+ 0,
+ 50,
+ 18,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_MAX_ZOOM_LEVEL, pspec);
/**
@@ -318,12 +318,12 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_uint ("tile-size",
- "Tile Size",
- "The tile size",
- 0,
- 2048,
- 256,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "Tile Size",
+ "The tile size",
+ 0,
+ 2048,
+ 256,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_TILE_SIZE, pspec);
/**
@@ -334,11 +334,11 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.4
*/
pspec = g_param_spec_enum ("projection",
- "Projection",
- "The map projection",
- CHAMPLAIN_TYPE_MAP_PROJECTION,
- CHAMPLAIN_MAP_PROJECTION_MERCATOR,
- (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ "Projection",
+ "The map projection",
+ CHAMPLAIN_TYPE_MAP_PROJECTION,
+ CHAMPLAIN_MAP_PROJECTION_MERCATOR,
+ (G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class, PROP_MAP_PROJECTION, pspec);
/**
@@ -349,10 +349,10 @@ champlain_tile_source_class_init (ChamplainTileSourceClass *klass)
* Since: 0.6
*/
pspec = g_param_spec_object ("cache",
- "Cache",
- "Cache used for tile sorage",
- CHAMPLAIN_TYPE_TILE_CACHE,
- G_PARAM_READWRITE);
+ "Cache",
+ "Cache used for tile sorage",
+ CHAMPLAIN_TYPE_TILE_CACHE,
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_CACHE, pspec);
}
@@ -401,7 +401,7 @@ champlain_tile_source_get_cache (ChamplainTileSource *tile_source)
*/
void
champlain_tile_source_set_cache (ChamplainTileSource *tile_source,
- ChamplainTileCache *cache)
+ ChamplainTileCache *cache)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source));
@@ -505,7 +505,7 @@ get_projection (ChamplainMapSource *map_source)
*/
void
champlain_tile_source_set_id (ChamplainTileSource *tile_source,
- const gchar *id)
+ const gchar *id)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source));
@@ -528,7 +528,7 @@ champlain_tile_source_set_id (ChamplainTileSource *tile_source,
*/
void
champlain_tile_source_set_name (ChamplainTileSource *tile_source,
- const gchar *name)
+ const gchar *name)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source));
@@ -551,7 +551,7 @@ champlain_tile_source_set_name (ChamplainTileSource *tile_source,
*/
void
champlain_tile_source_set_license (ChamplainTileSource *tile_source,
- const gchar *license)
+ const gchar *license)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source));
@@ -574,7 +574,7 @@ champlain_tile_source_set_license (ChamplainTileSource *tile_source,
*/
void
champlain_tile_source_set_license_uri (ChamplainTileSource *tile_source,
- const gchar *license_uri)
+ const gchar *license_uri)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source));
@@ -641,7 +641,7 @@ champlain_tile_source_set_max_zoom_level (ChamplainTileSource *tile_source,
*/
void
champlain_tile_source_set_tile_size (ChamplainTileSource *tile_source,
- guint tile_size)
+ guint tile_size)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source));
@@ -663,7 +663,7 @@ champlain_tile_source_set_tile_size (ChamplainTileSource *tile_source,
*/
void
champlain_tile_source_set_projection (ChamplainTileSource *tile_source,
- ChamplainMapProjection projection)
+ ChamplainMapProjection projection)
{
g_return_if_fail (CHAMPLAIN_IS_TILE_SOURCE (tile_source));
diff --git a/champlain/champlain-tile-source.h b/champlain/champlain-tile-source.h
index 04f1624..99d8234 100644
--- a/champlain/champlain-tile-source.h
+++ b/champlain/champlain-tile-source.h
@@ -54,14 +54,14 @@ GType champlain_tile_source_get_type (void);
ChamplainTileCache *champlain_tile_source_get_cache (ChamplainTileSource *tile_source);
void champlain_tile_source_set_cache (ChamplainTileSource *tile_source,
- ChamplainTileCache *cache);
+ ChamplainTileCache *cache);
void champlain_tile_source_set_id (ChamplainTileSource *tile_source,
- const gchar *id);
+ const gchar *id);
void champlain_tile_source_set_name (ChamplainTileSource *tile_source,
- const gchar *name);
+ const gchar *name);
void champlain_tile_source_set_license (ChamplainTileSource *tile_source,
- const gchar *license);
+ const gchar *license);
void champlain_tile_source_set_license_uri (ChamplainTileSource *tile_source,
const gchar *license_uri);
diff --git a/champlain/champlain-tile.c b/champlain/champlain-tile.c
index 21d201f..c2dcd94 100644
--- a/champlain/champlain-tile.c
+++ b/champlain/champlain-tile.c
@@ -513,7 +513,8 @@ fade_in_completed (ClutterAnimation *animation, ChamplainTile *self)
* Since: 0.4
*/
void
-champlain_tile_set_state (ChamplainTile *self, ChamplainState state)
+champlain_tile_set_state (ChamplainTile *self,
+ ChamplainState state)
{
g_return_if_fail (CHAMPLAIN_TILE (self));
@@ -749,7 +750,8 @@ champlain_tile_get_fade_in (ChamplainTile *self)
* Since: 0.6
*/
void
-champlain_tile_set_fade_in (ChamplainTile *self, gboolean fade_in)
+champlain_tile_set_fade_in (ChamplainTile *self,
+ gboolean fade_in)
{
g_return_if_fail (CHAMPLAIN_TILE (self));
diff --git a/champlain/champlain-tile.h b/champlain/champlain-tile.h
index 586b45a..d6fe1b3 100644
--- a/champlain/champlain-tile.h
+++ b/champlain/champlain-tile.h
@@ -77,7 +77,8 @@ gboolean champlain_tile_get_fade_in (ChamplainTile *self);
void champlain_tile_set_x (ChamplainTile *self,
gint x);
-void champlain_tile_set_y (ChamplainTile *self, gint y);
+void champlain_tile_set_y (ChamplainTile *self,
+ gint y);
void champlain_tile_set_zoom_level (ChamplainTile *self,
gint zoom_level);
void champlain_tile_set_size (ChamplainTile *self,
@@ -90,7 +91,8 @@ void champlain_tile_set_etag (ChamplainTile *self,
const gchar *etag);
void champlain_tile_set_modified_time (ChamplainTile *self,
const GTimeVal *time);
-void champlain_tile_set_fade_in (ChamplainTile *self, gboolean fade_in);
+void champlain_tile_set_fade_in (ChamplainTile *self,
+ gboolean fade_in);
G_END_DECLS
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 4ed62bb..9200363 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -189,39 +189,55 @@ G_DEFINE_TYPE (ChamplainView, champlain_view, CLUTTER_TYPE_GROUP);
static gdouble viewport_get_current_longitude (ChamplainViewPrivate *priv);
static gdouble viewport_get_current_latitude (ChamplainViewPrivate *priv);
-static gdouble viewport_get_longitude_at (ChamplainViewPrivate *priv, gint x);
-static gdouble viewport_get_latitude_at (ChamplainViewPrivate *priv, gint y);
-static gboolean scroll_event (ClutterActor *actor, ClutterScrollEvent *event,
+static gdouble viewport_get_longitude_at (ChamplainViewPrivate *priv,
+ gint x);
+static gdouble viewport_get_latitude_at (ChamplainViewPrivate *priv,
+ gint y);
+static gboolean scroll_event (ClutterActor *actor,
+ ClutterScrollEvent *event,
+ ChamplainView *view);
+static void marker_reposition_cb (ChamplainMarker *marker,
+ ChamplainView *view);
+static void layer_reposition_cb (ClutterActor *layer,
ChamplainView *view);
-static void marker_reposition_cb (ChamplainMarker *marker, ChamplainView *view);
-static void layer_reposition_cb (ClutterActor *layer, ChamplainView *view);
static gboolean marker_reposition (gpointer data);
static void resize_viewport (ChamplainView *view);
-static void champlain_view_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec);
-static void champlain_view_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec);
+static void champlain_view_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void champlain_view_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
static void champlain_view_dispose (GObject *object);
static void champlain_view_class_init (ChamplainViewClass *champlainViewClass);
static void champlain_view_init (ChamplainView *view);
-static void viewport_pos_changed_cb (GObject *gobject, GParamSpec *arg1,
+static void viewport_pos_changed_cb (GObject *gobject,
+ GParamSpec *arg1,
ChamplainView *view);
static void notify_marker_reposition_cb (ChamplainMarker *marker,
- GParamSpec *arg1, ChamplainView *view);
-static void layer_add_marker_cb (ClutterGroup *layer, ChamplainMarker *marker,
+ GParamSpec *arg1,
+ ChamplainView *view);
+static void layer_add_marker_cb (ClutterGroup *layer,
+ ChamplainMarker *marker,
ChamplainView *view);
static void connect_marker_notify_cb (ChamplainMarker *marker,
ChamplainView *view);
static gboolean finger_scroll_button_press_cb (ClutterActor *actor,
- ClutterButtonEvent *event, ChamplainView *view);
+ ClutterButtonEvent *event,
+ ChamplainView *view);
static void update_license (ChamplainView *view);
static void update_scale (ChamplainView *view);
static void view_load_visible_tiles (ChamplainView *view);
-static void view_position_tile (ChamplainView* view, ChamplainTile* tile);
+static void view_position_tile (ChamplainView* view,
+ ChamplainTile* tile);
static void view_reload_tiles_cb (ChamplainMapSource *map_source,
ChamplainView* view);
static void view_update_state (ChamplainView *view);
-static void view_update_anchor (ChamplainView *view, gint x, gint y);
+static void view_update_anchor (ChamplainView *view,
+ gint x,
+ gint y);
static gboolean view_set_zoom_level_at (ChamplainView *view,
gint zoom_level,
gint x,
@@ -246,7 +262,8 @@ static gboolean fill_tile_cb (FillTileCallbackData *data);
#define SCALE_LINE_WIDTH 2
static gdouble
-viewport_get_longitude_at (ChamplainViewPrivate *priv, gint x)
+viewport_get_longitude_at (ChamplainViewPrivate *priv,
+ gint x)
{
if (!priv->map_source)
return 0.0;
@@ -263,7 +280,8 @@ viewport_get_current_longitude (ChamplainViewPrivate *priv)
}
static gdouble
-viewport_get_latitude_at (ChamplainViewPrivate *priv, gint y)
+viewport_get_latitude_at (ChamplainViewPrivate *priv,
+ gint y)
{
if (!priv->map_source)
return 0.0;
@@ -337,7 +355,7 @@ update_viewport (ChamplainView *view,
static void
panning_completed (TidyFingerScroll *scroll,
- ChamplainView *view)
+ ChamplainView *view)
{
ChamplainViewPrivate *priv = GET_PRIVATE (view);
gfloat x, y;
@@ -434,10 +452,10 @@ redraw_polygon_on_idle (PolygonRedrawContext *ctx)
if (ctx->polygon)
champlain_polygon_draw_polygon (ctx->polygon,
- priv->map_source,
- priv->zoom_level,
- priv->viewport_size.width, priv->viewport_size.height,
- priv->viewport_size.x + priv->anchor.x, priv->viewport_size.y + priv->anchor.y);
+ priv->map_source, priv->zoom_level,
+ priv->viewport_size.width, priv->viewport_size.height,
+ priv->viewport_size.x + priv->anchor.x,
+ priv->viewport_size.y + priv->anchor.y);
priv->polygon_redraw_id = 0;
// ctx is freed by g_idle_add_full
@@ -768,9 +786,9 @@ _update_idle_cb (ChamplainView *view)
}
static void
-champlain_view_allocate (ClutterActor *actor,
- const ClutterActorBox *box,
- ClutterAllocationFlags flags)
+champlain_view_allocate (ClutterActor *actor,
+ const ClutterActorBox *box,
+ ClutterAllocationFlags flags)
{
ChamplainView *view = CHAMPLAIN_VIEW (actor);
ChamplainViewPrivate *priv = GET_PRIVATE (view);
@@ -826,9 +844,9 @@ champlain_view_realize (ClutterActor *actor)
*/
static void
champlain_view_get_preferred_width (ClutterActor *actor,
- gfloat for_height,
- gfloat *min_width,
- gfloat *nat_width)
+ gfloat for_height,
+ gfloat *min_width,
+ gfloat *nat_width)
{
ChamplainView *view = CHAMPLAIN_VIEW (actor);
ChamplainViewPrivate *priv = GET_PRIVATE (view);
@@ -843,9 +861,9 @@ champlain_view_get_preferred_width (ClutterActor *actor,
static void
champlain_view_get_preferred_height (ClutterActor *actor,
- gfloat for_width,
- gfloat *min_height,
- gfloat *nat_height)
+ gfloat for_width,
+ gfloat *min_height,
+ gfloat *nat_height)
{
ChamplainView *view = CHAMPLAIN_VIEW (actor);
ChamplainViewPrivate *priv = GET_PRIVATE (view);
diff --git a/champlain/champlain-view.h b/champlain/champlain-view.h
index 782cd16..d00789c 100644
--- a/champlain/champlain-view.h
+++ b/champlain/champlain-view.h
@@ -109,11 +109,16 @@ void champlain_view_set_scroll_mode (ChamplainView *view,
ChamplainScrollMode mode);
void champlain_view_set_keep_center_on_resize (ChamplainView *view,
gboolean value);
-void champlain_view_set_show_license (ChamplainView *view, gboolean value);
-void champlain_view_set_license_text (ChamplainView *view, const gchar *text);
-void champlain_view_set_show_scale (ChamplainView *view, gboolean value);
-void champlain_view_set_scale_unit (ChamplainView *view, ChamplainUnit unit);
-void champlain_view_set_max_scale_width (ChamplainView *view, guint value);
+void champlain_view_set_show_license (ChamplainView *view,
+ gboolean value);
+void champlain_view_set_license_text (ChamplainView *view,
+ const gchar *text);
+void champlain_view_set_show_scale (ChamplainView *view,
+ gboolean value);
+void champlain_view_set_scale_unit (ChamplainView *view,
+ ChamplainUnit unit);
+void champlain_view_set_max_scale_width (ChamplainView *view,
+ guint value);
void champlain_view_set_zoom_on_double_click (ChamplainView *view,
gboolean value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]