diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2025-12-23 13:54:17 +0100 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2025-12-23 13:54:17 +0100 |
| commit | 0c89fb700957e411885e7e7835e15f441e8b5e84 (patch) | |
| tree | 56d756d6fa1923a5198504a322ec9c67cf274922 /src/interface.h | |
| parent | 2592ef74ab2eba57c32fe21993ce01e9698b106f (diff) | |
fixed clicking the "(Unnamed)" buffer in 0EB popupsHEADmaster-fmsbw-cimaster
* When constructing the list of popup items, the unnamed buffer is stored as the empty string
instead of a prerendered "(Unnamed)".
Using the empty string simplifies autocompletions, which will actually have to insert nothing
at all (in addition to terminating the string).
* Since unnamed buffers are now special in the popup list, we can render them with special
icons as well.
Currently, only on Curses we use a file symbol with a question mark.
There doesn't appear to be a fitting standard Freedesktop icon to use on GTK and there
isn't even any fitting standard emblem to lay over the default file icon.
Diffstat (limited to 'src/interface.h')
| -rw-r--r-- | src/interface.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/interface.h b/src/interface.h index 8ab66ef..24df14c 100644 --- a/src/interface.h +++ b/src/interface.h @@ -135,7 +135,17 @@ typedef enum { TECO_POPUP_DIRECTORY } teco_popup_entry_type_t; -/** @pure */ +/** + * Add entry to popup. + * + * @param type Entry type + * @param name + * Name string of the entry or NULL for "(Unnamed)". + * It is not necessarily null-terminated. + * @param name_len Length of string in name + * @param highlight Whether to highlight the entry + * @pure + */ void teco_interface_popup_add(teco_popup_entry_type_t type, const gchar *name, gsize name_len, gboolean highlight); /** @pure */ |
