aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/application.vala21
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);