}
static void
-map_zoom_changed(GtkWidget *widget, gint zoom)
+map_zoom_changed(GtkWidget *widget, gint zoom, gpointer data)
{
-g_debug("New zoom: %d", zoom);
+GtkWidget *zoomer=(GtkWidget *)data;
+
+gtk_range_set_value(GTK_RANGE(zoomer), zoom);
return TRUE;
}
gtk_map_set_tile_repository(map, rd);
gtk_box_pack_start(GTK_BOX(hbox), map, TRUE, TRUE, 0);
-g_signal_connect(G_OBJECT(map), "zoom-changed", G_CALLBACK(map_zoom_changed), NULL);
-
zoomer=gtk_vscale_new_with_range(0,17,1);
g_signal_connect(G_OBJECT(zoomer), "value-changed", G_CALLBACK(map_zoom), NULL);
+g_signal_connect(G_OBJECT(map), "zoom-changed", G_CALLBACK(map_zoom_changed), zoomer);
+
gtk_box_pack_start(GTK_BOX(hbox), zoomer, FALSE, FALSE, 0);
btn_left=gtk_button_new_with_label("L");