]> err.no Git - mapper/commitdiff
Fix enabling gps
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 24 Jan 2008 16:25:08 +0000 (18:25 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 24 Jan 2008 16:25:08 +0000 (18:25 +0200)
src/cb.c

index bcb2ab629da604a5a8ea5da456c25432a95e8225..494b0f424e24c40e0c8a6425d8718209b68b54e6 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
@@ -433,9 +433,11 @@ gboolean
 menu_cb_enable_gps(GtkAction * action)
 {
 if ((_enable_gps = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)))) {
+       if (_gps->io.address) {
                gps_conn_set_state(_gps, RCVR_DOWN);
-       if (gps_connect_now(_gps)==FALSE) {
-               popup_error(_window, _("Cannot enable GPS until a GPS Receiver MAC is set in the Settings dialog box."));
+               gps_connect_now(_gps);
+       } else {
+               popup_error(_window, _("Cannot enable GPS until a GPS Receiver has been configured in the GPS Settings dialog."));
                set_action_activate("gps_enabled", FALSE);
        }
 } else {