From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/knot.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/knot.cpp') diff --git a/src/knot.cpp b/src/knot.cpp index bfc0c4f0b..c914315ec 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -13,7 +13,6 @@ */ #ifdef HAVE_CONFIG_H -# include #endif #include #include @@ -24,7 +23,6 @@ #include "knot-ptr.h" #include "document.h" #include "document-undo.h" -#include "preferences.h" #include "message-stack.h" #include "message-context.h" #include "ui/tools-switch.h" -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/knot.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/knot.cpp') diff --git a/src/knot.cpp b/src/knot.cpp index c914315ec..bfc0c4f0b 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -13,6 +13,7 @@ */ #ifdef HAVE_CONFIG_H +# include #endif #include #include @@ -23,6 +24,7 @@ #include "knot-ptr.h" #include "document.h" #include "document-undo.h" +#include "preferences.h" #include "message-stack.h" #include "message-context.h" #include "ui/tools-switch.h" -- cgit v1.2.3 From 49a7927ecf31ace696e9e5770e8d6543c356db7a Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Thu, 28 Jul 2016 19:15:34 +0100 Subject: Finish removing GTK+ 2 fallbacks (bzr r15023.2.8) --- src/knot.cpp | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) (limited to 'src/knot.cpp') 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 } } -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/knot.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/knot.cpp') diff --git a/src/knot.cpp b/src/knot.cpp index bfc0c4f0b..c914315ec 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -13,7 +13,6 @@ */ #ifdef HAVE_CONFIG_H -# include #endif #include #include @@ -24,7 +23,6 @@ #include "knot-ptr.h" #include "document.h" #include "document-undo.h" -#include "preferences.h" #include "message-stack.h" #include "message-context.h" #include "ui/tools-switch.h" -- cgit v1.2.3