aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-gtk/gtk-label.h
AgeCommit message (Collapse)AuthorFilesLines
5 daysGTK: fixed bogus "(Unnamed)" strings in the message lineRobin Haberkorn1-1/+1
* An empty message line would actually contain "(Unnamed)". * Info popups must discern the "(Unnamed)" string (e.g. a file with that name) from the actual unnamed buffer since when clicking the unnamed buffer, you must insert nothing (`EB$`). Therefore, the unnamed buffer is represented as an empty string. "(Unnamed)" is just a placeholder for rendering. This was carried over into TecoGtkLabel which always rendered the empty string as "(Unnamed)". But TecoGtkLabels are used for the info and message lines as well. * Therefore the fallback/placeholder string is now configurable per label. * On the downside, this wastes one more machine word per TecoGtkLabel. The alternative would have been to use {NULL, 0} as the representation for unnamed buffers, so you can actually discern the empty string from the unnamed buffer representation. However it feels wrong to have this kind of info-popup-specific handling in a more generic label widget. Also, for consistency we'd have to touch the Curses UI as well where the unnamed buffer is also currently internally represented by empty strings (as opposed to NULL). * Regression introduced by 0c89fb700957e411885e7e7835e15f441e8b5e84, so it was in v2.5.0.
13 daysupdated copyright to 2026Robin Haberkorn1-1/+1
2025-12-28teco_string_t is now passed by value like a scalar if the callee isn't ↵Robin Haberkorn1-1/+1
expected to modify it * When passing a struct that should not be modified, I usually use a const pointer. * Strings however are small 2-word objects and they are often now already passed via separate `gchar*` and gsize parameters. So it is consistent to pass teco_string_t by value as well. A teco_string_t will usually fit into registers just like a pointer. * It's now obvious which function just _uses_ and which function _modifies_ a string. There is also no chance to pass a NULL pointer to those functions.
2025-07-31implemented ^T command: allows typing by code and getting characters from ↵Robin Haberkorn1-0/+2
stdin or the user * n:^T always prints bytes (cf. :^A) * ^T without arguments returns a codepoint or byte from stdin. In interactive mode, this currentply places a cursor in the message line and waits for a keypress.
2025-02-23support mouse interaction with popup windowsRobin Haberkorn1-0/+1
* Curses allows scrolling with the scroll wheel at least if mouse support is enabled via ED flags. Gtk always supported that. * Allow clicking on popup entries to fully autocomplete them. Since this behavior - just like auto completions - is parser state-dependant, I introduced a new state method (insert_completion_cb). All the implementations are currently in cmdline.c since there is some overlap with the process_edit_cmd_cb implementations. * Fixed pressing undefined function keys while showing the popup. The popup area is no longer redrawn/replaced with the Scintilla view. Instead, continue to show the popup.
2025-01-13updated copyright to 2025Robin Haberkorn1-1/+1
2024-01-21updated copyright to 2024Robin Haberkorn1-1/+1
2023-04-05updated copyright to 2023Robin Haberkorn1-1/+1
2022-06-21updated copyright to 2022 and updated TODORobin Haberkorn1-1/+1
2021-06-08get rid of the GObject Builder (GOB2): converted teco-gtk-info-popup.gob and ↵Robin Haberkorn1-0/+34
teco-gtk-label.gob to plain C * Using modern GObject idioms and macros greatly reduces the necessary boilerplate code. * The plain C versions of our GObject classes are now "final" (cannot be derived) This means we can hide the instance structures from the headers and avoid using explicit private fields. * Avoids some deprecation warnings when building the Gtk UI. * GOB2 is apparently no longer maintained, so this seems like a good idea in the long run. * The most important reason however is that there is no precompiled GOB2 for Windows which prevents compilation on native Windows hosts, eg. during nightly builds. This is even more important as Gtk+3 is distributed on Windows practically exclusively via MSYS. (ArchLinux contains MinGW gtk3 packages as well, so cross-compiling from ArchLinux would have been an alternative.)