gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: jakarta-gump/python/gump view.py
Date Fri, 02 May 2003 12:32:57 GMT
rubys       2003/05/02 05:32:57

  Modified:    python/gump view.py
  Log:
  Display a warning on invalid jar definions.  For an example, try scarab.
  
  Revision  Changes    Path
  1.14      +17 -10    jakarta-gump/python/gump/view.py
  
  Index: view.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/view.py,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- view.py	2 May 2003 12:26:41 -0000	1.13
  +++ view.py	2 May 2003 12:32:57 -0000	1.14
  @@ -221,9 +221,7 @@
       except:
         message=str(sys.exc_type)
         if sys.exc_value: message+= ": " + str(sys.exc_value)
  -      dlg=wxMessageDialog(None, message, "Error", wx.wxOK)
  -      dlg.ShowModal()
  -      dlg.Destroy()
  +      self.msgbox(message, "Error")
   
       # display the project dependencies
       self.dependencies.DeleteAllItems()
  @@ -290,10 +288,13 @@
         self.exports.InsertColumn(0, 'Exports')
   
       for i in range(0,len(project.jar)):
  -      jar=project.jar[i].path or 'UNNAMED'
  -      row=self.exports.InsertStringItem(i,jar)
  -      if not os.path.exists(jar):
  -        self.exports.SetItemBackgroundColour(row,wxRED)
  +      jar=project.jar[i].path
  +      if jar:
  +        row=self.exports.InsertStringItem(i,jar)
  +        if not os.path.exists(jar):
  +          self.exports.SetItemBackgroundColour(row,wxRED)
  +      else:
  +	self.msgbox('Invalid element: ' + xmlize('jar',project.jar[i]))
   
       self.exports.SetColumnWidth(0,wxLIST_AUTOSIZE_USEHEADER)
   
  @@ -312,6 +313,12 @@
     def unload(self):
       self.mItem.clear()
       self.pItem.clear()
  +
  +  # display a modal dialog box
  +  def msgbox(self,message,title="Warning"):
  +    dlg=wxMessageDialog(None, message, title, wx.wxOK)
  +    dlg.ShowModal()
  +    dlg.Destroy()
   
   class compileThread:
     def __init__(self,project,view):
  
  
  

Mime
View raw message