WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Destop menu truncates window titles from the @ sign to the end of line.  (Read 310 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12910
I recently noticed something while working on a script.



In the image above, the title bar of the terminal says:
Quote
mc [tc@E310]:~/Scripting/T_BirdNotifications
but the desktop menu lists that windows title as:
Quote
mc [tc
As you can see, everything from the @ sign to the end of the line is missing.

This occurs with flwm_topside.

So my questions are this:

1. Has anyone else seen this on other window managers (openbox, hackedbox, jwm, etc)?

2. Is there any downside to replacing the @ sign in my command prompt?
   For example, from this:
Code: [Select]
tc@E310:~$    To this:
Code: [Select]
tc(at)E310:~$    Or this:
Code: [Select]
tc.E310:~$    Or something else?

Offline mjmouse

  • Newbie
  • *
  • Posts: 12
Looks like something FLTK-specific:

Quote
The label() method sets the string that is displayed for the label. Symbols can be included with the label string by escaping them using the "@" symbol - "@@" displays a single at sign. These are the available symbols:

[...snip...]

Thus, to show a very large arrow pointing downward you would use the label string "@+92->".

https://www.fltk.org/doc-1.4/common.html (about half-way down)

The source only does the double-escaping for & signs, not @:
https://github.com/tinycorelinux/flwm/blob/9b09bf570d4702e39c09262013de7e1d58cb4373/Menu.C#L93-L103

And testing also shows that 'editor' doesn't escape @ signs either.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12910
Hi mjmouse
Thank you. That was very helpful.

This was under TC10 which uses FLTK-1.3. Turns out it does display the
@ sign if you pass it "@@".

I think I'll just change the @ sign to something that won't get filtered out.