Changeset f82ab8c in sasview for src/sas/qtgui/GuiManager.py


Ignore:
Timestamp:
Jun 29, 2016 10:04:43 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
481ff26
Parents:
9e426c1
Message:

More dialogs, drag and drop onto File Load

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/GuiManager.py

    r9e426c1 rf82ab8c  
    1818from GuiUtils import * 
    1919from UI.AcknowledgementsUI import Acknowledgements 
     20from AboutBox import AboutBox 
    2021 
    2122# Perspectives 
     
    6061        # Add FileDialog widget as docked 
    6162        self.filesWidget = DataExplorerWindow(parent, self) 
    62         #flags = (QtCore.Qt.Window | QtCore.Qt.WindowTitleHint | QtCore.Qt.CustomizeWindowHint) 
    63  
    64         self.dockedFilesWidget = QtGui.QDockWidget("File explorer", self._workspace) 
     63        #flags = (QtCore.Qt.Window | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinimizeButtonHint) 
     64        flags = (QtCore.Qt.CustomizeWindowHint | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinMaxButtonsHint ) 
     65 
     66        self.dockedFilesWidget = QtGui.QDockWidget("Data explorer", self._workspace, flags=flags) 
    6567        self.dockedFilesWidget.setWidget(self.filesWidget) 
    6668        self._workspace.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockedFilesWidget) 
    6769 
    6870        self.ackWidget = Acknowledgements() 
     71        self.aboutWidget = AboutBox() 
    6972 
    7073        # Disable the close button (?) 
     
    9598    def fileRead(self, data): 
    9699        """ 
     100        Callback for fileDataReceivedSignal 
    97101        """ 
    98102        pass 
     
    197201        # Exit if yes 
    198202        reactor.callFromThread(reactor.stop) 
    199         reactor.stop 
    200203        sys.exit() 
    201204 
     
    220223        self.processVersion(version_info)   
    221224   
    222     def processVersion(self, version_info, standalone=False): 
     225    def processVersion(self, version_info): 
    223226        """ 
    224227        Call-back method for the process of checking for updates. 
     
    228231 
    229232        :param version: version string 
    230         :param standalone: True of the update is being checked in 
    231            the background, False otherwise. 
    232  
    233233        """ 
    234234        try: 
     
    242242            elif cmp(version, LocalConfig.__version__) > 0: 
    243243                msg = "Version %s is available! " % str(version) 
    244                 if not standalone: 
    245                     if "download_url" in version_info: 
    246                         webbrowser.open(version_info["download_url"]) 
    247                     else: 
    248                         webbrowser.open(LocalConfig.__download_page__) 
     244                if "download_url" in version_info: 
     245                    webbrowser.open(version_info["download_url"]) 
    249246                else: 
    250                     msg += "See the help menu to download it." 
     247                    webbrowser.open(LocalConfig.__download_page__) 
    251248                self.communicate.statusBarUpdateSignal.emit(msg) 
    252249            else: 
     
    258255            msg += " version number\n  %s" % sys.exc_value 
    259256            logging.error(msg) 
    260             if not standalone: 
    261                 msg = "Could not connect to the application server." 
    262                 msg += " Please try again later." 
    263                 self.communicate.statusBarUpdateSignal.emit(msg) 
     257            msg = "Could not connect to the application server." 
     258            msg += " Please try again later." 
     259            self.communicate.statusBarUpdateSignal.emit(msg) 
    264260 
    265261    def addCallbacks(self): 
     
    629625        Open the About box 
    630626        """ 
    631          
    632         print("actionAbout TRIGGERED") 
    633         pass 
     627        # Update the about box with current version and stuff 
     628 
     629        # TODO: proper sizing 
     630        self.aboutWidget.show() 
    634631 
    635632    def actionCheck_for_update(self): 
Note: See TracChangeset for help on using the changeset viewer.