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 r201 - trunk/java/ch/idok/qtgui
- Date: Mon, 1 Sep 2008 11:30:43 +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
Date: Mon Sep 1 11:30:43 2008
New Revision: 201
Log:
Corrected the file name suggestion.
Modified:
trunk/java/ch/idok/qtgui/MainWindow.java
Modified: trunk/java/ch/idok/qtgui/MainWindow.java
==============================================================================
--- trunk/java/ch/idok/qtgui/MainWindow.java (original)
+++ trunk/java/ch/idok/qtgui/MainWindow.java Mon Sep 1 11:30:43 2008
@@ -644,8 +644,15 @@
return;
RepositoryPath repPath = (RepositoryPath) selectedDocItem_.data(0,
Qt.ItemDataRole.UserRole);
- String nameSuggestion = new String(repPath.getDocumentId().toString()
- .split("/")[1]);
+
+ String nameSuggestion;
+ String document = repPath.getDocumentId().toString();
+ if (document.contains("/")) {
+ nameSuggestion = document.substring(document.lastIndexOf("/")+1);
+ } else {
+ nameSuggestion = document;
+ }
+
String f = QFileDialog.getSaveFileName(null, "Save document as",
nameSuggestion);
if (f == null || f.equals(""))
- [idok-commit] idok commit r201 - trunk/java/ch/idok/qtgui, AFS account Florian Huebner, 09/01/2008
Archive powered by MHonArc 2.6.19.