Commit 3cf7dfbb authored by Jiří Techet's avatar Jiří Techet

Indentation fixes

parent 27b43372
......@@ -251,11 +251,11 @@ gtk_champlain_embed_init (GtkChamplainEmbed *embed)
static void
gdk_to_clutter_color (GdkColor *gtk_color,
ClutterColor *color)
ClutterColor *color)
{
color->red = CLAMP (((gtk_color->red / 65535.0) * 255), 0, 255);
color->red = CLAMP (((gtk_color->red / 65535.0) * 255), 0, 255);
color->green = CLAMP (((gtk_color->green / 65535.0) * 255), 0, 255);
color->blue = CLAMP (((gtk_color->blue / 65535.0) * 255), 0, 255);
color->blue = CLAMP (((gtk_color->blue / 65535.0) * 255), 0, 255);
color->alpha = 255;
}
......@@ -267,7 +267,7 @@ view_realize_cb (GtkWidget *widget,
ClutterColor color = { 0, 0, 0, };
GtkChamplainEmbedPrivate *priv = view->priv;
GtkStyle *style;
/* Setup mouse cursor to a hand */
gdk_window_set_cursor (gtk_widget_get_window (priv->clutter_embed), priv->cursor_hand_open);
......
This diff is collapsed.
......@@ -28,16 +28,16 @@
G_BEGIN_DECLS
#define CHAMPLAIN_TYPE_ADJUSTMENT (champlain_adjustment_get_type())
#define CHAMPLAIN_TYPE_ADJUSTMENT (champlain_adjustment_get_type ())
#define CHAMPLAIN_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustment))
#define CHAMPLAIN_IS_ADJUSTMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_ADJUSTMENT))
#define CHAMPLAIN_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentClass))
#define CHAMPLAIN_IS_ADJUSTMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_ADJUSTMENT))
#define CHAMPLAIN_ADJUSTMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_ADJUSTMENT, ChamplainAdjustmentClass))
typedef struct _ChamplainAdjustment ChamplainAdjustment;
typedef struct _ChamplainAdjustmentPrivate ChamplainAdjustmentPrivate;
typedef struct _ChamplainAdjustmentClass ChamplainAdjustmentClass;
typedef struct _ChamplainAdjustment ChamplainAdjustment;
typedef struct _ChamplainAdjustmentPrivate ChamplainAdjustmentPrivate;
typedef struct _ChamplainAdjustmentClass ChamplainAdjustmentClass;
/**
* ChamplainAdjustment:
......@@ -66,51 +66,50 @@ struct _ChamplainAdjustmentClass
GObjectClass parent_class;
/*< public >*/
void (* changed) (ChamplainAdjustment *adjustment);
void (*changed)(ChamplainAdjustment *adjustment);
};
GType champlain_adjustment_get_type (void) G_GNUC_CONST;
ChamplainAdjustment *champlain_adjustment_new (gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
gdouble page_size);
gdouble champlain_adjustment_get_value (ChamplainAdjustment *adjustment);
void champlain_adjustment_set_value (ChamplainAdjustment *adjustment,
gdouble value);
void champlain_adjustment_set_values (ChamplainAdjustment *adjustment,
gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
gdouble page_size);
void champlain_adjustment_get_values (ChamplainAdjustment *adjustment,
gdouble *value,
gdouble *lower,
gdouble *upper,
gdouble *step_increment,
gdouble *page_increment,
gdouble *page_size);
void champlain_adjustment_interpolate (ChamplainAdjustment *adjustment,
gdouble value,
guint n_frames,
guint fps);
gboolean champlain_adjustment_get_elastic (ChamplainAdjustment *adjustment);
void champlain_adjustment_set_elastic (ChamplainAdjustment *adjustment,
gboolean elastic);
gboolean champlain_adjustment_clamp (ChamplainAdjustment *adjustment,
gboolean interpolate,
guint n_frames,
guint fps);
void champlain_adjustment_interpolate_stop (ChamplainAdjustment *adjustment);
ChamplainAdjustment *champlain_adjustment_new (gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
gdouble page_size);
gdouble champlain_adjustment_get_value (ChamplainAdjustment *adjustment);
void champlain_adjustment_set_value (ChamplainAdjustment *adjustment,
gdouble value);
void champlain_adjustment_set_values (ChamplainAdjustment *adjustment,
gdouble value,
gdouble lower,
gdouble upper,
gdouble step_increment,
gdouble page_increment,
gdouble page_size);
void champlain_adjustment_get_values (ChamplainAdjustment *adjustment,
gdouble *value,
gdouble *lower,
gdouble *upper,
gdouble *step_increment,
gdouble *page_increment,
gdouble *page_size);
void champlain_adjustment_interpolate (ChamplainAdjustment *adjustment,
gdouble value,
guint n_frames,
guint fps);
gboolean champlain_adjustment_get_elastic (ChamplainAdjustment *adjustment);
void champlain_adjustment_set_elastic (ChamplainAdjustment *adjustment,
gboolean elastic);
gboolean champlain_adjustment_clamp (ChamplainAdjustment *adjustment,
gboolean interpolate,
guint n_frames,
guint fps);
void champlain_adjustment_interpolate_stop (ChamplainAdjustment *adjustment);
G_END_DECLS
#endif /* __CHAMPLAIN_ADJUSTMENT_H__ */
......@@ -38,9 +38,9 @@ champlain_bounding_box_get_type (void)
if (G_UNLIKELY (type == 0))
{
type = g_boxed_type_register_static (
g_intern_static_string ("ChamplainBoundingBox"),
(GBoxedCopyFunc) champlain_bounding_box_copy,
(GBoxedFreeFunc) champlain_bounding_box_free);
g_intern_static_string ("ChamplainBoundingBox"),
(GBoxedCopyFunc) champlain_bounding_box_copy,
(GBoxedFreeFunc) champlain_bounding_box_free);
}
return type;
......@@ -61,9 +61,9 @@ ChamplainBoundingBox *
champlain_bounding_box_new (void)
{
ChamplainBoundingBox *bbox;
bbox = g_slice_new (ChamplainBoundingBox);
bbox->left = CHAMPLAIN_MAX_LONGITUDE;
bbox->right = CHAMPLAIN_MIN_LONGITUDE;
bbox->bottom = CHAMPLAIN_MAX_LATITUDE;
......@@ -149,10 +149,10 @@ champlain_bounding_box_compose (ChamplainBoundingBox *bbox,
ChamplainBoundingBox *other)
{
g_return_if_fail (CHAMPLAIN_BOUNDING_BOX (bbox));
if (other->left < bbox->left)
bbox->left = other->left;
if (other->right > bbox->right)
bbox->right = other->right;
......@@ -175,11 +175,12 @@ champlain_bounding_box_compose (ChamplainBoundingBox *bbox,
*
* Since: 0.10
*/
void champlain_bounding_box_extend (ChamplainBoundingBox *bbox,
void
champlain_bounding_box_extend (ChamplainBoundingBox *bbox,
gdouble latitude, gdouble longitude)
{
g_return_if_fail (CHAMPLAIN_BOUNDING_BOX (bbox));
if (longitude < bbox->left)
bbox->left = longitude;
......@@ -210,9 +211,8 @@ champlain_bounding_box_is_valid (ChamplainBoundingBox *bbox)
g_return_val_if_fail (CHAMPLAIN_BOUNDING_BOX (bbox), FALSE);
return (bbox->left < bbox->right) && (bbox->bottom < bbox->top) &&
(bbox->left > CHAMPLAIN_MIN_LONGITUDE) && (bbox->left < CHAMPLAIN_MAX_LONGITUDE) &&
(bbox->right > CHAMPLAIN_MIN_LONGITUDE) && (bbox->right < CHAMPLAIN_MAX_LONGITUDE) &&
(bbox->bottom > CHAMPLAIN_MIN_LATITUDE) && (bbox->bottom < CHAMPLAIN_MAX_LATITUDE) &&
(bbox->top > CHAMPLAIN_MIN_LATITUDE) && (bbox->top < CHAMPLAIN_MAX_LATITUDE);
(bbox->left > CHAMPLAIN_MIN_LONGITUDE) && (bbox->left < CHAMPLAIN_MAX_LONGITUDE) &&
(bbox->right > CHAMPLAIN_MIN_LONGITUDE) && (bbox->right < CHAMPLAIN_MAX_LONGITUDE) &&
(bbox->bottom > CHAMPLAIN_MIN_LATITUDE) && (bbox->bottom < CHAMPLAIN_MAX_LATITUDE) &&
(bbox->top > CHAMPLAIN_MIN_LATITUDE) && (bbox->top < CHAMPLAIN_MAX_LATITUDE);
}
......@@ -68,7 +68,8 @@ void champlain_bounding_box_compose (ChamplainBoundingBox *bbox,
ChamplainBoundingBox *other);
void champlain_bounding_box_extend (ChamplainBoundingBox *bbox,
gdouble latitude, gdouble longitude);
gdouble latitude,
gdouble longitude);
gboolean champlain_bounding_box_is_valid (ChamplainBoundingBox *bbox);
......
......@@ -19,7 +19,7 @@
/**
* SECTION:champlain-coordinate
* @short_description: The simpliest implementation of #ChamplainLocation
*
*
* #ChamplainCoordinate is a simple object implementing #ChamplainLocation.
*/
......@@ -47,8 +47,8 @@ static gdouble get_longitude (ChamplainLocation *location);
static void location_interface_init (ChamplainLocationIface *iface);
G_DEFINE_TYPE_WITH_CODE (ChamplainCoordinate, champlain_coordinate, G_TYPE_INITIALLY_UNOWNED,
G_IMPLEMENT_INTERFACE (CHAMPLAIN_TYPE_LOCATION,
location_interface_init));
G_IMPLEMENT_INTERFACE (CHAMPLAIN_TYPE_LOCATION,
location_interface_init));
#define CHAMPLAIN_COORDINATE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_COORDINATE, ChamplainCoordinatePrivate))
......@@ -77,7 +77,7 @@ champlain_coordinate_get_property (GObject *object,
case PROP_LATITUDE:
g_value_set_double (value, priv->lat);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
......@@ -96,18 +96,18 @@ champlain_coordinate_set_property (GObject *object,
switch (prop_id)
{
case PROP_LONGITUDE:
{
gdouble lon = g_value_get_double (value);
set_location (CHAMPLAIN_LOCATION (coordinate), priv->lat, lon);
break;
}
{
gdouble lon = g_value_get_double (value);
set_location (CHAMPLAIN_LOCATION (coordinate), priv->lat, lon);
break;
}
case PROP_LATITUDE:
{
gdouble lat = g_value_get_double (value);
set_location (CHAMPLAIN_LOCATION (coordinate), lat, priv->lon);
break;
}
{
gdouble lat = g_value_get_double (value);
set_location (CHAMPLAIN_LOCATION (coordinate), lat, priv->lon);
break;
}
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......@@ -189,12 +189,12 @@ champlain_coordinate_class_init (ChamplainCoordinateClass *coordinate_class)
object_class->set_property = champlain_coordinate_set_property;
g_object_class_override_property (object_class,
PROP_LONGITUDE,
"longitude");
PROP_LONGITUDE,
"longitude");
g_object_class_override_property (object_class,
PROP_LATITUDE,
"latitude");
PROP_LATITUDE,
"latitude");
}
......@@ -209,6 +209,7 @@ champlain_coordinate_init (ChamplainCoordinate *coordinate)
priv->lon = 0;
}
/**
* champlain_coordinate_new:
*
......@@ -229,8 +230,8 @@ champlain_coordinate_new ()
* champlain_coordinate_new_full:
* @latitude: the latitude coordinate
* @longitude: the longitude coordinate
*
* Creates a new instance of #ChamplainCoordinate initialized with the given
*
* Creates a new instance of #ChamplainCoordinate initialized with the given
* coordinates.
*
* Returns: the created instance.
......@@ -238,11 +239,11 @@ champlain_coordinate_new ()
* Since: 0.10
*/
ChamplainCoordinate *
champlain_coordinate_new_full (gdouble latitude,
champlain_coordinate_new_full (gdouble latitude,
gdouble longitude)
{
return CHAMPLAIN_COORDINATE (g_object_new (CHAMPLAIN_TYPE_COORDINATE,
"latitude", latitude,
"longitude", longitude,
NULL));
return CHAMPLAIN_COORDINATE (g_object_new (CHAMPLAIN_TYPE_COORDINATE,
"latitude", latitude,
"longitude", longitude,
NULL));
}
......@@ -69,7 +69,7 @@ GType champlain_coordinate_get_type (void);
ChamplainCoordinate *champlain_coordinate_new (void);
ChamplainCoordinate *champlain_coordinate_new_full (gdouble latitude,
ChamplainCoordinate *champlain_coordinate_new_full (gdouble latitude,
gdouble longitude);
G_END_DECLS
......
......@@ -19,10 +19,10 @@
/**
* SECTION:champlain-custom-marker
* @short_description: #ChamplainCustomMarker is a marker implementing the
* #ClutterContainer interface.
*
* #ChamplainCustomMarker is a marker implementing the #ClutterContainer
* interface. You can insert your custom actors into the container. Don't forget
* #ClutterContainer interface.
*
* #ChamplainCustomMarker is a marker implementing the #ClutterContainer
* interface. You can insert your custom actors into the container. Don't forget
* to set the anchor position in the marker using #clutter_actor_set_anchor_point.
*/
......@@ -56,13 +56,12 @@ struct _ChamplainCustomMarkerPrivate
ClutterContainer *content_group;
};
static void
clutter_container_iface_init (ClutterContainerIface *iface);
static void clutter_container_iface_init (ClutterContainerIface *iface);
G_DEFINE_TYPE_WITH_CODE (ChamplainCustomMarker, champlain_custom_marker, CHAMPLAIN_TYPE_MARKER,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER,
clutter_container_iface_init));
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_CONTAINER,
clutter_container_iface_init));
#define GET_PRIVATE(obj) \
......@@ -75,57 +74,63 @@ add_actor (ClutterContainer *container,
ClutterActor *actor)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_add_actor (priv->content_group, actor);
clutter_container_add_actor (priv->content_group, actor);
}
static void
remove_actor (ClutterContainer *container,
ClutterActor *actor)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_remove_actor (priv->content_group, actor);
clutter_container_remove_actor (priv->content_group, actor);
}
static void
foreach_actor (ClutterContainer *container,
ClutterCallback callback,
gpointer user_data)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_foreach (priv->content_group, callback, user_data);
clutter_container_foreach (priv->content_group, callback, user_data);
}
static void
raise_actor (ClutterContainer *container,
ClutterActor *actor,
ClutterActor *sibling)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_raise_child (priv->content_group, actor, sibling);
clutter_container_raise_child (priv->content_group, actor, sibling);
}
static void
lower_actor (ClutterContainer *container,
ClutterActor *actor,
ClutterActor *sibling)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_lower_child (priv->content_group, actor, sibling);
clutter_container_lower_child (priv->content_group, actor, sibling);
}
static void
sort_depth_order (ClutterContainer *container)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (container);
clutter_container_sort_depth_order (priv->content_group);
clutter_container_sort_depth_order (priv->content_group);
}
static void
clutter_container_iface_init (ClutterContainerIface *iface)
{
......@@ -146,9 +151,10 @@ paint (ClutterActor *actor)
clutter_actor_paint (CLUTTER_ACTOR (priv->content_group));
}
static void
pick (ClutterActor *actor,
const ClutterColor *color)
pick (ClutterActor *actor,
const ClutterColor *color)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (actor);
......@@ -157,11 +163,12 @@ pick (ClutterActor *actor,
clutter_actor_paint (CLUTTER_ACTOR (priv->content_group));
}
static void
get_preferred_width (ClutterActor *actor,
gfloat for_height,
gfloat *min_width,
gfloat *natural_width)
gfloat for_height,
gfloat *min_width,
gfloat *natural_width)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (actor);
......@@ -171,11 +178,12 @@ get_preferred_width (ClutterActor *actor,
natural_width);
}
static void
get_preferred_height (ClutterActor *actor,
gfloat for_width,
gfloat *min_height,
gfloat *natural_height)
gfloat for_width,
gfloat *min_height,
gfloat *natural_height)
{
ChamplainCustomMarkerPrivate *priv = GET_PRIVATE (actor);
......@@ -185,6 +193,7 @@ get_preferred_height (ClutterActor *actor,
natural_height);
}
static void
allocate (ClutterActor *actor,
const ClutterActorBox *box,
......@@ -231,7 +240,7 @@ static void
champlain_custom_marker_dispose (GObject *object)
{
ChamplainCustomMarkerPrivate *priv = CHAMPLAIN_CUSTOM_MARKER (object)->priv;
if (priv->content_group)
{
clutter_actor_unparent (CLUTTER_ACTOR (priv->content_group));
......@@ -245,7 +254,7 @@ champlain_custom_marker_dispose (GObject *object)
static void
champlain_custom_marker_finalize (GObject *object)
{
// ChamplainCustomMarkerPrivate *priv = CHAMPLAIN_CUSTOM_MARKER (object)->priv;
/* ChamplainCustomMarkerPrivate *priv = CHAMPLAIN_CUSTOM_MARKER (object)->priv; */
G_OBJECT_CLASS (champlain_custom_marker_parent_class)->finalize (object);
}
......@@ -256,7 +265,7 @@ champlain_custom_marker_class_init (ChamplainCustomMarkerClass *klass)
{
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (klass, sizeof (ChamplainCustomMarkerPrivate));
object_class->finalize = champlain_custom_marker_finalize;
......@@ -286,7 +295,7 @@ champlain_custom_marker_init (ChamplainCustomMarker *custom_marker)
/**
* champlain_custom_marker_new:
*
*
* Creates an instance of #ChamplainCustomMarker.
*
* Returns: a new #ChamplainCustomMarker.
......
......@@ -56,7 +56,7 @@ struct _ChamplainCustomMarker
{
ChamplainMarker parent;
ChamplainCustomMarkerPrivate *priv;
ChamplainCustomMarkerPrivate *priv;
};
struct _ChamplainCustomMarkerClass
......
......@@ -210,9 +210,9 @@ init_cache (ChamplainFileCache *file_cache)
g_return_if_fail (create_cache_dir (priv->cache_dir));
filename = g_build_filename (priv->cache_dir,
"cache.db", NULL);
"cache.db", NULL);
error = sqlite3_open_v2 (filename, &priv->db,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
g_free (filename);
if (error == SQLITE_ERROR)
......@@ -247,8 +247,8 @@ init_cache (ChamplainFileCache *file_cache)
}
error = sqlite3_prepare_v2 (priv->db,
"SELECT etag FROM tiles WHERE filename = ?", -1,
&priv->stmt_select, NULL);
"SELECT etag FROM tiles WHERE filename = ?", -1,
&priv->stmt_select, NULL);
if (error != SQLITE_OK)
{
priv->stmt_select = NULL;
......@@ -258,8 +258,8 @@ init_cache (ChamplainFileCache *file_cache)
}
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;
......@@ -284,8 +284,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
}
......@@ -322,12 +322,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);
/**
......@@ -338,10 +338,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;
......@@ -389,10 +389,10 @@ champlain_file_cache_new_full (guint size_limit,
ChamplainFileCache *cache;
cache = g_object_new (CHAMPLAIN_TYPE_FILE_CACHE,
"size-limit", size_limit,
"cache-dir", cache_dir,
"renderer", renderer,
NULL);
"size-limit", size_limit,
"cache-dir", cache_dir,
"renderer", renderer,
NULL);
return cache;
}
......@@ -470,14 +470,14 @@ get_filename (ChamplainFileCache *file_cache,
ChamplainMapSource *map_source = CHAMPLAIN_MAP_SOURCE (file_cache);
gchar *filename = g_strdup_printf ("%s" G_DIR_SEPARATOR_S
"%s" G_DIR_SEPARATOR_S
"%d" G_DIR_SEPARATOR_S
"%d" G_DIR_SEPARATOR_S "%d.png",
priv->cache_dir,
champlain_map_source_get_id (map_source),
champlain_tile_get_zoom_level (tile),
champlain_tile_get_x (tile),
champlain_tile_get_y (tile));
"%s" G_DIR_SEPARATOR_S
"%d" G_DIR_SEPARATOR_S
"%d" G_DIR_SEPARATOR_S "%d.png",
priv->cache_dir,
champlain_map_source_get_id (map_source),
champlain_tile_get_zoom_level (tile),
champlain_tile_get_x (tile),
champlain_tile_get_y (tile));
return filename;
}
......@@ -548,8 +548,8 @@ tile_rendered_cb (ChamplainTile *tile,
/* Retrieve modification time */
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);
......@@ -644,7 +644,7 @@ file_loaded_cb (GFile *file,
{
gchar *path;
path = g_file_get_path(file);
path = g_file_get_path (file);
DEBUG ("Failed to load tile %s, error: %s", path, error->message);
g_free (path);
contents = NULL;
......@@ -728,7 +728,7 @@ refresh_tile_time (ChamplainTileCache *tile_cache,
g_free (filename);
info = g_file_query_info (file, G_FILE_ATTRIBUTE_TIME_MODIFIED,
G_FILE_QUERY_INFO_NONE, NULL, NULL);
G_FILE_QUERY_INFO_NONE, NULL, NULL);
if (info)
{
......@@ -740,7 +740,7 @@ refresh_tile_time (ChamplainTileCache *tile_cache,
g_file_set_attributes_from_info (file, info, G_FILE_QUERY_INFO_NONE, NULL, NULL);
g_object_unref (info);
}
}
g_object_unref (file);
......@@ -810,9 +810,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)
{
......@@ -1006,7 +1006,7 @@ champlain_file_cache_purge (ChamplainFileCache *file_cache)
sqlite3_finalize (stmt);
query = sqlite3_mprintf ("UPDATE tiles SET popularity = popularity - %d",
highest_popularity);
highest_popularity);
sqlite3_exec (priv->db, query, NULL, NULL, &error);
if (error != NULL)
{
......
......@@ -104,16 +104,16 @@ champlain_file_tile_source_new_full (const gchar *id,
ChamplainFileTileSource *source;
source = g_object_new (CHAMPLAIN_TYPE_FILE_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,
"renderer", renderer,
NULL);
"id", id,
"name", name,
"license", license,