1446 |
|
|
1447 |
priv->idle_map_redraw = 0; |
priv->idle_map_redraw = 0; |
1448 |
|
|
1449 |
|
/* don't redraw the entire map while the OSD is doing */ |
1450 |
|
/* some animation or the like. This is to keep the animation */ |
1451 |
|
/* fluid */ |
1452 |
|
if (priv->osd->busy(priv->osd)) |
1453 |
|
return FALSE; |
1454 |
|
|
1455 |
/* the motion_notify handler uses priv->pixmap to redraw the area; if we |
/* the motion_notify handler uses priv->pixmap to redraw the area; if we |
1456 |
* change it while we are dragging, we will end up showing it in the wrong |
* change it while we are dragging, we will end up showing it in the wrong |
1457 |
* place. This could be fixed by carefully recompute the coordinates, but |
* place. This could be fixed by carefully recompute the coordinates, but |
1502 |
gboolean handled = FALSE; |
gboolean handled = FALSE; |
1503 |
int step = GTK_WIDGET(widget)->allocation.width/OSM_GPS_MAP_SCROLL_STEP; |
int step = GTK_WIDGET(widget)->allocation.width/OSM_GPS_MAP_SCROLL_STEP; |
1504 |
|
|
1505 |
printf("key event with keyval %x\n", event->keyval); |
// printf("key event with keyval %x\n", event->keyval); |
1506 |
|
|
1507 |
// the map handles some keys on its own ... |
// the map handles some keys on its own ... |
1508 |
switch(event->keyval) { |
switch(event->keyval) { |
1570 |
#endif |
#endif |
1571 |
|
|
1572 |
default: |
default: |
1573 |
printf("unhandled key event with keyval %x\n", event->keyval); |
// printf("unhandled key event with keyval %x\n", event->keyval); |
1574 |
break; |
break; |
1575 |
} |
} |
1576 |
|
|
2189 |
GdkDrawable *drawable = widget->window; |
GdkDrawable *drawable = widget->window; |
2190 |
#endif |
#endif |
2191 |
|
|
2192 |
if (!priv->dragging) |
if (!priv->dragging && event) |
2193 |
{ |
{ |
2194 |
gdk_draw_drawable (drawable, |
gdk_draw_drawable (drawable, |
2195 |
widget->style->fg_gc[GTK_WIDGET_STATE (widget)], |
widget->style->fg_gc[GTK_WIDGET_STATE (widget)], |
3025 |
priv->osd = osd; |
priv->osd = osd; |
3026 |
} |
} |
3027 |
|
|
3028 |
|
void |
3029 |
|
osm_gps_map_repaint (OsmGpsMap *map) { |
3030 |
|
osm_gps_map_expose (GTK_WIDGET(map), NULL); |
3031 |
|
} |
3032 |
|
|
3033 |
#endif |
#endif |