diff options
author | Marvin W <git@larma.de> | 2017-08-17 11:38:41 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-08-25 22:30:03 +0200 |
commit | b672df94e82032f265255ea756b459251cadfef1 (patch) | |
tree | 68b24e86eba206cc660326fc0ec6dd787d9b5b1f /main/src | |
parent | f9436b63f1f7de08f8c2c97878c183495bb3c6f6 (diff) | |
download | dino-b672df94e82032f265255ea756b459251cadfef1.tar.gz dino-b672df94e82032f265255ea756b459251cadfef1.zip |
Use single process, accept xmpp:-URIs as program argument
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/ui/application.vala | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 33208786..6b0db782 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -14,6 +14,7 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { public SearchPathGenerator? search_path_generator { get; set; } public Application() throws Error { + Object(application_id: "im.dino.Dino", flags: ApplicationFlags.HANDLES_OPEN); init(); Notify.init("dino"); Environment.set_application_name("Dino"); @@ -21,15 +22,25 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { IconTheme.get_default().add_resource_path("/im/dino/icons"); activate.connect(() => { - create_set_app_menu(); - window = new UnifiedWindow(this, stream_interaction); - notifications = new Notifications(stream_interaction, window); - notifications.start(); - notifications.conversation_selected.connect(window.on_conversation_selected); + if (window == null) { + create_set_app_menu(); + window = new UnifiedWindow(this, stream_interaction); + notifications = new Notifications(stream_interaction, window); + notifications.start(); + notifications.conversation_selected.connect(window.on_conversation_selected); + } window.present(); }); } + public void handle_uri(string jid, string query, Gee.Map<string, string> options) { + switch (query) { + case "message": + // TODO + break; + } + } + private void show_accounts_window() { ManageAccounts.Dialog dialog = new ManageAccounts.Dialog(stream_interaction, db); dialog.set_transient_for(window); |