Skip to content

Commit

Permalink
Trim strings in the select all games submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
joeraz committed Nov 15, 2024
1 parent b6454ce commit 8cbac32
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pysollib/ui/tktile/menubar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,8 +1119,8 @@ def sort_func(gi):
if not mahjongg_games[n:n + d]:
break
m = min(n + d - 1, len(mahjongg_games) - 1)
label = mahjongg_games[n].short_name[:3] + ' - ' + \
mahjongg_games[m].short_name[:3]
label = mahjongg_games[n].short_name[:3].strip() + ' - ' + \
mahjongg_games[m].short_name[:3].strip()
submenu = MfxMenu(menu, label=label, name=None)
self._addSelectGameSubSubMenu(mahjongg_games[n:n + d], submenu,
command, variable, short_name=True)
Expand Down Expand Up @@ -1182,7 +1182,8 @@ def _addSelectAllGameSubMenu(self, games, menu, command, variable):
if not games[n:n+d]:
break
m = min(n+d-1, len(games)-1)
label = games[n].name[:3] + ' - ' + games[m].name[:3]
label = games[n].name[:3].strip() + ' - ' + \
games[m].name[:3].strip()
submenu = MfxMenu(menu, label=label, name=None)
self._addSelectGameSubSubMenu(games[n:n+d], submenu,
command, variable)
Expand Down

0 comments on commit 8cbac32

Please sign in to comment.