Browse Source

Add UnregisterCmd

master
boisso 7 years ago
parent
commit
ded88a8771
  1. 7
      k-meleon/JSBridge/jscomp.cpp
  2. 1
      k-meleon/JSBridge/nsIJSBridge.idl

7
k-meleon/JSBridge/jscomp.cpp

@ -292,6 +292,13 @@ nsresult GetPathAndRect(JSContext* cx, JS::HandleValue& icon, char** path, RECT*
return NS_OK;
}
NS_IMETHODIMP CJSBridge::UnregisterCmd(const char * name)
{
if (!kPlugin.kFuncs) return NS_ERROR_NOT_INITIALIZED;
kPlugin.kFuncs->UnregisterCmd(name);
return NS_OK;
}
NS_IMETHODIMP CJSBridge::RegisterCmd(const char * name, const char * desc,
kmICommandFunction *command, JS::HandleValue icon,
kmICallback *enabled, kmICallback *checked, JSContext* cx, int32_t *_retval)

1
k-meleon/JSBridge/nsIJSBridge.idl

@ -73,6 +73,7 @@ interface nsIJSBridge : nsISupports
long RegisterCmd(in string name, in string desc,
in kmICommandFunction command, [optional] in jsval icon,
[optional] in kmICallback enabled, [optional] in kmICallback checked);
void UnregisterCmd(in string name);
[implicit_jscontext]
void SetCmdIcon(in string name, in jsval icon);
[implicit_jscontext]

Loading…
Cancel
Save