зеркало из https://github.com/mozilla/gecko-dev.git
Fixing the widget factory for tree views.
This commit is contained in:
Родитель
a1d435f489
Коммит
748accd789
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче