Commit Graph
3 Commits
Author SHA1 Message Date
lotherk c2f93e1df4 dtchat: add the Telegram and WhatsApp adapter skeletons (T8.1/T9.1)
Telegram: telegram_adapter.c speaks protocol v1 with settings api_id/api_hash/phone/database, TDLib 1.8.57 through td_json (setTdlibParameters, phone/code/password as request/answer, updateNewMessage, sendMessage), states and disconnect; without TDLib it still answers hello and reports the missing library as a fatal error. Debian's versioned TDLib directories are found by configure (header and lib scan) and passed as TDLIB_CPPFLAGS/TDLIBLIB; the adapter is always built (stub without the library). WhatsApp: a Go program under whatsapp_adapter/ with go.mod/go.sum using whatsmeow from the module cache and modernc sqlite, QR pairing through whatsmeow, message events and SendMessage; without Go it is not built (MCDE_GO). Its QR is sent as qrText, which the request dialog now shows when there is no bitmap. Both adapters have DTCHAT_*_FAKE modes; tests/telegram_fake.py (15 checks) and tests/whatsapp_fake.py (13 checks) drive hello, configure, connect, the pairing request/answer, online, send echo and bye, all green stand-alone. The harness runs them when the binaries exist (50 entries with both). TDLib and golang-go were installed with apt; the WhatsApp module builds with GOPROXY=off from the cache. Real accounts, QR bitmap and files follow.
2026-11-17 11:40:59 +00:00
lotherk f46a914c73 dtchat: add the message catalog and the German UI (T10.4)
i18n.c opens catopen("dtchat", NL_CAT_LOCALE) and dc_text(id, fallback) reads set 1; the program calls dc_i18n_init after setlocale. The visible labels of the main window, the account editor, the request/peer/file/pair dialogs and the local status texts use ui_text.h ids; dtchat.msg (English) has 75 entries and programs/localized/de_DE.UTF-8/msg/dtchat.msg the German copy (ASCII transliteration, core font). test_i18n builds both catalogs with gencat and checks File/Datei, Send/Senden and the fallback; the German run under Xvfb shows Datei/Bearbeiten/Ansicht/Konversation/Hilfe, In der Naehe and Senden (screenshot build/mcde-shots/dtchat-t104-de.png) and the smoke stays green. Dynamic formatted statuses are partly still English. The in-tree build is pending: a foreign release chain holds the lock (pid 141722).
2026-11-17 07:06:55 +00:00
lotherk 64979ecebd dtchat: add the request, error and QR dialogs (T2.5)
ui_request.c turns one adapter request object into a Motif dialog: code, password (masked via modifyVerify, the real value kept out of the widget), notice, confirm and qr. The QR bitmap is base64 (one byte per module), drawn into a depth-1 pixmap and shown as XmNlabelPixmap; no QR library. The answer is delivered exactly once from OK/Yes/No, Cancel, the timeout or the window-manager close, and the dialog frees itself before the callback runs. dtchat_error_dialog is the one-button error/notice window. The smoke test exercises all five kinds plus the timeout; --demo-request qr|code|password|error shows one for screenshots. Standalone smoke PASS; QR and masked password verified on Xvfb (build/mcde-shots/dtchat-t25.png). make mcde-host still blocked by the foreign release build holding build/.build.lock (pid 175328).
2026-11-16 18:46:56 +00:00