libchamplain:vpoluceno-clone.git
7 years agoUse correct cast
Jiří Techet [Fri, 14 May 2010 19:16:09 +0000 (21:16 +0200)]
Use correct cast

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoMake introspection compilation work in other directory too
Jiří Techet [Fri, 14 May 2010 18:57:34 +0000 (20:57 +0200)]
Make introspection compilation work in other directory too

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix strange introspection scanner warning
Jiří Techet [Fri, 14 May 2010 00:15:53 +0000 (02:15 +0200)]
Fix strange introspection scanner warning

There seems to be a bug in the introspection scanner which causes
some nonsense warnings - this workaround should fix it

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoUse the new way for introspection makefile creation
Jiří Techet [Thu, 13 May 2010 23:37:21 +0000 (01:37 +0200)]
Use the new way for introspection makefile creation

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoReset the sql statement before bind_text also for stmt_select
Jiří Techet [Wed, 12 May 2010 23:24:04 +0000 (01:24 +0200)]
Reset the sql statement before bind_text also for stmt_select

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoReset the update prepared statement before each execution
Emmanuel Rodriguez [Sun, 21 Feb 2010 17:30:43 +0000 (18:30 +0100)]
Reset the update prepared statement before each execution

7 years agoGet rid of some warnings reported by clang static analysis tool
Jiří Techet [Wed, 12 May 2010 21:28:16 +0000 (23:28 +0200)]
Get rid of some warnings reported by clang static analysis tool

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoAdd G_GNUC_UNUSED where appropriate so LLVM clang doesn't complain
Jiří Techet [Wed, 12 May 2010 19:48:05 +0000 (21:48 +0200)]
Add G_GNUC_UNUSED where appropriate so LLVM clang doesn't complain

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoAdd missing shebang in python polygons demo
Jiří Techet [Wed, 12 May 2010 20:20:57 +0000 (22:20 +0200)]
Add missing shebang in python polygons demo

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoShip file pychamplainmemphis-constructors.defs
Victor Godoy Poluceno [Tue, 11 May 2010 19:13:52 +0000 (16:13 -0300)]
Ship file pychamplainmemphis-constructors.defs

7 years agoLike pyclutter-gtk the champlain-gtk in launcher-gtk.py demo must
Victor Godoy Poluceno [Tue, 11 May 2010 19:09:15 +0000 (16:09 -0300)]
Like pyclutter-gtk the champlain-gtk in launcher-gtk.py demo must
be the first to be imported

7 years agoAdd virtual proxy wrapper to ChamplainMapSource.get_projection
Victor Godoy Poluceno [Mon, 10 May 2010 21:57:55 +0000 (18:57 -0300)]
Add virtual proxy wrapper to ChamplainMapSource.get_projection

7 years agoUpdate ChamplainMapDataSource and ChamplainMemphisTileSource constructors to
Victor Godoy Poluceno [Mon, 10 May 2010 21:55:41 +0000 (18:55 -0300)]
Update ChamplainMapDataSource and ChamplainMemphisTileSource constructors to
new gobject API

7 years agoLatitude and longitude parameters of champlain_base_marker_set_position() swapped...
Jiří Techet [Tue, 11 May 2010 22:05:41 +0000 (00:05 +0200)]
Latitude and longitude parameters of champlain_base_marker_set_position() swapped in header

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFree proxy URI with soup_uri_free() instead of g_object_unref()
Jiří Techet [Tue, 11 May 2010 21:57:18 +0000 (23:57 +0200)]
Free proxy URI with soup_uri_free() instead of g_object_unref()

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFree GError when reporting an error
Emmanuel Rodriguez [Tue, 11 May 2010 21:50:22 +0000 (23:50 +0200)]
Free GError when reporting an error

7 years agoRemove debug print
Emmanuel Rodriguez [Tue, 11 May 2010 21:44:14 +0000 (23:44 +0200)]
Remove debug print

7 years agoEliminate warnings when compiling local-rendering demo
Jiří Techet [Tue, 11 May 2010 21:37:48 +0000 (23:37 +0200)]
Eliminate warnings when compiling local-rendering demo

