Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Re-enable and fix the formerly-broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed May 10, 2016
1 parent 9f4708e commit 11ae24d
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/gui.jl
Original file line number Diff line number Diff line change
Expand Up @@ -256,19 +256,19 @@ destroy(w)
tb = @ToggleButton("Off")
w = @Window(tb, "ToggleButton")|>showall
# TODO: uncomment these next lines
# on_signal_button_press(tb) do ptr, evt, widget
# state = getproperty(widget,:label,AbstractString)
# if state == "Off"
# setproperty!(widget,:label,"On")
# else
# setproperty!(widget,:label,"Off")
# end
# true
# end
# press=Gtk.GdkEventButton(Gtk.GdkEventType.BUTTON_PRESS, Gtk.gdk_window(tb), Int8(0), UInt32(0), 0.0, 0.0, convert(Ptr{Float64},C_NULL), UInt32(0), UInt32(1), C_NULL, 0.0, 0.0)
# signal_emit(tb, "button-press-event", Bool, press)
# release=Gtk.GdkEventButton(Gtk.GdkEventType.BUTTON_RELEASE, Gtk.gdk_window(tb), Int8(0), UInt32(0), 0.0, 0.0, convert(Ptr{Float64},C_NULL), UInt32(0), UInt32(1), C_NULL, 0.0, 0.0)
# signal_emit(tb, "button-release-event", Bool, release)
on_signal_button_press(tb) do ptr, evt, widget
state = getproperty(widget,:label,AbstractString)
if state == "Off"
setproperty!(widget,:label,"On")
else
setproperty!(widget,:label,"Off")
end
Int32(true)
end
press=Gtk.GdkEventButton(Gtk.GdkEventType.BUTTON_PRESS, Gtk.gdk_window(tb), Int8(0), UInt32(0), 0.0, 0.0, convert(Ptr{Float64},C_NULL), UInt32(0), UInt32(1), C_NULL, 0.0, 0.0)
signal_emit(tb, "button-press-event", Bool, press)
release=Gtk.GdkEventButton(Gtk.GdkEventType.BUTTON_RELEASE, Gtk.gdk_window(tb), Int8(0), UInt32(0), 0.0, 0.0, convert(Ptr{Float64},C_NULL), UInt32(0), UInt32(1), C_NULL, 0.0, 0.0)
signal_emit(tb, "button-release-event", Bool, release)
# next time just use "gtk_button_clicked", mkay?
destroy(w)

Expand All @@ -282,7 +282,7 @@ signal_connect(tb, :button_press_event) do widget, evt
else
setproperty!(widget,:label,"Off")
end
true
Int32(true)
end
press=Gtk.GdkEventButton(Gtk.GdkEventType.BUTTON_PRESS, Gtk.gdk_window(tb), Int8(0), UInt32(0), 0.0, 0.0, convert(Ptr{Float64},C_NULL), UInt32(0), UInt32(1), C_NULL, 0.0, 0.0)
signal_emit(tb, "button-press-event", Bool, press)
Expand Down

0 comments on commit 11ae24d

Please sign in to comment.