Fixing the widget factory for tree views.

This commit is contained in:
hyatt%netscape.com 1998-12-02 01:45:15 +00:00
Родитель a1d435f489
Коммит 748accd789
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -44,6 +44,7 @@
#include "nsMenuItem.h"
#include "nsPopUpMenu.h"
#include "nsImageButton.h"
#include "nsTreeView.h"
#include "nsMenuButton.h"
#include "nsToolbar.h"
#include "nsToolbarManager.h"
@ -79,6 +80,7 @@ static NS_DEFINE_IID(kCToolBarManager, NS_TOOLBARMANAGER_CID);
static NS_DEFINE_IID(kCToolBarItemHolder, NS_TOOLBARITEMHOLDER_CID);
static NS_DEFINE_IID(kCPopUpMenu, NS_POPUPMENU_CID);
static NS_DEFINE_IID(kCMenuButton, NS_MENUBUTTON_CID);
static NS_DEFINE_IID(kCTreeView, NS_TREEVIEW_CID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
@ -242,7 +244,11 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports* aOuter,
}
else if (mClassID.Equals(kCPopUpMenu)) {
inst = (nsISupports*)new nsPopUpMenu();
}/* */
}
else if (mClassID.Equals(kCTreeView)) {
inst = (nsISupports*)(nsWindow*)new nsTreeView();
}
/* */
if (inst == NULL) {
return NS_ERROR_OUT_OF_MEMORY;