Switch to GTK3 via pkg-config, start the port

This commit is contained in:
Přemysl Eric Janouch 2015-01-19 00:02:48 +01:00
parent 7617e6a002
commit c41f3ae529
2 changed files with 9 additions and 9 deletions

View File

@ -97,11 +97,11 @@ if (CONVERT_EXECUTABLE AND NOT WIN32)
endif (CONVERT_EXECUTABLE AND NOT WIN32) endif (CONVERT_EXECUTABLE AND NOT WIN32)
# Dependencies # Dependencies
find_package (GTK2 2.12 REQUIRED gtk)
find_package (JsonGlib REQUIRED) find_package (JsonGlib REQUIRED)
find_package (PkgConfig REQUIRED) find_package (PkgConfig REQUIRED)
pkg_search_module (Lua52 REQUIRED lua5.2 lua-5.2 lua>=5.2) pkg_search_module (Lua52 REQUIRED lua5.2 lua-5.2 lua>=5.2)
pkg_check_modules (GTK3 REQUIRED gtk+-3.0)
# Localization # Localization
find_package (Gettext REQUIRED) find_package (Gettext REQUIRED)
@ -229,9 +229,9 @@ glib_genmarshal (${CMAKE_CURRENT_SOURCE_DIR}/liblogdiag/ld-marshal
ld_marshal) ld_marshal)
include_directories (${CMAKE_CURRENT_SOURCE_DIR}) include_directories (${CMAKE_CURRENT_SOURCE_DIR})
include_directories (${GTK2_INCLUDE_DIRS} include_directories (${GTK3_INCLUDE_DIRS}
${JSON_GLIB_INCLUDE_DIRS} ${Lua52_INCLUDE_DIRS}) ${JSON_GLIB_INCLUDE_DIRS} ${Lua52_INCLUDE_DIRS})
set (logdiag_LIBS ${GTK2_LIBRARIES} set (logdiag_LIBS ${GTK3_LIBRARIES}
${JSON_GLIB_LIBRARIES} ${Lua52_LIBRARIES}) ${JSON_GLIB_LIBRARIES} ${Lua52_LIBRARIES})
if (WIN32) if (WIN32)

View File

@ -392,15 +392,15 @@ ld_diagram_view_class_init (LdDiagramViewClass *klass)
klass->move = ld_diagram_view_real_move; klass->move = ld_diagram_view_real_move;
binding_set = gtk_binding_set_by_class (klass); 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); "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); "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); "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); "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); "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); move_cursor = gdk_cursor_new (GDK_FLEUR);
gdk_window_set_cursor gdk_window_set_cursor
(gtk_widget_get_window (GTK_WIDGET (self)), move_cursor); (gtk_widget_get_window (GTK_WIDGET (self)), move_cursor);
gdk_cursor_unref (move_cursor); g_object_unref (move_cursor);
} }
static void static void