chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1327971 - /chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
Date Thu, 19 Apr 2012 14:44:51 GMT
Author: fmui
Date: Thu Apr 19 14:44:50 2012
New Revision: 1327971

URL: http://svn.apache.org/viewvc?rev=1327971&view=rev
Log:
Workbench: added user to window title

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java?rev=1327971&r1=1327970&r2=1327971&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
Thu Apr 19 14:44:50 2012
@@ -39,6 +39,7 @@ import javax.swing.JPopupMenu;
 import javax.swing.JSplitPane;
 import javax.swing.JToolBar;
 
+import org.apache.chemistry.opencmis.commons.SessionParameter;
 import org.apache.chemistry.opencmis.workbench.ClientHelper.FileEntry;
 import org.apache.chemistry.opencmis.workbench.details.DetailsTabs;
 import org.apache.chemistry.opencmis.workbench.model.ClientModel;
@@ -307,7 +308,14 @@ public class ClientFrame extends JFrame 
                 toolbarButton[BUTTON_CREATE_FOLDER].setEnabled(true);
                 toolbarButton[BUTTON_CREATE_RELATIONSHIP].setEnabled(model.supportsRelationships());
 
-                setTitle(WINDOW_TITLE + " - " + clientSession.getSession().getRepositoryInfo().getName());
+                Object user = clientSession.getSessionParameters().get(SessionParameter.USER);
+                if (user != null) {
+                    user = " - (" + user.toString() + ")";
+                } else {
+                    user = "";
+                }
+
+                setTitle(WINDOW_TITLE + user + " - " + clientSession.getSession().getRepositoryInfo().getName());
             } catch (Exception ex) {
                 toolbarButton[BUTTON_REPOSITORY_INFO].setEnabled(false);
                 toolbarButton[BUTTON_TYPES].setEnabled(false);



Mime
View raw message