Can't reproduce the original warnings myself but was reported in bugzilla.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix the unref of the previous image in champlain_marker_set_image
Jiří Techet [Tue, 11 May 2010 21:25:52 +0000 (23:25 +0200)]
Fix the unref of the previous image in champlain_marker_set_image

7 years agoAdd some missing G_BEGIN_DECLS/G_END_DECLS
Jiří Techet [Tue, 11 May 2010 21:12:40 +0000 (23:12 +0200)]
Add some missing G_BEGIN_DECLS/G_END_DECLS

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix an invalid cast if a view is passed a ChamplainLayer instead of a ChamplainSelect...
Emmanuel Rodriguez [Tue, 11 May 2010 19:59:49 +0000 (21:59 +0200)]
Fix an invalid cast if a view is passed a ChamplainLayer instead of a ChamplainSelectionLayer

button_release_cb can't assume that all objects in the layer group are
selection layers. Normal layers are also allowed.

7 years agoRemove libchamplain-gtk.types - it should be generated automatically
Jiří Techet [Mon, 10 May 2010 22:15:31 +0000 (00:15 +0200)]
Remove libchamplain-gtk.types - it should be generated automatically

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoMerge branch 'LIBCHAMPLAIN_0_4_5'
Jiří Techet [Mon, 10 May 2010 21:29:29 +0000 (23:29 +0200)]
Merge branch 'LIBCHAMPLAIN_0_4_5'

Conflicts:
AUTHORS
NEWS
configure.ac

7 years agoUpdate web page in configure.ac
Jiří Techet [Mon, 10 May 2010 20:37:59 +0000 (22:37 +0200)]
Update web page in configure.ac

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoUpdate dependencies in README
Jiří Techet [Mon, 10 May 2010 20:37:29 +0000 (22:37 +0200)]
Update dependencies in README

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoDo not unref polygons
Jiří Techet [Mon, 10 May 2010 20:03:37 +0000 (22:03 +0200)]
Do not unref polygons

...they are owned by ChamplainView now.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoDo not generate 0 size clutter textures for polygons
Jiří Techet [Mon, 10 May 2010 20:02:40 +0000 (22:02 +0200)]
Do not generate 0 size clutter textures for polygons

Fix at the right place...

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove unnecessary DIST_SUBDIRS
Jiří Techet [Mon, 10 May 2010 19:14:02 +0000 (21:14 +0200)]
Remove unnecessary DIST_SUBDIRS

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix a compilation issue with libsoup-gnome
Lorenzo Masini [Mon, 10 May 2010 19:11:54 +0000 (21:11 +0200)]
Fix a compilation issue with libsoup-gnome

7 years agoUpdate champlain-gtk docs
Jiří Techet [Sun, 9 May 2010 23:46:02 +0000 (01:46 +0200)]
Update champlain-gtk docs

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoUpdate python defs
Jiří Techet [Sun, 9 May 2010 23:42:43 +0000 (01:42 +0200)]
Update python defs

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoMake the TOC of the manual more readable
Jiří Techet [Sun, 9 May 2010 22:43:39 +0000 (00:43 +0200)]
Make the TOC of the manual more readable

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoImprovements to the documentation and moving around some definitions
Jiří Techet [Sun, 9 May 2010 21:47:32 +0000 (23:47 +0200)]
Improvements to the documentation and moving around some definitions

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoGenerate types file automatically
Jiří Techet [Sun, 9 May 2010 13:31:13 +0000 (15:31 +0200)]
Generate types file automatically

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoMany improvements to the build process
Jiří Techet [Sat, 8 May 2010 22:01:50 +0000 (00:01 +0200)]
Many improvements to the build process

* be less verbose during build
* use templates for generated enum files

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoUse new autogen.sh from gnome-common
Jiří Techet [Sat, 8 May 2010 21:55:24 +0000 (23:55 +0200)]
Use new autogen.sh from gnome-common

Fixes warning during build

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoSome build fixes
Jiří Techet [Sat, 8 May 2010 13:20:14 +0000 (15:20 +0200)]
Some build fixes

make distcheck should work now

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove the outdated tutorial
Jiří Techet [Fri, 7 May 2010 23:01:42 +0000 (01:01 +0200)]
Remove the outdated tutorial

