Re: [gnome-flashback] Logout dialog with gnome-session>=3.10



Hi,

2014-06-07 7:51 GMT+02:00 Alberts Muktupāvels <alberts muktupavels gmail com>:
Hi,

can you try explain more your idea?

I did manage to create application which shows this dialog, but it does not
work like you think.
1) Launched created application on ubuntu 14.10 which use gnome-session <
3.10. From other terminal sending dbus-send command I was able to get
dialog. Clicking on button did work.
2) Installed application in jhbuild session which use gnome-session > 3.10.
Using dbus-send I got dialog, but clicking on logout, power off buttons
still does nothing.

Note that this was fast try and I might not done all things that was needed.
I will look at this again when I will have more time, maybe this evening.

Why you are suggesting to change to 'org.gnome.Shell'. Would not that mean
that we depend on gnome-shell? I think our session should not.

No, it just needed for providing the same D-Bus name as gnome-shell.
I'm not sure about that, but gnome-session explicitly tries to connect
to 'org.gnome.Shell' here:
https://git.gnome.org/browse/gnome-session/tree/gnome-session/gsm-shell.c#n587

So I think the process is the following:

1. gnome-session-end-dialog provides the same D-Bus interface as gnome-shell.

2. When the user tries to open the logout dialog, gnome-session
connects to that interface, listens to its signals, and open the
dialog via the 'Open()' D-Bus method.

3. gnome-session-end-dialog displays the logout dialog, waiting for user action.

4. When the user hit the appropriate button on the dialog,
gnome-session-end-dialog sends back the signal to gnome-session
(Closed, Canceled, ConfirmedLogout, ConfirmedShutdown,
ConfirmedReboot)

5. gnome-session listens to these signals, and do the appropriate action.

The whole process is handled in gsm-shell.c:
https://git.gnome.org/browse/gnome-session/tree/gnome-session/gsm-shell.c

--
György Balló


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]