Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r103 - trunk/java/ch/idok/qtgui

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r103 - trunk/java/ch/idok/qtgui


Chronological Thread 
  • From: "Apache" <apache AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r103 - trunk/java/ch/idok/qtgui
  • Date: Fri, 16 May 2008 09:27:11 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: huebner AT PSI.CH
Date: Fri May 16 09:27:10 2008
New Revision: 103

Log:
-Files are no longer recognised as "local" if the svn/openoffice reside on
the same machine as the gui client (like on the VMWare server image)

-unrecognised file types can no longer be viewed as text on a local drive

Modified:
trunk/java/ch/idok/qtgui/PreviewWidget.java

Modified: trunk/java/ch/idok/qtgui/PreviewWidget.java
==============================================================================
--- trunk/java/ch/idok/qtgui/PreviewWidget.java (original)
+++ trunk/java/ch/idok/qtgui/PreviewWidget.java Fri May 16 09:27:10 2008
@@ -115,6 +115,8 @@
public boolean enablePreview = false;

public boolean enablePreviewAnyway = false;
+
+ private boolean localFile = false;

private PDFFile pdfFile_ = null;

@@ -212,6 +214,11 @@
}

public void setLocalContents(String fileName) {
+ localFile = true;
+ previewAnywayButton_.hide();
+ previewButton_.hide();
+ enablePreviewAnyway = false;
+ enablePreview = false;
fileName_ = fileName;
previewData(fileName);
docLabel_.setText(fileName);
@@ -219,6 +226,7 @@

public void setDmsContents(RepositoryController repoC,
RepositoryPath repPath) {
+ localFile = false;
repPath_ = repPath;
repoCon_ = repoC;
try {
@@ -320,7 +328,7 @@
int convertTime = 0;
int displayTime = 0;
time.start();
- if (fileName_.startsWith("/tmp/lastViewedFile")) {
+ if (!localFile) {
ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
outStream = repoCon_.getCurrentRepo().getFileOverHttp(
repoCon_.getCurrentRepo(),
@@ -356,7 +364,7 @@
try {
QTime time = new QTime();
time.start();
- if (fileName_.startsWith("/tmp/lastViewedFile")) {
+ if (!localFile) {
ByteArrayOutputStream outStream = new
ByteArrayOutputStream();
outStream = repoCon_.getCurrentRepo().getFileOverHttp(
repoCon_.getCurrentRepo(),
@@ -393,7 +401,8 @@
textView_
.setText("<b> Sorry, preview of this file type is not
yet supported </b> <br> (Doubleclick on document to start external viewer)");
enableTextView();
- previewAnywayButton_.show();
+ if (!localFile)
+ previewAnywayButton_.show();
enablePreviewAnyway = false;
}
unsetCursor();



  • [idok-commit] idok commit r103 - trunk/java/ch/idok/qtgui, Apache, 05/16/2008

Archive powered by MHonArc 2.6.19.

Top of Page