]> err.no Git - libchamplain/commitdiff
Set the current zoom level in the zoom spin button
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Sun, 14 Jun 2009 14:14:38 +0000 (16:14 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 14 Jun 2009 15:11:18 +0000 (11:11 -0400)
bindings/perl/Champlain/examples/gtk2.pl

index 0e8b195e9ba2e14fb01eca2c504683cd09772ade..b6e226391a3cd66dc988de79d6895f2c3b875f07 100755 (executable)
@@ -70,6 +70,7 @@ sub main {
        $toolbox->add(create_combo_box($map));
 
        my $spin = Gtk2::SpinButton->new_with_range(0, 20, 1);
+       $spin->set_value($map->get_zoom_level);
        $spin->signal_connect('changed', sub {
                $map->set_zoom_level($spin->get_value_as_int);
        });