Commit 59f647fc authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Restore threading (solved crash with help of arc)

parent 81978fc1
import gintro / gtk
import .. / .. / cores / handle_activities
import .. / ansurf_objects
proc do_anonsurf_enable_boot(cb_send_msg: proc) {.gcsafe.} =
ansurf_acts_handle_boot_enable("gksudo", cb_send_msg)
proc do_anonsurf_disable_boot(cb_send_msg: proc) {.gcsafe.} =
ansurf_acts_handle_boot_disable("gksudo", cb_send_msg)
proc ansurf_gtk_do_enable_disable_boot*(b: Button, cb_send_msg: proc) =
if b.label == "Enable":
ansurf_acts_handle_boot_enable("gksudo", cb_send_msg)
# ansurf_acts_handle_boot_enable("gksudo", cb_send_msg)
createThread(ansurf_workers_common, do_anonsurf_enable_boot, cb_send_msg)
else:
ansurf_acts_handle_boot_disable("gksudo", cb_send_msg)
# ansurf_acts_handle_boot_disable("gksudo", cb_send_msg)
createThread(ansurf_workers_common, do_anonsurf_disable_boot, cb_send_msg)
ansurf_workers_common.joinThread()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment