On Sunday 01 of April 2007, Dan Winship wrote: > It doesn't have to be a future version (or at least, not any farther > into the future than the version of g-p-m that supports o.f.PM). > Shutdown(), Reboot() and Logout() are just alternate ways of invoking > existing functionality, so they'd be one-liners. And the code to > implement Inhibit is pretty much the same whether you put it in g-p-m or > gnome-session. So really, the hardest part of implementing the interface > in gnome-session right away would be the dbus glue. Which isn't that big > a difficulty.
As you point yourself below, just plain Shutdown(), Reboot(), Logout() calls are not the right interface (that's Shutdown(void) etc. for you C folks), so at least some thinking needs to go even to designed such simple interface. > (And ksmserver in KDE4 already has a D-Bus method for shutdown, reboot, > and logout, so it would be even less work for them.) Not precisely, there's only logout( int, int, int ) and one has to look in the sources to find out how those arguments control the logout (whether to shutdown/reboot etc.). > > Would this work for everyone? Personally I think this is a lot nicer. > > Yes, pretty much. We need to move CanShutdown and CanReboot to o.f.SM > too, so that callers know whether or not to offer those options to the > user. (The CanShutdownChanged and CanRebootChanged signals seem like > overkill...) > > Also, does Logout() mean "ask if the user wants to log out" or just "log > out!" IOW, who does the confirmation dialogs, the caller or the session > manager? Or should there be a "bool ask_for_confirmation" flag? And > should there be a generic "pop up a dialog to let the user pick whether > to log out, reboot, or shut down" method? (GNOME has moved towards > having the callers do the dialogs themselves in recent releases, but the > session manager needs to have its own dialogs anyway to properly deal > with logout requests from XSMP clients, so it seems to me like it would > make more sense to move gnome-panel's logout/reboot/shutdown dialogs > into gnome-session.) -- Lubos Lunak KDE developer -------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: [EMAIL PROTECTED] , [EMAIL PROTECTED] Lihovarska 1060/12 tel: +420 284 028 972 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http//www.suse.cz _______________________________________________ xdg mailing list xdg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xdg