X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/6af463da374056ecb9fc79243c849e3d7f8d6950..d260d7985116255a0eb2232edfd8a0dbc29f31d6:/src/vikgeoreflayer.c?ds=inline diff --git a/src/vikgeoreflayer.c b/src/vikgeoreflayer.c index 37b08b77..57915052 100644 --- a/src/vikgeoreflayer.c +++ b/src/vikgeoreflayer.c @@ -24,12 +24,10 @@ #endif #include "viking.h" -#include "vikgeoreflayer_pixmap.h" -#include -#include -#include +#include #include #include +#include #include "icons/icons.h" @@ -67,16 +65,16 @@ static gboolean georef_layer_zoom_press ( VikGeorefLayer *vgl, GdkEventButton *e static VikToolInterface georef_tools[] = { { N_("Georef Move Map"), (VikToolConstructorFunc) georef_layer_move_create, NULL, NULL, NULL, (VikToolMouseFunc) georef_layer_move_press, NULL, (VikToolMouseFunc) georef_layer_move_release, - (VikToolKeyFunc) NULL, GDK_CURSOR_IS_PIXMAP, &cursor_geomove }, + (VikToolKeyFunc) NULL, GDK_CURSOR_IS_PIXMAP, &cursor_geomove_pixbuf }, { N_("Georef Zoom Tool"), (VikToolConstructorFunc) georef_layer_zoom_create, NULL, NULL, NULL, (VikToolMouseFunc) georef_layer_zoom_press, NULL, NULL, - (VikToolKeyFunc) NULL, GDK_CURSOR_IS_PIXMAP, &cursor_geozoom }, + (VikToolKeyFunc) NULL, GDK_CURSOR_IS_PIXMAP, &cursor_geozoom_pixbuf }, }; VikLayerInterface vik_georef_layer_interface = { "GeoRef Map", - &georeflayer_pixbuf, /*icon */ + &vikgeoreflayer_pixbuf, /*icon */ georef_tools, sizeof(georef_tools) / sizeof(VikToolInterface), @@ -300,7 +298,7 @@ static gboolean world_file_read_line ( gchar *buffer, gint size, FILE *f, GtkWid } if ( use_value ) { - gdouble val = strtod ( buffer, NULL ); + gdouble val = g_strtod ( buffer, NULL ); gtk_spin_button_set_value ( GTK_SPIN_BUTTON(widget), val > 0 ? val : -val ); } return TRUE; @@ -327,8 +325,8 @@ static void georef_layer_dialog_load ( GtkWidget *pass_along[4] ) else { gchar *buffer = g_malloc ( 1024 * sizeof(gchar) ); - if ( world_file_read_line ( buffer, 1024, f, pass_along[0], TRUE ) && world_file_read_line ( buffer, 1024, f, pass_along[1], TRUE ) - && world_file_read_line ( buffer, 1024, f, pass_along[0], FALSE ) && world_file_read_line ( buffer, 1024, f, pass_along[0], FALSE ) + if ( world_file_read_line ( buffer, 1024, f, pass_along[0], TRUE ) && world_file_read_line ( buffer, 1024, f, pass_along[0], FALSE) + && world_file_read_line ( buffer, 1024, f, pass_along[0], FALSE ) && world_file_read_line ( buffer, 1024, f, pass_along[1], TRUE) && world_file_read_line ( buffer, 1024, f, pass_along[2], TRUE ) && world_file_read_line ( buffer, 1024, f, pass_along[3], TRUE ) ) { g_free ( buffer ); @@ -407,18 +405,22 @@ static gboolean georef_layer_dialog ( VikGeorefLayer **vgl, gpointer vp, GtkWind ce_label = gtk_label_new ( _("Corner pixel easting:") ); ce_spin = gtk_spin_button_new ( (GtkAdjustment *) gtk_adjustment_new ( 4, 0.0, 1500000.0, 1, 5, 5 ), 1, 4 ); + gtk_widget_set_tooltip_text ( GTK_WIDGET(ce_spin), _("the UTM \"easting\" value of the upper-right corner pixel of the map") ); cn_label = gtk_label_new ( _("Corner pixel northing:") ); cn_spin = gtk_spin_button_new ( (GtkAdjustment *) gtk_adjustment_new ( 4, 0.0, 9000000.0, 1, 5, 5 ), 1, 4 ); + gtk_widget_set_tooltip_text ( GTK_WIDGET(cn_spin), _("the UTM \"northing\" value of the upper-right corner pixel of the map") ); xlabel = gtk_label_new ( _("X (easting) scale (mpp): ")); ylabel = gtk_label_new ( _("Y (northing) scale (mpp): ")); xspin = gtk_spin_button_new ( (GtkAdjustment *) gtk_adjustment_new ( 4, VIK_VIEWPORT_MIN_ZOOM, VIK_VIEWPORT_MAX_ZOOM, 1, 5, 5 ), 1, 8 ); + gtk_widget_set_tooltip_text ( GTK_WIDGET(xspin), _("the scale of the map in the X direction (meters per pixel)") ); yspin = gtk_spin_button_new ( (GtkAdjustment *) gtk_adjustment_new ( 4, VIK_VIEWPORT_MIN_ZOOM, VIK_VIEWPORT_MAX_ZOOM, 1, 5, 5 ), 1, 8 ); + gtk_widget_set_tooltip_text ( GTK_WIDGET(yspin), _("the scale of the map in the Y direction (meters per pixel)") ); imagelabel = gtk_label_new ( _("Map Image:") ); - imageentry = vik_file_entry_new (); + imageentry = vik_file_entry_new (GTK_FILE_CHOOSER_ACTION_OPEN); if (*vgl) {