]> err.no Git - libchamplain/commitdiff
Add the button 'Home' using a go_to()
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Sun, 29 Mar 2009 09:29:40 +0000 (11:29 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 29 Mar 2009 15:32:58 +0000 (18:32 +0300)
bindings/perl/Champlain/examples/gtk2.pl

index 9748d0ff7dfe412205fa369896556b914d112f88..3d8432684e249b5acaf38b8d13a77d72ffa15000 100755 (executable)
@@ -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')) {