disabled spurious debug output
This commit is contained in:
parent
2c2f058642
commit
bd54d37687
4 changed files with 36 additions and 5 deletions
31
examples/gtk3/glisttest.nim
Normal file
31
examples/gtk3/glisttest.nim
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# nim c --gc:arc glisttest.nim
|
||||
import gintro/[gtk, glib, gobject, gio]
|
||||
|
||||
proc buttonClicked (button: Button) =
|
||||
button.label = utf8Strreverse(button.label, -1)
|
||||
|
||||
proc appActivate (app: Application) =
|
||||
let window = newApplicationWindow(app)
|
||||
window.title = "GNOME Button"
|
||||
window.defaultSize = (250, 50)
|
||||
let button = newButton("Click Me")
|
||||
window.add(button)
|
||||
#button.connect("clicked", buttonClicked)
|
||||
let ch = window.getChildren # glist to Nim seq test
|
||||
echo ch.len
|
||||
echo ch[0] == button
|
||||
echo cast[int](ch[0].impl)
|
||||
echo cast[int](button.impl)
|
||||
echo ch[0] is Button
|
||||
echo ch[0] of Button
|
||||
Button(ch[0]).connect("clicked", buttonClicked)
|
||||
#button.connect("clicked", buttonClicked)
|
||||
window.showAll
|
||||
|
||||
proc main =
|
||||
let app = newApplication("org.gtk.example")
|
||||
connect(app, "activate", appActivate)
|
||||
discard app.run
|
||||
|
||||
main()
|
||||
|
||||
|
|
@ -22,6 +22,6 @@ nim c simpledrawingarea.nim
|
|||
nim c spinbutton.nim
|
||||
nim c sourceview_test.nim
|
||||
nim c t0.nim
|
||||
nim c thread1.nim
|
||||
nim c thread2.nim
|
||||
nim c --threads:on thread1.nim
|
||||
nim c --threads:on thread2.nim
|
||||
nim c vte.nim
|
||||
|
|
|
|||
|
|
@ -22,6 +22,6 @@ nim c --gc:arc simpledrawingarea.nim
|
|||
nim c --gc:arc spinbutton.nim
|
||||
nim c --gc:arc sourceview_test.nim
|
||||
nim c --gc:arc t0.nim
|
||||
nim c --gc:arc thread1.nim
|
||||
nim c --gc:arc thread2.nim
|
||||
nim c --gc:arc --threads:on thread1.nim
|
||||
nim c --gc:arc --threads:on thread2.nim
|
||||
nim c --gc:arc vte.nim
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ proc $1$2 {.cdecl.} =
|
|||
r1s.add(")\n")
|
||||
else: # signals with multiple arguments and maybe using interface providers
|
||||
(sn, wid, num, ahl, all) = sci.split(RecSep)
|
||||
echo "ttt ", ahl
|
||||
#echo "ttt ", ahl
|
||||
if ahl.contains("|"): # we have to handle interface providers
|
||||
var hargs = ahl.split(";") # handler arguments
|
||||
for i in 0 .. hargs.high: # find the position of the providers, should be second or third argument
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue