]> err.no Git - libchamplain/commitdiff
Use the dedicated setters instead of set('prop', 'value');
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Sun, 10 May 2009 20:09:18 +0000 (22:09 +0200)
committerEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Sun, 10 May 2009 20:09:18 +0000 (22:09 +0200)
bindings/perl/Champlain/examples/capitals.pl
bindings/perl/Champlain/examples/gtk2.pl
bindings/perl/Champlain/examples/image.pl
bindings/perl/Champlain/examples/launcher.pl

index 36f072f5b111bcc2979b8657c445cb2f92e60864..8fc5447ef10674853658a4f552c389757775e896 100755 (executable)
@@ -37,7 +37,8 @@ sub main {
        my $gtk2_map = Gtk2::Champlain::ViewEmbed->new($map);
        $gtk2_map->set_size_request(640, 480);
        $map->center_on(0, 0);
-       $map->set('scroll-mode', 'kinetic', 'zoom-level', 3);
+       $map->set_scroll_mode('kinetic');
+       $map->set_zoom_level(3);
        
        my $layer = Champlain::Layer->new();
        $map->add_layer($layer);
index 402b8a28a66688c0465a4f1453e8cc213e10a949..ca32066878beaeeece04895bcff0e8e83c308675 100755 (executable)
@@ -25,7 +25,8 @@ sub main {
        # Create the map view
        my $map = Champlain::View->new();
        my $gtk2_map = Gtk2::Champlain::ViewEmbed->new($map);
-       $map->set('scroll-mode', 'kinetic', 'zoom-level', 5);
+       $map->set_scroll_mode('kinetic');
+       $map->set_zoom_level(5);
        $gtk2_map->set_size_request(640, 480);
        
        # Create the markers and marker layer
@@ -70,7 +71,7 @@ sub main {
 
        my $spin = Gtk2::SpinButton->new_with_range(0, 20, 1);
        $spin->signal_connect('changed', sub {
-               $map->set('zoom-level', $spin->get_value_as_int);
+               $map->set_zoom_level($spin->get_value_as_int);
        });
        $map->signal_connect('notify::zoom-level', sub {
                $spin->set_value($map->get('zoom-level'));
@@ -180,7 +181,7 @@ sub create_marker_layer {
        $layer->add($marker);
 
        $marker = Champlain::Marker->new_with_text("Bratislava", "Sans 15", $orange);
-       $marker->set_position(47.130885, -70.764141);
+       $marker->set_position(48.148377, 17.107311);
        $layer->add($marker);
 
        $layer->show();
index ca81b00b82709fadcac4b2b89f77c3e58d435395..c66310668d007ade8956807d8e84646b7bb8f71d 100755 (executable)
@@ -34,7 +34,8 @@ sub main {
        # Create the map view
        my $map = Champlain::View->new();
        $map->center_on(47.130885, -70.764141);
-       $map->set('scroll-mode', 'kinetic', 'zoom-level', 5);
+       $map->set_scroll_mode('kinetic');
+       $map->set_zoom_level(5);
        my $gtk2_map = Gtk2::Champlain::ViewEmbed->new($map);
        $gtk2_map->set_size_request(640, 480);
        
index b0e980a6d06ba7d7bdbd248afb4061e7c450ef83..c1b9b6e8ad2c0a5054a504b531800c43e35dbf63 100755 (executable)
@@ -23,7 +23,7 @@ sub main {
        
        # Create the map view
        my $map = Champlain::View->new();
-       $map->set('scroll-mode', 'kinetic');
+       $map->set_scroll_mode('kinetic');
        $map->set_size(800, 600);
        $stage->add($map);