From c41f3ae529261f3311d5d62620c82443bba3782d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Mon, 19 Jan 2015 00:02:48 +0100 Subject: [PATCH] Switch to GTK3 via pkg-config, start the port --- CMakeLists.txt | 6 +++--- liblogdiag/ld-diagram-view.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebdefca..4b01a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,11 +97,11 @@ if (CONVERT_EXECUTABLE AND NOT WIN32) endif (CONVERT_EXECUTABLE AND NOT WIN32) # Dependencies -find_package (GTK2 2.12 REQUIRED gtk) find_package (JsonGlib REQUIRED) find_package (PkgConfig REQUIRED) pkg_search_module (Lua52 REQUIRED lua5.2 lua-5.2 lua>=5.2) +pkg_check_modules (GTK3 REQUIRED gtk+-3.0) # Localization find_package (Gettext REQUIRED) @@ -229,9 +229,9 @@ glib_genmarshal (${CMAKE_CURRENT_SOURCE_DIR}/liblogdiag/ld-marshal ld_marshal) include_directories (${CMAKE_CURRENT_SOURCE_DIR}) -include_directories (${GTK2_INCLUDE_DIRS} +include_directories (${GTK3_INCLUDE_DIRS} ${JSON_GLIB_INCLUDE_DIRS} ${Lua52_INCLUDE_DIRS}) -set (logdiag_LIBS ${GTK2_LIBRARIES} +set (logdiag_LIBS ${GTK3_LIBRARIES} ${JSON_GLIB_LIBRARIES} ${Lua52_LIBRARIES}) if (WIN32) diff --git a/liblogdiag/ld-diagram-view.c b/liblogdiag/ld-diagram-view.c index e40b55f..050a638 100644 --- a/liblogdiag/ld-diagram-view.c +++ b/liblogdiag/ld-diagram-view.c @@ -392,15 +392,15 @@ ld_diagram_view_class_init (LdDiagramViewClass *klass) klass->move = ld_diagram_view_real_move; binding_set = gtk_binding_set_by_class (klass); - gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "cancel-operation", 0); - gtk_binding_entry_add_signal (binding_set, GDK_Left, 0, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Left, 0, "move", 2, G_TYPE_DOUBLE, (gdouble) -1, G_TYPE_DOUBLE, (gdouble) 0); - gtk_binding_entry_add_signal (binding_set, GDK_Right, 0, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Right, 0, "move", 2, G_TYPE_DOUBLE, (gdouble) 1, G_TYPE_DOUBLE, (gdouble) 0); - gtk_binding_entry_add_signal (binding_set, GDK_Up, 0, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, 0, "move", 2, G_TYPE_DOUBLE, (gdouble) 0, G_TYPE_DOUBLE, (gdouble) -1); - gtk_binding_entry_add_signal (binding_set, GDK_Down, 0, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, 0, "move", 2, G_TYPE_DOUBLE, (gdouble) 0, G_TYPE_DOUBLE, (gdouble) 1); /** @@ -1803,7 +1803,7 @@ oper_move_view_begin (LdDiagramView *self, const LdPoint *point) move_cursor = gdk_cursor_new (GDK_FLEUR); gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (self)), move_cursor); - gdk_cursor_unref (move_cursor); + g_object_unref (move_cursor); } static void