#define DEBUG_MAP_TIME 1
+#define MAP_THUMB_MARGIN (20)
+
/* Initial size */
#define BUF_WIDTH_TILES (4)
#define BUF_HEIGHT_TILES (3)
gtk_widget_add_events(map_widget, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
+#ifdef WITH_HILDON
+gtk_widget_set_extension_events(GTK_WIDGET(map_widget), GDK_EXTENSION_EVENTS_ALL);
+#endif
map_poi_init(map_widget);
}
static gboolean
-map_cb_button_press(GtkWidget * widget, GdkEventButton * event)
+map_cb_button_press(GtkWidget *widget, GdkEventButton *event)
{
_cmenu_position_x = event->x + 0.5;
_cmenu_position_y = event->y + 0.5;
+#if defined(WITH_HILDON_NEW)
+if (hildon_helper_event_button_is_finger(event)) {
+ if (event->x<MAP_THUMB_MARGIN)
+ map_pan(-PAN_UNITS, 0);
+
+ if (event->x>(_screen_width_pixels-MAP_THUMB_MARGIN))
+ map_pan(PAN_UNITS, 0);
+
+ if (event->y<MAP_THUMB_MARGIN)
+ map_pan(0, -PAN_UNITS);
+
+ if (event->y>(_screen_height_pixels-MAP_THUMB_MARGIN))
+ map_pan(0, PAN_UNITS);
+
+ return FALSE;
+}
+#endif
+
+
switch (event->button) {
case 1:
if (event->type==GDK_2BUTTON_PRESS) {