From 139b263c789613752ab4bd8a0ebce7e7f7b90ae4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Tue, 3 Nov 2015 10:55:22 -0500 Subject: [PATCH] tests & lib/ui: update gtk users MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/linux/ui.nit | 4 ++-- tests/test_gtk.nit | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/linux/ui.nit b/lib/linux/ui.nit index 4f67eed..f3deb77 100644 --- a/lib/linux/ui.nit +++ b/lib/linux/ui.nit @@ -21,7 +21,7 @@ import gtk import data_store redef class App - redef fun setup do init_gtk + redef fun setup do gtk_init # On GNU/Linux, we go through all the callbacks once, # there is no complex life-cycle. @@ -34,7 +34,7 @@ redef class App var window = window window.native.show_all - run_gtk + gtk_main app.on_pause app.on_stop diff --git a/tests/test_gtk.nit b/tests/test_gtk.nit index 4916f4b..28ee606 100644 --- a/tests/test_gtk.nit +++ b/tests/test_gtk.nit @@ -33,19 +33,18 @@ class MyApp if sender == but_ok then print "ok!" - quit_gtk + gtk_main_quit else if sender == but_cancel then print "cancel!" - quit_gtk + gtk_main_quit else print sender end - end init do - init_gtk + gtk_init win = new GtkWindow(new GtkWindowType.toplevel) win.connect_destroy_signal_to_quit @@ -70,5 +69,5 @@ end if "NIT_TESTING".environ != "true" then var app = new MyApp - run_gtk + gtk_main end -- 1.7.9.5