Changeset 3001


Ignore:
Timestamp:
Aug 11, 2017 10:13:46 PM (4 years ago)
Author:
toby
Message:

remove 2frame ref from Help menu

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3000 r3001  
    35043504                text='&Regress to an old GSAS-II version')
    35053505            frame.Bind(wx.EVT_MENU, self.OnSelectVersion, helpobj)
    3506             if GSASIIpath.svnTestBranch():
    3507                 msg = "&Switch back to standard GSAS-II version"
    3508             else:
    3509                 msg = "&Switch to test (2frame) GSAS-II version"
    3510             helpobj = self.Append(
    3511                 help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL,text=msg)
    3512             frame.Bind(wx.EVT_MENU, self.OnSelectBranch, helpobj)
     3506            # if GSASIIpath.svnTestBranch():
     3507            #     msg = "&Switch back to standard GSAS-II version"
     3508            # else:
     3509            #     msg = "&Switch to test (2frame) GSAS-II version"
     3510            # helpobj = self.Append(
     3511            #     help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL,text=msg)
     3512            # frame.Bind(wx.EVT_MENU, self.OnSelectBranch, helpobj)
    35133513        # provide special help topic names for extra items in help menu
    35143514        for lbl,indx in morehelpitems:
     
    37423742        return
    37433743
    3744     def OnSelectBranch(self,event):
    3745         '''Allow the user to select branch of GSAS-II or return to trunk
    3746         N.B. Name of branch to use is hard-coded here. Must contain a slash
    3747         '''
    3748         testbranch = '/branch/2frame'
    3749         if not GSASIIpath.svnTestBranch():
    3750             dlg = wx.MessageDialog(self.frame,
    3751                                    'Switching to test GSAS-II version',
    3752                                    'Confirm Switch',
    3753                                    wx.OK|wx.CANCEL)
    3754             if dlg.ShowModal() != wx.ID_OK: return
    3755             branch = testbranch
    3756         else:
    3757             dlg = wx.MessageDialog(self.frame,
    3758                                    'Switching back to standard GSAS-II version',
    3759                                    'Confirm Switch',
    3760                                    wx.OK|wx.CANCEL)
    3761             if dlg.ShowModal() != wx.ID_OK: return
    3762             branch = 'trunk'
    3763         print('start switch')
    3764         self.frame.OnFileSave(event)
    3765         GPX = self.frame.GSASprojectfile
    3766         GSASIIpath.svnUpdateProcess(projectfile=GPX,branch=branch)
     3744    # def OnSelectBranch(self,event):
     3745    #     '''Allow the user to select branch of GSAS-II or return to trunk
     3746    #     N.B. Name of branch to use is hard-coded here. Must contain a slash
     3747    #     '''
     3748    #     testbranch = '/branch/2frame'
     3749    #     if not GSASIIpath.svnTestBranch():
     3750    #         dlg = wx.MessageDialog(self.frame,
     3751    #                                'Switching to test GSAS-II version',
     3752    #                                'Confirm Switch',
     3753    #                                wx.OK|wx.CANCEL)
     3754    #         if dlg.ShowModal() != wx.ID_OK: return
     3755    #         branch = testbranch
     3756    #     else:
     3757    #         dlg = wx.MessageDialog(self.frame,
     3758    #                                'Switching back to standard GSAS-II version',
     3759    #                                'Confirm Switch',
     3760    #                                wx.OK|wx.CANCEL)
     3761    #         if dlg.ShowModal() != wx.ID_OK: return
     3762    #         branch = 'trunk'
     3763    #     print('start switch')
     3764    #     self.frame.OnFileSave(event)
     3765    #     GPX = self.frame.GSASprojectfile
     3766    #     GSASIIpath.svnUpdateProcess(projectfile=GPX,branch=branch)
    37673767
    37683768################################################################################
  • trunk/GSASIIpath.py

    r3000 r3001  
    511511    return os.path.join(path2GSAS2,'bindist')
    512512
    513 def svnTestBranch(loc=None):
    514     '''Returns the name of the branch directory if the installation has been switched.
    515     Returns none, if not a branch
    516     the test 2frame branch. False otherwise
    517     '''
    518     if loc is None: loc = path2GSAS2
    519     svn = whichsvn()
    520     if not svn:
    521         print('**** unable to load files: svn not found ****')
    522         return ''
    523     cmd = [svn, 'info', loc]
    524     if proxycmds: cmd += proxycmds
    525     p = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
    526     res,err = p.communicate()
    527     for l in res.split('\n'):
    528         if "Relative URL:" in l: break
    529     if "/branch/" in l:
    530         return l[l.find("/branch/")+8:].strip()
    531     else:
    532         return None
     513# def svnTestBranch(loc=None):
     514#     '''Returns the name of the branch directory if the installation has been switched.
     515#     Returns none, if not a branch
     516#     the test 2frame branch. False otherwise
     517#     '''
     518#     if loc is None: loc = path2GSAS2
     519#     svn = whichsvn()
     520#     if not svn:
     521#         print('**** unable to load files: svn not found ****')
     522#         return ''
     523#     cmd = [svn, 'info', loc]
     524#     if proxycmds: cmd += proxycmds
     525#     p = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
     526#     res,err = p.communicate()
     527#     for l in res.split('\n'):
     528#         if "Relative URL:" in l: break
     529#     if "/branch/" in l:
     530#         return l[l.find("/branch/")+8:].strip()
     531#     else:
     532#         return None
    533533   
    534534def svnSwitch2branch(branch=None,loc=None,svnHome=None):
Note: See TracChangeset for help on using the changeset viewer.