]> git.itanic.dy.fi Git - maemo-mapper/commitdiff
Fixed minor initial-start-up issue.
authorgnuite <gnuite@gmail.com>
Sat, 3 Mar 2007 22:15:43 +0000 (22:15 +0000)
committergnuite <gnuite@gmail.com>
Sat, 3 Mar 2007 22:15:43 +0000 (22:15 +0000)
git-svn-id: svn+ssh://garage/var/lib/gforge/svnroot/maemo-mapper/trunk@89 6c538b50-5814-0410-93ad-8bdf4c0149d1

src/maemo-mapper.c

index de37be810b2d334e2d8628df0aef3875acc49df6..f0800cf671e0aefa2a0cc3d6c07794b3b2c2e34f 100644 (file)
@@ -6615,6 +6615,7 @@ static gboolean
 window_present()
 {
     static gint been_here = 0;
+    static gint done_here = 0;
     printf("%s()\n", __PRETTY_FUNCTION__);
 
     if(!been_here++)
@@ -6636,14 +6637,19 @@ window_present()
         /* Connect to receiver. */
         if(_enable_gps)
             rcvr_connect_now();
-    }
-    gtk_window_present(GTK_WINDOW(_window));
 
-    /* Re-enable any banners that might have been up. */
+        done_here++; /* Don't ask... */
+    }
+    if(done_here)
     {
-        ConnState old_state = _conn_state;
-        set_conn_state(RCVR_OFF);
-        set_conn_state(old_state);
+        gtk_window_present(GTK_WINDOW(_window));
+
+        /* Re-enable any banners that might have been up. */
+        {
+            ConnState old_state = _conn_state;
+            set_conn_state(RCVR_OFF);
+            set_conn_state(old_state);
+        }
     }
 
     vprintf("%s(): return\n", __PRETTY_FUNCTION__);