| Age | Commit message (Collapse) | Author | Files | Lines |
|
* 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.
|
|
|
|
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.
|
|
* 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.
|
|
the popup entries
* By default, use the "text" cursor - this is the default Scintilla cursor, but
inhibited by the GtkEventBox I used to catch all input events.
* When processing input events, the cursor is changed to "wait".
This is done with a small delay in order to avoid flickering during normal typing.
The cursor is only changed after 100ms of activity, i.e. only when executing long loops
or external programs.
* We use the raw GSource API since it's tricky to work with source ids if the
source could be removed in the meantime.
* The popup entries' cursor is also changed to "pointer" (hand) to give a hint that
it can be clicked.
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
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.)
|