]> err.no Git - mapper/commitdiff
misc
authorKaj-Michael Lang <milang@angel.tal.org>
Sat, 21 Jul 2007 17:54:57 +0000 (20:54 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Sat, 21 Jul 2007 17:54:57 +0000 (20:54 +0300)
intltool-update
src/config.h.in
src/gps-panels.c
src/route.c
src/track.c

index 43a83d0c009c11b39ecd543a5cfe221f3543d8bc..986e88e37f59d299defeb7ddb32ecabad1649f23 100755 (executable)
@@ -565,7 +565,7 @@ sub Console_WriteError_InvalidOption
 
 sub GenerateHeaders
 {
-    my $EXTRACT = "/home/milang/devel/mapper/intltool-extract";
+    my $EXTRACT = "/data/repos/mapper/intltool-extract";
     chomp $EXTRACT;
 
     $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
index 48035eafd54d5e41026591e1a7c950613a372ad7..1a55248bb0647b28f6949b9095d7c2c7b7a9098f 100644 (file)
@@ -24,6 +24,9 @@
 /* Define if your <locale.h> file defines LC_MESSAGES. */
 #undef HAVE_LC_MESSAGES
 
+/* Defined if you have libexpat */
+#undef HAVE_LIBEXPAT
+
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
index 9d375685dc3bc140dca28bf8f5d0db3167d22f59..f0bd8469924117cd98b48fc873858fe468b28d40 100644 (file)
@@ -737,146 +737,166 @@ gps_display_details(void)
        return TRUE;
 }
 
+void gps_details_dialog(void)
+{
+GtkWidget *dialog;
+
+dialog = gtk_dialog_new_with_buttons(_("GPS Details"),
+                    GTK_WINDOW(_window),
+                    GTK_DIALOG_MODAL, GTK_STOCK_OK,
+                    GTK_RESPONSE_ACCEPT, NULL);
+
+gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 300);
+
+gtk_widget_show_all(dialog);
+_satdetails_on = TRUE;
+gps_display_details();
+while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {
+       _satdetails_on = FALSE;
+       break;
+}
+gtk_widget_destroy(dialog);
+
+}
+
 void gps_details(void)
 {
-       GtkWidget *dialog;
-       GtkWidget *table;
-       GtkWidget *label;
-       GtkWidget *notebook;
-       printf("%s()\n", __PRETTY_FUNCTION__);
+GtkWidget *dialog;
+GtkWidget *table;
+GtkWidget *label;
+GtkWidget *notebook;
+printf("%s()\n", __PRETTY_FUNCTION__);
 
-       dialog = gtk_dialog_new_with_buttons(_("GPS Details"),
-                                            GTK_WINDOW(_window),
-                                            GTK_DIALOG_MODAL, GTK_STOCK_OK,
-                                            GTK_RESPONSE_ACCEPT, NULL);
-
-       gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 300);
-
-       gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
-                          notebook = gtk_notebook_new(), TRUE, TRUE, 0);
-
-       /* textual info */
-       gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
-                                table = gtk_table_new(4, 6, FALSE),
-                                label = gtk_label_new(_("GPS Information")));
-
-       _sat_details_panel = gtk_drawing_area_new();
-       gtk_widget_set_size_request(_sat_details_panel, 300, 300);
-       /* sat details info */
-       gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
-                                _sat_details_panel,
-                                label =
-                                gtk_label_new(_("Satellites details")));
-       g_signal_connect(G_OBJECT(_sat_details_panel), "expose_event",
-                        G_CALLBACK(sat_details_panel_expose), NULL);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Latitude")),
-                        0, 1, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_lat = gtk_label_new(" --- "),
-                        1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_lat), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Longitude")),
-                        0, 1, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_lon = gtk_label_new(" --- "),
-                        1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_lon), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Speed")),
-                        0, 1, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_spd = gtk_label_new(" --- "),
-                        1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_spd), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Altitude")),
-                        0, 1, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_alt = gtk_label_new(" --- "),
-                        1, 2, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_alt), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Heading")),
-                        0, 1, 4, 5, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_hea = gtk_label_new(" --- "),
-                        1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_hea), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Local time")),
-                        0, 1, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_tim = gtk_label_new(" --:--:-- "),
-                        1, 2, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_tim), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Sat in view")),
-                        2, 3, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_vie = gtk_label_new("0"),
-                        3, 4, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_vie), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Sat in use")),
-                        2, 3, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_use = gtk_label_new("0"),
-                        3, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_use), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Fix")),
-                        2, 3, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_fix = gtk_label_new(_("nofix")),
-                        3, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_fix), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Fix Quality")),
-                        2, 3, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_fqu = gtk_label_new(_("none")),
-                        3, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_fqu), 0.f, 0.5f);
-
-       gtk_table_attach(GTK_TABLE(table),
-                        label = gtk_label_new(_("Max speed")),
-                        2, 3, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
-       gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-       gtk_table_attach(GTK_TABLE(table),
-                        _sdi_msp = gtk_label_new(" --- "),
-                        3, 4, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
-       gtk_misc_set_alignment(GTK_MISC(_sdi_msp), 0.f, 0.5f);
-
-       gtk_widget_show_all(dialog);
-       _satdetails_on = TRUE;
-       gps_display_details();
-       while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {
-               _satdetails_on = FALSE;
-               break;
-       }
-       gtk_widget_destroy(dialog);
+dialog = gtk_dialog_new_with_buttons(_("GPS Details"),
+                    GTK_WINDOW(_window),
+                    GTK_DIALOG_MODAL, GTK_STOCK_OK,
+                    GTK_RESPONSE_ACCEPT, NULL);
+
+gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 300);
+gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                  notebook = gtk_notebook_new(), TRUE, TRUE, 0);
+
+/* textual info */
+gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
+                        table = gtk_table_new(4, 6, FALSE),
+                        label = gtk_label_new(_("GPS Information")));
+
+_sat_details_panel = gtk_drawing_area_new();
+gtk_widget_set_size_request(_sat_details_panel, 300, 300);
+/* sat details info */
+gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
+                        _sat_details_panel,
+                        label = gtk_label_new(_("Satellites details")));
+g_signal_connect(G_OBJECT(_sat_details_panel), "expose_event",
+                G_CALLBACK(sat_details_panel_expose), NULL);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Latitude")),
+                0, 1, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_lat = gtk_label_new(" --- "),
+                1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_lat), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Longitude")),
+                0, 1, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_lon = gtk_label_new(" --- "),
+                1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_lon), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Speed")),
+                0, 1, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_spd = gtk_label_new(" --- "),
+                1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_spd), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Altitude")),
+                0, 1, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_alt = gtk_label_new(" --- "),
+                1, 2, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_alt), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Heading")),
+                0, 1, 4, 5, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_hea = gtk_label_new(" --- "),
+                1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_hea), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Local time")),
+                0, 1, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_tim = gtk_label_new(" --:--:-- "),
+                1, 2, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_tim), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Sat in view")),
+                2, 3, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_vie = gtk_label_new("0"),
+                3, 4, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_vie), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Sat in use")),
+                2, 3, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_use = gtk_label_new("0"),
+                3, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_use), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Fix")),
+                2, 3, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_fix = gtk_label_new(_("nofix")),
+                3, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_fix), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Fix Quality")),
+                2, 3, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_fqu = gtk_label_new(_("none")),
+                3, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_fqu), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+                label = gtk_label_new(_("Max speed")),
+                2, 3, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+                _sdi_msp = gtk_label_new(" --- "),
+                3, 4, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_msp), 0.f, 0.5f);
+
+gtk_widget_show_all(dialog);
+_satdetails_on = TRUE;
+gps_display_details();
+while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {
+       _satdetails_on = FALSE;
+       break;
+}
+gtk_widget_destroy(dialog);
 
