diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2016-07-28 18:15:34 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2016-07-28 18:15:34 +0000 |
| commit | 49a7927ecf31ace696e9e5770e8d6543c356db7a (patch) | |
| tree | d5c2d0a3d1581718d0d4cf2b2e2bcddf24b0105f /src/knot.cpp | |
| parent | Drop remaining GTKMM 2 fallback support (diff) | |
| download | inkscape-49a7927ecf31ace696e9e5770e8d6543c356db7a.tar.gz inkscape-49a7927ecf31ace696e9e5770e8d6543c356db7a.zip | |
Finish removing GTK+ 2 fallbacks
(bzr r15023.2.8)
Diffstat (limited to 'src/knot.cpp')
| -rw-r--r-- | src/knot.cpp | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/src/knot.cpp b/src/knot.cpp index bfc0c4f0b..8027a0301 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -126,21 +126,14 @@ SPKnot::SPKnot(SPDesktop *desktop, gchar const *tip) } SPKnot::~SPKnot() { -#if GTK_CHECK_VERSION(3,0,0) - GdkDisplay *display = gdk_display_get_default(); - GdkDeviceManager *dm = gdk_display_get_device_manager(display); - GdkDevice *device = gdk_device_manager_get_client_pointer(dm); + auto display = gdk_display_get_default(); + auto dm = gdk_display_get_device_manager(display); + auto device = gdk_device_manager_get_client_pointer(dm); if ((this->flags & SP_KNOT_GRABBED) && gdk_display_device_is_grabbed(display, device)) { // This happens e.g. when deleting a node in node tool while dragging it gdk_device_ungrab(device, GDK_CURRENT_TIME); } -#else - if ((this->flags & SP_KNOT_GRABBED) && gdk_pointer_is_grabbed ()) { - // This happens e.g. when deleting a node in node tool while dragging it - gdk_pointer_ungrab (GDK_CURRENT_TIME); - } -#endif if (this->_event_handler_id > 0) { g_signal_handler_disconnect(G_OBJECT (this->item), this->_event_handler_id); @@ -154,11 +147,7 @@ SPKnot::~SPKnot() { for (gint i = 0; i < SP_KNOT_VISIBLE_STATES; i++) { if (this->cursor[i]) { -#if GTK_CHECK_VERSION(3,0,0) g_object_unref(this->cursor[i]); -#else - gdk_cursor_unref(this->cursor[i]); -#endif this->cursor[i] = NULL; } } @@ -525,57 +514,33 @@ void SPKnot::setImage(guchar* normal, guchar* mouseover, guchar* dragging) { void SPKnot::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 } } |
