Commit 7a0649da authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Optimize code

parent 80801d6d
Pipeline #3782 canceled with stages
......@@ -7,12 +7,12 @@ import .. / widgets / tor_status_widget
let cb_kill_apps = init_gtk_askkill()
proc do_anonsurf_start(cb_send_msg: proc) {.gcsafe.} =
ansurf_acts_handle_start("gksudo", cb_kill_apps, cb_send_msg)
# proc do_anonsurf_start(cb_send_msg: proc) {.gcsafe.} =
# ansurf_acts_handle_start("gksudo", cb_kill_apps, cb_send_msg)
proc do_anonsurf_stop(cb_send_msg: proc) {.gcsafe.} =
ansurf_acts_handle_stop("gksudo", cb_kill_apps, cb_send_msg)
# proc do_anonsurf_stop(cb_send_msg: proc) {.gcsafe.} =
# ansurf_acts_handle_stop("gksudo", cb_kill_apps, cb_send_msg)
proc do_anonsurf_restart(cb_send_msg: proc) {.gcsafe.} =
......@@ -30,12 +30,10 @@ proc do_anonsurf_checkip(cb_send_msg: proc) {.gcsafe.} =
proc ansurf_gtk_do_start_stop*(b: Button, cb_send_msg: proc) =
if b.label == "Start":
# createThread(ansurf_workers_common, do_anonsurf_start, cb_send_msg)
# createThread(ansurf_start_stop_workers, ansurf_acts_handle_start, ("gksudo", cb_kill_apps, cb_send_msg))
ansurf_acts_handle_start("gksudo", cb_kill_apps, cb_send_msg)
else:
# createThread(ansurf_workers_common, do_anonsurf_stop, cb_send_msg)
ansurf_acts_handle_stop("gksudo", cb_kill_apps, cb_send_msg)
# createThread(ansurf_start_stop_workers, ansurf_acts_handle_stop, "gksudo", cb_kill_apps, cb_send_msg)
# joinThread(ansurf_workers_common)
......
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