Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Gtk
- function file_new()
- println("File Menu")
- end
- function on_button_clicked(w)
- println("The button has been clicked")
- end
- b = GtkBuilder(filename="gtk-menu1.glade")
- win = b["window_main"]
- button = b["button1"]
- println(b)
- _file_new = b["_New"]
- println("---file new")
- println(_file_new)
- s1=signal_connect(file_new, _file_new, "activate")
- s2=signal_connect(on_button_clicked, button, "clicked")
- showall(win)
- if !isinteractive()
- c = Condition()
- signal_connect(win, :destroy) do widget
- notify(c)
- end
- wait(c)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement