Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsuen2007-04-21 23:01:34 +0000
committerrsuen2007-04-21 23:01:34 +0000
commit370e717dea39c2b3d8ba8f35f8332199cd716f42 (patch)
tree053bb5afd635535f2440a01b1e56b7ba916d1099
parent71a6adcd9064d9de8ef263ecd229c3d7b03029af (diff)
downloadorg.eclipse.ecf-370e717dea39c2b3d8ba8f35f8332199cd716f42.tar.gz
org.eclipse.ecf-370e717dea39c2b3d8ba8f35f8332199cd716f42.tar.xz
org.eclipse.ecf-370e717dea39c2b3d8ba8f35f8332199cd716f42.zip
Take an IChatMessage instead so that XHTML support can be added in.
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java53
1 files changed, 33 insertions, 20 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java
index 9e7d96df4..9e6b2a041 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp.ui/src/org/eclipse/ecf/internal/provider/xmpp/ui/XMPPConnectWizard.java
@@ -80,17 +80,23 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
IFileTransferInfo transferInfo = event
.getFileTransferInfo();
String fileName = transferInfo.getFile().getName();
- Object[] bindings = new Object[] {
- username,
- fileName,
+ Object[] bindings = new Object[] { username, fileName,
((transferInfo.getFileSize() == -1) ? "unknown" //$NON-NLS-1$
: (transferInfo.getFileSize() + " bytes")), //$NON-NLS-1$
(transferInfo.getDescription() == null) ? "none" //$NON-NLS-1$
: transferInfo.getDescription() };
- if (MessageDialog.openQuestion(shell, NLS.bind(
- Messages.getString("XMPPConnectWizard.FILE_RECEIVE_TITLE"), username), //$NON-NLS-1$
- NLS.bind(Messages.getString("XMPPConnectWizard.FILE_RECEIVE_MESSAGE"), //$NON-NLS-1$
- bindings))) {
+ if (MessageDialog
+ .openQuestion(
+ shell,
+ NLS
+ .bind(
+ Messages
+ .getString("XMPPConnectWizard.FILE_RECEIVE_TITLE"), username), //$NON-NLS-1$
+ NLS
+ .bind(
+ Messages
+ .getString("XMPPConnectWizard.FILE_RECEIVE_MESSAGE"), //$NON-NLS-1$
+ bindings))) {
FileDialog fd = new FileDialog(shell, SWT.OPEN);
// XXX this should be some default path gotten from
// preference. For now we'll have it be the user.home
@@ -103,9 +109,12 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
.lastIndexOf('.'));
fd.setFilterExtensions(new String[] { ext });
}
- fd.setText(NLS.bind(
- Messages.getString("XMPPConnectWizard.FILE_SAVE_TITLE"), //$NON-NLS-1$
- username));
+ fd
+ .setText(NLS
+ .bind(
+ Messages
+ .getString("XMPPConnectWizard.FILE_SAVE_TITLE"), //$NON-NLS-1$
+ username));
final String res = fd.open();
if (res == null)
event.reject();
@@ -133,10 +142,12 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
MessageDialog
.openError(
shell,
- Messages.getString("XMPPConnectWizard.RECEIVE_ERROR_TITLE"), //$NON-NLS-1$
+ Messages
+ .getString("XMPPConnectWizard.RECEIVE_ERROR_TITLE"), //$NON-NLS-1$
NLS
.bind(
- Messages.getString("XMPPConnectWizard.RECEIVE_ERROR_MESSAGE"), //$NON-NLS-1$
+ Messages
+ .getString("XMPPConnectWizard.RECEIVE_ERROR_MESSAGE"), //$NON-NLS-1$
new Object[] {
fileName,
username,
@@ -190,7 +201,7 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
.getSite().getAdapter(
IWorkbenchSiteProgressService.class);
view.openTab(icms, itms, targetID, message.getFromID());
- view.showMessage(message.getFromID(), message.getBody());
+ view.showMessage(message);
service.warnOfContentChange();
} else {
try {
@@ -208,9 +219,7 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
service.warnOfContentChange();
}
view.openTab(icms, itms, targetID, message.getFromID());
- view
- .showMessage(message.getFromID(), message
- .getBody());
+ view.showMessage(message);
} catch (PartInitException e) {
e.printStackTrace();
}
@@ -247,7 +256,7 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
final IPresenceContainerAdapter adapter = (IPresenceContainerAdapter) container
.getAdapter(IPresenceContainerAdapter.class);
-
+
container.addListener(new IContainerListener() {
public void handleEvent(IContainerEvent event) {
if (event instanceof IContainerConnectedEvent) {
@@ -285,9 +294,13 @@ public class XMPPConnectWizard extends Wizard implements IConnectWizard {
exception.printStackTrace();
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- new ContainerConnectErrorDialog(workbench
- .getActiveWorkbenchWindow()
- .getShell(), 1, Messages.getString("XMPPConnectWizard.SEE_DETAILS"), //$NON-NLS-1$
+ new ContainerConnectErrorDialog(
+ workbench
+ .getActiveWorkbenchWindow()
+ .getShell(),
+ 1,
+ Messages
+ .getString("XMPPConnectWizard.SEE_DETAILS"), //$NON-NLS-1$
targetID.getName(), exception)
.open();
}

Back to the top