mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Ensured icon style menu is correctly sorted.
This commit is contained in:
parent
69bbec8e70
commit
0c0feeae97
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,9 @@ def createToolbarMenu(menubar, menu):
|
||||||
tearoff = menu.cget('tearoff')
|
tearoff = menu.cget('tearoff')
|
||||||
data_dir = os.path.join(menubar.app.dataloader.dir, 'images', 'toolbar')
|
data_dir = os.path.join(menubar.app.dataloader.dir, 'images', 'toolbar')
|
||||||
submenu = MfxMenu(menu, label=n_('Icon Style'), tearoff=tearoff)
|
submenu = MfxMenu(menu, label=n_('Icon Style'), tearoff=tearoff)
|
||||||
for f in os.listdir(data_dir):
|
styledirs = os.listdir(data_dir)
|
||||||
|
styledirs.sort()
|
||||||
|
for f in styledirs:
|
||||||
d = os.path.join(data_dir, f)
|
d = os.path.join(data_dir, f)
|
||||||
if os.path.isdir(d) and os.path.exists(os.path.join(d, 'small')):
|
if os.path.isdir(d) and os.path.exists(os.path.join(d, 'small')):
|
||||||
name = f.replace('_', ' ').capitalize()
|
name = f.replace('_', ' ').capitalize()
|
||||||
|
|
Loading…
Add table
Reference in a new issue