Replaced BaseController.add stub with working implementation
authorStas Shtin <antisvin@gmail.com>
Fri, 9 Apr 2010 17:37:16 +0000 (21:37 +0400)
committerStas Shtin <antisvin@gmail.com>
Fri, 9 Apr 2010 17:37:16 +0000 (21:37 +0400)
src/ipypbx/controllers.py

index bfb7a17..1277d3a 100644 (file)
@@ -116,12 +116,10 @@ class BaseController(QtCore.QObject):
         """
         Add new connection.
         """
-        #name_template = 'New connection'
-
         num_rows = self.model.rowCount()
         self.model.insertRows(num_rows, 1)
         self.view_list.selectRow(num_rows)
-        getattr(self.parent(), self.basename + 'Add').setEnabled(False)
+        getattr(self.views, self.basename + 'Add').setEnabled(False)
             
         #self.parent.ui.connectionName.setText('New connection')
         #self.parent.ui.connectionName.setFocus()
@@ -137,12 +135,6 @@ class BaseController(QtCore.QObject):
         """
         return NotImplemented
 
-    def add(self):
-        """
-        TODO: Default implementation.
-        """
-        return NotImplemented
-
 
 class ConnectionController(BaseController):
     """