Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-03-14 21:08:41 +0000
committerslewis2008-03-14 21:08:41 +0000
commitf063dc36e01f4065ca4bc0dd1884e4ff50f05fea (patch)
tree86c8a168ff01e58be1ad4b14e52ec70fbc2a5c77 /examples/bundles/org.eclipse.ecf.example.collab/src
parentbfbaa33348ef9c994112cc83109c1c32868c88df (diff)
downloadorg.eclipse.ecf-f063dc36e01f4065ca4bc0dd1884e4ff50f05fea.tar.gz
org.eclipse.ecf-f063dc36e01f4065ca4bc0dd1884e4ff50f05fea.tar.xz
org.eclipse.ecf-f063dc36e01f4065ca4bc0dd1884e4ff50f05fea.zip
Fix for screen capture dialog image capture, sizing issues, and handling multiple simultaneous senders
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.example.collab/src')
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java38
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties2
2 files changed, 22 insertions, 18 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
index 82acb5cf2..c18d27c5c 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/share/EclipseCollabSharedObject.java
@@ -14,6 +14,7 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
+import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.resources.IFile;
@@ -133,9 +134,7 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
localGUI = null;
}
}
- if (showImageShell != null) {
- showImageShell.close();
- }
+ shells.clear();
if (sharedObjectEventListener != null) {
sharedObjectEventListener = null;
}
@@ -534,36 +533,41 @@ public class EclipseCollabSharedObject extends GenericSharedObject {
}
}
- ShowImageShell showImageShell = null;
+ Map shells = new HashMap();
protected void handleShowImageStart(final ID id, final String fromUser, final ImageWrapper imageWrapper) {
final Display display = localGUI.getTextControl().getDisplay();
display.asyncExec(new Runnable() {
public void run() {
+ ShowImageShell showImageShell = (ShowImageShell) shells.get(id);
if (showImageShell == null) {
- showImageShell = new ShowImageShell(display, id, imageWrapper, new DisposeListener() {
+ showImageShell = new ShowImageShell(display, id, new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
- showImageShell = null;
+ shells.remove(id);
}
});
- showImageShell.setText(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM + fromUser);
- showImageShell.open();
+ shells.put(id, showImageShell);
}
+ showImageShell.initialize(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM + fromUser, imageWrapper);
+ showImageShell.open();
}
});
}
protected void handleShowImageData(final ID id, final byte[] data, final Boolean done) {
- final Display display = localGUI.getTextControl().getDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if (showImageShell != null && showImageShell.getSenderID().equals(id)) {
- showImageShell.addData(data);
- if (done.booleanValue())
- showImageShell.showImage();
- }
+ final ShowImageShell showImageShell = (ShowImageShell) shells.get(id);
+ if (showImageShell != null) {
+ final Display display = showImageShell.getDisplay();
+ if (display != null) {
+ display.asyncExec(new Runnable() {
+ public void run() {
+ showImageShell.addData(data);
+ if (done.booleanValue())
+ showImageShell.showImage();
+ }
+ });
}
- });
+ }
}
public void sendShowTextMsg(String msg) {
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
index 09a41d26f..646508eff 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/internal/example/collab/ui/MessageLoader.properties
@@ -9,7 +9,7 @@ ChatComposite.DIALOG_CONFIRM_CLEAR_TITLE=Confirm Clear Text Output
ChatComposite.DIALOG_COPY_ERROR_TEXT=Exception copying file locally. Cancelling file transfer.\nException:
ChatComposite.DIALOG_COPY_ERROR_TITLE=Local File Copy Error
ChatComposite.DIALOG_FILE_OPEN_ERROR_TITLE=File Open Error
-ChatComposite.DIALOG_SCREEN_CAPTURE_TEXT=To initiate screen capture, click OK, wait 5 seconds,\nand then select capture region with arrow cursor.
+ChatComposite.DIALOG_SCREEN_CAPTURE_TEXT=To initiate screen capture, click OK, wait 5 seconds,\nand then select capture region with crosshair cursor.
ChatComposite.DIALOG_SCREEN_CAPTURE_TITLE=Screen Capture
ChatComposite.EXCEPTION_FILE_NOT_FOUND_TEXT=File {0} not found\nException: {0}
ChatComposite.EXCEPTION_FILE_NOT_FOUND_TEXT1=File {0} not found.

Back to the top