Minor thingies..
authorwellu <wellu@wellu.org>
Thu, 25 Sep 2008 17:59:02 +0000 (17:59 +0000)
committerwellu <wellu@wellu.org>
Thu, 25 Sep 2008 17:59:02 +0000 (17:59 +0000)
git-svn-id: file:///svnroot/speedometer/trunk@37 df364472-da61-43ef-8a67-511c89aa921b

ui.c
util.c

diff --git a/ui.c b/ui.c
index df4f4b9..0fa47fc 100644 (file)
--- a/ui.c
+++ b/ui.c
@@ -74,6 +74,7 @@ void repaint_all_digits(AppData* appdata) {
        gtk_widget_queue_draw(GTK_WIDGET(appdata->digit_array[2]));
 }
 
+// used only in testing...
 void randomize(AppData* appdata) {
        g_assert(appdata);
        gint32 n = g_random_int_range(0, 3);
@@ -130,7 +131,6 @@ void create_ui(AppData* appdata) {
 
        gtk_container_add(GTK_CONTAINER(appdata->window), GTK_WIDGET(vbox));
 
-
        // set backgrounds black
        set_widget_bg_black(GTK_WIDGET(appdata->window));
        set_widget_bg_black(bottom_e);
diff --git a/util.c b/util.c
index ed20591..a20f0b1 100644 (file)
--- a/util.c
+++ b/util.c
@@ -14,7 +14,8 @@
 
        You should have received a copy of the GNU General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.
- ****/
+****/
+
 #include <math.h>
 #include <location/location-gps-device.h>
 #include <location/location-gpsd-control.h>
@@ -25,6 +26,9 @@
 #include "callbacks.h"
 #include "ui.h"
 
+
+gdouble unit_array[] = {3.6};
+
 #define GCONF_KEY "/apps/Maemo/speedometer/disclaimer"
 
 static LocationGPSDevice *device = NULL;
@@ -66,11 +70,13 @@ void interpret_speed_from_gps(AppData* appdata, gdouble speed) {
 
        g_print("Speed is %s km/h\n", charspeed);
 
+       // set the main digits
        guint i = 3;
        while(i) {
                i--;
                set_nth_digit(appdata, i, g_ascii_digit_value(charspeed[i]));
        }
+
        repaint_all_digits(appdata);
 
        g_free(charspeed);
@@ -87,7 +93,7 @@ static show_dialog() {
                        "which means (among other things) that you don't have to pay "
                        "a dime for it. "
                        "If you think, however, that this software is worth it, you "
-                       "can always drop me a postcard.\n\n"
+                       "can always drop me a postcard. (or a speeding ticket :)\n\n"
                        "Wellu Mäkinen\n"
                        "PO BOX\n"
                        "33580 Tampere\n"