mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
fix: strip newlines
This commit is contained in:
parent
005288371b
commit
c6034bc6b9
@ -866,13 +866,14 @@ def spawn_dialog(msg: str, mode: Popup) -> bool:
|
|||||||
dialog = GenericDialog(msg, mode)
|
dialog = GenericDialog(msg, mode)
|
||||||
response = dialog.run()
|
response = dialog.run()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
clean_msg = msg.replace("\n", " ")
|
||||||
|
|
||||||
match response:
|
match response:
|
||||||
case Gtk.ResponseType.OK:
|
case Gtk.ResponseType.OK:
|
||||||
logger.info(f"User confirmed dialog with message '{msg}'")
|
logger.info(f"User confirmed dialog with message '{clean_msg}'")
|
||||||
return False
|
return False
|
||||||
case Gtk.ResponseType.CANCEL | Gtk.ResponseType.DELETE_EVENT:
|
case Gtk.ResponseType.CANCEL | Gtk.ResponseType.DELETE_EVENT:
|
||||||
logger.info(f"User aborted dialog with message '{msg}'")
|
logger.info(f"User aborted dialog with message '{clean_msg}'")
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user