It was very incomplete and outdated and users will find much more
up-to date examples of how to use libchamplain in our demo apps.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoUse the new INSTALL that is generated with recent autotools
Jiří Techet [Fri, 7 May 2010 22:56:57 +0000 (00:56 +0200)]
Use the new INSTALL that is generated with recent autotools

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove the perl bindings for now as they are not updated yet
Jiří Techet [Fri, 7 May 2010 22:55:26 +0000 (00:55 +0200)]
Remove the perl bindings for now as they are not updated yet

It is expected they will be updated for 0.6 after its release and
re-introduced again.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove "managed" bindings as they seem to be unmaintained
Jiří Techet [Fri, 7 May 2010 22:29:12 +0000 (00:29 +0200)]
Remove "managed" bindings as they seem to be unmaintained

Can be reintroduced any time in the future if there is someone
willing to maintain them.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix some introspection build problems
Jiří Techet [Fri, 7 May 2010 22:20:26 +0000 (00:20 +0200)]
Fix some introspection build problems

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoUpdate champlain and champlainmemphis python bindings.
Victor Godoy Poluceno [Mon, 3 May 2010 21:18:10 +0000 (18:18 -0300)]
Update champlain and champlainmemphis python bindings.

Add new wraped functions and properly dispose of gboxed objects.

7 years agoMany changes in build process
Jiří Techet [Sat, 17 Apr 2010 20:19:59 +0000 (22:19 +0200)]
Many changes in build process

* make libchamplain independent of memphis so it can be built without it
* automatically generate library name based on version in autoconf configuration
* some necessary updates in python bindings
* minor updates everywhere

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoAdd new file pychamplain-gtk-base.defs
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:55:11 +0000 (23:55 -0300)]
Add new file pychamplain-gtk-base.defs

7 years agoAdd support to virtual methods by using defsgen.py.
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:51:19 +0000 (23:51 -0300)]
Add support to virtual methods by using defsgen.py.

Reported by Jiří Techet.

7 years agoUse memphis.h include and add ChamplainBoundingBox sets
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:49:54 +0000 (23:49 -0300)]
Use memphis.h include and add ChamplainBoundingBox sets

7 years agoAdd new boxed type ChamplainBoundingBox
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:49:14 +0000 (23:49 -0300)]
Add new boxed type ChamplainBoundingBox

7 years agoUpdate .defs
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:48:37 +0000 (23:48 -0300)]
Update .defs

7 years agoJust include pychamplaingtk-base.defs
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:46:49 +0000 (23:46 -0300)]
Just include pychamplaingtk-base.defs

7 years agoUpdate required memphis version to 0.2
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:45:44 +0000 (23:45 -0300)]
Update required memphis version to 0.2

7 years agoUse memphis .defs in codegen
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:44:00 +0000 (23:44 -0300)]
Use memphis .defs in codegen

7 years agoShip pychamplaingtk-base.defs
Victor Godoy Poluceno [Tue, 6 Apr 2010 02:39:04 +0000 (23:39 -0300)]
Ship pychamplaingtk-base.defs

7 years agoMake the windows mkdtemp be robust with non-ascii characters too
Fridrich Štrba [Thu, 22 Apr 2010 15:01:04 +0000 (17:01 +0200)]
Make the windows mkdtemp be robust with non-ascii characters too

7 years agoUpdate maintainer information
Pierre-Luc Beaudoin [Thu, 22 Apr 2010 03:32:56 +0000 (23:32 -0400)]
Update maintainer information

7 years agoBuild fixes for windows
Fridrich Štrba [Tue, 20 Apr 2010 14:37:19 +0000 (16:37 +0200)]
Build fixes for windows

7 years agoRequire Memphis 0.2.1
Simon Wenner [Sat, 3 Apr 2010 13:25:12 +0000 (15:25 +0200)]
Require Memphis 0.2.1

7 years agoAdd launcher.js: A champlain javascript demo
Simon Wenner [Fri, 26 Feb 2010 22:40:09 +0000 (23:40 +0100)]
Add launcher.js: A champlain javascript demo

luncher.js implements the same application as its c equivalent, but
uses the javascript bindings provided by gobject-introspection.
The demo has no implementation of the marker layer and printing the
coordinates of a mouse click does currently not work.

