@@ -89,82 +89,96 @@ def refill_menu():
8989 sc_category = Menu .Category (0 , locale .sc_label )
9090 sc_category .add (
9191 Menu .Item (
92- locale .decode_sc , locale .decode_sc_description , decode_textures_only
92+ name = locale .decode_sc ,
93+ description = locale .decode_sc_description ,
94+ handler = decode_textures_only ,
9395 )
9496 )
9597 sc_category .add (
9698 Menu .Item (
97- locale .encode_sc , locale .encode_sc_description , encode_textures_only
99+ name = locale .encode_sc ,
100+ description = locale .encode_sc_description ,
101+ handler = encode_textures_only ,
98102 )
99103 )
100104 sc_category .add (
101105 Menu .Item (
102- locale .decode_by_parts ,
103- locale .decode_by_parts_description ,
104- decode_and_render_objects ,
106+ name = locale .decode_by_parts ,
107+ description = locale .decode_by_parts_description ,
108+ handler = decode_and_render_objects ,
105109 )
106110 )
107111 sc_category .add (
108112 Menu .Item (
109- locale .encode_by_parts ,
110- locale .encode_by_parts_description ,
111- collect_objects_and_encode ,
113+ name = locale .encode_by_parts ,
114+ description = locale .encode_by_parts_description ,
115+ handler = collect_objects_and_encode ,
112116 )
113117 )
114118 sc_category .add (
115119 Menu .Item (
116- locale .overwrite_by_parts ,
117- locale .overwrite_by_parts_description ,
118- lambda : collect_objects_and_encode (True ),
120+ name = locale .overwrite_by_parts ,
121+ description = locale .overwrite_by_parts_description ,
122+ handler = lambda : collect_objects_and_encode (True ),
119123 )
120124 )
121125 menu .add_category (sc_category )
122126
123127 csv_category = Menu .Category (1 , locale .csv_label )
124128 csv_category .add (
125129 Menu .Item (
126- locale .decompress_csv , locale .decompress_csv_description , decompress_csv
130+ name = locale .decompress_csv ,
131+ description = locale .decompress_csv_description ,
132+ handler = decompress_csv ,
127133 )
128134 )
129135 csv_category .add (
130136 Menu .Item (
131- locale .compress_csv , locale .compress_csv_description , compress_csv
137+ name = locale .compress_csv ,
138+ description = locale .compress_csv_description ,
139+ handler = compress_csv ,
132140 )
133141 )
134142 menu .add_category (csv_category )
135143
136144 other = Menu .Category (10 , locale .other_features_label )
137145 other .add (
138- Menu .Item (locale .check_update , locale .version % config .version , check_update )
146+ Menu .Item (
147+ name = locale .check_update ,
148+ description = locale .version % config .version ,
149+ handler = check_update ,
150+ )
139151 )
140- other .add (Menu .Item (locale .check_for_outdated , None , check_for_outdated ))
152+ other .add (Menu .Item (name = locale .check_for_outdated , handler = check_for_outdated ))
141153 other .add (
142154 Menu .Item (
143- locale .reinit ,
144- locale .reinit_description ,
145- lambda : (initialize (), refill_menu ()),
155+ name = locale .reinit ,
156+ description = locale .reinit_description ,
157+ handler = lambda : (initialize (), refill_menu ()),
146158 )
147159 )
148160 other .add (
149161 Menu .Item (
150- locale .change_language ,
151- locale .change_lang_description % config .language ,
152- lambda : (config .change_language (locale .change ()), refill_menu ()),
162+ name = locale .change_language ,
163+ description = locale .change_lang_description % config .language ,
164+ handler = lambda : (config .change_language (locale .change ()), refill_menu ()),
153165 )
154166 )
155167 other .add (
156168 Menu .Item (
157- locale .clear_directories ,
158- locale .clean_dirs_description ,
159- lambda : clear_directories () if Console .question (locale .clear_qu ) else - 1 ,
169+ name = locale .clear_directories ,
170+ description = locale .clean_dirs_description ,
171+ handler = lambda : clear_directories ()
172+ if Console .question (locale .clear_qu )
173+ else - 1 ,
160174 )
161175 )
162176 other .add (
163177 Menu .Item (
164- locale .toggle_update_auto_checking ,
165- locale .enabled if config .auto_update else locale .disabled ,
166- lambda : (config .toggle_auto_update (), refill_menu ()),
178+ name = locale .toggle_update_auto_checking ,
179+ description = locale .enabled if config .auto_update else locale .disabled ,
180+ handler = lambda : (config .toggle_auto_update (), refill_menu ()),
167181 )
168182 )
169- other .add (Menu .Item (locale .exit , None , lambda : (clear (), exit ())))
183+ other .add (Menu .Item (name = locale .exit , handler = lambda : (clear (), exit ())))
170184 menu .add_category (other )
0 commit comments