Forum › Forums › antiX-development › Development › A few easy suggestions from watching video reviews
- This topic has 62 replies, 13 voices, and was last updated Apr 22-3:42 am by BobC.
-
AuthorPosts
-
April 20, 2022 at 10:32 pm #81847Forum Admin
Dave
::I have given up on the original topic. I guess asking Zebras to change their stripes is just too much!
OT:
Marcelo, I will try to come up with a tweaked version of the menu generator. When the comment needs to be included, how many characters should it be limited to? It seems to me that we could truncate it and end the line with “…” to let the user know that the text to display was too long.
Logic as follows:
If Name < 3 words
If generic name not contained in name
Name = Name – GenericName
else
Name = Name – Comment truncated [if truncated …]Let me know if that logic looks reasonable
If looking into desktop-menu, there likely will be an update to add an option to generate with generic names.
https://gitlab.com/antiX-Dave/desktop-menu-antixThere is a related change for app-select that will also likely be an update.
https://gitlab.com/antiX-Dave/app-select-antixDoing some basic testing / reviewing before making it available to an update and further testing.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
April 21, 2022 at 12:03 am #81857ModeratorBobC
::Dave, It’s great to see you interested in this. I do actually have it working if it will help save you any time, and I’d be happy to help with testing your version. As was suggested above, I agree it would make sense to save a setting that remembers if you prefer short or verbose menu text. I’m not a python programmer, but you are welcome to use whatever is useful from my efforts. The idea was Xecure’s but he only looked at the comment, and just added it all of the time. This is desktop-menu starting at line 171:
elif isinstance(entry, xdg.Menu.MenuEntry): de = entry.DesktopEntry desktopFile=str(entry) OnlyShowIn = de.getOnlyShowIn() if not os.path.isfile("/usr/share/applications/antix/"+desktopFile) and not OnlyShowIn: name = de.getName() or entry.DesktopFileID # BobC 04/20/2022 start mods - add description from GenericName or Comment genericname = de.getGenericName() comment = de.getComment() namewords = len(name.split()) if namewords < 3: if genericname != '' and not re.search(genericname, name, re.IGNORECASE): name += " - " + genericname else: if comment != '' and not re.search(comment, name, re.IGNORECASE): name += " - " + comment # BobC 04/20/2022 end mods if not no_icons: icon = find_icon(de) or default_entry_icon execute = exec_clean2_re.sub('%', exec_clean1_re.sub('', de.getExec()))April 22, 2022 at 3:42 am #81900ModeratorBobC
::1. The namewords < 3 is not good design.
2. Based on how Marcelo was using it, it should have the option of including the generic text and/or the comment to maximize the clarity of translation.
3. IceWM will limit the width of what is displayed to show as much as reasonably possible based on screen size and resolution.
4. Once Dave forwards his version to anti, he has given me instructions to provide mine which I based on his new code.
5. I sent mine to Dave and Marcelo along with instructions to test them for IceWM. If anyone else would like to try it to see how well it translates or not, let me know. I could either post it here, or send via private message. In the meantime I’ll be testing on JWM and Fluxbox for Dave, so more tweaking is likely needed for those.
6. It worked fine with IceWM, JWM and Fluxbox with ” – ” as a delimiter.- This reply was modified 1 year ago by BobC.
-
AuthorPosts
- You must be logged in to reply to this topic.