lxqt / liblxqt

Core utility library for all LXQt components
https://lxqt-project.org
GNU Lesser General Public License v2.1
60 stars 51 forks source link

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

Open kreijack opened 1 year ago

kreijack commented 1 year ago

Add a timeout to the confirmation dialog for

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

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

stefonarch commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

@tsujan should we include this in LXQt 2.0.0 ?

I don't like a timeout.

tsujan commented 8 months ago

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 commented 8 months ago

@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.