aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/conversation_content_view/message_widget.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/src/ui/conversation_content_view/message_widget.vala b/main/src/ui/conversation_content_view/message_widget.vala
index 3186cfbb..05661e56 100644
--- a/main/src/ui/conversation_content_view/message_widget.vala
+++ b/main/src/ui/conversation_content_view/message_widget.vala
@@ -91,6 +91,7 @@ public class MessageItemWidget : SizeRequestBin {
construct {
this.add(label);
+ label.activate_link.connect(on_label_activate_link);
this.size_request_mode = SizeRequestMode.HEIGHT_FOR_WIDTH;
}
@@ -217,6 +218,14 @@ public class MessageItemWidget : SizeRequestBin {
}
return markup_text;
}
+
+ public static bool on_label_activate_link(string uri) {
+ // Always handle xmpp URIs with Dino
+ if (!uri.has_prefix("xmpp:")) return false;
+ File file = File.new_for_uri(uri);
+ Dino.Application.get_default().open(new File[]{file}, "");
+ return true;
+ }
}
[GtkTemplate (ui = "/im/dino/Dino/message_item_widget_edit_mode.ui")]