|
|
9ccdfb |
diff -up ./esc/src/app/daemon/manifest.mn.fix9 ./esc/src/app/daemon/manifest.mn
|
|
|
9ccdfb |
--- ./esc/src/app/daemon/manifest.mn.fix9 2011-03-24 12:35:31.481712082 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/daemon/manifest.mn 2011-03-24 12:35:39.758712086 -0700
|
|
|
9ccdfb |
@@ -37,7 +37,7 @@ DEFINES += $(shell pkg-config --cflags x
|
|
|
9ccdfb |
CPPFLAGS += $(DEFINES) -g
|
|
|
9ccdfb |
|
|
|
9ccdfb |
LDFLAGS += -lstdc++ -L$(CORE_DIST)/$(OBJDIR)/lib -L$(XULRUNNER_LIBS_LDFLAGS) -lnss3 -lnspr4 -lssl3 -lckyapplet $(shell pkg-config --libs xft)
|
|
|
9ccdfb |
-LDFLAGS += -lckymanager -lhttpchunked -lm -lnss3 -lplc4 -lplds4
|
|
|
9ccdfb |
+LDFLAGS += -lckymanager -lhttpchunked -lm -lnss3 -lplc4 -lplds4 -lX11
|
|
|
9ccdfb |
# MODULE public and private header directories are implicitly REQUIRED.
|
|
|
9ccdfb |
|
|
|
9ccdfb |
CPPSRCS = \
|
|
|
9ccdfb |
diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix9 ./esc/src/app/xpcom/rhCoolKey.cpp
|
|
|
9ccdfb |
--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix9 2011-03-24 12:37:10.273712093 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-03-24 12:37:18.813712092 -0700
|
|
|
9ccdfb |
@@ -70,6 +70,7 @@
|
|
|
9ccdfb |
|
|
|
9ccdfb |
#define PSM_COMPONENT_CONTRACTID "@mozilla.org/psm;1"
|
|
|
9ccdfb |
#define NS_CERTOVERRIDE_CONTRACTID "@mozilla.org/security/certoverride;1"
|
|
|
9ccdfb |
+#define RH_COOLKEY_CONTRACTID "@redhat.com/rhCoolKey;1"
|
|
|
9ccdfb |
|
|
|
9ccdfb |
static const nsIID kIModuleIID = NS_IMODULE_IID;
|
|
|
9ccdfb |
static const nsIID kIFactoryIID = NS_IFACTORY_IID;
|
|
|
9ccdfb |
@@ -1711,297 +1712,36 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyVersi
|
|
|
9ccdfb |
|
|
|
9ccdfb |
NS_GENERIC_FACTORY_CONSTRUCTOR(rhCoolKey)
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-NS_IMPL_ISUPPORTS1(rhCoolKey,rhICoolKey)
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-// Implement full module and factory dance so we can see what is going on
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-class rhCoolKeyFactory: public nsIFactory{
|
|
|
9ccdfb |
-private:
|
|
|
9ccdfb |
-nsrefcnt mRefCnt;
|
|
|
9ccdfb |
-public:
|
|
|
9ccdfb |
-rhCoolKeyFactory();
|
|
|
9ccdfb |
-virtual ~rhCoolKeyFactory();
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHOD QueryInterface(const nsIID &aIID, void **aResult);
|
|
|
9ccdfb |
-NS_IMETHOD_(nsrefcnt) AddRef(void);
|
|
|
9ccdfb |
-NS_IMETHOD_(nsrefcnt) Release(void);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result);
|
|
|
9ccdfb |
-NS_IMETHOD LockFactory(PRBool lock);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
+// Build a table of ClassIDs (CIDs) which are implemented by this module. CIDs
|
|
|
9ccdfb |
+// // should be completely unique UUIDs.
|
|
|
9ccdfb |
+// // each entry has the form { CID, service, factoryproc, constructorproc }
|
|
|
9ccdfb |
+// // where factoryproc is usually NULL.
|
|
|
9ccdfb |
+static const mozilla::Module::CIDEntry kCoolKeyCIDs[] = {
|
|
|
9ccdfb |
+ { &kCoolKeyCID, false, NULL, rhCoolKeyConstructor },
|
|
|
9ccdfb |
+ { NULL }
|
|
|
9ccdfb |
+ };
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+// Build a table which maps contract IDs to CIDs.
|
|
|
9ccdfb |
+// // A contract is a string which identifies a particular set of functionality. In some
|
|
|
9ccdfb |
+// // cases an extension component may override the contract ID of a builtin gecko component
|
|
|
9ccdfb |
+// // to modify or extend functionality.
|
|
|
9ccdfb |
+//
|
|
|
9ccdfb |
+static const mozilla::Module::ContractIDEntry kCoolKeyContracts[] = {
|
|
|
9ccdfb |
+ { RH_COOLKEY_CONTRACTID, &kCoolKeyCID },
|
|
|
9ccdfb |
+ { NULL }
|
|
|
9ccdfb |
};
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-rhCoolKeyFactory::rhCoolKeyFactory()
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-mRefCnt = 0;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-rhCoolKeyFactory::~rhCoolKeyFactory()
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP rhCoolKeyFactory::QueryInterface(const nsIID &aIID,
|
|
|
9ccdfb |
-void **aResult)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-if (aResult == NULL) {
|
|
|
9ccdfb |
-return NS_ERROR_NULL_POINTER;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-*aResult = NULL;
|
|
|
9ccdfb |
-if (aIID.Equals(kISupportsIID)) {
|
|
|
9ccdfb |
-*aResult = (void *) this;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-else
|
|
|
9ccdfb |
-if (aIID.Equals(kIFactoryIID)) {
|
|
|
9ccdfb |
-*aResult = (void *) this;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-if (*aResult == NULL) {
|
|
|
9ccdfb |
-return NS_ERROR_NO_INTERFACE;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-AddRef();
|
|
|
9ccdfb |
-return NS_OK;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP_(nsrefcnt) rhCoolKeyFactory::AddRef()
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-return ++mRefCnt;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP_(nsrefcnt) rhCoolKeyFactory::Release()
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-if (--mRefCnt == 0) {
|
|
|
9ccdfb |
-delete this;
|
|
|
9ccdfb |
-return 0;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-return mRefCnt;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP
|
|
|
9ccdfb |
-rhCoolKeyFactory::CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-if (!result)
|
|
|
9ccdfb |
-return NS_ERROR_INVALID_ARG;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-rhCoolKey* sample = new rhCoolKey();
|
|
|
9ccdfb |
-if (!sample)
|
|
|
9ccdfb |
-return NS_ERROR_OUT_OF_MEMORY;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-nsresult rv = sample->QueryInterface(iid, result);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-if (NS_FAILED(rv)) {
|
|
|
9ccdfb |
-*result = nsnull;
|
|
|
9ccdfb |
-delete sample;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-return rv;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP
|
|
|
9ccdfb |
-rhCoolKeyFactory::LockFactory(PRBool lock)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-// Module implementation
|
|
|
9ccdfb |
-class rhCoolKeyModule : public nsIModule
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-public:
|
|
|
9ccdfb |
-rhCoolKeyModule();
|
|
|
9ccdfb |
-virtual ~rhCoolKeyModule();
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-// nsISupports methods:
|
|
|
9ccdfb |
-NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result);
|
|
|
9ccdfb |
-NS_IMETHOD_(nsrefcnt) AddRef(void);
|
|
|
9ccdfb |
-NS_IMETHOD_(nsrefcnt) Release(void);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-// nsIModule methods:
|
|
|
9ccdfb |
-NS_IMETHOD GetClassObject(nsIComponentManager *aCompMgr, const nsCID & aClass, const nsIID & aIID, void * *aResult);
|
|
|
9ccdfb |
-NS_IMETHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr, const char *aType);
|
|
|
9ccdfb |
-NS_IMETHOD UnregisterSelf(nsIComponentManager *aCompMgr, nsIFile *aLocation, const char *aLoaderStr);
|
|
|
9ccdfb |
-NS_IMETHOD CanUnload(nsIComponentManager *aCompMgr, PRBool *_retval);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-private:
|
|
|
9ccdfb |
-nsrefcnt mRefCnt;
|
|
|
9ccdfb |
+static const mozilla::Module kCoolKeyModule = {
|
|
|
9ccdfb |
+ mozilla::Module::kVersion,
|
|
|
9ccdfb |
+ kCoolKeyCIDs,
|
|
|
9ccdfb |
+ kCoolKeyContracts,
|
|
|
9ccdfb |
+ NULL
|
|
|
9ccdfb |
};
|
|
|
9ccdfb |
|
|
|
9ccdfb |
+// The following line implements the one-and-only "NSModule" symbol exported from this
|
|
|
9ccdfb |
+// // shared library.
|
|
|
9ccdfb |
+ NSMODULE_DEFN(rhCoolKeyModule) = &kCoolKeyModule;
|
|
|
9ccdfb |
+//
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-//----------------------------------------------------------------------
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-rhCoolKeyModule::rhCoolKeyModule()
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-mRefCnt = 0;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-rhCoolKeyModule::~rhCoolKeyModule()
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-// nsISupports implemention
|
|
|
9ccdfb |
-NS_IMETHODIMP_(nsrefcnt)
|
|
|
9ccdfb |
-rhCoolKeyModule::AddRef(void)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-char tBuff[56];
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::AddRef \n",GetTStamp(tBuff,56)));
|
|
|
9ccdfb |
-++mRefCnt;
|
|
|
9ccdfb |
-return mRefCnt;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP_(nsrefcnt)
|
|
|
9ccdfb |
-rhCoolKeyModule::Release(void)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-char tBuff[56];
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::Release : mRefCnt %d \n",GetTStamp(tBuff,56),mRefCnt - 1));
|
|
|
9ccdfb |
---mRefCnt;
|
|
|
9ccdfb |
-if (mRefCnt == 0) {
|
|
|
9ccdfb |
-mRefCnt = 1; /* stabilize */
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::Release deleting Module \n",GetTStamp(tBuff,56)));
|
|
|
9ccdfb |
-delete this;
|
|
|
9ccdfb |
-return 0;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-return mRefCnt;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP
|
|
|
9ccdfb |
-rhCoolKeyModule::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-char tBuff[56];
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::QueryInterface \n",GetTStamp(tBuff,56)));
|
|
|
9ccdfb |
-if ( !aInstancePtr )
|
|
|
9ccdfb |
-return NS_ERROR_NULL_POINTER;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-nsISupports* foundInterface;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-if ( aIID.Equals(kIModuleIID) )
|
|
|
9ccdfb |
-foundInterface = (nsIModule*) this;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-else if ( aIID.Equals(kISupportsIID) )
|
|
|
9ccdfb |
-foundInterface = (nsISupports*) this;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-else
|
|
|
9ccdfb |
-foundInterface = 0;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-if (foundInterface) {
|
|
|
9ccdfb |
-foundInterface->AddRef();
|
|
|
9ccdfb |
-*aInstancePtr = foundInterface;
|
|
|
9ccdfb |
-return NS_OK;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-*aInstancePtr = foundInterface;
|
|
|
9ccdfb |
-return NS_NOINTERFACE;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-// Create a factory object for creating instances of aClass.
|
|
|
9ccdfb |
-NS_IMETHODIMP
|
|
|
9ccdfb |
-rhCoolKeyModule::GetClassObject(nsIComponentManager *aCompMgr,
|
|
|
9ccdfb |
-const nsCID& aClass,
|
|
|
9ccdfb |
-const nsIID& aIID,
|
|
|
9ccdfb |
-void** result)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-char tBuff[56];
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::GetClassObject \n",GetTStamp(tBuff,56)));
|
|
|
9ccdfb |
-if (!kCoolKeyCID.Equals(aClass))
|
|
|
9ccdfb |
-return NS_ERROR_FACTORY_NOT_REGISTERED;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-if (!result)
|
|
|
9ccdfb |
-return NS_ERROR_INVALID_ARG;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-rhCoolKeyFactory* factory = new rhCoolKeyFactory();
|
|
|
9ccdfb |
-if (!factory)
|
|
|
9ccdfb |
-return NS_ERROR_OUT_OF_MEMORY;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-nsresult rv = factory->QueryInterface(aIID, result);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-if (NS_FAILED(rv)) {
|
|
|
9ccdfb |
-*result = nsnull;
|
|
|
9ccdfb |
-delete factory;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-return rv;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP
|
|
|
9ccdfb |
-rhCoolKeyModule::RegisterSelf(nsIComponentManager *aCompMgr,
|
|
|
9ccdfb |
-nsIFile* aPath,
|
|
|
9ccdfb |
-const char* registryLocation,
|
|
|
9ccdfb |
-const char* componentType)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-char tBuff[54];
|
|
|
9ccdfb |
-nsIComponentRegistrar* compReg = nsnull;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::RegisterSelf \n",GetTStamp(tBuff,56)));
|
|
|
9ccdfb |
-nsresult rv = aCompMgr->QueryInterface(kIComponentRegistrarIID, (void**)&compReg);
|
|
|
9ccdfb |
-if (NS_FAILED(rv))
|
|
|
9ccdfb |
-return rv;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-rv = compReg->RegisterFactoryLocation(kCoolKeyCID,
|
|
|
9ccdfb |
-"CoolKey",
|
|
|
9ccdfb |
-"@redhat.com/rhCoolKey",
|
|
|
9ccdfb |
-aPath,
|
|
|
9ccdfb |
-registryLocation,
|
|
|
9ccdfb |
-componentType);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-compReg->Release();
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-return rv;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP
|
|
|
9ccdfb |
-rhCoolKeyModule::UnregisterSelf(nsIComponentManager* aCompMgr,
|
|
|
9ccdfb |
-nsIFile* aPath,
|
|
|
9ccdfb |
-const char* registryLocation)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-char tBuff[56];
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::UnregisterSelf \n",GetTStamp(tBuff,56)));
|
|
|
9ccdfb |
-nsIComponentRegistrar* compReg = nsnull;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-nsresult rv = aCompMgr->QueryInterface(kIComponentRegistrarIID, (void**)&compReg);
|
|
|
9ccdfb |
-if (NS_FAILED(rv))
|
|
|
9ccdfb |
-return rv;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-rv = compReg->UnregisterFactoryLocation(kCoolKeyCID, aPath);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-compReg->Release();
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-return rv;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-NS_IMETHODIMP
|
|
|
9ccdfb |
-rhCoolKeyModule::CanUnload(nsIComponentManager *aCompMgr, PRBool *okToUnload)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-*okToUnload = PR_FALSE; // we do not know how to unload.
|
|
|
9ccdfb |
-return NS_OK;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-//----------------------------------------------------------------------
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr,
|
|
|
9ccdfb |
-nsIFile* location,
|
|
|
9ccdfb |
-nsIModule** return_cobj)
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
-nsresult rv = NS_OK;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-char tBuff[56];
|
|
|
9ccdfb |
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::NSGetModule \n",GetTStamp(tBuff,56)));
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-// Create and initialize the module instance
|
|
|
9ccdfb |
-rhCoolKeyModule *m = new rhCoolKeyModule();
|
|
|
9ccdfb |
-if (!m) {
|
|
|
9ccdfb |
-return NS_ERROR_OUT_OF_MEMORY;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
+NS_IMPL_ISUPPORTS1(rhCoolKey,rhICoolKey)
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-// Increase refcnt and store away nsIModule interface to m in return_cobj
|
|
|
9ccdfb |
-rv = m->QueryInterface(kIModuleIID, (void**)return_cobj);
|
|
|
9ccdfb |
-if (NS_FAILED(rv)) {
|
|
|
9ccdfb |
-delete m;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
-return rv;
|
|
|
9ccdfb |
-}
|
|
|
9ccdfb |
diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix9 ./esc/src/app/xpcom/rhCoolKey.h
|
|
|
9ccdfb |
--- ./esc/src/app/xpcom/rhCoolKey.h.fix9 2011-03-24 12:40:07.291712102 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xpcom/rhCoolKey.h 2011-03-24 12:40:15.644712108 -0700
|
|
|
9ccdfb |
@@ -19,7 +19,9 @@
|
|
|
9ccdfb |
#define RH_COOLKEY_H
|
|
|
9ccdfb |
|
|
|
9ccdfb |
#include "rhICoolKey.h"
|
|
|
9ccdfb |
-#include "nsIGenericFactory.h"
|
|
|
9ccdfb |
+/*#include "nsIGenericFactory.h" */
|
|
|
9ccdfb |
+#include "mozilla/ModuleUtils.h"
|
|
|
9ccdfb |
+#include "nsIClassInfoImpl.h"
|
|
|
9ccdfb |
#include "nsEmbedString.h"
|
|
|
9ccdfb |
#include <list>
|
|
|
9ccdfb |
#include "nspr.h"
|
|
|
9ccdfb |
diff -up ./esc/src/app/xpcom/rhICoolKey.idl.fix9 ./esc/src/app/xpcom/rhICoolKey.idl
|
|
|
9ccdfb |
--- ./esc/src/app/xpcom/rhICoolKey.idl.fix9 2011-03-24 12:42:27.595712113 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xpcom/rhICoolKey.idl 2011-03-24 12:42:39.069712124 -0700
|
|
|
9ccdfb |
@@ -17,12 +17,11 @@
|
|
|
9ccdfb |
|
|
|
9ccdfb |
#include "nsISupports.idl"
|
|
|
9ccdfb |
#include "rhIKeyNotify.idl"
|
|
|
9ccdfb |
-#include "nsIObserver.idl"
|
|
|
9ccdfb |
+//#include "nsIObserver.idl"
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-interface nsIDOMHTMLDocument;
|
|
|
9ccdfb |
[scriptable,uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)]
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-interface rhICoolKey: nsISupports
|
|
|
9ccdfb |
+interface rhICoolKey:nsISupports
|
|
|
9ccdfb |
{
|
|
|
9ccdfb |
|
|
|
9ccdfb |
void rhNotifyKeyStateChange(in unsigned long aKeyType, in string aKeyID, in unsigned long aKeyState, in unsigned long aData, in string strData);
|
|
|
9ccdfb |
diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix9 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp
|
|
|
9ccdfb |
--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix9 2011-03-24 12:43:20.262712118 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2011-03-24 12:43:34.767712121 -0700
|
|
|
9ccdfb |
@@ -18,14 +18,17 @@
|
|
|
9ccdfb |
#define FORCE_PR_LOG 1
|
|
|
9ccdfb |
|
|
|
9ccdfb |
#include "rhTray.h"
|
|
|
9ccdfb |
-#include "nsIGenericFactory.h"
|
|
|
9ccdfb |
+#include "mozilla/ModuleUtils.h"
|
|
|
9ccdfb |
#include <prlog.h>
|
|
|
9ccdfb |
#include "notifytray.h"
|
|
|
9ccdfb |
#include "nsIStringBundle.h"
|
|
|
9ccdfb |
#include <gdk/gdkx.h>
|
|
|
9ccdfb |
#include <stdlib.h>
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-NS_IMPL_ISUPPORTS1(rhTray, rhITray)
|
|
|
9ccdfb |
+#define RH_COOLKEY_TRAY_CONTRACTID "@redhat.com/rhTray;1"
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+static const nsCID kCoolKeyTrayCID = RH_TRAY_CID;
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
|
|
|
9ccdfb |
GtkWidget* rhTray::mWnd = NULL;
|
|
|
9ccdfb |
GtkWidget* rhTray::mIconMenu = NULL;
|
|
|
9ccdfb |
@@ -861,15 +864,36 @@ gboolean rhTrayWindowListener::WndDelete
|
|
|
9ccdfb |
NS_GENERIC_FACTORY_CONSTRUCTOR(rhTray)
|
|
|
9ccdfb |
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-//rhTray Module Implementation
|
|
|
9ccdfb |
+// Build a table of ClassIDs (CIDs) which are implemented by this module. CIDs
|
|
|
9ccdfb |
+// // // should be completely unique UUIDs.
|
|
|
9ccdfb |
+// // // each entry has the form { CID, service, factoryproc, constructorproc }
|
|
|
9ccdfb |
+// // // where factoryproc is usually NULL.
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+static const mozilla::Module::CIDEntry kCoolKeyTrayCIDs[] = {
|
|
|
9ccdfb |
+ { &kCoolKeyTrayCID, false, NULL, rhTrayConstructor },
|
|
|
9ccdfb |
+ { NULL }
|
|
|
9ccdfb |
+};
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-static const nsModuleComponentInfo components[] =
|
|
|
9ccdfb |
-{
|
|
|
9ccdfb |
- { "rhTray",
|
|
|
9ccdfb |
- RH_TRAY_CID,
|
|
|
9ccdfb |
- "@redhat.com/rhTray",
|
|
|
9ccdfb |
- rhTrayConstructor
|
|
|
9ccdfb |
- }
|
|
|
9ccdfb |
+// Build a table which maps contract IDs to CIDs.
|
|
|
9ccdfb |
+// A contract is a string which identifies a particular set of functionality. In some
|
|
|
9ccdfb |
+// cases an extension component may override the contract ID of a builtin gecko component
|
|
|
9ccdfb |
+// to modify or extend functionality.
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+static const mozilla::Module::ContractIDEntry kCoolKeyTrayContracts[] = {
|
|
|
9ccdfb |
+ { RH_COOLKEY_TRAY_CONTRACTID, &kCoolKeyTrayCID },
|
|
|
9ccdfb |
+ { NULL }
|
|
|
9ccdfb |
};
|
|
|
9ccdfb |
|
|
|
9ccdfb |
-NS_IMPL_NSGETMODULE(rhTrayModule, components)
|
|
|
9ccdfb |
+static const mozilla::Module kCoolKeyTrayModule = {
|
|
|
9ccdfb |
+ mozilla::Module::kVersion,
|
|
|
9ccdfb |
+ kCoolKeyTrayCIDs,
|
|
|
9ccdfb |
+ kCoolKeyTrayContracts,
|
|
|
9ccdfb |
+ NULL
|
|
|
9ccdfb |
+};
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+// The following line implements the one-and-only "NSModule" symbol exported from this
|
|
|
9ccdfb |
+// shared library.
|
|
|
9ccdfb |
+NSMODULE_DEFN(rhCoolKeyTrayModule) = &kCoolKeyTrayModule;
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+NS_IMPL_ISUPPORTS1(rhTray,rhITray)
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
diff -up ./esc/src/app/xpcom/tray/rhTray.h.fix9 ./esc/src/app/xpcom/tray/rhTray.h
|
|
|
9ccdfb |
--- ./esc/src/app/xpcom/tray/rhTray.h.fix9 2011-03-24 12:44:10.035712119 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xpcom/tray/rhTray.h 2011-03-24 12:44:19.059712129 -0700
|
|
|
9ccdfb |
@@ -19,7 +19,8 @@
|
|
|
9ccdfb |
#define RH_TRAY_H
|
|
|
9ccdfb |
|
|
|
9ccdfb |
#include "rhITray.h"
|
|
|
9ccdfb |
-#include "nsIGenericFactory.h"
|
|
|
9ccdfb |
+//#include "nsIGenericFactory.h"
|
|
|
9ccdfb |
+//#include mozilla/ModuleUtils.h
|
|
|
9ccdfb |
#include "nsEmbedString.h"
|
|
|
9ccdfb |
#include <list>
|
|
|
9ccdfb |
#include "nsCOMPtr.h"
|
|
|
9ccdfb |
diff -up ./esc/src/app/xul/esc/application.ini.fix9 ./esc/src/app/xul/esc/application.ini
|
|
|
9ccdfb |
--- ./esc/src/app/xul/esc/application.ini.fix9 2011-03-24 12:45:51.087712126 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xul/esc/application.ini 2011-03-24 12:46:01.780712129 -0700
|
|
|
9ccdfb |
@@ -25,11 +25,11 @@ Vendor=RedHat
|
|
|
9ccdfb |
Name=ESC
|
|
|
9ccdfb |
;
|
|
|
9ccdfb |
; This field specifies your application's version. This field is optional.
|
|
|
9ccdfb |
-Version=1.1.0-12
|
|
|
9ccdfb |
+Version=1.1.0-13
|
|
|
9ccdfb |
;
|
|
|
9ccdfb |
; This field specifies your application's build ID (timestamp). This field is
|
|
|
9ccdfb |
; required.
|
|
|
9ccdfb |
-BuildID=0000001012
|
|
|
9ccdfb |
+BuildID=0000001013
|
|
|
9ccdfb |
;
|
|
|
9ccdfb |
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
|
|
9ccdfb |
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
|
|
9ccdfb |
@@ -41,12 +41,12 @@ ID={6380471b-1924-4b48-b652-49f42951af86
|
|
|
9ccdfb |
; This field is required. It specifies the minimum Gecko version that this
|
|
|
9ccdfb |
; application requires. Specifying 1.8 matches all releases with a version
|
|
|
9ccdfb |
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
|
|
9ccdfb |
-MinVersion=1.9
|
|
|
9ccdfb |
+MinVersion=1.99
|
|
|
9ccdfb |
;
|
|
|
9ccdfb |
; This field is optional. It specifies the maximum Gecko version that this
|
|
|
9ccdfb |
; application requires. It should be specified if your application uses
|
|
|
9ccdfb |
; unfrozen interfaces. Specifying 1.8 matches all releases with a version
|
|
|
9ccdfb |
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
|
|
|
9ccdfb |
-MaxVersion=1.99
|
|
|
9ccdfb |
+MaxVersion=2.99
|
|
|
9ccdfb |
|
|
|
9ccdfb |
[Shell]
|
|
|
9ccdfb |
diff -up ./esc/src/app/xul/esc/chrome/chrome.manifest.fix9 ./esc/src/app/xul/esc/chrome/chrome.manifest
|
|
|
9ccdfb |
--- ./esc/src/app/xul/esc/chrome/chrome.manifest.fix9 2011-03-24 12:52:14.601712157 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xul/esc/chrome/chrome.manifest 2011-03-24 12:52:23.723712155 -0700
|
|
|
9ccdfb |
@@ -1,19 +0,0 @@
|
|
|
9ccdfb |
-# BEGIN COPYRIGHT BLOCK
|
|
|
9ccdfb |
-# This Program is free software; you can redistribute it and/or modify it under
|
|
|
9ccdfb |
-# the terms of the GNU General Public License as published by the Free Software
|
|
|
9ccdfb |
-# Foundation; version 2 of the License.
|
|
|
9ccdfb |
-#
|
|
|
9ccdfb |
-# This Program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
9ccdfb |
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
9ccdfb |
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
9ccdfb |
-#
|
|
|
9ccdfb |
-# You should have received a copy of the GNU General Public License along with
|
|
|
9ccdfb |
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
|
|
9ccdfb |
-# Place, Suite 330, Boston, MA 02111-1307 USA.
|
|
|
9ccdfb |
-#
|
|
|
9ccdfb |
-# Copyright (C) 2005 Red Hat, Inc.
|
|
|
9ccdfb |
-# All rights reserved.
|
|
|
9ccdfb |
-# END COPYRIGHT BLOCK
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
-content esc content/esc/
|
|
|
9ccdfb |
-locale esc en-US locale/en-US/
|
|
|
9ccdfb |
diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix9 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js
|
|
|
9ccdfb |
--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix9 2011-03-24 12:52:49.995712156 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2011-03-24 12:52:59.829712160 -0700
|
|
|
9ccdfb |
@@ -132,7 +132,7 @@ jsNotify.prototype = {
|
|
|
9ccdfb |
|
|
|
9ccdfb |
try {
|
|
|
9ccdfb |
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
9ccdfb |
- netkey = Components.classes["@redhat.com/rhCoolKey"].getService();
|
|
|
9ccdfb |
+ netkey = Components.classes["@redhat.com/rhCoolKey;1"].getService();
|
|
|
9ccdfb |
netkey = netkey.QueryInterface(Components.interfaces.rhICoolKey);
|
|
|
9ccdfb |
gNotify = new jsNotify;
|
|
|
9ccdfb |
netkey.rhCoolKeySetNotifyCallback(gNotify);
|
|
|
9ccdfb |
diff -up ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix9 ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js
|
|
|
9ccdfb |
--- ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix9 2011-03-24 12:53:21.344712157 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js 2011-03-24 12:53:28.456712159 -0700
|
|
|
9ccdfb |
@@ -63,7 +63,7 @@ jsWindNotify.prototype = {
|
|
|
9ccdfb |
// GECKO ONLY initialization
|
|
|
9ccdfb |
try {
|
|
|
9ccdfb |
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
9ccdfb |
- gTray = Components.classes["@redhat.com/rhTray"].getService();
|
|
|
9ccdfb |
+ gTray = Components.classes["@redhat.com/rhTray;1"].getService();
|
|
|
9ccdfb |
|
|
|
9ccdfb |
|
|
|
9ccdfb |
gTray = gTray.QueryInterface(Components.interfaces.rhITray);
|
|
|
9ccdfb |
diff -up ./esc/src/app/xul/esc/chrome.manifest.fix9 ./esc/src/app/xul/esc/chrome.manifest
|
|
|
9ccdfb |
--- ./esc/src/app/xul/esc/chrome.manifest.fix9 2011-03-24 12:49:14.983712140 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xul/esc/chrome.manifest 2011-03-24 12:49:47.350712147 -0700
|
|
|
9ccdfb |
@@ -0,0 +1,33 @@
|
|
|
9ccdfb |
+# BEGIN COPYRIGHT BLOCK
|
|
|
9ccdfb |
+# This Program is free software; you can redistribute it and/or modify it under
|
|
|
9ccdfb |
+# the terms of the GNU General Public License as published by the Free Software
|
|
|
9ccdfb |
+# Foundation; version 2 of the License.
|
|
|
9ccdfb |
+#
|
|
|
9ccdfb |
+# This Program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
9ccdfb |
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
9ccdfb |
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
9ccdfb |
+#
|
|
|
9ccdfb |
+# You should have received a copy of the GNU General Public License along with
|
|
|
9ccdfb |
+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
|
|
9ccdfb |
+# Place, Suite 330, Boston, MA 02111-1307 USA.
|
|
|
9ccdfb |
+#
|
|
|
9ccdfb |
+# Copyright (C) 2005 Red Hat, Inc.
|
|
|
9ccdfb |
+# All rights reserved.
|
|
|
9ccdfb |
+# END COPYRIGHT BLOCK
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+content esc chrome/content/esc/
|
|
|
9ccdfb |
+locale esc en-US chrome/locale/en-US/
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+interfaces components/rhICoolKey.xpt
|
|
|
9ccdfb |
+interfaces components/rhIKeyNotify.xpt
|
|
|
9ccdfb |
+interfaces components/rhITray.xpt
|
|
|
9ccdfb |
+interfaces components/rhITrayWindNotify.xpt
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+binary-component components/librhCoolKey.so
|
|
|
9ccdfb |
+binary-component components/librhTray.so
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+component {36c65861-52a8-4ce9-aa3b-235b88216ed4} components/escCLH.js
|
|
|
9ccdfb |
+contract @redhat.com/esc-clh;1 {36c65861-52a8-4ce9-aa3b-235b88216ed4}
|
|
|
9ccdfb |
+category command-line-handler escCLH @redhat.com/esc-clh;1
|
|
|
9ccdfb |
diff -up ./esc/src/app/xul/esc/components/escCLH.js.fix9 ./esc/src/app/xul/esc/components/escCLH.js
|
|
|
9ccdfb |
--- ./esc/src/app/xul/esc/components/escCLH.js.fix9 2011-03-24 12:54:15.072712160 -0700
|
|
|
9ccdfb |
+++ ./esc/src/app/xul/esc/components/escCLH.js 2011-03-24 12:54:53.868712165 -0700
|
|
|
9ccdfb |
@@ -2,6 +2,8 @@
|
|
|
9ccdfb |
* -myapp commandline handler; starts up My App.
|
|
|
9ccdfb |
*/
|
|
|
9ccdfb |
|
|
|
9ccdfb |
+ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
const nsIAppShellService = Components.interfaces.nsIAppShellService;
|
|
|
9ccdfb |
const nsISupports = Components.interfaces.nsISupports;
|
|
|
9ccdfb |
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
|
|
9ccdfb |
@@ -20,20 +22,26 @@
|
|
|
9ccdfb |
consoleService.logStringMessage("esc: " + message + "\n");
|
|
|
9ccdfb |
}
|
|
|
9ccdfb |
|
|
|
9ccdfb |
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
/*
|
|
|
9ccdfb |
* Classes
|
|
|
9ccdfb |
*/
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+function escCLH() {}
|
|
|
9ccdfb |
|
|
|
9ccdfb |
- const escCLH = {
|
|
|
9ccdfb |
+ escCLH.prototype = {
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+ contractID: "@redhat.com/esc-clh;1",
|
|
|
9ccdfb |
+ classID: Components.ID("{36c65861-52a8-4ce9-aa3b-235b88216ed4}"),
|
|
|
9ccdfb |
+ // const clh_category = "c-esc";
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
/* nsISupports */
|
|
|
9ccdfb |
- QueryInterface : function clh_QI(iid) {
|
|
|
9ccdfb |
- if (iid.equals(nsICommandLineHandler) ||
|
|
|
9ccdfb |
- iid.equals(nsIFactory) ||
|
|
|
9ccdfb |
- iid.equals(nsISupports))
|
|
|
9ccdfb |
- return this;
|
|
|
9ccdfb |
|
|
|
9ccdfb |
- throw Components.results.NS_ERROR_NO_INTERFACE;
|
|
|
9ccdfb |
- },
|
|
|
9ccdfb |
+ QueryInterface : XPCOMUtils.generateQI([nsICommandLineHandler]),
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
|
|
|
9ccdfb |
/* nsICommandLineHandler */
|
|
|
9ccdfb |
|
|
|
9ccdfb |
@@ -91,76 +99,8 @@
|
|
|
9ccdfb |
|
|
|
9ccdfb |
helpInfo : " -myapp Open the My App.\n",
|
|
|
9ccdfb |
|
|
|
9ccdfb |
- /* nsIFactory */
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- createInstance : function clh_CI(outer, iid) {
|
|
|
9ccdfb |
- if (outer != null)
|
|
|
9ccdfb |
- throw Components.results.NS_ERROR_NO_AGGREGATION;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- return this.QueryInterface(iid);
|
|
|
9ccdfb |
- },
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- lockFactory : function clh_lock(lock) {
|
|
|
9ccdfb |
- /* no-op */
|
|
|
9ccdfb |
- }
|
|
|
9ccdfb |
- };
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- const clh_contractID = "@redhat.com/esc-clh;1";
|
|
|
9ccdfb |
- const clh_CID = Components.ID("{36c65861-52a8-4ce9-aa3b-235b88216ed4}");
|
|
|
9ccdfb |
- const clh_category = "c-esc";
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- const escCLHModule = {
|
|
|
9ccdfb |
- /* nsISupports */
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- QueryInterface : function mod_QI(iid) {
|
|
|
9ccdfb |
- if (iid.equals(nsIModule) ||
|
|
|
9ccdfb |
- iid.equals(nsISupports))
|
|
|
9ccdfb |
- return this;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- throw Components.results.NS_ERROR_NO_INTERFACE;
|
|
|
9ccdfb |
- },
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- /* nsIModule */
|
|
|
9ccdfb |
- getClassObject : function mod_gch(compMgr, cid, iid) {
|
|
|
9ccdfb |
- if (cid.equals(clh_CID))
|
|
|
9ccdfb |
- return escCLH.QueryInterface(iid);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- throw Components.results.NS_ERROR_NOT_REGISTERED;
|
|
|
9ccdfb |
- },
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- registerSelf : function mod_regself(compMgr, fileSpec, location, type) {
|
|
|
9ccdfb |
- compMgr.QueryInterface(nsIComponentRegistrar);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- compMgr.registerFactoryLocation(clh_CID,
|
|
|
9ccdfb |
- "escCLH",
|
|
|
9ccdfb |
- clh_contractID,
|
|
|
9ccdfb |
- fileSpec,
|
|
|
9ccdfb |
- location,
|
|
|
9ccdfb |
- type);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
|
|
9ccdfb |
- .getService(nsICategoryManager);
|
|
|
9ccdfb |
- catMan.addCategoryEntry("command-line-handler",
|
|
|
9ccdfb |
- clh_category,
|
|
|
9ccdfb |
- clh_contractID, true, true);
|
|
|
9ccdfb |
- },
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- unregisterSelf : function mod_unreg(compMgr, location, type) {
|
|
|
9ccdfb |
- compMgr.QueryInterface(nsIComponentRegistrar);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- compMgr.unregisterFactoryLocation(clh_CID, location);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
|
|
9ccdfb |
- .getService(nsICategoryManager);
|
|
|
9ccdfb |
- catMan.deleteCategoryEntry("command-line-handler", clh_category);
|
|
|
9ccdfb |
- },
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- canUnload : function (compMgr) {
|
|
|
9ccdfb |
- return true;
|
|
|
9ccdfb |
- }
|
|
|
9ccdfb |
};
|
|
|
9ccdfb |
|
|
|
9ccdfb |
/* Module initialisation */
|
|
|
9ccdfb |
- function NSGetModule(comMgr, fileSpec) {
|
|
|
9ccdfb |
- return escCLHModule;
|
|
|
9ccdfb |
- }
|
|
|
9ccdfb |
+
|
|
|
9ccdfb |
+var NSGetFactory = XPCOMUtils.generateNSGetFactory([escCLH]);
|
|
|
9ccdfb |
diff -up ./esc/src/lib/notifytray/notifyareaicon.c.fix9 ./esc/src/lib/notifytray/notifyareaicon.c
|
|
|
9ccdfb |
--- ./esc/src/lib/notifytray/notifyareaicon.c.fix9 2011-03-24 12:57:00.410712173 -0700
|
|
|
9ccdfb |
+++ ./esc/src/lib/notifytray/notifyareaicon.c 2011-03-24 12:57:21.501712174 -0700
|
|
|
9ccdfb |
@@ -90,19 +90,7 @@ notify_area_icon_class_init (NotifyAreaI
|
|
|
9ccdfb |
static void
|
|
|
9ccdfb |
notify_area_icon_unrealize (GtkWidget *widget)
|
|
|
9ccdfb |
{
|
|
|
9ccdfb |
- NotifyAreaIcon *icon = (NotifyAreaIcon *) widget;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- GdkWindow *root_window;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
g_print("notify_area_icon_unrealize \n");
|
|
|
9ccdfb |
- if (icon->manager_wnd != None)
|
|
|
9ccdfb |
- {
|
|
|
9ccdfb |
- GdkWindow *gdkwin;
|
|
|
9ccdfb |
- gdkwin = gdk_window_lookup (icon->manager_wnd);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- }
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
|
|
|
9ccdfb |
|
|
|
9ccdfb |
if (GTK_WIDGET_CLASS (plug_parent_class)->unrealize)
|
|
|
9ccdfb |
(* GTK_WIDGET_CLASS (plug_parent_class)->unrealize) (widget);
|
|
|
9ccdfb |
@@ -159,14 +147,6 @@ notify_area_icon_update_manager_wnd(Noti
|
|
|
9ccdfb |
|
|
|
9ccdfb |
xdisplay = gdk_display;
|
|
|
9ccdfb |
|
|
|
9ccdfb |
- if (icon->manager_wnd != None)
|
|
|
9ccdfb |
- {
|
|
|
9ccdfb |
- GdkWindow *gdkwin;
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- gdkwin = gdk_window_lookup (icon->manager_wnd);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- }
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
XGrabServer (xdisplay);
|
|
|
9ccdfb |
|
|
|
9ccdfb |
icon->manager_wnd = XGetSelectionOwner (xdisplay, icon->selection_atom);
|
|
|
9ccdfb |
@@ -235,7 +215,7 @@ notify_area_icon_new(const gchar *name)
|
|
|
9ccdfb |
{
|
|
|
9ccdfb |
NotifyAreaIcon *icon;
|
|
|
9ccdfb |
char buff[256];
|
|
|
9ccdfb |
- GdkWindow *root;
|
|
|
9ccdfb |
+ /* GdkWindow *root; */
|
|
|
9ccdfb |
|
|
|
9ccdfb |
Screen *xscreen = DefaultScreenOfDisplay (gdk_display);
|
|
|
9ccdfb |
|
|
|
9ccdfb |
@@ -275,8 +255,6 @@ notify_area_icon_new(const gchar *name)
|
|
|
9ccdfb |
notify_area_icon_update_manager_wnd(icon);
|
|
|
9ccdfb |
|
|
|
9ccdfb |
g_print ("attempted to update_manager_wnd: %p",(void *)icon->manager_wnd);
|
|
|
9ccdfb |
-
|
|
|
9ccdfb |
- root = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
|
|
|
9ccdfb |
|
|
|
9ccdfb |
icon->tooltips = gtk_tooltips_new ();
|
|
|
9ccdfb |
|
|
|
9ccdfb |
diff -up ./esc/src/lib/notifytray/notifytray.c.fix9 ./esc/src/lib/notifytray/notifytray.c
|
|
|
9ccdfb |
--- ./esc/src/lib/notifytray/notifytray.c.fix9 2011-03-24 12:57:57.680712175 -0700
|
|
|
9ccdfb |
+++ ./esc/src/lib/notifytray/notifytray.c 2011-03-24 12:58:07.243712165 -0700
|
|
|
9ccdfb |
@@ -239,7 +239,7 @@ void notify_icon_send_tooltip_msg(const
|
|
|
9ccdfb |
}
|
|
|
9ccdfb |
|
|
|
9ccdfb |
g_print("icon %s", icon);
|
|
|
9ccdfb |
- NotifyNotification *not = notify_notification_new(msg_title, message,icon, GTK_WIDGET(notify));
|
|
|
9ccdfb |
+ NotifyNotification *not = notify_notification_new(msg_title, message,icon); /*, GTK_WIDGET(notify));*/
|
|
|
9ccdfb |
|
|
|
9ccdfb |
if(not)
|
|
|
9ccdfb |
{
|