mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-10-05 21:08:40 +03:00
Client: Subscribe arg now prints when first called
This commit is contained in:
parent
780887f0b9
commit
de55a18227
@ -3,9 +3,11 @@ interface CcDaemon : GLib.Object {
|
||||
|
||||
public abstract uint notification_count () throws DBusError, IOError;
|
||||
|
||||
public abstract bool get_dnd () throws DBusError, IOError;
|
||||
|
||||
public abstract void toggle () throws DBusError, IOError;
|
||||
|
||||
public abstract uint toggle_dnd () throws DBusError, IOError;
|
||||
public abstract bool toggle_dnd () throws DBusError, IOError;
|
||||
|
||||
public signal void subscribe (uint count, bool dnd);
|
||||
}
|
||||
@ -56,6 +58,8 @@ public int command_line (string[] args) {
|
||||
case "--subscribe":
|
||||
case "-s":
|
||||
cc_daemon.subscribe.connect ((c, d) => on_subscribe (c, d));
|
||||
on_subscribe (cc_daemon.notification_count (),
|
||||
cc_daemon.get_dnd ());
|
||||
var loop = new MainLoop ();
|
||||
loop.run ();
|
||||
break;
|
||||
|
@ -37,8 +37,12 @@ namespace SwayNotificatonCenter {
|
||||
}
|
||||
}
|
||||
|
||||
public uint toggle_dnd () throws DBusError, IOError {
|
||||
return dbusInit.notiDaemon.toggle_dnd () == true ? 1 : 0;
|
||||
public bool toggle_dnd () throws DBusError, IOError {
|
||||
return dbusInit.notiDaemon.toggle_dnd ();
|
||||
}
|
||||
|
||||
public bool get_dnd () throws DBusError, IOError {
|
||||
return dbusInit.notiDaemon.get_dnd ();
|
||||
}
|
||||
|
||||
public void add_notification (NotifyParams param) throws DBusError, IOError {
|
||||
|
Loading…
Reference in New Issue
Block a user