Commits

Aleš Erjavec  committed f395043

Replaced the use of signal manager freeze with widget blocking state.

  • Participants
  • Parent commits 7194056

Comments (0)

Files changed (4)

File orangecontrib/bio/widgets/OWGOEnrichmentAnalysis.py

         self.annotationComboBox = OWGUI.comboBox(box, self, "annotationIndex",
                             items = self.annotationCodes, callback=self.Update,
                             tooltip="Select organism", debuggingEnabled=0)
-        
-        # freeze until annotation combo box is updateded with available annotations.
-        if self.signalManager:
-            self.signalManager.freeze(self).push()
-        QTimer.singleShot(0, self.UpdateOrganismComboBox)
-        
+
         self.geneAttrIndexCombo = OWGUI.comboBox(self.inputTab, self, "geneAttrIndex",
                             box="Gene names", callback=self.Update,
                             tooltip="Use this attribute to extract gene names from input data")
         self.selectedTerms = []
         
         self.connect(self, SIGNAL("widgetStateChanged(QString, int, QString)"), self.onStateChanged)
-        
+
+        self.setBlocking(True)
+        QTimer.singleShot(0, self.UpdateOrganismComboBox)
+
     def UpdateOrganismComboBox(self):
         try:
             if self.annotationCodes and len(self.annotationCodes) > self.annotationIndex:
             self.annotationComboBox.addItems(self.annotationCodes)
             self.annotationComboBox.setCurrentIndex(self.annotationIndex)
         finally:
-            if self.signalManager:
-                self.signalManager.freeze(self).pop()
+            self.setBlocking(False)
 
     def UpdateGeneMatcher(self):
         dialog = GeneMatcherDialog(self, defaults=self.geneMatcherSettings, modal=True)

File orangecontrib/bio/widgets/OWGsea.py

             self.organismComboBox.clear()
             self.organismComboBox.addItems(items)
         finally:
-            if self.signalManager:
-                self.signalManager.freeze(self).pop()
+            self.setBlocking(False)
 
 
     def __init__(self, parent=None, signalManager = None, name='GSEA'):
         self.organismComboBox = cb = OWGUI.comboBox(box, self, "organismIndex", items=[], debuggingEnabled=0) #changed
         cb.setMaximumWidth(200)
 
-        if self.signalManager:
-            self.signalManager.freeze(self).push()
-        QTimer.singleShot(100, self.UpdateOrganismComboBox)
- 
         #OWGUI.checkBox(box, self, "csgm", "Case sensitive gene matching")
 
         box2 = OWGUI.widgetBox(ca, "Descriptors")
 
         self.gridSels = []
         self.loadSettings()
- 
+
+        self.setBlocking(True)
+        QTimer.singleShot(0, self.UpdateOrganismComboBox)
+
         def cleanInvalid(maxn):
             """
             Removes invalid gene set selection

File orangecontrib/bio/widgets/OWKEGGPathwayBrowser.py

             debuggingEnabled=0,
             tooltip="Select the organism of the input genes")
 
-        if self.signalManager:
-            self.signalManager.freeze(self).push()
-
         # Selection of genes attribute
         box = OWGUI.widgetBox(self.controlArea, "Gene attribute")
         self.geneAttrCombo = OWGUI.comboBox(box, self, "geneAttrIndex",
 
         self.setEnabled(False)
         self.infoLabel.setText("Fetching organism definitions\n")
+
+        self.setBlocking(True)
         QTimer.singleShot(100, self.UpdateOrganismComboBox)
 
     def UpdateOrganismComboBox(self):
         finally:
             self.setEnabled(True)
             self.infoLabel.setText("No data on input\n")
-            if self.signalManager:
-                self.signalManager.freeze(self).pop()
+            self.setBlocking(False)
 
     def Clear(self):
         """

File orangecontrib/bio/widgets/OWSetEnrichment.py

 
         self.loadSettings()
 
-        if self.signalManager:
-            self.signalManager.freeze(self).push()
-        QTimer.singleShot(50, self.updateHierarchy)
-
         box = OWGUI.widgetBox(self.controlArea, "Info")
         self.infoBox = OWGUI.widgetLabel(box, "Info")
         self.infoBox.setText("No data on input")
         self.updatingAnnotationsFlag = False
         self.currentAnnotatedCategories = []
 
+        self.setBlocking(True)
+        QTimer.singleShot(0, self.updateHierarchy)
+
     def updateHierarchy(self):
         try:
             self.progressBarInit()
             self.speciesComboBox.addItems([obiTaxonomy.name(id) for id in self.taxid_list])
             self.genesets = all
         finally:
-            if self.signalManager:
-                self.signalManager.freeze(self).pop() #setFreeze(self.signalManager.freezing - 1)
+            self.setBlocking(False)
 
     def setData(self, data=None):
         self.data = data