Commit 1d93aa8d authored by Nong Hoang Tu's avatar Nong Hoang Tu
Browse files

Fix kill app for cli

parent 1f33e93a
Pipeline #3772 canceled with stages
......@@ -10,6 +10,6 @@ proc init_cli_askkill*(is_desktop: bool): callback_kill_apps =
proc init_gtk_askkill*(): callback_kill_apps =
return dialog_kill_app
# return dialog_kill_app
# return window_kill_app
# return window_kill_apps_gtk
return window_kill_apps_gtk
......@@ -3,18 +3,17 @@ import .. / ansurf_types
import kill_apps_activities
# proc onClickExit(w: Window) =
# mainQuit()
proc onClickExit(w: Window) =
mainQuit()
proc do_not_kill(b: Button) =
discard
# mainQuit()
mainQuit()
proc do_kill(b: Button, callback_send_msg: callback_send_messenger) =
ansurf_kill_apps(callback_send_msg)
# mainQuit()
mainQuit()
# proc do_exit(b: Button) =
......@@ -58,27 +57,28 @@ proc window_kill_app*(callback_send_msg: callback_send_messenger) =
mainBoard.setBorderWidth(3)
mainBoard.showAll()
# mainBoard.connect("destroy", onClickExit)
mainBoard.connect("destroy", onClickExit)
gtk.main()
mainQuit()
# mainQuit()
# proc window_kill_apps_gtk*(callback_send_msg: callback_send_messenger) =
# gtk.init()
# let
# mainBoard = newWindow()
# boxMainWindow = box_kill_app(callback_send_msg)
proc window_kill_apps_gtk*(callback_send_msg: callback_send_messenger) =
gtk.init()
let
mainBoard = newWindow()
boxMainWindow = box_kill_app(callback_send_msg)
# mainBoard.setResizable(false)
# mainBoard.title = "Kill dangerous application"
# mainBoard.setPosition(WindowPosition.center)
# mainBoard.add(boxMainWindow)
# mainBoard.setBorderWidth(3)
# mainBoard.showAll()
# mainBoard.connect("destroy", onClickExit)
# gtk.main()
# mainQuit()
mainBoard.setResizable(false)
mainBoard.title = "Kill dangerous application"
mainBoard.setPosition(WindowPosition.center)
mainBoard.add(boxMainWindow)
mainBoard.setBorderWidth(3)
mainBoard.showAll()
mainBoard.connect("destroy", onClickExit)
gtk.main()
mainQuit()
proc dialog_kill_app*(callback_send_msg: callback_send_messenger) =
# FIXME broken
......@@ -90,4 +90,4 @@ proc dialog_kill_app*(callback_send_msg: callback_send_messenger) =
dialogArea.add(boxDialog)
retDialog.showAll()
discard retDialog.run()
retDialog.destroy()
\ No newline at end of file
retDialog.destroy()
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