From: wellu Date: Tue, 14 Oct 2008 05:10:35 +0000 (+0000) Subject: Yet another mod. X-Git-Tag: 0.99~22 X-Git-Url: http://git.maemo.org/git/?p=speedometer;a=commitdiff_plain;h=6f7dff6fb2c487ea9a6fe2fc4bc33de446efcff3 Yet another mod. git-svn-id: file:///svnroot/speedometer/trunk@48 df364472-da61-43ef-8a67-511c89aa921b --- diff --git a/README b/README index 9fbcbec..913066d 100644 --- a/README +++ b/README @@ -2,25 +2,16 @@ This application and all its files are released under GPL license. See COPYING for the whole license text. There is one catch though.. If you really like this -program I would like to get a postcard from you. Include -word Speedometer in the card so I know that the card is -related to this software (like I'm getting tons of -anynomous postcards all around the world ;) +program I would like to get a postcard from you. This is *not* to say you have to but it would be very nice. See http://en.wikipedia.org/wiki/Cardware if you don't know what this means. - Anyway, here goes the address: -Wellu Mäkinen -PO Box +Wellu Mäkinen, +Poste restante, 33580 Tampere - FINLAND - - - - diff --git a/callbacks.c b/callbacks.c index 9159c60..ea30825 100644 --- a/callbacks.c +++ b/callbacks.c @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . -****/ + ****/ #include #include @@ -29,7 +29,7 @@ void location_changed(LocationGPSDevice* device, gpointer data) { if(device->fix->fields & LOCATION_GPS_DEVICE_SPEED_SET) { if(!isnan(device->fix->speed)) { interpret_and_set_speed(device->fix->speed); - } + } } } @@ -75,22 +75,16 @@ gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, HildonWindow* windo return FALSE; } -gboolean top_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data) { - g_assert(data); - +gboolean middle_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data) { gdouble x = event->x; - g_print("Top event box pressed at: %f\n", x); - AppData* appdata = (AppData*) data; - - if(x > 750) { - g_print("Exiting..\n"); + if (event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) { + g_assert(data); + AppData* appdata = (AppData*) data; g_signal_emit_by_name(appdata->window, "delete_event"); } - return TRUE; -} -gboolean middle_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data) { - gdouble x = event->x; + + g_print("Middle event box pressed at: %f\n", x); g_print("Changing conversion unit\n"); change_unit(); diff --git a/callbacks.h b/callbacks.h index 465482b..44911d0 100644 --- a/callbacks.h +++ b/callbacks.h @@ -32,9 +32,6 @@ gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, HildonWindow* windo // middle event box gboolean middle_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data); -// top event box -gboolean top_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data); - // bottom event box gboolean bottom_event_box_button_press(GtkWidget* widget, GdkEventButton* event, gpointer data); diff --git a/data/dot.png b/data/dot.png deleted file mode 100644 index 9f6ec4b..0000000 Binary files a/data/dot.png and /dev/null differ diff --git a/ui.c b/ui.c index 6328e7f..35e01e5 100644 --- a/ui.c +++ b/ui.c @@ -270,7 +270,7 @@ static void show_dialog() { "If you think, however, that this software is worth it, you " "can always drop me a postcard.\n\n" "Wellu Mäkinen\n" - "PO BOX\n" + "Poste restante\n" "33580 Tampere\n" "FINLAND"); gtk_dialog_run(GTK_DIALOG(dialog));