Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.6, 0.7, and 0.7.1

cmenu: keep init menu visible but disable it accordingly

Changeset 718940048bf1

Parent 969788b53534

by TK Soh

Changes to one file · Browse files at 718940048bf1 Showing diff from parent 969788b53534 Diff from another changeset...

 
403
404
405
406
407
408
409
410
 
 
 
 
 
411
412
413
 
403
404
405
 
 
 
 
 
406
407
408
409
410
411
412
413
@@ -403,11 +403,11 @@
  result.append(TortoiseMenu(_("Create Clone"),   _("Clone a repository here"),   self._clone, icon="menuclone.ico")) - if repo.root != rpath: - result.append(TortoiseMenu(_("Create Repository Here"), - _("create a new repository in this directory"), - self._init, icon="menucreaterepos.ico", - state=os.path.isdir(rpath))) + can_init = repo.root != rpath and os.path.isdir(rpath) + result.append(TortoiseMenu(_("Create Repository Here"), + _("create a new repository in this directory"), + self._init, icon="menucreaterepos.ico", + state=can_init))     # config setttings menu   result.append(TortoiseMenuSep())