symbols: provide a bit more path information in the goto-symbol popup.
commitb116a66862eb89b0c12833eb9bc6ecafcb6c7284
authorThomas Martitz <kugel@rockbox.org>
Thu, 23 Mar 2017 20:58:43 +0000 (23 21:58 +0100)
committerThomas Martitz <kugel@rockbox.org>
Mon, 3 Dec 2018 20:51:01 +0000 (3 21:51 +0100)
treeede53fd77a6844c140f40f8406020e6708b268b1
parent4956b05d1e9052861deb3608673da25741bc6013
symbols: provide a bit more path information in the goto-symbol popup.

From #1069:
> At the moment if symbols of the same name are defined in identically named
> files, it's hard to distinguish which file is which because there's no path
> in the popup.

> The popup should show part of the path until a directory where the paths
> differ so it's possible to distinguish the different files. At the same time
> there should probably be some top limit for the length of the paths as they
> can make the popup too wide.

This addresses the above by showing more of the file's paths but still try
to make it as short as possible. The file list is processed by the new
utils_strv_shorten_file_list(), as a result the popup will list files with
the common prefix stripped and the longest common sub-path ellipsized.

As a result, the file list shows enough of the path to make them unique but
still is still very short and doesn't make the dialog too wide.

Fixes #1069.
src/symbols.c
src/utils.c