7 years agolauncher: remove redundant semicolon
Simon Wenner [Fri, 26 Feb 2010 22:28:34 +0000 (23:28 +0100)]
launcher: remove redundant semicolon

7 years agoBugfix: GtkChamplain-0.5.gir has to depend on Champlain-0.5 and not 0.4
Simon Wenner [Fri, 26 Feb 2010 22:26:37 +0000 (23:26 +0100)]
Bugfix: GtkChamplain-0.5.gir has to depend on Champlain-0.5 and not 0.4

7 years agoupdate m4/gtk-doc.m4
Simon Wenner [Thu, 25 Feb 2010 16:40:05 +0000 (17:40 +0100)]
update m4/gtk-doc.m4

7 years agoFix a typo in a comment
Simon Wenner [Thu, 25 Feb 2010 16:38:01 +0000 (17:38 +0100)]
Fix a typo in a comment

7 years agoMigrate to libmemphis version 0.2
Simon Wenner [Thu, 25 Feb 2010 16:31:20 +0000 (17:31 +0100)]
Migrate to libmemphis version 0.2

Version 0.2 features proper io error handling and introspection support.

7 years agoUnref GdkPixbufLoader
Jiří Techet [Sat, 27 Mar 2010 13:56:23 +0000 (14:56 +0100)]
Unref GdkPixbufLoader

GdkPixbufLoader wasn't unreffed when the tile was successfully loaded.
This caused a _huge_ memory leak.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove tile ref/unref in ChamplainTile
Jiří Techet [Sat, 27 Mar 2010 13:53:37 +0000 (14:53 +0100)]
Remove tile ref/unref in ChamplainTile

Under Lucid, there are some warnings in the console about non-existent
object being unreffed. This patch fixes that. It should be safe not
to ref the tile because when fade_in is completed, the content actor
is guaranteed to exist and because it exists, its parent exists as
well.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoOptimize ChamplainView state update
Jiří Techet [Mon, 22 Mar 2010 21:48:54 +0000 (22:48 +0100)]
Optimize ChamplainView state update

When profiling with Oprofile and gprof2dot, view_update_state() consumed
nearly one half of CPU cycles (CPU used by libchamplain only without
any other libraries). This was because we were cycling through all
the tiles to determine the state and the state was updated for every
tile, which lead to quadratic complexity. This patch fixes this by
updating a counter of tiles that are being filled.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoMove variable declarations to the top of view_load_visible_tiles()
Jiří Techet [Sun, 21 Mar 2010 03:26:27 +0000 (04:26 +0100)]
Move variable declarations to the top of view_load_visible_tiles()

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix freeing const string
Jiří Techet [Sun, 21 Mar 2010 03:12:06 +0000 (04:12 +0100)]
Fix freeing const string

g_get_tmp_dir () returns const string that must not be deallocated.
Copy it first.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoDisplay polygons again
Jiří Techet [Sat, 20 Mar 2010 17:05:14 +0000 (18:05 +0100)]
Display polygons again

Still mystery what the original code was good for - commenting out
as it causes that the polygon is not displayed.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoGet rid of public privates for good
Jiří Techet [Sat, 20 Mar 2010 16:27:18 +0000 (17:27 +0100)]
Get rid of public privates for good

Gets rid of shared private in ChamplainBaseMarker and corrects variable
naming conventions in CHamplainBaseMarker.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoAccess private members through priv member of the class. Everywhere.
Jiří Techet [Sat, 20 Mar 2010 13:30:28 +0000 (14:30 +0100)]
Access private members through priv member of the class. Everywhere.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix violations against my own coding style
Jiří Techet [Sat, 20 Mar 2010 01:21:30 +0000 (02:21 +0100)]
Fix violations against my own coding style

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoCoding style fixes
Jiří Techet [Sat, 20 Mar 2010 01:17:28 +0000 (02:17 +0100)]
Coding style fixes

The most boring hour in my life...

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoLie a bit about not fading in
Jiří Techet [Fri, 19 Mar 2010 21:00:36 +0000 (22:00 +0100)]
Lie a bit about not fading in

Even if fade-in is set to false, fade in a little. This is much more
eye-pleasing than displaying the tile directly, which causes flickering
effect when panning and loading tiles from the cache. Slight fade-in
looks much more natural and when it's short enough, it's not annoying.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoMake fade-in a property of a tile
Jiří Techet [Fri, 19 Mar 2010 20:49:37 +0000 (21:49 +0100)]
Make fade-in a property of a tile

