Changeset 3075 for trunk/GSASIIdataGUI.py
- Timestamp:
- Sep 13, 2017 4:13:06 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r3062 r3075 126 126 #### class definitions used for main GUI 127 127 ################################################################################ 128 129 128 130 129 class MergeDialog(wx.Dialog): … … 457 456 item = parent.Append(wx.ID_PREFERENCES, text = "&Preferences") 458 457 self.Bind(wx.EVT_MENU, self.OnPreferences, item) 458 if GSASIIpath.whichsvn(): 459 item = parent.Append( 460 help='Edit proxy internet information (used for updates)', id=wx.ID_ANY, 461 kind=wx.ITEM_NORMAL,text='Edit proxy...') 462 self.Bind(wx.EVT_MENU, self.EditProxyInfo, id=item.GetId()) 459 463 if GSASIIpath.GetConfigValue('debug'): 460 464 def OnIPython(event): … … 462 466 item = parent.Append(wx.ID_ANY, text = "IPython Console") 463 467 self.Bind(wx.EVT_MENU, OnIPython, item) 468 def OnwxInspect(event): 469 import wx.lib.inspection as wxeye 470 wxeye.InspectionTool().Show() 471 item = parent.Append(wx.ID_ANY, text = "wx inspection tool") 472 self.Bind(wx.EVT_MENU, OnwxInspect, item) 473 464 474 item = parent.Append( 465 475 help='Exit from GSAS-II', id=wx.ID_ANY, … … 1962 1972 dlg.Destroy() 1963 1973 1974 def EditProxyInfo(self,event): 1975 '''Edit the proxy information used by subversion 1976 ''' 1977 h,p = host,port = GSASIIpath.getsvnProxy() 1978 dlg = G2G.MultiStringDialog(self,'Enter proxy values', 1979 ['Proxy address','proxy port'], 1980 [host,port],size=300) 1981 #dlg.SetSize((300,-1)) 1982 if dlg.Show(): 1983 h,p = dlg.GetValues() 1984 dlg.Destroy() 1985 if h != host or p != port: 1986 proxyinfo = os.path.join(GSASIIpath.path2GSAS2,"proxyinfo.txt") 1987 GSASIIpath.setsvnProxy(h,p) 1988 if not h.strip(): 1989 os.remove(proxyinfo) 1990 return 1991 try: 1992 fp = open(proxyinfo,'w') 1993 fp.write(h.strip()+'\n') 1994 fp.write(p.strip()+'\n') 1995 fp.close() 1996 except Exception as err: 1997 print('Error writing file {}:\n{}'.format(proxyinfo,err)) 1964 1998 def _Add_ImportMenu_smallangle(self,parent): 1965 1999 '''configure the Small Angle Data menus accord to the readers found in _init_Imports
Note: See TracChangeset
for help on using the changeset viewer.