Skip to content

Commit

Permalink
tests & lib/ui: update gtk users
Browse files Browse the repository at this point in the history
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
  • Loading branch information
xymus committed Nov 3, 2015
1 parent 4b177b0 commit 139b263
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/linux/ui.nit
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -34,7 +34,7 @@ redef class App

var window = window
window.native.show_all
run_gtk
gtk_main

app.on_pause
app.on_stop
Expand Down
9 changes: 4 additions & 5 deletions tests/test_gtk.nit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -70,5 +69,5 @@ end

if "NIT_TESTING".environ != "true" then
var app = new MyApp
run_gtk
gtk_main
end

0 comments on commit 139b263

Please sign in to comment.