Bug #241602 --> Port thunderbird fixes from the aviary 1.0 branch to the trunk.

register properties chrome url for Win XP Start menu
This commit is contained in:
scott%scott-macgregor.org 2004-12-21 00:25:47 +00:00
Родитель b6200dd111
Коммит 3a0c7649c7
5 изменённых файлов: 53 добавлений и 0 удалений

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

@ -312,6 +312,11 @@ function updateMapi()
winreg.createKey(subkey + "\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\shell\\open\\command", "", sfpMainExePath);
winreg.createKey(subkey + "\\shell\\properties", "");
winreg.setValueString(subkey + "\\shell\\properties", "", "Thunderbird &Options");
winreg.createKey(subkey + "\\shell\\properties\\command", "");
winreg.setValueString(subkey + "\\shell\\properties\\command", "", sfpMainExePath + " -options");
// Register Thunderbird as a News Reader
subkey = "SOFTWARE\\Clients\\News\\$ProductName$";
winreg.createKey(subkey, "");

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

@ -138,3 +138,19 @@ NS_IMETHODIMP nsMessengerBootstrap::OpenMessengerWindowWithUri(const char *windo
return NS_OK;
}
#ifdef MOZ_THUNDERBIRD
nsMsgOptionsCmdLineHandler::nsMsgOptionsCmdLineHandler()
{
}
nsMsgOptionsCmdLineHandler::~nsMsgOptionsCmdLineHandler()
{
}
NS_IMPL_ISUPPORTS1(nsMsgOptionsCmdLineHandler, nsICmdLineHandler)
CMDLINEHANDLER_IMPL(nsMsgOptionsCmdLineHandler,"-options","", "chrome://communicator/content/pref/pref.xul",
"Open Options Dialog.", NS_MAILOPTIONSTARTUPHANDLER_CONTRACTID,"Mail Options Startup Handler", PR_TRUE,"", PR_TRUE)
#endif

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

@ -49,6 +49,10 @@
0x4a85a5d0, 0xcddd, 0x11d2, \
{0xb7, 0xf6, 0x00, 0x80, 0x5f, 0x05, 0xff, 0xa5}}
#define NS_MESSENGEROPTIONSSTARTUP_CID \
{ /* 87A35D6C-9BB9-49f8-9CAC-5D5214550B2D */ \
0x87a35d6c, 0x9bb9, 0x49f8, \
{ 0x9c, 0xac, 0x5d, 0x52, 0x14, 0x55, 0xb, 0x2d }}
class nsMessengerBootstrap : public nsICmdLineHandler, public nsIMessengerWindowService {
@ -63,5 +67,24 @@ public:
};
#ifdef MOZ_THUNDERBIRD
// thunderbird has a new command line argument called -options which launches
// the Options dialog.
class nsMsgOptionsCmdLineHandler : public nsICmdLineHandler
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSICMDLINEHANDLER
nsMsgOptionsCmdLineHandler();
virtual ~nsMsgOptionsCmdLineHandler();
CMDLINEHANDLER_REGISTERPROC_DECLS
};
#endif
#endif

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

@ -249,6 +249,8 @@
"@mozilla.org/appshell/component/messenger;1"
#define NS_MAILSTARTUPHANDLER_CONTRACTID \
"@mozilla.org/commandlinehandler/general-startup;1?type=mail"
#define NS_MAILOPTIONSTARTUPHANDLER_CONTRACTID \
"@mozilla.org/commandlinehandler/general-startup;1?type=options"
#define NS_MESSENGERWINDOWSERVICE_CONTRACTID \
"@mozilla.org/messenger/windowservice;1"
#define NS_MESSENGERWINDOWSERVICE_CID \

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

@ -284,6 +284,7 @@
// mailnews base factories
////////////////////////////////////////////////////////////////////////////////
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessengerBootstrap)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgOptionsCmdLineHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUrlListenerManager)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMsgMailSession, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMessenger)
@ -576,6 +577,12 @@ static const nsModuleComponentInfo gComponents[] = {
NS_MESSENGERBOOTSTRAP_CONTRACTID,
nsMessengerBootstrapConstructor,
},
{ "Options Startup Handler", NS_MESSENGEROPTIONSSTARTUP_CID,
NS_MAILOPTIONSTARTUPHANDLER_CONTRACTID,
nsMsgOptionsCmdLineHandlerConstructor,
nsMsgOptionsCmdLineHandler::RegisterProc,
nsMsgOptionsCmdLineHandler::UnregisterProc
},
{ "Netscape Messenger Window Service", NS_MESSENGERWINDOWSERVICE_CID,
NS_MESSENGERWINDOWSERVICE_CONTRACTID,
nsMessengerBootstrapConstructor,