I now have webclient mostly working on win32. The following features have been tested and work well.

File->New Window

File->Close

View->View Page Source as String

Search->Find

Search->Find Next

Edit->Select All

Edit->Copy

History->Back

History->Forward

History-> <Navigation Number>

Bookmarks->Manage Bookmarks

The bookmarks window pops up and you can double click on bookmarks to
cause webclient to go to that page.

Stream->Load Stream From File...

Stream->Load Random HTML InputStream

Mouse over events work

The DOMViewer works

Navigation buttons work.

This leaves Bookmarks->Add Current Page, Bookmarks->Add Current Page in New Folder,
Profile->Create Profile, and Profile->Delete Profile. The first two should be easy,
the second two, I'll probably just take out, since their implementation was based in
BlackConnect, which is currently quite dead.

When I'm happy with the state of Webclient on win32, I'll get it working on linux.
This commit is contained in:
edburns%acm.org 2002-05-08 21:55:14 +00:00
Родитель 9588555e4c
Коммит 0eca4c3b0f
4 изменённых файлов: 8 добавлений и 32 удалений

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

@ -59,7 +59,7 @@ import java.io.FileInputStream;
* This is a test application for using the BrowserControl.
*
* @version $Id: EMWindow.java,v 1.35 2001/07/27 17:24:25 edburns%acm.org Exp $
* @version $Id: EMWindow.java,v 1.36 2002/05/08 21:55:10 edburns%acm.org Exp $
*
* @see org.mozilla.webclient.BrowserControlFactory
@ -112,7 +112,6 @@ private UniversalDialog uniDialog = null;
private MenuItem popup_ViewSource, popup_SelectAll;
private PopupActionListener contextListener;
private ProfileManager profileManager = null;
private String myBinDir;
public static void main(String [] arg)
@ -139,7 +138,6 @@ private UniversalDialog uniDialog = null;
Menu viewMenu = new Menu("View");
Menu searchMenu = new Menu("Search");
Menu editMenu = new Menu("Edit");
Menu profileMenu = new Menu("Profile");
MenuItem newItem = new MenuItem("New Window");
MenuItem closeItem = new MenuItem("Close");
MenuItem findItem = new MenuItem("Find");
@ -148,18 +146,11 @@ private UniversalDialog uniDialog = null;
MenuItem pageInfoItem = new MenuItem("View Page Info");
MenuItem selectAllItem = new MenuItem("Select All");
MenuItem copyItem = new MenuItem("Copy");
MenuItem createProfileItem = new MenuItem("Create Profile");
MenuItem deleteProfileItem = new MenuItem("Delete Profile");
menuBar.add(fileMenu);
menuBar.add(viewMenu);
menuBar.add(searchMenu);
menuBar.add(editMenu);
menuBar.add(profileMenu);
profileMenu.add(createProfileItem);
createProfileItem.addActionListener(this);
profileMenu.add(deleteProfileItem);
deleteProfileItem.addActionListener(this);
fileMenu.add(newItem);
newItem.addActionListener(this);
@ -478,20 +469,6 @@ public void actionPerformed (ActionEvent evt)
}
else if (command.equals("Copy")) {
currentPage.copyCurrentSelectionToSystemClipboard();
}
else if (command.equals("Create Profile")) {
if (profileManager == null) {
profileManager = (ProfileManager)
browserControl.queryInterface(BrowserControl.PROFILE_MANAGER_NAME);
}
profileManager.CreateNewProfile("Tester", myBinDir, null, true);
}
else if (command.equals("Delete Profile")) {
if (profileManager == null) {
profileManager = (ProfileManager)
browserControl.queryInterface(BrowserControl.PROFILE_MANAGER_NAME);
}
profileManager.DeleteProfile("Tester", true);
}
else if(command.equals("Stop")) {
navigation.stop();
@ -797,10 +774,10 @@ public void mouseClicked(java.awt.event.MouseEvent e)
}
if (0 != (modifiers & InputEvent.BUTTON2_MASK)) {
System.out.println("Button2 ");
popup.show(this, e.getX(), e.getY());
}
if (0 != (modifiers & InputEvent.BUTTON3_MASK)) {
System.out.println("Button3 ");
popup.show(this, e.getX(), e.getY());
}
}

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

@ -37,7 +37,6 @@ public class WrapperFactoryImpl extends WrapperFactory
final String [] stubsImplementedInterfaces =
{
BrowserControl.PROFILE_MANAGER_NAME
};
//
@ -248,7 +247,7 @@ public static void main(String [] args)
WrapperFactory me = new WrapperFactoryImpl();
Log.setApplicationName("WrapperFactoryImpl");
Log.setApplicationVersion("0.0");
Log.setApplicationVersionDate("$Id: WrapperFactoryImpl.java,v 1.5 2001/05/24 21:13:34 ashuk%eng.sun.com Exp $");
Log.setApplicationVersionDate("$Id: WrapperFactoryImpl.java,v 1.6 2002/05/08 21:55:12 edburns%acm.org Exp $");
}

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

@ -466,7 +466,7 @@ static void event_processor_callback(gpointer data,
void DoMozInitialization(WebShellInitContext * initContext)
{
if (gFirstTime) {
// PENDING(edburns): figure out why we need this
// PENDING(edburns): We need this for rdf_getChildCount
PR_SetEnv("XPCOM_CHECK_THREADSAFE=0");
nsILocalFile * pathFile = nsnull;

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

@ -292,7 +292,7 @@ wsRDFInsertElementAtEvent::handleEvent ()
PR_ASSERT(gComponentManager);
// get a container in order to create a child
rv = gComponentManager->CreateInstance(kRDFContainerCID,
rv = nsComponentManager::CreateInstance(kRDFContainerCID,
nsnull,
NS_GET_IID(nsIRDFContainer),
getter_AddRefs(container));
@ -470,7 +470,7 @@ wsRDFNewFolderEvent::handleEvent ()
// http://lxr.mozilla.org/mozilla/source/xpfe/components/bookmarks/resources/bookmarks.js#1190
// set up selection nsISupportsArray
rv = gComponentManager->CreateInstance(kSupportsArrayCID,
rv = nsComponentManager::CreateInstance(kSupportsArrayCID,
nsnull,
NS_GET_IID(nsISupportsArray),
getter_AddRefs(selectionArray));
@ -481,7 +481,7 @@ wsRDFNewFolderEvent::handleEvent ()
}
// set up arguments nsISupportsArray
rv = gComponentManager->CreateInstance(kSupportsArrayCID,
rv = nsComponentManager::CreateInstance(kSupportsArrayCID,
nsnull,
NS_GET_IID(nsISupportsArray),
getter_AddRefs(argumentsArray));
@ -751,7 +751,7 @@ jint getNativeEnumFromJava(JNIEnv *env, jobject obj, jint nativeRDFNode)
PR_ASSERT(gComponentManager);
// get a container in order to get the enum
rv = gComponentManager->CreateInstance(kRDFContainerCID,
rv = nsComponentManager::CreateInstance(kRDFContainerCID,
nsnull,
NS_GET_IID(nsIRDFContainer),
getter_AddRefs(container));