fade-in should be independent of champlain_tile_set_content() for greater
flexibility. In addition, memphis and error tile sources load tiles fast
and don't need to be faded in.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix changing map source doesn't update the display
Jiří Techet [Fri, 19 Mar 2010 00:39:04 +0000 (01:39 +0100)]
Fix changing map source doesn't update the display

Commit that was supposed to move all tile removal to
view_load_visible_tiles() was a little bit too aggressive...

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoCall viewport_pos_changed_cb() only when we want to
Jiří Techet [Fri, 19 Mar 2010 00:32:58 +0000 (01:32 +0100)]
Call viewport_pos_changed_cb() only when we want to

We don't want to unnecessarily update viewport within another update
so block the signal in these functions when updating viewport.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove my last question/comment
Jiří Techet [Thu, 18 Mar 2010 23:40:44 +0000 (00:40 +0100)]
Remove my last question/comment

Replace the original code with what I think might be correct even though
I still don't understand its purpose...

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoProper fix of bug 575133
Jiří Techet [Thu, 18 Mar 2010 23:36:43 +0000 (00:36 +0100)]
Proper fix of bug 575133

Cures causes instead of symptoms. More description in the patch.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove update of tile map
Jiří Techet [Thu, 18 Mar 2010 21:16:45 +0000 (22:16 +0100)]
Remove update of tile map

Not needed since the new spiral loading doesn't revisit already loaded
tiles.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoPosition tiles even when they don't need to be loaded
Jiří Techet [Thu, 18 Mar 2010 21:15:18 +0000 (22:15 +0100)]
Position tiles even when they don't need to be loaded

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoLoad tiles in true spiral pattern
Jiří Techet [Thu, 18 Mar 2010 00:17:25 +0000 (01:17 +0100)]
Load tiles in true spiral pattern

Despite author's comment, the tiles were _not_ loaded in concentric squares
(hint: the number of tiles present one square is not equal to 4*side_size).
This patch loads tiles in true spiral manner, which, apart from not loading
the same tile several times, also looks much nicer.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoMove fill_tile() call from view_load_visible_tiles() to an idle callback
Jiří Techet [Wed, 17 Mar 2010 23:34:59 +0000 (00:34 +0100)]
Move fill_tile() call from view_load_visible_tiles() to an idle callback

Even though we load tiles asynchronously, the preparation steps take
some time. Inside the inner loop of view_load_visible_tiles() the time
is multiplied by the number of loaded tiles. For improved interactivity it
is better to load tiles outside of the loop in idle functions so it can be
interleaved with other main loop calls. This significantly improves
interactivity in full screen launcher-gtk demo.

Signed-off-by: Jiří Techet <techet@gmail.com>
add commit

7 years agoRevert buggy commit
Jiří Techet [Wed, 17 Mar 2010 22:52:53 +0000 (23:52 +0100)]
Revert buggy commit

My assumption that priv->latitude and priv->longitude don't change in
resize_viewport() was clearly wrong as I hit the bug. What's going
on here?

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoCode cleanup
Jiří Techet [Wed, 17 Mar 2010 22:28:47 +0000 (23:28 +0100)]
Code cleanup

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove all invalid tiles within view_load_visible_tiles()
Jiří Techet [Wed, 17 Mar 2010 22:27:58 +0000 (23:27 +0100)]
Remove all invalid tiles within view_load_visible_tiles()

Now view_load_visible_tiles() is the only function that creates or
destroys tiles, which eliminates all special cases where we might
forget to destroy tiles.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoUse tile-presence map instead of going through tile list over and over
Jiří Techet [Wed, 17 Mar 2010 22:13:57 +0000 (23:13 +0100)]
Use tile-presence map instead of going through tile list over and over

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoSome cleanups in view_load_visible_tiles()
Jiří Techet [Wed, 17 Mar 2010 21:48:33 +0000 (22:48 +0100)]
Some cleanups in view_load_visible_tiles()

