diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-03-10 00:30:45 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-03-10 00:30:45 +0100 |
commit | 0f1a352dd7945b6a685d70a39eead409f6ee2215 (patch) | |
tree | 4557e1a4a2d0c4d525f414150bc181aaa34608b9 | |
parent | Reduce times we read upload data (diff) | |
download | nheko-0f1a352dd7945b6a685d70a39eead409f6ee2215.tar.xz |
Make buttons hideable via setting, button contents can still be accessed via context menu
-rw-r--r-- | resources/langs/nheko_de.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_el.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_en.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_fi.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_fr.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_ja.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_nl.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_pl.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_ru.ts | 38 | ||||
-rw-r--r-- | resources/langs/nheko_zh_CN.ts | 38 | ||||
-rw-r--r-- | resources/qml/Avatar.qml | 7 | ||||
-rw-r--r-- | resources/qml/TimelineRow.qml | 38 | ||||
-rw-r--r-- | resources/qml/TimelineView.qml | 19 | ||||
-rw-r--r-- | src/UserSettingsPage.cpp | 12 | ||||
-rw-r--r-- | src/UserSettingsPage.h | 9 |
15 files changed, 292 insertions, 173 deletions
diff --git a/resources/langs/nheko_de.ts b/resources/langs/nheko_de.ts index 41e518b0..5251742f 100644 --- a/resources/langs/nheko_de.ts +++ b/resources/langs/nheko_de.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation>Nutzer konnte nicht eingeladen werden: %1</translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation>Eingeladener Benutzer: %1</translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation>Medienupload fehlgeschlagen. Bitte versuche es erneut.</translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Wiederherstellung des OLM Accounts fehlgeschlagen. Bitte logge dich erneut ein.</translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation>-- Verschlüsseltes Event (keine Schlüssel zur Entschlüsselung gefunden) --</translation> @@ -672,7 +672,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation>Antworten</translation> </message> @@ -685,7 +685,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished">Antworten</translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished">Lesebestätigungen</translation> </message> @@ -715,7 +720,7 @@ <translation>Kein Raum geöffnet</translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished">Schließen</translation> </message> @@ -777,7 +782,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Ins Benachrichtigungsfeld minimieren</translation> </message> @@ -798,6 +803,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>Schreibbenachrichtigungen</translation> </message> @@ -847,7 +857,7 @@ <translation>Gerätefingerabdruck</translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation>Sitzungsschlüssel</translation> </message> @@ -867,22 +877,22 @@ <translation>VERSCHLÜSSELUNG</translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>ALLGEMEINES</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation>Öffne Sessions Datei</translation> </message> diff --git a/resources/langs/nheko_el.ts b/resources/langs/nheko_el.ts index 0398f066..0f75ca9f 100644 --- a/resources/langs/nheko_el.ts +++ b/resources/langs/nheko_el.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation type="unfinished"></translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation type="unfinished"></translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation type="unfinished"></translation> @@ -672,7 +672,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation type="unfinished"></translation> </message> @@ -685,7 +685,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished"></translation> </message> @@ -715,7 +720,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -777,7 +782,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Ελαχιστοποίηση</translation> </message> @@ -798,6 +803,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation type="unfinished"></translation> </message> @@ -847,7 +857,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation type="unfinished"></translation> </message> @@ -867,22 +877,22 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>ΓΕΝΙΚΑ</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts index 638e0a89..f01bd5d0 100644 --- a/resources/langs/nheko_en.ts +++ b/resources/langs/nheko_en.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation>Failed to invite user: %1</translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation>Invited user: %1</translation> </message> @@ -50,12 +50,12 @@ <translation>Unbanned user: %1</translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation>Failed to upload media. Please try again.</translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Failed to restore OLM account. Please login again.</translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation>-- Encrypted Event (No keys found for decryption) --</translation> @@ -672,7 +672,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation>Reply</translation> </message> @@ -685,7 +685,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished">Reply</translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation>Read receipts</translation> </message> @@ -715,7 +720,7 @@ <translation>No room open</translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation>Close</translation> </message> @@ -777,7 +782,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Minimize to tray</translation> </message> @@ -798,6 +803,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>Typing notifications</translation> </message> @@ -847,7 +857,7 @@ <translation>Device Fingerprint</translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation>Session Keys</translation> </message> @@ -867,22 +877,22 @@ <translation>ENCRYPTION</translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>GENERAL</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation>Open Sessions File</translation> </message> diff --git a/resources/langs/nheko_fi.ts b/resources/langs/nheko_fi.ts index bf7dd6f0..5cc9b9fe 100644 --- a/resources/langs/nheko_fi.ts +++ b/resources/langs/nheko_fi.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation type="unfinished"></translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation>OLM-tilin palauttaminen epäonnistui. Ole hyvä ja kirjaudu sisään uudelleen.</translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation type="unfinished">-- Salattu viesti (salauksen purkuavaimia ei löydetty) --</translation> @@ -672,7 +672,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation type="unfinished"></translation> </message> @@ -685,7 +685,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished">Lukukuittaukset</translation> </message> @@ -715,7 +720,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished">Sulje</translation> </message> @@ -777,7 +782,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Pienennä ilmoitusalueelle</translation> </message> @@ -798,6 +803,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>Kirjoitusilmoitukset</translation> </message> @@ -847,7 +857,7 @@ <translation>Laitteen sormenjälki</translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation>Istunnon avaimet</translation> </message> @@ -867,22 +877,22 @@ <translation>SALAUS</translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>YLEISET ASETUKSET</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation>Avaa Istuntoavaintiedosto</translation> </message> diff --git a/resources/langs/nheko_fr.ts b/resources/langs/nheko_fr.ts index 19236b11..7af4f89e 100644 --- a/resources/langs/nheko_fr.ts +++ b/resources/langs/nheko_fr.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation type="unfinished"></translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation type="unfinished"></translation> </message> @@ -480,7 +480,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation type="unfinished"></translation> @@ -673,7 +673,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation type="unfinished"></translation> </message> @@ -686,7 +686,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished">Accusés de lecture</translation> </message> @@ -716,7 +721,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -778,7 +783,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Réduire à la barre des tâches</translation> </message> @@ -799,6 +804,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>Notifications d'écriture</translation> </message> @@ -848,7 +858,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation type="unfinished"></translation> </message> @@ -868,22 +878,22 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>GÉNÉRAL</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> diff --git a/resources/langs/nheko_ja.ts b/resources/langs/nheko_ja.ts index c0891f1f..8ee5a053 100644 --- a/resources/langs/nheko_ja.ts +++ b/resources/langs/nheko_ja.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation>ユーザーを招待できませんでした: %1</translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation>招待されたユーザー: %1</translation> </message> @@ -50,12 +50,12 @@ <translation>永久追放を解除されたユーザー: %1</translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation>メディアをアップロードできませんでした。やり直して下さい。</translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation>OLMアカウントを復元できませんでした。もう一度ログインして下さい。</translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation>-- 暗号化イベント (復号鍵が見つかりません) --</translation> @@ -671,7 +671,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation>返信</translation> </message> @@ -684,7 +684,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished">返信</translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation>開封確認</translation> </message> @@ -714,7 +719,7 @@ <translation>部屋が開いていません</translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation>閉じる</translation> </message> @@ -776,7 +781,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>トレイへ最小化</translation> </message> @@ -797,6 +802,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>入力状態の通知</translation> </message> @@ -846,7 +856,7 @@ <translation>デバイスの指紋</translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation>セッション鍵</translation> </message> @@ -866,22 +876,22 @@ <translation>暗号化</translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>全般</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation>セッションファイルを開く</translation> </message> diff --git a/resources/langs/nheko_nl.ts b/resources/langs/nheko_nl.ts index 3cb64e6c..b07971bc 100644 --- a/resources/langs/nheko_nl.ts +++ b/resources/langs/nheko_nl.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation type="unfinished"></translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation type="unfinished"></translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation type="unfinished"></translation> @@ -672,7 +672,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation type="unfinished"></translation> </message> @@ -685,7 +685,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished">Leesbevestigingen</translation> </message> @@ -715,7 +720,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -777,7 +782,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Minimaliseren naar systeemvak</translation> </message> @@ -798,6 +803,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>Meldingen bij typen van berichten</translation> </message> @@ -847,7 +857,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation type="unfinished"></translation> </message> @@ -867,22 +877,22 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>ALGEMEEN</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> diff --git a/resources/langs/nheko_pl.ts b/resources/langs/nheko_pl.ts index f6764e82..f28164dc 100644 --- a/resources/langs/nheko_pl.ts +++ b/resources/langs/nheko_pl.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation type="unfinished"></translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Nie udało się przywrócić konta OLM. Spróbuj zalogować się ponownie.</translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation type="unfinished"></translation> @@ -673,7 +673,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation type="unfinished"></translation> </message> @@ -686,7 +686,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished">Potwierdzenia przeczytania</translation> </message> @@ -716,7 +721,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -778,7 +783,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Zminimalizuj do paska zadań</translation> </message> @@ -799,6 +804,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>Powiadomienia o pisaniu</translation> </message> @@ -848,7 +858,7 @@ <translation>Odcisk palca urządzenia</translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation type="unfinished"></translation> </message> @@ -868,22 +878,22 @@ <translation>SZYFROWANIE</translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>OGÓLNE</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation type="unfinished"></translation> </message> diff --git a/resources/langs/nheko_ru.ts b/resources/langs/nheko_ru.ts index a2c8c951..8dde197e 100644 --- a/resources/langs/nheko_ru.ts +++ b/resources/langs/nheko_ru.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation type="unfinished"></translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation>Не удалось восстановить учетную запись OLM. Пожалуйста, войдите снова.</translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation type="unfinished"></translation> @@ -673,7 +673,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation type="unfinished"></translation> </message> @@ -686,7 +686,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished">Подтверждать прочтение</translation> </message> @@ -716,7 +721,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished">Закрыть</translation> </message> @@ -778,7 +783,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>Сворачивать в системную панель</translation> </message> @@ -799,6 +804,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>Сообщать о наборе сообщения</translation> </message> @@ -848,7 +858,7 @@ <translation>Отпечаток устройства</translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation>Ключи сеанса</translation> </message> @@ -868,22 +878,22 @@ <translation>ШИФРОВАНИЕ</translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>ГЛАВНОЕ</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation>Открыть файл сеансов</translation> </message> diff --git a/resources/langs/nheko_zh_CN.ts b/resources/langs/nheko_zh_CN.ts index 0ed3153e..3b7138bb 100644 --- a/resources/langs/nheko_zh_CN.ts +++ b/resources/langs/nheko_zh_CN.ts @@ -4,13 +4,13 @@ <context> <name>ChatPage</name> <message> - <location filename="../../src/ChatPage.cpp" line="+223"/> + <location filename="../../src/ChatPage.cpp" line="+225"/> <source>Failed to invite user: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> - <location line="+868"/> + <location line="+894"/> <source>Invited user: %1</source> <translation type="unfinished"></translation> </message> @@ -50,12 +50,12 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-807"/> + <location line="-815"/> <source>Failed to upload media. Please try again.</source> <translation type="unfinished"></translation> </message> <message> - <location line="+399"/> + <location line="+407"/> <source>Failed to restore OLM account. Please login again.</source> <translation>恢复 OLM 账户失败。请重新登录。</translation> </message> @@ -479,7 +479,7 @@ <context> <name>TimelineModel</name> <message> - <location filename="../../src/timeline/TimelineModel.cpp" line="+714"/> + <location filename="../../src/timeline/TimelineModel.cpp" line="+718"/> <source>-- Encrypted Event (No keys found for decryption) --</source> <comment>Placeholder, when the message was not decrypted yet or can't be decrypted</comment> <translation type="unfinished"></translation> @@ -671,7 +671,7 @@ <context> <name>TimelineRow</name> <message> - <location filename="../qml/TimelineRow.qml" line="+84"/> + <location filename="../qml/TimelineRow.qml" line="+69"/> <source>Reply</source> <translation type="unfinished"></translation> </message> @@ -684,7 +684,12 @@ <context> <name>TimelineView</name> <message> - <location filename="../qml/TimelineView.qml" line="+32"/> + <location filename="../qml/TimelineView.qml" line="+45"/> + <source>Reply</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+4"/> <source>Read receipts</source> <translation type="unfinished">阅读回执</translation> </message> @@ -714,7 +719,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+239"/> + <location line="+241"/> <source>Close</source> <translation type="unfinished"></translation> </message> @@ -776,7 +781,7 @@ <context> <name>UserSettingsPage</name> <message> - <location filename="../../src/UserSettingsPage.cpp" line="+290"/> + <location filename="../../src/UserSettingsPage.cpp" line="+296"/> <source>Minimize to tray</source> <translation>最小化至托盘</translation> </message> @@ -797,6 +802,11 @@ </message> <message> <location line="+2"/> + <source>Show buttons in timeline</source> + <translation type="unfinished"></translation> + </message> + <message> + <location line="+1"/> <source>Typing notifications</source> <translation>打字通知</translation> </message> @@ -846,7 +856,7 @@ <translation>设备指纹</translation> </message> <message> - <location line="-56"/> + <location line="-57"/> <source>Session Keys</source> <translation>会话密钥</translation> </message> @@ -866,22 +876,22 @@ <translation>加密</translation> </message> <message> - <location line="-60"/> + <location line="-61"/> <source>GENERAL</source> <translation>通用</translation> </message> <message> - <location line="+22"/> + <location line="+23"/> <source>INTERFACE</source> <translation type="unfinished"></translation> </message> <message> - <location line="+105"/> + <location line="+106"/> <source>Emoji Font Family</source> <translation type="unfinished"></translation> </message> <message> - <location line="+142"/> + <location line="+147"/> <source>Open Sessions File</source> <translation>打开会话文件</translation> </message> diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml index 0a53eac9..54875f9f 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml @@ -1,6 +1,5 @@ import QtQuick 2.6 import QtGraphicalEffects 1.0 -import Qt.labs.settings 1.0 Rectangle { id: avatar @@ -8,12 +7,6 @@ Rectangle { height: 48 radius: settings.avatar_circles ? height/2 : 3 - Settings { - id: settings - category: "user" - property bool avatar_circles: true - } - property alias url: img.source property string displayName diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml index 2984844f..a9ae5f5c 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml @@ -8,36 +8,21 @@ import im.nheko 1.0 import "./delegates" MouseArea { - id: rowArea - anchors.left: parent.left anchors.right: parent.right height: row.height - - hoverEnabled: true - preventStealing: true propagateComposedEvents: true - acceptedButtons: Qt.NoButton - - property bool showButtons: false + preventStealing: true - Timer { - running: rowArea.containsMouse - interval: 150 - onTriggered: rowArea.state = "showButtons" + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: { + if (mouse.button === Qt.RightButton) + messageContextMenu.show(model.id, model.type, row) + } + onPressAndHold: { + if (mouse.source === Qt.MouseEventNotSynthesized) + messageContextMenu.show(model.id, model.type, row) } - - states: [ - State { - name: "hideButtons" - when: !rowArea.containsMouse - PropertyChanges { target: rowArea; showButtons: false; } - }, - State { - name: "showButtons" - PropertyChanges { target: rowArea; showButtons: true; } - } - ] RowLayout { id: row @@ -70,7 +55,7 @@ MouseArea { } ImageButton { - visible: rowArea.showButtons + visible: timelineSettings.buttons Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 width: 16 @@ -86,7 +71,7 @@ MouseArea { onClicked: chat.model.replyAction(model.id) } ImageButton { - visible: rowArea.showButtons + visible: timelineSettings.buttons Layout.alignment: Qt.AlignRight | Qt.AlignTop Layout.preferredHeight: 16 width: 16 @@ -125,6 +110,7 @@ MouseArea { id: ma anchors.fill: parent hoverEnabled: true + propagateComposedEvents: true } ToolTip.visible: ma.containsMouse diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml index 46cf484b..5612b04c 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml @@ -3,6 +3,7 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 import QtGraphicalEffects 1.0 import QtQuick.Window 2.2 +import Qt.labs.settings 1.0 import im.nheko 1.0 @@ -14,6 +15,18 @@ Item { property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive property int avatarSize: 40 + Settings { + id: settings + category: "user" + property bool avatar_circles: true + } + + Settings { + id: timelineSettings + category: "user/timeline" + property bool buttons: true + } + Menu { id: messageContextMenu palette: colors @@ -29,6 +42,10 @@ Item { property int eventType MenuItem { + text: qsTr("Reply") + onClicked: chat.model.replyAction(messageContextMenu.eventId) + } + MenuItem { text: qsTr("Read receipts") onTriggered: chat.model.readReceiptsAction(messageContextMenu.eventId) } @@ -212,6 +229,7 @@ Item { anchors.fill: parent onClicked: chat.model.openUserProfile(modelData.userId) cursorShape: Qt.PointingHandCursor + propagateComposedEvents: true } } @@ -225,6 +243,7 @@ Item { anchors.fill: parent onClicked: chat.model.openUserProfile(section.split(" ")[0]) cursorShape: Qt.PointingHandCursor + propagateComposedEvents: true } } } diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 2cac783c..930b1b7b 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -55,6 +55,7 @@ UserSettings::load() hasDesktopNotifications_ = settings.value("user/desktop_notifications", true).toBool(); isStartInTrayEnabled_ = settings.value("user/window/start_in_tray", false).toBool(); isGroupViewEnabled_ = settings.value("user/group_view", true).toBool(); + isButtonsInTimelineEnabled_ = settings.value("user/timeline/buttons", true).toBool(); isMarkdownEnabled_ = settings.value("user/markdown_enabled", true).toBool(); isTypingNotificationsEnabled_ = settings.value("user/typing_notifications", true).toBool(); isReadReceiptsEnabled_ = settings.value("user/read_receipts", true).toBool(); @@ -126,6 +127,10 @@ UserSettings::save() settings.setValue("start_in_tray", isStartInTrayEnabled_); settings.endGroup(); + settings.beginGroup("timeline"); + settings.setValue("buttons", isButtonsInTimelineEnabled_); + settings.endGroup(); + settings.setValue("avatar_circles", avatarCircles_); settings.setValue("font_size", baseFontSize_); @@ -190,6 +195,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge startInTrayToggle_ = new Toggle{this}; avatarCircles_ = new Toggle{this}; groupViewToggle_ = new Toggle{this}; + timelineButtonsToggle_ = new Toggle{this}; typingNotifications_ = new Toggle{this}; readReceipts_ = new Toggle{this}; markdownEnabled_ = new Toggle{this}; @@ -292,6 +298,7 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge formLayout_->addRow(new HorizontalLine{this}); boxWrap(tr("Circular Avatars"), avatarCircles_); boxWrap(tr("Group's sidebar"), groupViewToggle_); + boxWrap(tr("Show buttons in timeline"), timelineButtonsToggle_); boxWrap(tr("Typing notifications"), typingNotifications_); formLayout_->addRow(new HorizontalLine{this}); boxWrap(tr("Read receipts"), readReceipts_); @@ -394,6 +401,10 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge settings_->setTypingNotifications(!isDisabled); }); + connect(timelineButtonsToggle_, &Toggle::toggled, this, [this](bool isDisabled) { + settings_->setButtonsInTimeline(!isDisabled); + }); + connect(readReceipts_, &Toggle::toggled, this, [this](bool isDisabled) { settings_->setReadReceipts(!isDisabled); }); @@ -428,6 +439,7 @@ UserSettingsPage::showEvent(QShowEvent *) groupViewToggle_->setState(!settings_->isGroupViewEnabled()); avatarCircles_->setState(!settings_->isAvatarCirclesEnabled()); typingNotifications_->setState(!settings_->isTypingNotificationsEnabled()); + timelineButtonsToggle_->setState(!settings_->isButtonsInTimelineEnabled()); readReceipts_->setState(!settings_->isReadReceiptsEnabled()); markdownEnabled_->setState(!settings_->isMarkdownEnabled()); desktopNotifications_->setState(!settings_->hasDesktopNotifications()); diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h index a1b7b084..ca5a213c 100644 --- a/src/UserSettingsPage.h +++ b/src/UserSettingsPage.h @@ -87,6 +87,12 @@ public: save(); } + void setButtonsInTimeline(bool state) + { + isButtonsInTimelineEnabled_ = state; + save(); + } + void setDesktopNotifications(bool state) { hasDesktopNotifications_ = state; @@ -106,6 +112,7 @@ public: bool isAvatarCirclesEnabled() const { return avatarCircles_; } bool isMarkdownEnabled() const { return isMarkdownEnabled_; } bool isTypingNotificationsEnabled() const { return isTypingNotificationsEnabled_; } + bool isButtonsInTimelineEnabled() const { return isButtonsInTimelineEnabled_; } bool isReadReceiptsEnabled() const { return isReadReceiptsEnabled_; } bool hasDesktopNotifications() const { return hasDesktopNotifications_; } double fontSize() const { return baseFontSize_; } @@ -127,6 +134,7 @@ private: bool isGroupViewEnabled_; bool isMarkdownEnabled_; bool isTypingNotificationsEnabled_; + bool isButtonsInTimelineEnabled_; bool isReadReceiptsEnabled_; bool hasDesktopNotifications_; bool avatarCircles_; @@ -175,6 +183,7 @@ private: Toggle *trayToggle_; Toggle *startInTrayToggle_; Toggle *groupViewToggle_; + Toggle *timelineButtonsToggle_; Toggle *typingNotifications_; Toggle *readReceipts_; Toggle *markdownEnabled_; |