From: Emmanuel Rodriguez Date: Sun, 29 Mar 2009 09:29:40 +0000 (+0200) Subject: Add the button 'Home' using a go_to() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2916fad44cd62c8fd52a19c82360e401aae040f8;p=libchamplain Add the button 'Home' using a go_to() --- 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')) {