Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new gala dbus name #750

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 1 addition & 34 deletions compositor/DBus.vala
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

[DBus (name="org.pantheon.greeter")]
public class GreeterCompositor.DBus {
public static DBus? instance;
static WindowManager wm;

[DBus (visible = false)]
public static void init (WindowManager _wm) {
wm = _wm;

Bus.own_name (BusType.SESSION, "org.pantheon.greeter", BusNameOwnerFlags.NONE,
(connection) => {
if (instance == null)
instance = new DBus ();

try {
connection.register_object ("/org/pantheon/greeter", instance);
} catch (Error e) {
warning (e.message);
}
},
() => {},
() => warning ("Could not acquire name\n")
);

public static void init (WindowManager wm) {
Bus.own_name (BusType.SESSION, "org.gnome.Shell", BusNameOwnerFlags.NONE,
(connection) => {
try {
Expand All @@ -52,15 +30,4 @@ public class GreeterCompositor.DBus {
() => critical ("Could not acquire name")
);
}

[DBus (visible = false)]
public signal void change_wallpaper (string path);

public void set_wallpaper (string path) throws GLib.Error {
change_wallpaper (path);
}

private DBus () {

}
}
8 changes: 4 additions & 4 deletions compositor/WingpanelManager/DBusWingpanelManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

[DBus (name = "org.pantheon.gala.WingpanelInterface")]
[DBus (name = "io.elementary.gala.WingpanelInterface")]
public class GreeterCompositor.DBusWingpanelManager : GLib.Object {
private static DBusWingpanelManager? instance;
private static WindowManager wm;
Expand All @@ -15,19 +15,19 @@ public class GreeterCompositor.DBusWingpanelManager : GLib.Object {
public static void init (WindowManager _wm) {
wm = _wm;

Bus.own_name (BusType.SESSION, "org.pantheon.gala.WingpanelInterface", BusNameOwnerFlags.NONE,
Bus.own_name (BusType.SESSION, "io.elementary.gala.WingpanelInterface", BusNameOwnerFlags.NONE,
(connection) => {
if (instance == null)
instance = new DBusWingpanelManager ();

try {
connection.register_object ("/org/pantheon/gala/WingpanelInterface", instance);
connection.register_object ("/io/elementary/gala/WingpanelInterface", instance);
} catch (Error e) {
warning (e.message);
}
},
() => {},
() => warning ("Could not acquire name\n")
() => warning ("Could not acquire name")
);
}

Expand Down