]> git.itanic.dy.fi Git - maemo-mapper/commitdiff
Made changes mentioned in changelog for Maemo Mapper v0.2.2.
authorgnuite <gnuite@gmail.com>
Mon, 29 May 2006 15:46:33 +0000 (15:46 +0000)
committergnuite <gnuite@gmail.com>
Mon, 29 May 2006 15:46:33 +0000 (15:46 +0000)
git-svn-id: svn+ssh://garage/var/lib/gforge/svnroot/maemo-mapper/trunk@7 6c538b50-5814-0410-93ad-8bdf4c0149d1

configure.ac
debian/changelog
maemo-mapper.c

index fed12ea9638bc1fb63634ea25e7e600b10f548ca..b7741385a8e3c931877787692c02b646cec6fd32 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(maemo-mapper, 0.2.1)
+AM_INIT_AUTOMAKE(maemo-mapper, 0.2.2)
 
 AC_PROG_CPP
 AC_PROG_INSTALL
index 3c1d9234731abc71c7d32f8b120ff23854dfebaf..44cd4df33331cc870bcfe4aad6f3a4cb434d8f8e 100644 (file)
@@ -1,8 +1,16 @@
+maemo-mapper (0.2.2) unstable; urgency=low
+
+  * Fixed erroneous hciconfig reset call.
+  * Added Armin Warda's "previous two center points define the default
+    top-left/bottom-right points in Download-By-Area" patch.
+
+ -- John Costigan <gnuite@gmail.com>  Sun, 28 May 2006 22:01:00 -0400
+
 maemo-mapper (0.2.1) unstable; urgency=low
 
   * Changed error-handling of NMEA messages to better support missing values.
 
- -- John Costigan <gnuite@gmail.com>  Fri, 12 May 2006 19:12:00 -0400
+ -- John Costigan <gnuite@gmail.com>  Fri, 26 May 2006 19:12:00 -0400
 
 maemo-mapper (0.2) unstable; urgency=low
 
@@ -23,7 +31,7 @@ maemo-mapper (0.2) unstable; urgency=low
   * Fixed some other minor, workaround-able bugs.
   * Added some more comment documentation to the code.
 
- -- John Costigan <gnuite@gmail.com>  Wed, 10 May 2006 21:16:00 -0400
+ -- John Costigan <gnuite@gmail.com>  Wed, 24 May 2006 21:16:00 -0400
 
 maemo-mapper (0.1) unstable; urgency=low
 
index cfb86738020dfc30384a139ada0a685213a5a1c5..9ba4dad0403489ba1ffc0a78836bbce92a7816c0 100644 (file)
@@ -447,6 +447,7 @@ static ConnState _conn_state = RCVR_OFF;
  * Each pixel in the current view is exactly (1 << _zoom) "units" wide. */
 static guint _zoom = 3; /* zoom level, from 0 to MAX_ZOOM. */
 static TrackPoint _center = {-1, -1}; /* current center location, X. */
+static TrackPoint _prev_center = {-1, -1}; /* previous center location, X */
 
 /** The "base tile" is the upper-left tile in the pixmap. */
 static guint _base_tilex = -5;
@@ -2675,6 +2676,8 @@ map_center_unit(guint new_center_unitx, guint new_center_unity)
     BOUND(new_center_unitx, _min_center.unitx, _max_center.unitx);
     BOUND(new_center_unity, _min_center.unity, _max_center.unity);
 
+    _prev_center.unitx  = _center.unitx;
+    _prev_center.unity  = _center.unity;
     _center.unitx = new_center_unitx;
     _center.unity = new_center_unity;
 
@@ -3893,8 +3896,8 @@ channel_cb_error(GIOChannel *src, GIOCondition condition, gpointer data)
 
     if(_fd != -1)
         /* Attempt to reset the radio if user has sudo access. */
