idok-commit AT lists.psi.ch
Subject: Commit emails of the iDok project
List archive
- From: "AFS account Florian Huebner" <huebner AT savannah.psi.ch>
- To: idok-commit AT lists.psi.ch
- Subject: [idok-commit] idok commit r320 - trunk/java/ch/idok/qtgui
- Date: Tue, 3 Feb 2009 16:37:12 +0100
- 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
Date: Tue Feb 3 16:37:12 2009
New Revision: 320
Log:
Resolved issue #IDO-197: Its now possible to save the state of the local
file browser.
Modified:
trunk/java/ch/idok/qtgui/MainWindow.java
trunk/java/ch/idok/qtgui/PerspectiveHandler.java
Modified: trunk/java/ch/idok/qtgui/MainWindow.java
==============================================================================
--- trunk/java/ch/idok/qtgui/MainWindow.java (original)
+++ trunk/java/ch/idok/qtgui/MainWindow.java Tue Feb 3 16:37:12 2009
@@ -35,7 +35,6 @@
import ch.idok.common.repository.RepositoryPath;
import ch.idok.common.util.RevisionInfo;
-import com.sun.corba.se.impl.encoding.OSFCodeSetRegistry.Entry;
import com.trolltech.qt.core.QDateTime;
import com.trolltech.qt.core.QObject;
import com.trolltech.qt.core.QPoint;
@@ -211,17 +210,15 @@
fd_ = new QFileDialog(ui_.dockWidgetContentsLocalFS);
List<String> filters = new ArrayList<String>();
- ;
+
filters.add(tr("Any files (*)"));
- filters
- .add(tr("Image files (*.png *.gif *.jpg *.tif *.tiff *.jpeg
*.ps *.eps)"));
+ filters.add(tr("Image files (*.png *.gif *.jpg *.tif *.tiff *.jpeg
*.ps *.eps)"));
filters.add(tr("PDF files (*.pdf)"));
filters.add(tr("TeX files (*.tex *.dvi)"));
filters.add(tr("Text files (*.txt *.xml *.htm *.html *.log)"));
filters.add(tr("Microsoft Office files (*.doc *.xls *.ppt)"));
filters.add(tr("OpenOffice files (*.odt *.ods *.odp *.odc *.odg)"));
- filters
- .add(tr("CAD files (*.dxf *.dwg *.plt *.CatPart *.CatProduct
*.model)"));
+ filters.add(tr("CAD files (*.dxf *.dwg *.plt *.CatPart *.CatProduct
*.model)"));
fd_.setFilters(filters);
fd_.setFileMode(QFileDialog.FileMode.ExistingFiles);
@@ -249,7 +246,7 @@
fd_.currentChanged.connect(worker_, "start(String)");
worker_.executeSignal.connect(dc_, "previewLocalFile(String)");
- ph_ = new PerspectiveHandler(this);
+ ph_ = new PerspectiveHandler(this,fd_);
searchHintLabel_ = new QLabel("test");
searchHintLabel_.setVisible(false);
Modified: trunk/java/ch/idok/qtgui/PerspectiveHandler.java
==============================================================================
--- trunk/java/ch/idok/qtgui/PerspectiveHandler.java (original)
+++ trunk/java/ch/idok/qtgui/PerspectiveHandler.java Tue Feb 3 16:37:12
2009
@@ -25,6 +25,7 @@
import com.trolltech.qt.gui.QCheckBox;
import com.trolltech.qt.gui.QComboBox;
import com.trolltech.qt.gui.QDialog;
+import com.trolltech.qt.gui.QFileDialog;
import com.trolltech.qt.gui.QGridLayout;
import com.trolltech.qt.gui.QIcon;
import com.trolltech.qt.gui.QLineEdit;
@@ -50,6 +51,8 @@
public final QLineEdit perspectiveNameLineEdit;
public final QMainWindow mw_;
+
+ public final QFileDialog fd_;
// original state is only stored here internally, not in preferences
private QByteArray originalState_;
@@ -66,9 +69,10 @@
private static String DEFAULTKEY = "default";
- public PerspectiveHandler(QMainWindow mw) {
+ public PerspectiveHandler(QMainWindow mw,QFileDialog fd) {
super();
mw_ = mw;
+ fd_ = fd;
originalState_ = mw_.saveState();
original_ = tr("Original perspective");
@@ -123,6 +127,8 @@
} else {
mw_.restoreState((QByteArray)
DmsGui.Settings.value("perspective/"
+ perspective));
+ fd_.restoreState((QByteArray)
DmsGui.Settings.value("localFileBrowser/"
+ + perspective));
}
}
@@ -178,6 +184,8 @@
if (!currentPerspective_.equalsIgnoreCase(original_)) {
DmsGui.Settings.setValue(PREKEY + currentPerspective_, mw_
.saveState());
+ DmsGui.Settings.setValue("localFileBrowser/" +
currentPerspective_, fd_
+ .saveState());
}
updateComboBox();
}
- [idok-commit] idok commit r320 - trunk/java/ch/idok/qtgui, AFS account Florian Huebner, 02/03/2009
Archive powered by MHonArc 2.6.19.