X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=core%2Forg.argeo.suite.ui%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fui%2FSuiteUi.java;h=187888e55e0190d4b5a2cd8b2998627622d46ddb;hp=52a2fd6c0f2894adca62bf7e6042a24c1b80933b;hb=25f40e8e6c393b188e53d81c96da10ea0294dfbd;hpb=9ab716f8f45fc34f4848bd1a8b8c0a5e7783a5a9 diff --git a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java index 52a2fd6..187888e 100644 --- a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java +++ b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java @@ -32,7 +32,7 @@ class SuiteUi extends Composite { private Composite dynamicArea; private Session sysSession; -// private Session homeSession; + private Session homeSession; private Node userDir; private Map layers = new HashMap<>(); @@ -56,7 +56,7 @@ class SuiteUi extends Composite { footer = new Composite(this, SWT.NONE); footer.setLayout(CmsUiUtils.noSpaceGridLayout()); - CmsUiUtils.style(header, SuiteStyle.header); + CmsUiUtils.style(footer, SuiteStyle.footer); footer.setLayoutData(CmsUiUtils.fillWidth()); } @@ -149,6 +149,7 @@ class SuiteUi extends Composite { } throw new IllegalArgumentException("Layer is not registered."); } + void addLayer(String id, SuiteLayer layer) { layers.put(id, layer); @@ -174,7 +175,7 @@ class SuiteUi extends Composite { synchronized void logout() { userDir = null; Jcr.logout(sysSession); -// Jcr.logout(homeSession); + Jcr.logout(homeSession); currentLayerId = null; workAreas.clear(); } @@ -205,11 +206,11 @@ class SuiteUi extends Composite { // synchronized void initSessions(Repository repository, String userDirPath) throws RepositoryException { this.sysSession = repository.login(); -// this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE); + this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE); userDir = sysSession.getNode(userDirPath); addDisposeListener((e) -> { Jcr.logout(sysSession); -// Jcr.logout(homeSession); + Jcr.logout(homeSession); }); } @@ -226,8 +227,8 @@ class SuiteUi extends Composite { return sysSession; if (NodeConstants.SYS_WORKSPACE.equals(workspaceName)) return sysSession; -// else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName)) -// return homeSession; + else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName)) + return homeSession; else throw new IllegalArgumentException("Unknown workspace " + workspaceName); }