Allow to run Dino as background service
This commit is contained in:
parent
f34aa58626
commit
7d561ddfab
|
@ -111,10 +111,12 @@ public interface Dino.Application : GLib.Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void add_connection(Account account) {
|
protected void add_connection(Account account) {
|
||||||
|
if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) hold();
|
||||||
stream_interactor.connect_account(account);
|
stream_interactor.connect_account(account);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void remove_connection(Account account) {
|
protected void remove_connection(Account account) {
|
||||||
|
if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) release();
|
||||||
stream_interactor.disconnect_account(account);
|
stream_interactor.disconnect_account(account);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application {
|
||||||
controller = new UnifiedWindowController(this, stream_interactor, db);
|
controller = new UnifiedWindowController(this, stream_interactor, db);
|
||||||
window = new UnifiedWindow(this, stream_interactor, db);
|
window = new UnifiedWindow(this, stream_interactor, db);
|
||||||
controller.set_window(window);
|
controller.set_window(window);
|
||||||
|
if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) window.delete_event.connect(window.hide_on_delete);
|
||||||
|
|
||||||
notifications = new Notifications(stream_interactor, window);
|
notifications = new Notifications(stream_interactor, window);
|
||||||
notifications.start();
|
notifications.start();
|
||||||
|
|
Loading…
Reference in a new issue