Commit 81978fc1 authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Remove multithread for enable / disable boot

parent 7a0649da
Pipeline #3783 canceled with stages
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)
createThread(ansurf_workers_common, do_anonsurf_enable_boot, cb_send_msg)
ansurf_acts_handle_boot_enable("gksudo", cb_send_msg)
else:
# ansurf_acts_handle_boot_disable("gksudo", cb_send_msg)
createThread(ansurf_workers_common, do_anonsurf_disable_boot, cb_send_msg)
ansurf_workers_common.joinThread()
ansurf_acts_handle_boot_disable("gksudo", cb_send_msg)
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