Skip to content

Instantly share code, notes, and snippets.

@mattn
Created February 4, 2013 12:09
Show Gist options
  • Save mattn/4706388 to your computer and use it in GitHub Desktop.
Save mattn/4706388 to your computer and use it in GitHub Desktop.
#!falcon -E utf-8
load gtk
m = GtkMain()
function quit()
m.quit()
return false
end
w = GtkWindow()
b = GtkButton()
b.set_label("押せ")
function clicked()
d = GtkMessageDialog(
w,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"よくも押したな!",
nil)
d.run()
d.destroy()
end
b.signal_clicked().connect(clicked)
w.add(b)
w.signal_delete_event().connect(quit)
w.show_all()
m.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment