From: Emmanuel Rodriguez Date: Sun, 10 May 2009 20:09:18 +0000 (+0200) Subject: Use the dedicated setters instead of set('prop', 'value'); X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca2ad3fa55083924ebc0f12a888724fcfea354eb;p=libchamplain Use the dedicated setters instead of set('prop', 'value'); --- diff --git a/bindings/perl/Champlain/examples/capitals.pl b/bindings/perl/Champlain/examples/capitals.pl index 36f072f..8fc5447 100755 --- a/bindings/perl/Champlain/examples/capitals.pl +++ b/bindings/perl/Champlain/examples/capitals.pl @@ -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); diff --git a/bindings/perl/Champlain/examples/gtk2.pl b/bindings/perl/Champlain/examples/gtk2.pl index 402b8a2..ca32066 100755 --- a/bindings/perl/Champlain/examples/gtk2.pl +++ b/bindings/perl/Champlain/examples/gtk2.pl @@ -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(); diff --git a/bindings/perl/Champlain/examples/image.pl b/bindings/perl/Champlain/examples/image.pl index ca81b00..c663106 100755 --- a/bindings/perl/Champlain/examples/image.pl +++ b/bindings/perl/Champlain/examples/image.pl @@ -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); diff --git a/bindings/perl/Champlain/examples/launcher.pl b/bindings/perl/Champlain/examples/launcher.pl index b0e980a..c1b9b6e 100755 --- a/bindings/perl/Champlain/examples/launcher.pl +++ b/bindings/perl/Champlain/examples/launcher.pl @@ -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);