From 2916fad44cd62c8fd52a19c82360e401aae040f8 Mon Sep 17 00:00:00 2001 From: Emmanuel Rodriguez Date: Sun, 29 Mar 2009 11:29:40 +0200 Subject: [PATCH] Add the button 'Home' using a go_to() --- bindings/perl/Champlain/examples/gtk2.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/perl/Champlain/examples/gtk2.pl b/bindings/perl/Champlain/examples/gtk2.pl index 9748d0f..3d84326 100755 --- a/bindings/perl/Champlain/examples/gtk2.pl +++ b/bindings/perl/Champlain/examples/gtk2.pl @@ -48,6 +48,12 @@ sub main { }); $toolbox->add($child); + $child = Gtk2::Button->new_from_stock('gtk-home'); + $child->signal_connect('clicked', sub { + $map->go_to(48.218611, 17.146397); + }); + $toolbox->add($child); + $child = Gtk2::ToggleButton->new_with_label("Markers"); $child->signal_connect('toggled', sub { if ($layer->get('visible')) { -- 2.39.5