зеркало из https://github.com/mozilla/pjs.git
Fixing the widget factory for the tree view.
This commit is contained in:
Родитель
cd3b8d7527
Коммит
d5ef2d42bb
|
@ -45,6 +45,7 @@
|
|||
#include "nsPopUpMenu.h"
|
||||
#include "nsImageButton.h"
|
||||
#include "nsMenuButton.h"
|
||||
#include "nsTreeView.h"
|
||||
#include "nsToolbar.h"
|
||||
#include "nsToolbarManager.h"
|
||||
#include "nsToolbarItemHolder.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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче