Commit fca0f000 authored by Marcus Lundblad's avatar Marcus Lundblad
Browse files

Merge branch 'master' into 'master'

fixed build

See merge request mlundblad/libshumate!1
parents e26b3f97 d8b8b11b
......@@ -470,7 +470,7 @@ motion_event_cb (ShumateMarker *marker,
ShumateMarkerPrivate *priv = marker->priv;
gfloat x, y;
if (event->type != GDK_DRAG_MOTION)
if (gdk_event_get_event_type(event) != GDK_DRAG_MOTION)
return FALSE;
/*
......@@ -494,9 +494,11 @@ capture_release_event_cb (ShumateMarker *marker,
GdkEventButton *event)
{
ShumateMarkerPrivate *priv = marker->priv;
guint button;
gdk_event_get_button(event, &button);
if ((event->type != GDK_BUTTON_RELEASE) ||
(event->button != 1))
if ((gdk_event_get_event_type(event) != GDK_BUTTON_RELEASE) ||
(button != 1))
return FALSE;
/*
......@@ -521,8 +523,11 @@ static gboolean
button_release_event_cb (ShumateMarker *marker,
GdkEventButton *event)
{
if ((event->type != GDK_BUTTON_RELEASE) ||
(event->button != 1))
guint button;
gdk_event_get_button(event, &button);
if ((gdk_event_get_event_type(event) != GDK_BUTTON_RELEASE) ||
(button != 1))
return FALSE;
g_signal_handlers_disconnect_by_func (marker,
......@@ -539,9 +544,11 @@ button_press_event_cb (ShumateMarker *marker,
GdkEventButton *event)
{
ShumateMarkerPrivate *priv = marker->priv;
guint button;
gdk_event_get_button(event, &button);
if (event->type != GDK_BUTTON_PRESS ||
event->button != 1)
if (gdk_event_get_event_type(event) != GDK_BUTTON_PRESS ||
button != 1)
{
return FALSE;
}
......@@ -605,7 +612,7 @@ shumate_marker_init (ShumateMarker *marker)
priv->selectable = TRUE;
priv->draggable = FALSE;
gtk_widget_set_has_window (GTK_WIDGET (marker), FALSE);
gtk_widget_set_has_surface (GTK_WIDGET (marker), FALSE);
g_signal_connect (marker,
"button-press-event",
......
......@@ -511,16 +511,20 @@ scroll_event (G_GNUC_UNUSED ShumateView *this,
ShumateView *view)
{
DEBUG_LOG ()
GdkScrollDirection direction;
gdk_event_get_scroll_direction(event, &direction);
gdouble x, y;
gdk_event_get_coords(event, &x, &y);
ShumateViewPrivate *priv = view->priv;
guint zoom_level = priv->zoom_level;
if (event->scroll.direction == GDK_SCROLL_UP)
if (direction == GDK_SCROLL_UP)
zoom_level = priv->zoom_level + 1;
else if (event->scroll.direction == GDK_SCROLL_DOWN)
else if (direction == GDK_SCROLL_DOWN)
zoom_level = priv->zoom_level - 1;
else if (event->scroll.direction == GDK_SCROLL_SMOOTH)
else if (direction == GDK_SCROLL_SMOOTH)
{
gdouble dx, dy;
gint steps;
......@@ -541,7 +545,7 @@ scroll_event (G_GNUC_UNUSED ShumateView *this,
priv->zoom_timeout = g_timeout_add (1000, zoom_timeout_cb, view);
}
return view_set_zoom_level_at (view, zoom_level, TRUE, event->scroll.x, event->scroll.y);
return view_set_zoom_level_at (view, zoom_level, TRUE, x, y);
}
......@@ -1471,7 +1475,7 @@ shumate_view_init (ShumateView *view)
shumate_debug_set_flags (g_getenv ("SHUMATE_DEBUG"));
view->priv = priv;
gtk_widget_set_has_window (GTK_WIDGET (view), FALSE);
gtk_widget_set_has_surface (GTK_WIDGET (view), FALSE);
factory = shumate_map_source_factory_dup_default ();
source = shumate_map_source_factory_create_cached_source (factory, SHUMATE_MAP_SOURCE_OSM_MAPNIK);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment