comparison frontends/src/primitivus/primitivus @ 797:84214df2d837

primitivus: fixed bad closure, resulting in menus bug.
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2014 18:02:37 +0100
parents 5642939d254e
children 7f2082b192ed
comparison
equal deleted inserted replaced
796:46aa5ada61bf 797:84214df2d837
303 self.launchAction(callback_id, None, profile_key = self.profile) 303 self.launchAction(callback_id, None, profile_key = self.profile)
304 for id_, type_, path, path_i18n in add_menus: 304 for id_, type_, path, path_i18n in add_menus:
305 assert(type_=="NORMAL") #TODO: manage other types 305 assert(type_=="NORMAL") #TODO: manage other types
306 if len(path) != 2: 306 if len(path) != 2:
307 raise NotImplementedError("Menu with a path != 2 are not implemented yet") 307 raise NotImplementedError("Menu with a path != 2 are not implemented yet")
308 menu.addMenu(path_i18n[0], path_i18n[1], lambda menu: add_menu_cb(id_)) 308 menu.addMenu(path_i18n[0], path_i18n[1], lambda menu,id_=id_: add_menu_cb(id_))
309 309
310 menu_roller = sat_widgets.MenuRoller([(_('Main menu'),menu)]) 310 menu_roller = sat_widgets.MenuRoller([(_('Main menu'),menu)])
311 return menu_roller 311 return menu_roller
312 312
313 def _buildMainWidget(self): 313 def _buildMainWidget(self):