summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2022-03-20 04:30:54 +0100
committerGitHub <noreply@github.com>2022-03-20 04:30:54 +0100
commitdda1bcd3c19952edc4b7ac7a6926979d40190ba7 (patch)
tree6f5884e91d56564742cdb01f4f93c0e8973044f6 /resources
parentMerge pull request #1002 from maltee1/fix_send_with_input_method (diff)
parentwarn about implications of toggling external option (diff)
downloadnheko-dda1bcd3c19952edc4b7ac7a6926979d40190ba7.tar.xz
Merge pull request #1001 from duarm/master
options to open images/videos with external program by default
Diffstat (limited to 'resources')
-rw-r--r--resources/langs/nheko_en.ts10
-rw-r--r--resources/qml/delegates/ImageMessage.qml2
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml2
3 files changed, 12 insertions, 2 deletions
diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts
index 7aba5fec..c1b8e379 100644
--- a/resources/langs/nheko_en.ts
+++ b/resources/langs/nheko_en.ts
@@ -2910,6 +2910,16 @@ Reason: %4</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>Open images with external program</source>
+        <translation>Open images with external program</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Open videos with external program</source>
+        <translation>Open videos with external program</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Decrypt messages in sidebar</source>
         <translation>Decrypt messages in sidebar</translation>
     </message>
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index efd4f4a5..2ee8da7f 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -68,7 +68,7 @@ Item {
     TapHandler {
         //enabled: type == MtxEvent.ImageMessage && (img.status == Image.Ready || mxcimage.loaded)
         onSingleTapped: {
-            TimelineManager.openImageOverlay(room, url, eventId);
+            Settings.openImageExternal ? room.openMedia(eventId) : TimelineManager.openImageOverlay(room, url, eventId);
             eventPoint.accepted = true;
         }
         gesturePolicy: TapHandler.ReleaseWithinBounds
diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index 4f19275d..5d7beaad 100644
--- a/resources/qml/delegates/PlayableMediaMessage.qml
+++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -52,7 +52,7 @@ Item {
         height: parent.height - fileInfoLabel.height
 
         TapHandler {
-            onTapped: mediaControls.showControls()
+            onTapped: Settings.openVideoExternal ? room.openMedia(eventId) : mediaControls.showControls()
         }
 
         Image {