Files
mcde/programs/dtchat/ui_file.h
T
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

29 lines
1021 B
C

/*
* ui_file.h -- the local file dialogs
*
* License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree.
*/
#ifndef _Dtchat_ui_file_h
#define _Dtchat_ui_file_h
#include <X11/Intrinsic.h>
#include "dc_internal.h"
typedef struct DtFileOfferDialog DtFileOfferDialog;
typedef void (*DtFileOfferAnswerFn)(int accepted, void *arg);
typedef void (*DtFileSendFn)(const char *peer_id, const char *path,
void *arg);
/* "PEER offers NAME (SIZE bytes)" with Accept and Reject. */
DtFileOfferDialog *dtchat_file_offer_dialog(Widget parent, const char *peer,
const char *name, long long size, DtFileOfferAnswerFn answer, void *arg);
void dtchat_file_offer_dialog_destroy(DtFileOfferDialog *dialog);
Widget dtchat_file_offer_dialog_shell(const DtFileOfferDialog *dialog);
/* A file selection box; on OK FN(PEER_ID, PATH) runs and the box closes. */
void dtchat_file_send_dialog(Widget parent, const char *peer_id,
const char *peer_name, DtFileSendFn fn, void *arg);
#endif /* _Dtchat_ui_file_h */