Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a timeout to the reboot/poweroff ... confirmation dialog #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kreijack
Copy link

Add a timeout to the confirmation dialog for

  • poweroff
  • shutdown
  • logout
  • hibernate
  • suspend If the timeout expires, it is considered like the user pressed Ok.

The timeout is set on the basis of the timeout_confirmation settings:

  • -1 -> not timeout at all
  • 0 -> the confirmation dialog disappear instantly
  • 1... -> the dialog closes itself after the timeout set

This patch is inspired to the current behavior in mate-desktop, where the confirmation dialogs have a timeout.
Also this patch correct a bug where the method MessageBox::warning ignores title and text

Add a timeout to the confirmation dialog for
- poweroff
- shutdown
- logout
- hibernate
- suspend
If the timeout expires, it is considered like the user pressed Ok.

The timeout is set on the basis of the "timeout_confirmation"
settings:
- -1   -> not timeout at all
- 0    -> is like the dialog is not showed at all
- 1... -> the dialog closes itself after the timeout set
@stefonarch
Copy link
Member

stefonarch commented Feb 10, 2024

Gave a look (finally, sorry) at this, it's working fine.

screen_area_sab_08:21:15_

This would need a PR to include in lxqt-config-session for
timeout_confirmation= if leave_confirmation=true

@gfgit @tsujan should we include this in LXQt 2.0.0 ?
I think it would be nice, as it can easily be disabled and most DEs have it.

@stefonarch
Copy link
Member

stefonarch commented Feb 10, 2024

Btw I think this message could be changed as it's not true anymore, with many applications which have crash recovery nowadays.
"Unsaved work could be lost..."

@gfgit
Copy link
Member

gfgit commented Feb 10, 2024

Btw I think this message could be changed as it's not true anymore, with many applications which have crash recovery nowadays. "Unsaved work could be lost..."

Well it's worse to hope app recover and then they don't do it properly. At least user will double check.
To be honest other DE do not have this warning.

Anyway I like this change, only I don't have much time to review it now unfortunately.

@tsujan
Copy link
Member

tsujan commented Feb 10, 2024

@tsujan should we include this in LXQt 2.0.0 ?

I don't like a timeout.

@tsujan
Copy link
Member

tsujan commented Feb 10, 2024

I think this message could be changed as it's not true anymore, with many applications which have crash recovery nowadays.

It isn't only about crashes. An editor may or may not save changes on being terminated without prompt. Actually, some devs (like me) may believe that such a saving isn't good because there's no guarantee that the user wants to save a change to a document that he considers good, and saving to files with strange names might be confusing.

@stefonarch
Copy link
Member

@tsujan should we include this in LXQt 2.0.0 ?

I don't like a timeout.

Others do I guess. I don't use it either but it would not hurt. Default could still be 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants