Remove obsolete native widget files, and do some minor cleanup. Bug 279510, r=pinkerton

This commit is contained in:
smfr%smfr.org 2005-01-29 02:09:21 +00:00
Родитель 9c11ac481e
Коммит 71a47fb75e
17 изменённых файлов: 56 добавлений и 84 удалений

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

@ -36,11 +36,10 @@
* ***** END LICENSE BLOCK ***** */
#include <ControlDefinitions.h>
#include "nsNativeScrollbar.h"
#include "nsIDeviceContext.h"
#if TARGET_CARBON || (UNIVERSAL_INTERFACES_VERSION >= 0x0330)
#include <ControlDefinitions.h>
#endif
#include "nsReadableUtils.h"
#include "nsWidgetAtoms.h"

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

@ -37,6 +37,9 @@
#include "nsIFactory.h"
#include "nsISupports.h"
#include "nsIComponentManager.h"
#include "nsIGenericFactory.h"
#include "nsWidgetsCID.h"
#include "nsToolkit.h"
@ -49,10 +52,6 @@
#include "nsMenuX.h"
#include "nsMenuItemX.h"
#define nsMenuBar nsMenuBarX
#define nsMenu nsMenuX
#define nsMenuItem nsMenuItemX
#include "nsClipboard.h"
#include "nsClipboardHelper.h"
#include "nsTransferable.h"
@ -60,34 +59,24 @@
#include "nsDragService.h"
#include "nsDragHelperService.h"
#if USE_NATIVE_VERSION
# include "nsCheckButton.h"
#endif
#include "nsLookAndFeel.h"
#include "nsIComponentManager.h"
#include "nsSound.h"
#include "nsNativeScrollbar.h"
#include "nsBidiKeyboard.h"
#include "nsIGenericFactory.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCocoaWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildView)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShellCocoa)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuBar)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenu)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuItem)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuBarX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuItemX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeScrollbar)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
//NS_GENERIC_FACTORY_CONSTRUCTOR(nsFileSpecWithUIImpl)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
@ -96,7 +85,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragHelperService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
static nsModuleComponentInfo components[] =
static const nsModuleComponentInfo gComponents[] =
{
{ "nsWindow",
NS_WINDOW_CID,
@ -129,15 +118,15 @@ static nsModuleComponentInfo components[] =
{ "Menubar",
NS_MENUBAR_CID,
"@mozilla.org/widget/menubar/mac;1",
nsMenuBarConstructor },
nsMenuBarXConstructor },
{ "Menu",
NS_MENU_CID,
"@mozilla.org/widget/menu/mac;1",
nsMenuConstructor },
nsMenuXConstructor },
{ "MenuItem",
NS_MENUITEM_CID,
"@mozilla.org/widget/menuitem/mac;1",
nsMenuItemConstructor },
nsMenuItemXConstructor },
{ "Sound",
NS_SOUND_CID,
"@mozilla.org/sound;1",
@ -176,4 +165,4 @@ static nsModuleComponentInfo components[] =
nsNativeScrollbarConstructor }
};
NS_IMPL_NSGETMODULE(nsWidgetMacModule, components)
NS_IMPL_NSGETMODULE(nsWidgetMacModule, gComponents)

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

@ -82,18 +82,15 @@ GFX_LCPPSRCS = \
nsWatchTask.cpp \
$(NULL)
CPPSRCS = nsAppShell.cpp \
CPPSRCS = nsAppShell.cpp \
nsBidiKeyboard.cpp \
nsButton.cpp \
nsChildWindow.cpp \
nsClipboard.cpp \
nsDeleteObserver.cpp \
nsDragService.cpp \
nsDragHelperService.cpp \
nsFilePicker.cpp \
nsLabel.cpp \
nsLookAndFeel.cpp \
nsMacControl.cpp \
nsMacEventHandler.cpp \
nsMacMessagePump.cpp \
nsMacResources.cpp \
@ -103,9 +100,7 @@ CPPSRCS = nsAppShell.cpp \
nsMenuBarX.cpp \
nsMenuItemX.cpp \
nsMimeMapper.cpp \
nsNativeScrollbar.cpp \
nsSound.cpp \
nsTextWidget.cpp \
nsTSMStrategy.cpp \
nsToolkitBase.cpp \
nsToolkit.cpp \
@ -113,6 +108,8 @@ CPPSRCS = nsAppShell.cpp \
nsWindow.cpp \
nsMacNativeUnicodeConverter.cpp \
nsStylClipboardUtils.cpp \
nsMacControl.cpp \
nsNativeScrollbar.cpp \
$(GFX_LCPPSRCS) \
$(NULL)

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

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

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

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

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

@ -53,7 +53,6 @@
#include <InternetConfig.h>
#include "nsMacControl.h"
#include "nsCarbonHelpers.h"
#include "nsFilePicker.h"

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

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

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

@ -37,7 +37,6 @@
#include "nsMacWindow.h"
#include "nsMacEventHandler.h"
#include "nsMacControl.h"
#include "nsToolkit.h"
#include "nsIServiceManager.h" // for drag and drop
@ -1485,18 +1484,12 @@ NS_IMETHODIMP nsMacWindow::SetTitle(const nsAString& aTitle)
{
nsAString::const_iterator begin;
const PRUnichar *strTitle = aTitle.BeginReading(begin).get();
// Try to use the unicode friendly CFString version first
CFStringRef labelRef = ::CFStringCreateWithCharacters(kCFAllocatorDefault, (UniChar*)strTitle, aTitle.Length());
if(labelRef) {
if (labelRef) {
::SetWindowTitleWithCFString(mWindowPtr, labelRef);
::CFRelease(labelRef);
return NS_OK;
}
Str255 title;
// unicode to file system charset
nsMacControl::StringToStr255(aTitle, title);
::SetWTitle(mWindowPtr, title);
return NS_OK;
}

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

@ -45,7 +45,6 @@
#include "nsIContent.h"
class nsIScrollbarMediator;
class StControlProcSingleton5;
//

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

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

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

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

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

@ -38,28 +38,21 @@
#include "nsIFactory.h"
#include "nsISupports.h"
#include "nsIButton.h"
#include "nsITextWidget.h"
#include "nsIComponentManager.h"
#include "nsIGenericFactory.h"
#include "nsWidgetsCID.h"
#include "nsToolkit.h"
#include "nsWindow.h"
#include "nsMacWindow.h"
#include "nsAppShell.h"
#include "nsButton.h"
#include "nsTextWidget.h"
#include "nsLabel.h"
#include "nsFilePicker.h"
#include "nsNativeScrollbar.h"
#include "nsMenuBarX.h"
#include "nsMenuX.h"
#include "nsMenuItemX.h"
#define nsMenuBar nsMenuBarX
#define nsMenu nsMenuX
#define nsMenuItem nsMenuItemX
#include "nsClipboard.h"
#include "nsClipboardHelper.h"
@ -67,40 +60,41 @@
#include "nsHTMLFormatConverter.h"
#include "nsDragService.h"
#include "nsDragHelperService.h"
#if USE_NATIVE_VERSION
# include "nsCheckButton.h"
#endif
#include "nsLookAndFeel.h"
#include "nsIComponentManager.h"
#include "nsSound.h"
#include "nsBidiKeyboard.h"
#include "nsIGenericFactory.h"
#if USE_NATIVE_VERSION
#include "nsIButton.h"
#include "nsITextWidget.h"
#include "nsButton.h"
#include "nsCheckButton.h"
#include "nsTextWidget.h"
#include "nsLabel.h"
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
#if USE_NATIVE_VERSION
NS_GENERIC_FACTORY_CONSTRUCTOR(nsButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCheckButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsComboBox)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRadioButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsListBox)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextAreaWidget)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLabel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextWidget) // used by Viewer?
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLabel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuBar)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenu)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuItem)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuBarX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMenuItemX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
@ -111,8 +105,22 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragHelperService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeScrollbar)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
static const nsModuleComponentInfo components[] =
static const nsModuleComponentInfo gComponents[] =
{
#if USE_NATIVE_VERSION
{ "Text Field",
NS_TEXTFIELD_CID,
"@mozilla.org/widgets/textwidget/mac;1",
nsTextWidgetConstructor },
{ "Label",
NS_LABEL_CID,
"@mozilla.org/widget/label/mac;1",
nsLabelConstructor },
{ "Button",
NS_BUTTON_CID,
"@mozilla.org/widgets/button/mac;1",
nsButtonConstructor },
#endif
{ "nsWindow",
NS_WINDOW_CID,
"@mozilla.org/widgets/window/mac;1",
@ -125,18 +133,10 @@ static const nsModuleComponentInfo components[] =
NS_CHILD_CID,
"@mozilla.org/widgets/child_window/mac;1",
ChildWindowConstructor },
{ "Button",
NS_BUTTON_CID,
"@mozilla.org/widgets/button/mac;1",
nsButtonConstructor },
{ "File Picker",
NS_FILEPICKER_CID,
"@mozilla.org/filepicker;1",
nsFilePickerConstructor },
{ "Text Field",
NS_TEXTFIELD_CID,
"@mozilla.org/widgets/textwidget/mac;1",
nsTextWidgetConstructor },
{ "AppShell",
NS_APPSHELL_CID,
"@mozilla.org/widget/appshell/mac;1",
@ -149,22 +149,18 @@ static const nsModuleComponentInfo components[] =
NS_LOOKANDFEEL_CID,
"@mozilla.org/widget/lookandfeel;1",
nsLookAndFeelConstructor },
{ "Label",
NS_LABEL_CID,
"@mozilla.org/widget/label/mac;1",
nsLabelConstructor },
{ "Menubar",
NS_MENUBAR_CID,
"@mozilla.org/widget/menubar/mac;1",
nsMenuBarConstructor },
nsMenuBarXConstructor },
{ "Menu",
NS_MENU_CID,
"@mozilla.org/widget/menu/mac;1",
nsMenuConstructor },
nsMenuXConstructor },
{ "MenuItem",
NS_MENUITEM_CID,
"@mozilla.org/widget/menuitem/mac;1",
nsMenuItemConstructor },
nsMenuItemXConstructor },
{ "Sound",
NS_SOUND_CID,
"@mozilla.org/sound;1",
@ -203,5 +199,5 @@ static const nsModuleComponentInfo components[] =
nsBidiKeyboardConstructor },
};
NS_IMPL_NSGETMODULE(nsWidgetMacModule, components)
NS_IMPL_NSGETMODULE(nsWidgetMacModule, gComponents)