Changeset 10472:351e408d6aee in orange


Ignore:
Timestamp:
03/08/12 15:29:34 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Showing version from Orange.version in the Orange About dialog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/orngDlgs.py

    r9671 r10472  
    14001400class AboutDlg(QDialog): 
    14011401    def __init__(self, *args): 
    1402         apply(QDialog.__init__,(self,) + args) 
     1402        QDialog.__init__(self, *args) 
    14031403        self.topLayout = QVBoxLayout(self) 
    14041404#        self.setWindowFlags(Qt.Popup)       # Commented out, because it makes the window appear in the top-left corner on Linux 
     
    14131413         
    14141414        try: 
    1415             import orange 
    1416             version = orange.version.split("(")[0].strip() 
    1417             date = orange.version.split(",")[-1].strip(" )") 
    1418             OWGUI.widgetLabel(self, '<p align="center">version %s</p>' % (version)) 
    1419             OWGUI.widgetLabel(self, '<p align="center">(built %s)</p>' % (date)) 
    1420         except: 
     1415            import Orange.version as version 
     1416            short_version = version.short_version 
     1417            hg_revision = version.hg_revision 
     1418            OWGUI.widgetLabel(self, '<p align="center">version %s</p>' % (short_version)) 
     1419            if not version.release: 
     1420                OWGUI.widgetLabel(self, '<p align="center">(hg revision %s)</p>' % (hg_revision)) 
     1421        except ImportError: 
    14211422            pass 
    14221423        OWGUI.widgetLabel(self, "" ) 
     
    14281429        self.connect(butt, SIGNAL("clicked()"), self.accept) 
    14291430         
    1430          
    14311431 
    14321432class saveApplicationDlg(QDialog): 
Note: See TracChangeset for help on using the changeset viewer.