Linux + iPhone Continuity / iMessage / SMS
fix(gtk): "Send Clipboard" button didn't work
Zack Bartel5c90d6302ff0
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.mdindex ddec409..73b8fbc 100644--- a/docs/PROTOCOL.md+++ b/docs/PROTOCOL.md@@ -48,6 +48,12 @@ The clipboard capabilities allow seamless copying and pasting between the Host (---+### `clipboard_send` (Local client -> Daemon)++**Description**: Local socket only. Broadcasts the current Host clipboard to clients as `clipboard_updated`, and replies with `clipboard_content`. Nothing is broadcast when the clipboard is empty.++---+## 2. File TransfersTether supports streaming large binary files seamlessly through JSON using Base64 chunks to adhere to extension native messaging payload restrictions.diff --git a/po/cs.po b/po/cs.poindex 3a8ac0f..ef638b6 100644--- a/po/cs.po+++ b/po/cs.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Czech\n"@@ -2182,6 +2182,10 @@ msgstr[0] "Přeskočena {} položka, která není soubor."msgstr[1] "Přeskočeny {} položky, které nejsou soubor."msgstr[2] "Přeskočeno {} položek, které nejsou soubor."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Schránka je prázdná."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Synchronizace schránky plochy spuštěna."diff --git a/po/de.po b/po/de.poindex 01d28fb..bbe8ce7 100644--- a/po/de.po+++ b/po/de.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: German\n"@@ -2229,6 +2229,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "{} Element übersprungen, das keine Datei ist."msgstr[1] "{} Elemente übersprungen, die keine Dateien sind."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Die Zwischenablage ist leer."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Synchronisierung der Desktop-Zwischenablage ausgelöst."diff --git a/po/es.po b/po/es.poindex f6838bc..2ef2172 100644--- a/po/es.po+++ b/po/es.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: Spanish\n"@@ -2216,6 +2216,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "Se omitió {} elemento que no es un archivo."msgstr[1] "Se omitieron {} elementos que no son archivos."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "El portapapeles está vacío."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Sincronización del portapapeles del escritorio iniciada."diff --git a/po/fr.po b/po/fr.poindex 9eb839f..211e23a 100644--- a/po/fr.po+++ b/po/fr.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-22\n""Last-Translator: Tether project\n""Language-Team: French\n"@@ -2220,6 +2220,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "{} élément non fichier ignoré."msgstr[1] "{} éléments non fichiers ignorés."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Le presse-papiers est vide."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Synchronisation du presse-papiers du bureau déclenchée."diff --git a/po/it.po b/po/it.poindex d511753..3a1b5af 100644--- a/po/it.po+++ b/po/it.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Italian\n"@@ -2213,6 +2213,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "Saltato {} elemento non file."msgstr[1] "Saltati {} elementi non file."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Gli appunti sono vuoti."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Sincronizzazione degli appunti del desktop avviata."diff --git a/po/ja.po b/po/ja.poindex 39e797b..74ac0b8 100644--- a/po/ja.po+++ b/po/ja.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Japanese\n"@@ -2176,6 +2176,10 @@ msgid "Skipped {} non-file item."msgid_plural "Skipped {} non-file items."msgstr[0] "ファイルでない項目を {} 件スキップしました。"+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "クリップボードは空です。"+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "デスクトップのクリップボード同期を実行しました。"diff --git a/po/ko.po b/po/ko.poindex 185a295..3e43f35 100644--- a/po/ko.po+++ b/po/ko.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Korean\n"@@ -2149,6 +2149,10 @@ msgid "Skipped {} non-file item."msgid_plural "Skipped {} non-file items."msgstr[0] "파일이 아닌 항목 {}개를 건너뛰었습니다."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "클립보드가 비어 있습니다."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "데스크탑 클립보드 동기화를 실행했습니다."diff --git a/po/nl.po b/po/nl.poindex 4225c72..d39a5d4 100644--- a/po/nl.po+++ b/po/nl.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Dutch\n"@@ -2202,6 +2202,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "{} item dat geen bestand is overgeslagen."msgstr[1] "{} items die geen bestand zijn overgeslagen."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Het klembord is leeg."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Klembordsynchronisatie van het bureaublad gestart."diff --git a/po/pl.po b/po/pl.poindex ac75339..0fe1d80 100644--- a/po/pl.po+++ b/po/pl.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Polish\n"@@ -2200,6 +2200,10 @@ msgstr[0] "Pominięto {} element niebędący plikiem."msgstr[1] "Pominięto {} elementy niebędące plikami."msgstr[2] "Pominięto {} elementów niebędących plikami."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Schowek jest pusty."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Uruchomiono synchronizację schowka pulpitu."diff --git a/po/pt_BR.po b/po/pt_BR.poindex c41daa7..265b9e0 100644--- a/po/pt_BR.po+++ b/po/pt_BR.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Brazilian Portuguese\n"@@ -2202,6 +2202,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "{} item que não é arquivo foi ignorado."msgstr[1] "{} itens que não são arquivos foram ignorados."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "A área de transferência está vazia."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Sincronização da área de transferência do desktop acionada."diff --git a/po/ru.po b/po/ru.poindex b0e1c99..0c8a605 100644--- a/po/ru.po+++ b/po/ru.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Russian\n"@@ -2202,6 +2202,10 @@ msgstr[0] "Пропущен {} объект, не являющийся файлmsgstr[1] "Пропущено {} объекта, не являющихся файлами."msgstr[2] "Пропущено {} объектов, не являющихся файлами."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Буфер обмена пуст."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Синхронизация буфера обмена рабочего стола запущена."diff --git a/po/sv.po b/po/sv.poindex 3e29609..b998cb0 100644--- a/po/sv.po+++ b/po/sv.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Swedish\n"@@ -2182,6 +2182,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "Hoppade över {} objekt som inte är en fil."msgstr[1] "Hoppade över {} objekt som inte är filer."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Urklippet är tomt."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Urklippssynkronisering för skrivbordet startad."diff --git a/po/tether.pot b/po/tether.potindex cc0cfad..cd257ef 100644--- a/po/tether.pot+++ b/po/tether.pot@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether 0.2.30\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <[email protected]>\n"@@ -1983,6 +1983,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] ""msgstr[1] ""+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr ""+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr ""diff --git a/po/tr.po b/po/tr.poindex e5413af..8aecd8c 100644--- a/po/tr.po+++ b/po/tr.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Turkish\n"@@ -2177,6 +2177,10 @@ msgid_plural "Skipped {} non-file items."msgstr[0] "Dosya olmayan {} öge atlandı."msgstr[1] "Dosya olmayan {} öge atlandı."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Pano boş."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Masaüstü pano eşzamanlaması başlatıldı."diff --git a/po/uk.po b/po/uk.poindex 69243ca..06d9600 100644--- a/po/uk.po+++ b/po/uk.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Ukrainian\n"@@ -2198,6 +2198,10 @@ msgstr[0] "Пропущено {} об'єкт, що не є файлом."msgstr[1] "Пропущено {} об'єкти, що не є файлами."msgstr[2] "Пропущено {} об'єктів, що не є файлами."+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "Буфер обміну порожній."+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "Синхронізацію буфера обміну стільниці запущено."diff --git a/po/zh_CN.po b/po/zh_CN.poindex 70f4855..f319b66 100644--- a/po/zh_CN.po+++ b/po/zh_CN.po@@ -8,7 +8,7 @@ msgid ""msgstr """Project-Id-Version: tether\n""Report-Msgid-Bugs-To: [email protected]\n"-"POT-Creation-Date: 2026-09-12 10:39-0700\n"+"POT-Creation-Date: 2026-09-12 17:22-0700\n""PO-Revision-Date: 2026-08-23\n""Last-Translator: Tether project\n""Language-Team: Simplified Chinese\n"@@ -2102,6 +2102,10 @@ msgid "Skipped {} non-file item."msgid_plural "Skipped {} non-file items."msgstr[0] "已跳过 {} 个非文件项目。"+#: src/gtk/devices_view.cpp+msgid "Clipboard is empty."+msgstr "剪贴板为空。"+#: src/gtk/devices_view.cppmsgid "Desktop Clipboard Sync triggered."msgstr "已触发桌面剪贴板同步。"diff --git a/src/core/src/net.cpp b/src/core/src/net.cppindex 0493be7..08d9541 100644--- a/src/core/src/net.cpp+++ b/src/core/src/net.cpp@@ -1335,6 +1335,19 @@ namespace tether {write_plain_packet(client_fd, payload);continue;}+ } else if (j.contains("command") && j["command"] == "clipboard_send") {+ nlohmann::json resp;+ resp["command"] = "clipboard_content";+ resp["content"] = g_wayland ? g_wayland->get_clipboard() : std::string{};+ if (!resp["content"].get_ref<const std::string&>().empty()) {+ nlohmann::json bc;+ bc["command"] = "clipboard_updated";+ bc["content"] = resp["content"];+ broadcast_message(bc.dump(-1, ' ', false, nlohmann::json::error_handler_t::replace));+ }+ write_plain_packet(client_fd,+ resp.dump(-1, ' ', false, nlohmann::json::error_handler_t::replace) + "\n");+ continue;} else if (j.contains("command") && j["command"] == "new_otp" && j.contains("otp")) {otp_publish(otp_from_json(j["otp"]), j.value("sender_domain", std::string{}), client_fd);std::string payload = "{\"status\":\"ok\"}\n";diff --git a/src/gtk/devices_view.cpp b/src/gtk/devices_view.cppindex c11aa1d..b054593 100644--- a/src/gtk/devices_view.cpp+++ b/src/gtk/devices_view.cpp@@ -1277,7 +1277,8 @@ namespace tether::ui {return true;}if (command == "clipboard_content") {- set_status_action(_("Desktop Clipboard Sync triggered."));+ set_status_action(event.value("content", std::string{}).empty() ? _("Clipboard is empty.")+ : _("Desktop Clipboard Sync triggered."));return true;}if (command == "bt_status") {@@ -1759,7 +1760,7 @@ namespace tether::ui {"clicked",G_CALLBACK(+[](GtkWidget*, gpointer) {nlohmann::json j;- j["command"] = "clipboard_set"; // triggers clipboard send+ j["command"] = "clipboard_send";daemon_send(j);set_status_action(_("Clipboard sync requested..."));}),