]> git.street.me.uk Git - andy/viking.git/blobdiff - src/vikgeoreflayer.c
Add a script to compute po/ChangeLog fragment
[andy/viking.git] / src / vikgeoreflayer.c
index e177be3393aced991744366b024362b214235e05..34947f34c5df8fa9bcffe72d00dcc834620f1b0c 100644 (file)
 #endif
 
 #include "viking.h"
-#include "vikgeoreflayer_pixmap.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
 #include <glib/gi18n.h>
+#include <string.h>
 
 #include "icons/icons.h"
 
@@ -66,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),
@@ -299,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;
@@ -326,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 );