Rename x_last to x_end to make it clear that this coordinate doesn't belong
to the range of loaded tiles. Fix one range check and use x_count, y_count
where possible.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix zoom level 0 not displayed
Jiří Techet [Tue, 16 Mar 2010 01:01:09 +0000 (02:01 +0100)]
Fix zoom level 0 not displayed

(One should be more careful when simplifying "obvious" things...)

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix zoom-out at low zoom level
Jiří Techet [Tue, 16 Mar 2010 00:40:40 +0000 (01:40 +0100)]
Fix zoom-out at low zoom level

When ChamplainZoomLevel was removed, removing tiles from the map layer
was removed as well, which is a problem at low zoom levels as there
are no tiles and the old tiles remained there.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoSimplify and optimize time-based redrawing
Jiří Techet [Tue, 16 Mar 2010 00:10:21 +0000 (01:10 +0100)]
Simplify and optimize time-based redrawing

Instead of evaluating time every time in viewport_pos_changed_cb(), we
can use a timer that sets the flag determining whether we should redraw
the viewport in periodic intervals.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoBase viewport update on time as well
Jiří Techet [Mon, 15 Mar 2010 01:06:28 +0000 (02:06 +0100)]
Base viewport update on time as well

Viewport is currently updated only based on the amount of scrolled pixels
(100). However, when the viewport is slowing down in the kinetic mode,
this can result in a blank space appearing in the top of the window for
quite a long time because the movement is slow and doesn't reach the 100
pixel margin needed for update. This patch adds one more criterion - time,
which makes to perform the updates at least 4 times a second, no matter
how many pixels were scrolled.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoReplace pow() with bit shift to be sure we are fast
Jiří Techet [Mon, 15 Mar 2010 00:02:29 +0000 (01:02 +0100)]
Replace pow() with bit shift to be sure we are fast

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoCompletely remove ChamplainZoomLevel
Jiří Techet [Sun, 14 Mar 2010 23:47:56 +0000 (00:47 +0100)]
Completely remove ChamplainZoomLevel

After looking at it, I have realized that this class became absolutely
useless now -> remove it.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoIterate through container using clutter_group_get_nth_child() when the container...
Jiří Techet [Sun, 14 Mar 2010 18:35:20 +0000 (19:35 +0100)]
Iterate through container using clutter_group_get_nth_child() when the container is not modified

Use of clutter_group_get_nth_child() is slightly simpler than using
clutter_container_get_children() [no forgotten free() at the end] and
there is no danger when the container is not modified inside the loop.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoWhen removing tiles from container, iterate using clutter_container_get_children()
Jiří Techet [Sun, 14 Mar 2010 18:11:42 +0000 (19:11 +0100)]
When removing tiles from container, iterate using clutter_container_get_children()

Iterating through container using clutter_group_get_nth_child()
and removing them inside the loop relies on the stability of deletion in
ClutterGroup, which isn't documented anywhere. Better to use
clutter_container_get_children() here.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove extra condition
Jiří Techet [Sun, 14 Mar 2010 16:00:21 +0000 (17:00 +0100)]
Remove extra condition

The condition below is a proper superset of the removed condition

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoFix scroll_to() for CHAMPLAIN_SCROLL_MODE_PUSH
Jiří Techet [Sun, 14 Mar 2010 15:53:21 +0000 (16:53 +0100)]
Fix scroll_to() for CHAMPLAIN_SCROLL_MODE_PUSH

Using tidy_viewport_set_origin() in scroll_to() isn't correct because
it doesn't load the necessary tiles (reproducible by scrolling using
keyboard arrows). Use champlain_view_center_on() instead.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoRemove the workaround related to resize_viewport()
Jiří Techet [Sun, 14 Mar 2010 15:15:35 +0000 (16:15 +0100)]
Remove the workaround related to resize_viewport()

I don't see anything in resize_viewport that could possibly change
priv->latitude and priv->longitude so this workaround is not probably
needed any more.

Signed-off-by: Jiří Techet <techet@gmail.com>
7 years agoSet zoom level only if champlain_zoom_level_zoom_to() is successful
Jiří Techet [Sun, 14 Mar 2010 13:46:03 +0000 (14:46 +0100)]
Set zoom level only if champlain_zoom_level_zoom_to() is successful

Signed-off-by: Jiří Techet <techet@gmail.com>