From 840dc8524b1b5f25b4df3873791f507fabb9063a Mon Sep 17 00:00:00 2001 From: Emmanuel Rodriguez Date: Mon, 13 Apr 2009 10:43:27 +0200 Subject: [PATCH] Champlain::Marker->new_with_text() gets passed only the parameters that are defined --- bindings/perl/Champlain/examples/gtk2.pl | 12 +++--------- bindings/perl/Champlain/examples/launcher.pl | 8 ++------ bindings/perl/Champlain/t/ChamplainMarker.t | 4 +--- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/bindings/perl/Champlain/examples/gtk2.pl b/bindings/perl/Champlain/examples/gtk2.pl index ca2f971..02a7d92 100755 --- a/bindings/perl/Champlain/examples/gtk2.pl +++ b/bindings/perl/Champlain/examples/gtk2.pl @@ -134,23 +134,17 @@ sub create_marker_layer { my $marker; - $marker = Champlain::Marker->new_with_text( - "Montr\x{e9}al", "Airmole 14", undef, undef - ); + $marker = Champlain::Marker->new_with_text("Montr\x{e9}al", "Airmole 14"); $marker->set_position(45.528178, -73.563788); $marker->set_reactive(TRUE); $marker->signal_connect_after("button-release-event", \&marker_button_release_cb, $map); $layer->add($marker); - $marker = Champlain::Marker->new_with_text( - "New York", "Sans 15", $white, undef - ); + $marker = Champlain::Marker->new_with_text("New York", "Sans 15", $white); $marker->set_position(40.77, -73.98); $layer->add($marker); - $marker = Champlain::Marker->new_with_text( - "Bratislava", "Sans 15", $orange, undef - ); + $marker = Champlain::Marker->new_with_text("Bratislava", "Sans 15", $orange); $marker->set_position(47.130885, -70.764141); $layer->add($marker); diff --git a/bindings/perl/Champlain/examples/launcher.pl b/bindings/perl/Champlain/examples/launcher.pl index c1b1711..c5cc5b7 100755 --- a/bindings/perl/Champlain/examples/launcher.pl +++ b/bindings/perl/Champlain/examples/launcher.pl @@ -105,17 +105,13 @@ sub create_marker_layer { my $marker; - $marker = Champlain::Marker->new_with_text( - "Montr\x{e9}al", "Airmole 14", undef, undef - ); + $marker = Champlain::Marker->new_with_text("Montr\x{e9}al", "Airmole 14"); $marker->set_position(45.528178, -73.563788); $marker->set_reactive(TRUE); $marker->signal_connect_after("button-release-event", \&marker_button_release_cb, $map); $layer->add($marker); - $marker = Champlain::Marker->new_with_text( - "New York", "Sans 15", $white, undef - ); + $marker = Champlain::Marker->new_with_text("New York", "Sans 15", $white); $marker->set_position(40.77, -73.98); $layer->add($marker); diff --git a/bindings/perl/Champlain/t/ChamplainMarker.t b/bindings/perl/Champlain/t/ChamplainMarker.t index 2b8dd1a..81b7647 100644 --- a/bindings/perl/Champlain/t/ChamplainMarker.t +++ b/bindings/perl/Champlain/t/ChamplainMarker.t @@ -37,9 +37,7 @@ sub test_new_with_text { my $marker; # Create a label without mandatory arguments - $marker = Champlain::Marker->new_with_text( - "Home", undef, undef, undef - ); + $marker = Champlain::Marker->new_with_text("Home"); isa_ok($marker, 'Champlain::Marker'); is($marker->get_text, 'Home', "new_with_text() sets 'text'"); ok($marker->get_font_name, "new_with_text(font = undef) sets 'font_name'"); -- 2.39.5