[Gambas-user] Inhibit shutdown/logout/etc if unsaved files.
Bruce Steers
bsteers4 at gmail.com
Tue Feb 21 21:08:42 CET 2023
Please
if you have made inhibit work on anything other than gnome2
gnome.SassionManager,
Or if you want a challenge and try to make it work on your system and have
success.
Then share the code on this post or the gambas.one forum topic i started,
https://forum.gambas.one/viewtopic.php?t=1483
Wishing well
BruceS
On Tue, 21 Feb 2023 at 19:48, Bruce Steers <bsteers4 at gmail.com> wrote:
> Well i got part way then hit a roadblock.
> See this discussion for more details and a demo-app / screenshot of it
> working with gambas IDE.
> https://forum.gambas.one/viewtopic.php?t=1483
>
> The class is currently very simple but limited to only working on gnome2
> based os's (mate, cinnamon, gnomoe-fallback)
> does not work for gnome3 (gnome shell), kde plasma, others
>
> But i use MATE and now my system CANNOT close down with an open unsaved
> gambas project running so i'm pretty happy about that. :)
>
> (it's a tiny 17k so i'll attach my demo to this post, i've added the same
> class to my gambas and edited the editors Modify and Save methods to
> enable/kill the inhibitors
> https://gitlab.com/bsteers4/gambas/-/tree/bruces-patched/app/src/gambas3/.src
> )
>
> the roadblock is that org.gnome.SessionManager.Inhibit was the only one i
> could get to work properly. and that seems to only work on gnome2 systems.
>
> I have looked into many other ways.
> org.freedesktop.portal.Desktop (doesn't seem to work)
> System://org.freedesktop.login1 (just gives me segfault 11)
> a few others.
>
> I've tried various methods. the gnome.SessionManager is absolute
> simplicity compared to others.
>
> Anyone had any success with Inhibit on anything other than
> gnome.SessionManager ?
>
> Respects
> BruceS
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230221/5d2de165/attachment.htm>
More information about the User
mailing list