-       vprintf("%s(): return\n", __PRETTY_FUNCTION__);
+vprintf("%s(): return\n", __PRETTY_FUNCTION__);
 }
index 55e406d31b115ca75a995e186ea7f017d0f21e7c..6d4a1363c1ce44b5c5cf38d852ada2e729f24fdf 100644 (file)
@@ -55,10 +55,14 @@ if (open_file(&buffer, NULL, &size, &_route_dir_uri, NULL, GTK_FILE_CHOOSER_ACTI
 
                map_force_redraw();
                MACRO_BANNER_SHOW_INFO(_window, _("Route Opened"));
-       } else
+               return TRUE;
+       } else {
                popup_error(_window, _("Error parsing GPX file."));
-       g_free(buffer);
+               g_free(buffer);
+               return FALSE;
+       }
 }
+return FALSE;
 }
 
 gboolean
index ad9b12e525c28083ca79b31905a8dbbcbaf2b012..14055aa914bf02a45b230215dd6edc5f35299a3a 100644 (file)
@@ -254,9 +254,9 @@ gboolean track_open(void)
                        map_force_redraw();
                        MACRO_BANNER_SHOW_INFO(_window, _("Track Opened"));
                        r = TRUE;
-               } else
+               } else {
                        popup_error(_window, _("Error parsing GPX file."));
-
+               }
                g_free(buffer);
        }
        return r;
@@ -267,14 +267,13 @@ gboolean track_save(void)
        GnomeVFSHandle *handle;
        gboolean r = FALSE;
 
-/*     if (open_file(NULL, &handle, NULL, NULL, &_track_file_uri, GTK_FILE_CHOOSER_ACTION_SAVE)) { */
-
        if (file_save(_track_file_uri, _track_file_uri, &handle)) {
                if (write_gpx(&_track, handle)) {
                        MACRO_BANNER_SHOW_INFO(_window, _("Track Saved"));
                        r = TRUE;
-               } else
+               } else {
                        popup_error(_window, _("Error writing GPX file."));
+               }
                gnome_vfs_close(handle);
        }
        return r;