The eel_str_double_underscores and eel_str_capitalize
functions didn't have documentation.
Added importance of eel_str_double_underscores as well.
It's good practice to have documentation for functions
in the long term.
f42979f0b0 changed the ellipsis to a
unicode one, which is one character in length, in turn changing the
expected output.
For cases where the truncation length is zero, the expected output is
changed to NULL, as 536505728e added an
assertion.
This commit tries to make the function more readable and fixes the allocation of
the new string: the truncated string is of the same size as the source string.
This can be fixed by adding a couple of different allocations. :)
Some comments were trimmed down or removed.
Currently, the process for getting the common prefix of a list of file
names is a tad too greedy:
1. Find the common prefix of all the strings.
2. Strip the extension from the prefix.
3. Strip trailing punctuation.
Step 2 may strip dots if there’s trailing whitespace and step 3 may
strip useful punctuation (e.g. parentheses). This commit reworks the
process as such:
1. Strip the extension from all the file names.
2. Find the common prefix of all the strings.
3. Trim trailing whitespace.
Fixes#174.
And make the style of Nautilus the same for all files.
Hopefully we can fix all the style issues we can find in the next days,
so expect a little of movement on this.
https://bugzilla.gnome.org/show_bug.cgi?id=770564
New Folder with Selection currently doesn't offer a folder name. It
would be better if it suggested a folder name based on the files that
are selected.
With this change, it now looks for a common filename prefix of the
selected files, and pre-populates the folder name entry with that. If no
common prefix is found that is greater than 3 characters long, the
folder name entry will be left blank.
https://bugzilla.gnome.org/show_bug.cgi?id=747907
Vim and emacs modelines are used to specify some of the code style in the code.
However, this is misleading and poorly supported since nautilus had a mix of
code style for some time.
Also, the mode lines doesn't specify the whole code style, so we will need to
use a different tool as well to specify the whole code style.
For that, we can just use a different tool for everything.
So remove the mode lines, and in a short future we will reestyle the nautilus
code to have a single code style, and use a tool like editorconfig to specify
the whole code style.