Skip to Content.
Sympa Menu

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

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

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


Chronological Thread 
  • From: "AFS account Florian Huebner" <huebner AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r358 - trunk/java/ch/idok/qtgui
  • Date: Mon, 27 Apr 2009 13:26:36 +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 Apr 27 13:26:36 2009
New Revision: 358

Log:
Fixed the external document preview

Modified:
trunk/java/ch/idok/qtgui/MainWindow.java
trunk/java/ch/idok/qtgui/PreviewWidget.java
trunk/java/ch/idok/qtgui/StartExternalProgram.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 Apr 27 13:26:36 2009
@@ -158,7 +158,7 @@

private Logger logger_ =
Setup.getInstance().getLogger("qtgui.MainWindow");

- StartExternalProgram startex;
+ private StartExternalProgram startex;
/**
* Currently open repository
*/
@@ -177,7 +177,7 @@

defineMainWindowCornerBehaviour();

- startex = new StartExternalProgram();
+ startex = StartExternalProgram.getInstance();

ui_.setupUi(this);


Modified: trunk/java/ch/idok/qtgui/PreviewWidget.java
==============================================================================
--- trunk/java/ch/idok/qtgui/PreviewWidget.java (original)
+++ trunk/java/ch/idok/qtgui/PreviewWidget.java Mon Apr 27 13:26:36 2009
@@ -147,7 +147,7 @@

// build up the structure from inner most widgets to outer widgets

- startex = new StartExternalProgram();
+ startex = StartExternalProgram.getInstance();

imageView_ = new PreviewImage();
textView_ = new QTextEdit();

Modified: trunk/java/ch/idok/qtgui/StartExternalProgram.java
==============================================================================
--- trunk/java/ch/idok/qtgui/StartExternalProgram.java (original)
+++ trunk/java/ch/idok/qtgui/StartExternalProgram.java Mon Apr 27 13:26:36
2009
@@ -35,8 +35,10 @@



-
-class StartExternalProgram{
+// Singleton
+public class StartExternalProgram{
+
+ private static StartExternalProgram instance;
private Logger logger_ =
Setup.getInstance().getLogger("qtgui.StartExternalProgram");
private QTreeWidgetItem selectedDocItem_;
private RepositoryPath repPath;
@@ -45,6 +47,16 @@
// public StartExternalProgram(QTreeWidgetItem item) {
// selectedDocItem_ = item;
// }
+
+ private StartExternalProgram(){}
+
+ public static synchronized StartExternalProgram getInstance() {
+ if (instance == null) {
+ instance = new StartExternalProgram();
+ }
+ return instance;
+ }
+
public void setItem(QTreeWidgetItem item){
selectedDocItem_ = item;
}



  • [idok-commit] idok commit r358 - trunk/java/ch/idok/qtgui, AFS account Florian Huebner, 04/27/2009

Archive powered by MHonArc 2.6.19.

Top of Page