On Thu, 3 Jan 2002, Allan Rae wrote:
> On WindowMaker-0.65.1,
>
> With: I get:
> "LyX: /mnt/mobile/thesis/arrae_thesis.lyx" "LyX:...sys.lyx"
> "LyX: arrae_thesis.lyx" "LyX...esis.lyx"
> "LyX:arrae_thesis.lyx" "..._thesis.lyx"
> "arrae_thesis.lyx" "..._thesis.lyx"
>
> "LaTeXConfig.lyx" "...Config.lyx"
>
> I think that since we are showing the whole filename and it ends with
> .lyx we can get away without showing the "LyX" part -- unless there
> are no files loaded. I'll change your patch to this and commit.
Would I be being too tricky if I did this?
/* Show only the filename if it's available and long
enough to overflow an icon if "LyX: " is included */
if (8 > OnlyFilename(cur_title).length()) {
icon_title += ": " + OnlyFilename(cur_title);
} else {
icon_title = OnlyFilename(cur_title);
}
This ensures that long names get just the name.
Shorter names get the "LyX: " bit added.
Thus, "doovy.lyx" is shown as "doovy.lyx" while "del.lyx" would be
shown as "LyX: del.lyx" and "LaTeXConfig.lyx" will appear as
"...Config.lyx" (at least on my WindowMaker installation it will
anyway).
Allan. (ARRae)