-        system("/usr/bin/sudo -l | grep -q '/usr/sbin/hciconfig  *reset'"
-                " && sudo /usr/sbin/hciconfig");
+        system("/usr/bin/sudo -l | grep -q '/usr/sbin/hciconfig  *hci0  *reset'"
+                " && sudo /usr/sbin/hciconfig hci0 reset");
 
     if(_conn_state > RCVR_OFF)
     {
@@ -4804,7 +4807,7 @@ menu_cb_maps_dlarea(GtkAction *action)
     GtkWidget *txt_botright_lat;
     GtkWidget *txt_botright_lon;
     gchar buffer[32];
-    gfloat lat, lon;
+    gfloat lat, lon, prev_lat, prev_lon;
     GtkWidget *chk_zoom_levels[MAX_ZOOM];
     guint i;
     printf("%s()\n", __PRETTY_FUNCTION__);
@@ -4856,6 +4859,7 @@ menu_cb_maps_dlarea(GtkAction *action)
             0, 1, 2, 3, GTK_FILL, 0, 4, 0);
     gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
     unit2latlon(_center.unitx, _center.unity, lat, lon);
+    unit2latlon(_prev_center.unitx, _prev_center.unity, prev_lat, prev_lon);
     sprintf(buffer, "%f", lat);
     gtk_table_attach(GTK_TABLE(table),
             label = gtk_label_new(buffer),
@@ -4869,6 +4873,9 @@ menu_cb_maps_dlarea(GtkAction *action)
     gtk_label_set_selectable(GTK_LABEL(label), TRUE);
     gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
 
+    /* default values for Top Left and Bottom Right are defined by the
+     * rectangle of the current and the previous Center */
+
     /* Top Left. */
     gtk_table_attach(GTK_TABLE(table),
             label = gtk_label_new("Top-Left"),
@@ -4877,10 +4884,14 @@ menu_cb_maps_dlarea(GtkAction *action)
     gtk_table_attach(GTK_TABLE(table),
             txt_topleft_lat = gtk_entry_new(),
             1, 2, 3, 4, GTK_EXPAND | GTK_FILL, 0, 4, 0);
+    sprintf(buffer, "%2.6f", MAX(lat, prev_lat));
+    gtk_entry_set_text(GTK_ENTRY(txt_topleft_lat), buffer);
     gtk_entry_set_alignment(GTK_ENTRY(txt_topleft_lat), 1.f);
     gtk_table_attach(GTK_TABLE(table),
             txt_topleft_lon = gtk_entry_new(),
             2, 3, 3, 4, GTK_EXPAND | GTK_FILL, 0, 4, 0);
+    sprintf(buffer, "%2.6f", MIN(lon, prev_lon));
+    gtk_entry_set_text(GTK_ENTRY(txt_topleft_lon), buffer);
     gtk_entry_set_alignment(GTK_ENTRY(txt_topleft_lon), 1.f);
 
     /* Bottom Right. */
@@ -4891,10 +4902,14 @@ menu_cb_maps_dlarea(GtkAction *action)
     gtk_table_attach(GTK_TABLE(table),
             txt_botright_lat = gtk_entry_new(),
             1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 0, 4, 0);
+    sprintf(buffer, "%2.6f", MIN(lat, prev_lat));
+    gtk_entry_set_text(GTK_ENTRY(txt_botright_lat), buffer);
     gtk_entry_set_alignment(GTK_ENTRY(txt_botright_lat), 1.f);
     gtk_table_attach(GTK_TABLE(table),
             txt_botright_lon = gtk_entry_new(),
             2, 3, 4, 5, GTK_EXPAND | GTK_FILL, 0, 4, 0);
+    sprintf(buffer, "%2.6f", MAX(lon, prev_lon));
+    gtk_entry_set_text(GTK_ENTRY(txt_botright_lon), buffer);
     gtk_entry_set_alignment(GTK_ENTRY(txt_botright_lon), 1.f);