mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
Use constants
This commit is contained in:
parent
3d24111852
commit
d9db718513
@ -6,8 +6,9 @@
|
||||
*/
|
||||
|
||||
public class Gala.DaemonManager : GLib.Object {
|
||||
private const string DAEMON_DBUS_NAME = "org.pantheon.gala.daemon";
|
||||
private const string DAEMON_DBUS_OBJECT_PATH = "/org/pantheon/gala/daemon";
|
||||
public const string DAEMON_DBUS_NAME = "org.pantheon.gala.daemon";
|
||||
public const string DAEMON_DBUS_OBJECT_PATH = "/org/pantheon/gala/daemon";
|
||||
|
||||
private const int SPACING = 12;
|
||||
|
||||
[DBus (name = "org.pantheon.gala.daemon")]
|
||||
|
@ -24,12 +24,12 @@ public class Gala.SessionManager : Object {
|
||||
private EndSessionDialog? proxy = null;
|
||||
|
||||
construct {
|
||||
Bus.watch_name (SESSION, "org.pantheon.gala.daemon", NONE, () => on_proxy_appeared.begin (), () => proxy = null);
|
||||
Bus.watch_name (SESSION, DaemonManager.DAEMON_DBUS_NAME, NONE, () => on_proxy_appeared.begin (), () => proxy = null);
|
||||
}
|
||||
|
||||
private async void on_proxy_appeared () {
|
||||
try {
|
||||
proxy = yield Bus.get_proxy (BusType.SESSION, "org.pantheon.gala.daemon", "/org/pantheon/gala/daemon", 0, null);
|
||||
proxy = yield Bus.get_proxy (BusType.SESSION, DaemonManager.DAEMON_DBUS_NAME, DaemonManager.DAEMON_DBUS_OBJECT_PATH, 0, null);
|
||||
} catch (Error e) {
|
||||
warning ("Could not connect to io.elementary.wm.daemon.EndSessionDialog proxy: %s", e.message);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user