diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-08 00:17:30 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-08 00:17:30 +0000 |
| commit | 736d7a269f58740a3c724914abc016542f05a16c (patch) | |
| tree | a982dbbcd974402473ba312eef7be696aa043d04 /src/knot.h | |
| parent | circle tool: fix shift click to reset to full circle for start angle node (diff) | |
| download | inkscape-736d7a269f58740a3c724914abc016542f05a16c.tar.gz inkscape-736d7a269f58740a3c724914abc016542f05a16c.zip | |
More GDK key macro fixes, and some cursor referencing
(bzr r11180)
Diffstat (limited to 'src/knot.h')
| -rw-r--r-- | src/knot.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/knot.h b/src/knot.h index 73bb226c6..02f21c917 100644 --- a/src/knot.h +++ b/src/knot.h @@ -100,27 +100,51 @@ struct SPKnot : GObject { } inline void setCursor (GdkCursor* normal, GdkCursor* mouseover, GdkCursor* dragging) { if (cursor[SP_KNOT_STATE_NORMAL]) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(cursor[SP_KNOT_STATE_NORMAL]); +#else gdk_cursor_unref(cursor[SP_KNOT_STATE_NORMAL]); +#endif } cursor[SP_KNOT_STATE_NORMAL] = normal; if (normal) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_ref(normal); +#else gdk_cursor_ref(normal); +#endif } if (cursor[SP_KNOT_STATE_MOUSEOVER]) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(cursor[SP_KNOT_STATE_MOUSEOVER]); +#else gdk_cursor_unref(cursor[SP_KNOT_STATE_MOUSEOVER]); +#endif } cursor[SP_KNOT_STATE_MOUSEOVER] = mouseover; if (mouseover) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_ref(mouseover); +#else gdk_cursor_ref(mouseover); +#endif } if (cursor[SP_KNOT_STATE_DRAGGING]) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(cursor[SP_KNOT_STATE_DRAGGING]); +#else gdk_cursor_unref(cursor[SP_KNOT_STATE_DRAGGING]); +#endif } cursor[SP_KNOT_STATE_DRAGGING] = dragging; if (dragging) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_ref(dragging); +#else gdk_cursor_ref(dragging); +#endif } } |
