}
});
PluginInterface pi = PluginInitializer.getDefaultInterface();
UIManager uim = pi.getUIManager();
MenuManager menuManager = uim.getMenuManager();
String menuID = "sidebar."
+ ContentNetworkUtils.getTarget(contentNetwork);
MenuItem item = menuManager.addMenuItem(menuID, "Button.reload");
item.addListener(new MenuItemListener() {
public void selected(MenuItem menu, Object target) {
browserSkinObject.refresh();
}
});
if (org.gudy.azureus2.core3.util.Constants.isCVSVersion()) {
MenuItem parent = menuManager.addMenuItem(menuID, "CVS Only");
parent.setStyle(MenuItem.STYLE_MENU);
MenuItem menuItem = menuManager.addMenuItem(parent, "Button.reset");
menuItem.addListener(new MenuItemListener() {
public void selected(MenuItem menu, Object target) {
browserSkinObject.getContext().executeInBrowser("sendMessage('display','reset-url', {});");
//browserSkinObject.restart();
}
});
menuItem = menuManager.addMenuItem(parent, "Tux RPC Test");
menuItem.addListener(new MenuItemListener() {
public void selected(MenuItem menu, Object target) {
browserSkinObject.setURL("c:\\test\\BrowserMessaging.html");
}
});
menuItem = menuManager.addMenuItem(parent, "URL..");
menuItem.addListener(new MenuItemListener() {
public void selected(MenuItem menu, Object target) {
SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow("", "!URL!");
entryWindow.prompt(new UIInputReceiverListener() {
public void UIInputReceiverClosed(UIInputReceiver entryWindow) {
if (entryWindow.hasSubmittedInput()) {
browserSkinObject.setURL(entryWindow.getSubmittedInput());
}
}
});
}
});
if (contentNetwork != ConstantsVuze.getDefaultContentNetwork()) {
menuItem = menuManager.addMenuItem(parent, "Remove HD Network");
menuItem.addListener(new MenuItemListener() {
public void selected(MenuItem menu, Object target) {
if (mdi != null) {
MdiEntry entry = mdi.getEntryBySkinView(Browse.this);
if (entry != null) {
entry.removeListener(Browse.this);
}
mdi.closeEntry(ContentNetworkUtils.getTarget(contentNetwork));
}
contentNetwork.remove();
}
});
menuItem = menuManager.addMenuItem(parent, "Reset IP Flag && Close");
menuItem.addListener(new MenuItemListener() {
public void selected(MenuItem menu, Object target) {
contentNetwork.setPersistentProperty(
ContentNetwork.PP_AUTH_PAGE_SHOWN, Boolean.FALSE);
if (mdi != null) {
MdiEntry entry = mdi.getEntryBySkinView(Browse.this);
if (entry != null) {
entry.removeListener(Browse.this);
}
mdi.closeEntry(ContentNetworkUtils.getTarget(contentNetwork));
}
}
});
}
menuItem = menuManager.addMenuItem(parent, "Source Ref: "
+ contentNetwork.getPersistentProperty(ContentNetwork.PP_SOURCE_REF));
menuItem.setEnabled(false);
}
return null;