From bd54d3768706e95ae45b79a351ea9907a98cb2ec Mon Sep 17 00:00:00 2001 From: Stefan Salewski Date: Sat, 15 Aug 2020 09:03:28 +0200 Subject: [PATCH] disabled spurious debug output --- examples/gtk3/glisttest.nim | 31 +++++++++++++++++++++++++++++++ examples/gtk3/makeAll | 4 ++-- examples/gtk3/makeAllArc | 4 ++-- gintro/gimpl.nim | 2 +- 4 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 examples/gtk3/glisttest.nim diff --git a/examples/gtk3/glisttest.nim b/examples/gtk3/glisttest.nim new file mode 100644 index 0000000..37ae86b --- /dev/null +++ b/examples/gtk3/glisttest.nim @@ -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() + diff --git a/examples/gtk3/makeAll b/examples/gtk3/makeAll index 8be997d..0cc79ff 100644 --- a/examples/gtk3/makeAll +++ b/examples/gtk3/makeAll @@ -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 diff --git a/examples/gtk3/makeAllArc b/examples/gtk3/makeAllArc index 6e0f649..d7a4cf0 100644 --- a/examples/gtk3/makeAllArc +++ b/examples/gtk3/makeAllArc @@ -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 diff --git a/gintro/gimpl.nim b/gintro/gimpl.nim index 482df41..7b4bc35 100644 --- a/gintro/gimpl.nim +++ b/gintro/gimpl.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