[i18ncube] access to appearsin_addmenu config through uicfg directly 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 15 Sep 2009 14:10:52 +0200
branch3.5
changeset 3221 3422d2188940
parent 3220 11b6016e3970
child 3223 480b003cd31b
child 3224 56d4104b4261
[i18ncube] access to appearsin_addmenu config through uicfg directly
devtools/devctl.py
--- a/devtools/devctl.py	Mon Sep 14 19:01:37 2009 +0200
+++ b/devtools/devctl.py	Tue Sep 15 14:10:52 2009 +0200
@@ -23,6 +23,7 @@
 from cubicweb import CW_SOFTWARE_ROOT as BASEDIR, BadCommandUsage, underline_title
 from cubicweb.__pkginfo__ import version as cubicwebversion
 from cubicweb.toolsutils import Command, copy_skeleton
+from cubicweb.web import uicfg
 from cubicweb.web.webconfig import WebConfiguration
 from cubicweb.server.serverconfig import ServerConfiguration
 
@@ -151,7 +152,7 @@
             add_msg(w, rschema.description)
     w('# add related box generated message\n')
     w('\n')
-    actionbox = vreg['boxes']['edit_box'][0]
+    appearsin_addmenu = uicfg.actionbox_appearsin_addmenu
     for eschema in schema.entities():
         if eschema.is_final():
             continue
@@ -170,8 +171,8 @@
                             subjtype, objtype = teschema, eschema
                         if librschema.has_rdef(subjtype, objtype):
                             continue
-                    if actionbox.appearsin_addmenu.etype_get(eschema, rschema,
-                                                             role, teschema):
+                    if appearsin_addmenu.etype_get(eschema, rschema, role,
+                                                   teschema):
                         if role == 'subject':
                             label = 'add %s %s %s %s' % (eschema, rschema,
                                                          teschema, role)