From 16f920d2f536507667cd1d67417d30ecf68991c6 Mon Sep 17 00:00:00 2001 From: "kmcclusk%netscape.com" Date: Thu, 17 Sep 1998 17:55:24 +0000 Subject: [PATCH] Added back missing nsTextField and nsTextArea widgets to the factory. --- widget/src/motif/nsWidgetFactory.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/widget/src/motif/nsWidgetFactory.cpp b/widget/src/motif/nsWidgetFactory.cpp index ba9e8df3943b..bb61654132c2 100644 --- a/widget/src/motif/nsWidgetFactory.cpp +++ b/widget/src/motif/nsWidgetFactory.cpp @@ -29,8 +29,8 @@ #include "nsScrollbar.h" #include "nsCheckButton.h" #include "nsRadioButton.h" -//#include "nsTextWidget.h" -//#include "nsTextAreaWidget.h" +#include "nsTextWidget.h" +#include "nsTextAreaWidget.h" #include "nsFileWidget.h" #include "nsListBox.h" #include "nsComboBox.h" @@ -135,10 +135,6 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter, *aResult = NULL; - if (nsnull != aOuter && !aIID.Equals(kISupportsIID)) { - // aggregation with IID != nsISupports - return NS_ERROR_ILLEGAL_VALUE; - } nsISupports *inst = nsnull; if (aIID.Equals(kCWindow)) { @@ -160,12 +156,12 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter, inst = nsnull; fprintf(stderr, "------ NOT CreatingkIScrollbar Scrollbar\n"); } - //else if (mClassID.Equals(kCTextWidgetCID)) { - //inst = (nsISupports *)(nsIWidget *)new nsTextWidget(); - //} - //else if (mClassID.Equals(kCTextAreaWidgetCID)) { - //inst = (nsISupports *)(nsIWidget *)new nsTextAreaWidget(); - //} + else if (mClassID.Equals(kCTextWidgetCID)) { + inst = (nsISupports *)(nsIWidget *)new nsTextWidget(); + } + else if (mClassID.Equals(kCTextAreaWidgetCID)) { + inst = (nsISupports *)(nsIWidget *)new nsTextAreaWidget(); + } else if ( mClassID.Equals(kCRadioButtonCID)) { inst = (nsISupports *)(nsIWidget *)new nsRadioButton(); }