Commits

Aleš Erjavec committed 3a6c3d4

Test for the presence of 'self.signalManager'.

A default global signalManager is no longer provided by OWBaseWidget.

  • Participants
  • Parent commits fee3c71

Comments (0)

Files changed (5)

_bioinformatics/widgets/OWGOEnrichmentAnalysis.py

                             tooltip="Select organism", debuggingEnabled=0)
         
         # freeze until annotation combo box is updateded with available annotations.
-        self.signalManager.freeze(self).push()
+        if self.signalManager:
+            self.signalManager.freeze(self).push()
         QTimer.singleShot(0, self.UpdateOrganismComboBox)
         
         self.geneAttrIndexCombo = OWGUI.comboBox(self.inputTab, self, "geneAttrIndex",
             self.annotationComboBox.addItems(self.annotationCodes)
             self.annotationComboBox.setCurrentIndex(self.annotationIndex)
         finally:
-            self.signalManager.freeze(self).pop()
-            
+            if self.signalManager:
+                self.signalManager.freeze(self).pop()
+
     def UpdateGeneMatcher(self):
         dialog = GeneMatcherDialog(self, defaults=self.geneMatcherSettings, modal=True)
         if dialog.exec_():
     import sys
     app = QApplication(sys.argv)
     w=OWGOEnrichmentAnalysis()
-    data = orange.ExampleTable("../../../doc/datasets/brown-selected.tab")
+    data = orange.ExampleTable("brown-selected.tab")
     w.show()
     w.SetClusterDataset(data)
     app.exec_()

_bioinformatics/widgets/OWGsea.py

             
             self.organismComboBox.addItems(items)
         finally:
-            self.signalManager.freeze(self).pop() #setFreeze(0)
+            if self.signalManager:
+                self.signalManager.freeze(self).pop()
 
 
     def __init__(self, parent=None, signalManager = None, name='GSEA'):
         self.organismCodes = []
         self.organismComboBox = cb = OWGUI.comboBox(box, self, "organismIndex", items=[], debuggingEnabled=0) #changed
         cb.setMaximumWidth(200)
-        self.signalManager.freeze(self).push() #setFreeze(1)
+
+        if self.signalManager:
+            self.signalManager.freeze(self).push()
         QTimer.singleShot(100, self.UpdateOrganismComboBox)
  
         #OWGUI.checkBox(box, self, "csgm", "Case sensitive gene matching")

_bioinformatics/widgets/OWKEGGPathwayBrowser.py

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

_bioinformatics/widgets/OWPIPA.py

             return "-1"
 
     def UpdateExperimentTypes(self):
-        self.signalManager.freeze(self).push() #setFreeze(1)
+        if self.signalManager:
+            self.signalManager.freeze(self).push()
         try:
             self.expressionTypesCB.clear()
             items = [desc for _,desc,_ in self.exTypes]
         except IOError:
             pass
         finally:
-            self.signalManager.freeze(self).pop() #setFreeze(0)
+            if self.signalManager:
+                self.signalManager.freeze(self).pop()
+
         self.ctypei = max(0, min(self.ctypei, len(self.exTypes)-1))
 
     def UpdateExperiments(self, reload=False):

_bioinformatics/widgets/OWSetEnrichment.py

         
         self.loadSettings()
         
-        self.signalManager.freeze(self).push()
+        if self.signalManager:
+            self.signalManager.freeze(self).push()
         QTimer.singleShot(50, self.updateHierarchy)
         
         box = OWGUI.widgetBox(self.controlArea, "Info")
             self.speciesComboBox.addItems([obiTaxonomy.name(id) for id in self.taxid_list])
             self.genesets = all
         finally:
-            self.signalManager.freeze(self).pop() #setFreeze(self.signalManager.freezing - 1)
+            if self.signalManager:
+                self.signalManager.freeze(self).pop()
         
     def setData(self, data=None):
         self.data = data
     app = QApplication(sys.argv)
     w = OWSetEnrichment()
     w.updateHierarchy()
-    data = orange.ExampleTable("../../../doc/datasets/brown-selected")
+    data = orange.ExampleTable("brown-selected")
 #    data = orange.ExampleTable("../human")
 #    print cProfile.runctx("w.setData(data)", globals(), locals())
     w.setData(data)