From d8c312141f8881c1b04ae308806beabbc7ea2664 2012-06-24 00:39:31
From: Carlos Cordoba <ccordoba12@gmail.com>
Date: 2012-06-24 00:39:31
Subject: [PATCH] Call custom control variables when creating the widgets

- This better matches how they are normally created

---

diff --git a/IPython/frontend/qt/console/console_widget.py b/IPython/frontend/qt/console/console_widget.py
index 75801dc..71e7fe1 100644
--- a/IPython/frontend/qt/console/console_widget.py
+++ b/IPython/frontend/qt/console/console_widget.py
@@ -997,7 +997,7 @@ class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):
         """
         # Create the underlying control.
         if self.custom_control:
-            control = self.custom_control
+            control = self.custom_control()
         elif self.kind == 'plain':
             control = QtGui.QPlainTextEdit()
         elif self.kind == 'rich':
@@ -1036,7 +1036,7 @@ class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):
         """ Creates and connects the underlying paging widget.
         """
         if self.custom_page_control:
-            control = self.custom_page_control
+            control = self.custom_page_control()
         elif self.kind == 'plain':
             control = QtGui.QPlainTextEdit()
         elif self.kind == 'rich':