[kune-commits] r1133 - in trunk/src: main/java/org/ourproject/kune/blogs/client main/java/org/ourproject/kune/chat/client main/java/org/ourproject/kune/docs/client main/java/org/ourproject/kune/gallery/client main/java/org/ourproject/kune/platf/client/actions/common main/java/org/ourproject/kune/platf/client/actions/ui main/java/org/ourproject/kune/platf/client/dto main/java/org/ourproject/kune/platf/client/ui/img main/java/org/ourproject/kune/platf/client/ui/rte/basic main/java/org/ourproject/kune/platf/server/users main/java/org/ourproject/kune/wiki/client main/java/org/ourproject/kune/workspace/client main/java/org/ourproject/kune/workspace/client/entityheader main/java/org/ourproject/kune/workspace/client/licensewizard main/java/org/ourproject/kune/workspace/client/options/license main/java/org/ourproject/kune/workspace/client/options/pscape main/java/org/ourproject/kune/workspace/client/options/tools main/java/org/ourproject/kune/workspace/client/site main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu main/java/org/ourproject/kune/workspace/client/socialnet main/java/org/ourproject/kune/workspace/client/tags main/java/org/ourproject/kune/workspace/client/themes main/java/org/ourproject/kune/workspace/client/tool test/java/org/ourproject/kune/workspace/client/entityheader test/java/org/ourproject/kune/workspace/client/tags test/java/org/ourproject/kune/workspace/client/tool

vjrj vjrj at ourproject.org
Thu Jul 2 01:07:15 CEST 2009


Author: vjrj
Date: 2009-07-02 01:06:27 +0200 (Thu, 02 Jul 2009)
New Revision: 1133

Added:
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ActionExtensibleView.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/CssStyleDescriptor.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SimpleGuiItem.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/bug.png
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/GroupOptionsPublicSpaceConfPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/site/DefCssResource.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/site/defCssResource.css
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManagerPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelector.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java
Removed:
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensibleView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeView.java
Modified:
   trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
   trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
   trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
   trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java
   trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
   trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/common/GotoGroupAction.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/kimg.css
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorView.java
   trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java
   trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java
   trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
   trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicensePresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/GroupOptionsDefLicensePresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/UserOptionsDefLicensePresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteResources.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java
   trunk/src/test/java/org/ourproject/kune/workspace/client/entityheader/EntityLogoPresenterTest.java
   trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java
   trunk/src/test/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenterTest.java
Log:
Complete - task User/GroupOptions cleanup

Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -51,7 +51,7 @@
 import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
 
@@ -68,7 +68,7 @@
             public BlogClientTool create() {
                 i(BlogClientActions.class);
                 return new BlogClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
-                        i(WsThemePresenter.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+                        i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,7 @@
 import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 
@@ -34,7 +34,7 @@
     public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
 
     public BlogClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
-            final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws,
+            final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
             final ContentCapabilitiesRegistry cntCapReg) {
         super(NAME, i18n.t("blogs"), toolSelector, wsThemePresenter, ws, cntCapReg);
 

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -45,7 +45,7 @@
 import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
 import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 
 import com.calclab.emiteuimodule.client.EmiteUIDialog;
@@ -70,7 +70,7 @@
             @Override
             public ChatClientTool create() {
                 return new ChatClientTool(i(I18nUITranslationService.class), i(WorkspaceSkeleton.class),
-                        i(ToolSelector.class), i(WsThemePresenter.class), i(ContentCapabilitiesRegistry.class));
+                        i(ToolSelector.class), i(WsThemeManager.class), i(ContentCapabilitiesRegistry.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientTool.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,7 @@
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
 import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 
@@ -33,7 +33,7 @@
     public static final String TYPE_CHAT = "chat.chat";
 
     public ChatClientTool(final I18nTranslationService i18n, final WorkspaceSkeleton ws,
-            final ToolSelector toolSelector, final WsThemePresenter wsThemePresenter,
+            final ToolSelector toolSelector, final WsThemeManager wsThemePresenter,
             ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
         super(NAME, i18n.t("chat rooms"), toolSelector, wsThemePresenter, ws, contentCapabilitiesRegistry);
         registerContentTypeIcon(TYPE_ROOM, "images/emite-room.png");

Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -51,7 +51,7 @@
 import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
 
@@ -68,7 +68,7 @@
             public DocumentClientTool create() {
                 i(DocumentClientActions.class);
                 return new DocumentClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
-                        i(WsThemePresenter.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+                        i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientTool.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,7 @@
 import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 
@@ -34,7 +34,7 @@
     public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
 
     public DocumentClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
-            final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws,
+            final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
             final ContentCapabilitiesRegistry cntCapRegistry) {
         super(NAME, i18n.t("documents"), toolSelector, wsThemePresenter, ws, cntCapRegistry);
 

Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -51,7 +51,7 @@
 import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
 
@@ -68,7 +68,7 @@
             public GalleryClientTool create() {
                 i(GalleryClientActions.class);
                 return new GalleryClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
-                        i(WsThemePresenter.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+                        i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,7 @@
 import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 
@@ -33,7 +33,7 @@
     public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
 
     public GalleryClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
-            final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws,
+            final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
             final ContentCapabilitiesRegistry cntCapabReg) {
         super(NAME, i18n.t("gallery"), toolSelector, wsThemePresenter, ws, cntCapabReg);
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/common/GotoGroupAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/common/GotoGroupAction.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/common/GotoGroupAction.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -9,12 +9,13 @@
     private final String name;
     private final StateManager stateManager;
 
-    public GotoGroupAction(final String logoImageUrl, final String name, final StateManager stateManager) {
+    public GotoGroupAction(final String logoImageUrl, final String name, final String longName,
+            final StateManager stateManager) {
         super();
         this.name = name;
         this.stateManager = stateManager;
         putValue(Action.SMALL_ICON, logoImageUrl);
-        putValue(Action.NAME, name);
+        putValue(Action.NAME, longName);
     }
 
     public void actionPerformed(final ActionEvent event) {

Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensibleView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensibleView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensibleView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,9 +0,0 @@
-package org.ourproject.kune.platf.client.actions.ui;
-
-import org.ourproject.kune.platf.client.View;
-
-public interface AbstractActionExtensibleView extends View {
-
-    void addAction(GuiActionDescrip descriptor);
-
-}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractButtonGui.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -3,9 +3,7 @@
 import org.ourproject.kune.platf.client.actions.Action;
 import org.ourproject.kune.platf.client.actions.ActionEvent;
 import org.ourproject.kune.platf.client.actions.KeyStroke;
-import org.ourproject.kune.platf.client.ui.img.ImgConstants;
 
-import com.google.gwt.libideas.resources.client.ImageResource;
 import com.gwtext.client.core.EventObject;
 import com.gwtext.client.widgets.Button;
 import com.gwtext.client.widgets.event.ButtonListenerAdapter;
@@ -69,8 +67,8 @@
     }
 
     @Override
-    protected void setIcon(final ImageResource imageResource) {
-        button.setIconCls(ImgConstants.CSS_SUFFIX + imageResource.getName());
+    protected void setIconStyle(final String style) {
+        button.setIconCls(style);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -5,6 +5,7 @@
 import org.ourproject.kune.platf.client.actions.Action;
 import org.ourproject.kune.platf.client.actions.PropertyChangeEvent;
 import org.ourproject.kune.platf.client.actions.PropertyChangeListener;
+import org.ourproject.kune.platf.client.ui.img.ImgConstants;
 
 import com.google.gwt.libideas.resources.client.ImageResource;
 import com.google.gwt.user.client.ui.Composite;
@@ -73,7 +74,7 @@
 
     protected abstract void setEnabled(boolean enabled);
 
-    protected abstract void setIcon(ImageResource imageResource);
+    protected abstract void setIconStyle(String style);
 
     protected abstract void setIconUrl(String iconUrl);
 
@@ -112,8 +113,10 @@
     }
 
     private void setIcon(final Object icon) {
-        if (icon instanceof ImageResource) {
-            setIcon((ImageResource) icon);
+        if (icon instanceof CssStyleDescriptor) {
+            setIconStyle(((CssStyleDescriptor) icon).getName());
+        } else if (icon instanceof ImageResource) {
+            setIconStyle((ImgConstants.CSS_SUFFIX + ((ImageResource) icon).getName()));
         } else if (icon instanceof String) {
             setIconUrl((String) icon);
         }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -5,9 +5,7 @@
 import org.ourproject.kune.platf.client.actions.KeyStroke;
 import org.ourproject.kune.platf.client.actions.PropertyChangeEvent;
 import org.ourproject.kune.platf.client.actions.PropertyChangeListener;
-import org.ourproject.kune.platf.client.ui.img.ImgConstants;
 
-import com.google.gwt.libideas.resources.client.ImageResource;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
 import com.google.gwt.user.client.ui.Widget;
@@ -77,8 +75,8 @@
     }
 
     @Override
-    protected void setIcon(final ImageResource imageResource) {
-        item.setIconCls(ImgConstants.CSS_SUFFIX + imageResource.getName());
+    protected void setIconStyle(final String style) {
+        item.setIconCls(style);
     }
 
     @Override

Copied: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ActionExtensibleView.java (from rev 1128, trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensibleView.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensibleView.java	2009-06-13 00:43:29 UTC (rev 1128)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ActionExtensibleView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,9 @@
+package org.ourproject.kune.platf.client.actions.ui;
+
+import org.ourproject.kune.platf.client.View;
+
+public interface ActionExtensibleView extends View {
+
+    void addAction(GuiActionDescrip descriptor);
+
+}

Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/CssStyleDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/CssStyleDescriptor.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/CssStyleDescriptor.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,18 @@
+package org.ourproject.kune.platf.client.actions.ui;
+
+public class CssStyleDescriptor {
+
+    public static CssStyleDescriptor create(final String name) {
+        return new CssStyleDescriptor(name);
+    }
+
+    private final String name;
+
+    public CssStyleDescriptor(final String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuGui.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -3,9 +3,7 @@
 import org.ourproject.kune.platf.client.actions.Action;
 import org.ourproject.kune.platf.client.actions.PropertyChangeEvent;
 import org.ourproject.kune.platf.client.actions.PropertyChangeListener;
-import org.ourproject.kune.platf.client.ui.img.ImgConstants;
 
-import com.google.gwt.libideas.resources.client.ImageResource;
 import com.google.gwt.user.client.ui.UIObject;
 import com.gwtext.client.widgets.ToolbarButton;
 
@@ -59,9 +57,9 @@
     }
 
     @Override
-    public void setIcon(final ImageResource imageResource) {
+    public void setIconStyle(final String style) {
         if (notStandAlone) {
-            button.setIconCls(ImgConstants.CSS_SUFFIX + imageResource.getName());
+            button.setIconCls(style);
         }
     }
 

Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SimpleGuiItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SimpleGuiItem.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SimpleGuiItem.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,25 @@
+package org.ourproject.kune.platf.client.actions.ui;
+
+import com.google.gwt.user.client.ui.HorizontalPanel;
+
+public class SimpleGuiItem extends AbstractComposedGuiItem implements ActionExtensibleView {
+
+    private final HorizontalPanel hpanel;
+
+    public SimpleGuiItem(final GuiBindingsRegister bindings) {
+        super(bindings);
+        hpanel = new HorizontalPanel();
+        initWidget(hpanel);
+    }
+
+    @Override
+    protected void add(final AbstractGuiItem item) {
+        hpanel.add(item);
+    }
+
+    @Override
+    protected void insert(final AbstractGuiItem item, final int position) {
+        hpanel.insert(item, position);
+    }
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,8 +1,5 @@
 package org.ourproject.kune.platf.client.actions.ui;
 
-import org.ourproject.kune.platf.client.ui.img.ImgConstants;
-
-import com.google.gwt.libideas.resources.client.ImageResource;
 import com.gwtext.client.widgets.menu.MenuItem;
 
 public class SubMenuGui extends AbstractMenuGui {
@@ -31,8 +28,8 @@
     }
 
     @Override
-    public void setIcon(final ImageResource imageResource) {
-        item.setIconCls(ImgConstants.CSS_SUFFIX + imageResource.getName());
+    public void setIconStyle(final String style) {
+        item.setIconCls(style);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -33,6 +33,7 @@
     private List<GroupDTO> groupsIsCollab;
     private boolean showDeletedContent;
     private List<String> enabledTools;
+    private GroupDTO userGroup;
 
     public String getChatName() {
         return chatName;
@@ -82,6 +83,10 @@
         return user;
     }
 
+    public GroupDTO getUserGroup() {
+        return userGroup;
+    }
+
     public String getUserHash() {
         return userHash;
     }
@@ -119,6 +124,10 @@
         this.user = user;
     }
 
+    public void setUserGroup(final GroupDTO userGroup) {
+        this.userGroup = userGroup;
+    }
+
     public void setUserHash(final String userHash) {
         this.userHash = userHash;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/ImgResources.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -9,6 +9,9 @@
     @Resource("add-green.png")
     ImageResource addGreen();
 
+    @Resource("bug.png")
+    ImageResource bug();
+
     @Resource("kimg.css")
     CssResource css();
 
@@ -32,4 +35,5 @@
 
     @Resource("prefs.png")
     ImageResource prefs();
+
 }
\ No newline at end of file

Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/bug.png
===================================================================
(Binary files differ)


Property changes on: trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/bug.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/kimg.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/kimg.css	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/img/kimg.css	2009-07-01 23:06:27 UTC (rev 1133)
@@ -10,6 +10,10 @@
   gwt-image: 'kuneIcon16';
 }
 
+ at sprite div .k-icon-bug {
+  gwt-image: 'bug';
+}
+
 @sprite div .k-icon-prefs {
   gwt-image: 'prefs';
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -887,7 +887,6 @@
     }
 
     private void createBasicActions() {
-
         final MenuSeparatorDescriptor editMenuSep = new MenuSeparatorDescriptor(editMenu);
         final MenuSeparatorDescriptor insertMenuSep = new MenuSeparatorDescriptor(insertMenu);
         final MenuSeparatorDescriptor formatMenuSep = new MenuSeparatorDescriptor(formatMenu);
@@ -1147,7 +1146,7 @@
         menus.add(insertMenu = new MenuDescriptor(i18n.t("Insert")));
         menus.add(formatMenu = new MenuDescriptor(i18n.t("Format")));
         menus.add(linkCtxMenu = new MenuDescriptor(i18n.t("Change Link")));
-        menus.add(fontMenu = new MenuDescriptor(NO_TEXT, i18n.t("Font"),
+        menus.add(fontMenu = new MenuDescriptor("&nbsp;", i18n.t("Font"),
                 ImgConstants.toPath(imgResources.charfontname())));
         menus.add(fontSizeMenu = new MenuDescriptor(NO_TEXT, i18n.t("Font size"),
                 ImgConstants.toPath(imgResources.fontheight())));

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -2,11 +2,11 @@
 
 import org.ourproject.kune.platf.client.View;
 import org.ourproject.kune.platf.client.actions.InputMap;
-import org.ourproject.kune.platf.client.actions.ui.AbstractActionExtensibleView;
+import org.ourproject.kune.platf.client.actions.ui.ActionExtensibleView;
 import org.ourproject.kune.platf.client.ui.rte.RichTextArea.FontSize;
 import org.ourproject.kune.platf.client.ui.rte.insertlink.LinkInfo;
 
-public interface RTEditorView extends AbstractActionExtensibleView {
+public interface RTEditorView extends ActionExtensibleView {
 
     void adjustSize(int height);
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -36,6 +36,7 @@
     private String userHash;
     private boolean showDeletedContent;
     private List<String> enabledTools;
+    private Group userGroup;
 
     public String getChatName() {
         return chatName;
@@ -85,6 +86,10 @@
         return user;
     }
 
+    public Group getUserGroup() {
+        return userGroup;
+    }
+
     public String getUserHash() {
         return userHash;
     }
@@ -121,6 +126,10 @@
         this.user = user;
     }
 
+    public void setUserGroup(final Group userGroup) {
+        this.userGroup = userGroup;
+    }
+
     public void setUserHash(final String userHash) {
         this.userHash = userHash;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -43,28 +43,29 @@
     }
 
     public UserInfo buildInfo(final User user, final String userHash) throws DefaultException {
-        UserInfo info = null;
+        UserInfo userInfo = null;
         if (User.isKnownUser(user)) {
-            info = new UserInfo();
+            userInfo = new UserInfo();
 
-            info.setUser(user);
-            info.setChatName(user.getShortName());
-            info.setChatPassword(user.getPassword());
-            info.setUserHash(userHash);
+            userInfo.setUser(user);
+            userInfo.setChatName(user.getShortName());
+            userInfo.setChatPassword(user.getPassword());
+            userInfo.setUserHash(userHash);
             // FIXME: save this in user properties
-            info.setShowDeletedContent(false);
+            userInfo.setShowDeletedContent(false);
 
             final Group userGroup = user.getUserGroup();
 
             final ParticipationData participation = socialNetworkManager.findParticipation(user, userGroup);
-            info.setGroupsIsAdmin(participation.getGroupsIsAdmin());
-            info.setGroupsIsCollab(participation.getGroupsIsCollab());
-            info.setEnabledTools(groupManager.findEnabledTools(userGroup.getId()));
+            userInfo.setGroupsIsAdmin(participation.getGroupsIsAdmin());
+            userInfo.setGroupsIsCollab(participation.getGroupsIsCollab());
+            userInfo.setEnabledTools(groupManager.findEnabledTools(userGroup.getId()));
             final Content defaultContent = userGroup.getDefaultContent();
+            userInfo.setUserGroup(userGroup);
             if (defaultContent != null) {
-                info.setHomePage(defaultContent.getStateToken().toString());
+                userInfo.setHomePage(defaultContent.getStateToken().toString());
             }
         }
-        return info;
+        return userInfo;
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -51,7 +51,7 @@
 import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
 import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 import org.ourproject.kune.workspace.client.upload.FileUploader;
 
@@ -68,7 +68,7 @@
             public WikiClientTool create() {
                 i(WikiClientActions.class);
                 return new WikiClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
-                        i(WsThemePresenter.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+                        i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
             }
         });
 

Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,7 @@
 import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
 import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.FoldableAbstractClientTool;
 import org.ourproject.kune.workspace.client.tool.ToolSelector;
 
@@ -34,7 +34,7 @@
     public static final String TYPE_UPLOADEDFILE = NAME + "." + FoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
 
     public WikiClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
-            final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws,
+            final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
             final ContentCapabilitiesRegistry cntCapabReg) {
         super(NAME, i18n.t("wiki"), toolSelector, wsThemePresenter, ws, cntCapabReg);
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -23,6 +23,7 @@
 import org.ourproject.kune.platf.client.actions.ActionManager;
 import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
 import org.ourproject.kune.platf.client.actions.ui.GuiBindingsRegister;
+import org.ourproject.kune.platf.client.actions.ui.SimpleGuiItem;
 import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
 import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
 import org.ourproject.kune.platf.client.app.UserOptionsCollection;
@@ -126,7 +127,6 @@
 import org.ourproject.kune.workspace.client.nohomepage.NoHomePage;
 import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePanel;
 import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePresenter;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
 import org.ourproject.kune.workspace.client.options.GroupOptions;
 import org.ourproject.kune.workspace.client.options.GroupOptionsPanel;
 import org.ourproject.kune.workspace.client.options.GroupOptionsPresenter;
@@ -146,9 +146,10 @@
 import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogoPanel;
 import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogoPresenter;
 import org.ourproject.kune.workspace.client.options.pscape.EntityOptionsPublicSpaceConfPanel;
-import org.ourproject.kune.workspace.client.options.pscape.EntityOptionsPublicSpaceConfPresenter;
 import org.ourproject.kune.workspace.client.options.pscape.GroupOptionsPublicSpaceConf;
+import org.ourproject.kune.workspace.client.options.pscape.GroupOptionsPublicSpaceConfPresenter;
 import org.ourproject.kune.workspace.client.options.pscape.UserOptionsPublicSpaceConf;
+import org.ourproject.kune.workspace.client.options.pscape.UserOptionsPublicSpaceConfPresenter;
 import org.ourproject.kune.workspace.client.options.tools.EntityOptionsToolsConf;
 import org.ourproject.kune.workspace.client.options.tools.EntityOptionsToolsConfPanel;
 import org.ourproject.kune.workspace.client.options.tools.GroupOptionsToolsConfPresenter;
@@ -235,8 +236,10 @@
 import org.ourproject.kune.workspace.client.tags.TagsSummary;
 import org.ourproject.kune.workspace.client.tags.TagsSummaryPanel;
 import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenter;
-import org.ourproject.kune.workspace.client.themes.WsThemePanel;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeManagerPanel;
+import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
+import org.ourproject.kune.workspace.client.themes.WsThemeSelectorPresenter;
 import org.ourproject.kune.workspace.client.title.EntitySubTitle;
 import org.ourproject.kune.workspace.client.title.EntitySubTitlePanel;
 import org.ourproject.kune.workspace.client.title.EntitySubTitlePresenter;
@@ -343,8 +346,8 @@
             @Override
             public SiteUserOptions create() {
                 final SiteUserOptionsPresenter presenter = new SiteUserOptionsPresenter(i(Session.class),
-                        i(StateManager.class), p(UserOptions.class), p(FileDownloadUtils.class),
-                        $(I18nTranslationService.class), $(ImgResources.class));
+                        i(StateManager.class), p(FileDownloadUtils.class), $(I18nTranslationService.class),
+                        $(ImgResources.class));
                 final SiteUserOptionsPanel panel = new SiteUserOptionsPanel(presenter, i(WorkspaceSkeleton.class),
                         $(GuiBindingsRegister.class));
                 presenter.init(panel);
@@ -424,7 +427,7 @@
             @Override
             public EntityHeader create() {
                 final EntityHeaderPresenter presenter = new EntityHeaderPresenter(i(StateManager.class),
-                        i(WsThemePresenter.class), i(Session.class));
+                        i(WsThemeManager.class), i(Session.class));
                 final EntityHeaderPanel panel = new EntityHeaderPanel(i(WorkspaceSkeleton.class),
                         p(FileDownloadUtils.class), i(Images.class), i(GuiBindingsRegister.class));
                 presenter.init(panel);
@@ -432,18 +435,26 @@
             }
         });
 
-        register(ApplicationComponentGroup.class, new Factory<WsThemePresenter>(WsThemePresenter.class) {
+        register(ApplicationComponentGroup.class, new Factory<WsThemeManager>(WsThemeManager.class) {
             @Override
-            public WsThemePresenter create() {
-                final WsThemePresenter presenter = new WsThemePresenter(i(Session.class), p(GroupServiceAsync.class),
+            public WsThemeManager create() {
+                final WsThemeManager presenter = new WsThemeManager(i(Session.class), p(GroupServiceAsync.class),
                         i(StateManager.class));
-                final WsThemePanel panel = new WsThemePanel(i(WorkspaceSkeleton.class), presenter,
-                        i(I18nUITranslationService.class));
-                presenter.init(panel);
+                new WsThemeManagerPanel(presenter, i(WorkspaceSkeleton.class));
                 return presenter;
             }
         });
 
+        register(NoDecoration.class, new Factory<WsThemeSelector>(WsThemeSelector.class) {
+            @Override
+            public WsThemeSelector create() {
+                final WsThemeSelectorPresenter presenter = new WsThemeSelectorPresenter(i(Session.class),
+                        i(I18nTranslationService.class));
+                presenter.init(new SimpleGuiItem(i(GuiBindingsRegister.class)));
+                return presenter;
+            }
+        });
+
         register(ApplicationComponentGroup.class, new Factory<EntityTitle>(EntityTitle.class) {
             @Override
             public EntityTitle create() {
@@ -541,8 +552,8 @@
                 final GroupMembersSummaryPresenter presenter = new GroupMembersSummaryPresenter(
                         i(I18nUITranslationService.class), i(StateManager.class), i(ImageUtils.class),
                         i(Session.class), p(SocialNetworkServiceAsync.class), p(GroupServiceAsync.class),
-                        p(GroupLiveSearcher.class), i(WsThemePresenter.class), p(ChatEngine.class),
-                        i(GroupActionRegistry.class), i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class));
+                        p(GroupLiveSearcher.class), p(ChatEngine.class), i(GroupActionRegistry.class),
+                        i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class));
                 final GroupMembersSummaryView view = new GroupMembersSummaryPanel(presenter,
                         i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
                                 ActionGroupSummaryToolbar.class).getView());
@@ -580,8 +591,8 @@
             public ParticipationSummary create() {
                 final ParticipationSummaryPresenter presenter = new ParticipationSummaryPresenter(
                         i(I18nUITranslationService.class), i(StateManager.class), i(ImageUtils.class),
-                        i(Session.class), p(SocialNetworkServiceAsync.class), i(WsThemePresenter.class),
-                        i(GroupActionRegistry.class), i(ActionParticipationToolbar.class), p(FileDownloadUtils.class));
+                        i(Session.class), p(SocialNetworkServiceAsync.class), i(GroupActionRegistry.class),
+                        i(ActionParticipationToolbar.class), p(FileDownloadUtils.class));
                 final ParticipationSummaryView view = new ParticipationSummaryPanel(presenter,
                         i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
                                 ActionParticipationToolbar.class).getView());
@@ -594,7 +605,7 @@
             @Override
             public TagsSummary create() {
                 final TagsSummaryPresenter presenter = new TagsSummaryPresenter(i(Session.class),
-                        p(SiteSearcher.class), i(StateManager.class), i(WsThemePresenter.class));
+                        p(SiteSearcher.class), i(StateManager.class));
                 final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i(I18nUITranslationService.class),
                         i(WorkspaceSkeleton.class));
                 presenter.init(panel);
@@ -719,7 +730,14 @@
                 GroupOptionsPublicSpaceConf.class) {
             @Override
             public GroupOptionsPublicSpaceConf create() {
-                return createEntityOptionsPublicSpace(i(GroupOptions.class));
+                final WsThemeSelector themeSelector = i(WsThemeSelector.class);
+                final GroupOptionsPublicSpaceConfPresenter presenter = new GroupOptionsPublicSpaceConfPresenter(
+                        i(Session.class), i(StateManager.class), i(GroupOptions.class), i(WsThemeManager.class),
+                        themeSelector);
+                final EntityOptionsPublicSpaceConfPanel panel = new EntityOptionsPublicSpaceConfPanel(presenter,
+                        i(WorkspaceSkeleton.class), i(I18nTranslationService.class), themeSelector);
+                presenter.init(panel);
+                return presenter;
             }
         });
 
@@ -727,7 +745,13 @@
                 new Factory<UserOptionsPublicSpaceConf>(UserOptionsPublicSpaceConf.class) {
                     @Override
                     public UserOptionsPublicSpaceConf create() {
-                        return createEntityOptionsPublicSpace(i(UserOptions.class));
+                        final WsThemeSelector themeSelector = i(WsThemeSelector.class);
+                        final UserOptionsPublicSpaceConfPresenter presenter = new UserOptionsPublicSpaceConfPresenter(
+                                i(Session.class), i(UserOptions.class), i(WsThemeManager.class), themeSelector);
+                        final EntityOptionsPublicSpaceConfPanel panel = new EntityOptionsPublicSpaceConfPanel(
+                                presenter, i(WorkspaceSkeleton.class), i(I18nTranslationService.class), themeSelector);
+                        presenter.init(panel);
+                        return presenter;
                     }
                 });
 
@@ -897,7 +921,7 @@
             @Override
             public ToolSelector create() {
                 final ToolSelectorPresenter presenter = new ToolSelectorPresenter(i(StateManager.class),
-                        i(WsThemePresenter.class));
+                        i(WsThemeManager.class));
                 return presenter;
             }
         });
@@ -1071,11 +1095,4 @@
         i(GlobalShortcutRegister.class).enable();
     }
 
-    private EntityOptionsPublicSpaceConfPresenter createEntityOptionsPublicSpace(final EntityOptions entityOptions) {
-        final EntityOptionsPublicSpaceConfPresenter presenter = new EntityOptionsPublicSpaceConfPresenter(entityOptions);
-        final EntityOptionsPublicSpaceConfPanel panel = new EntityOptionsPublicSpaceConfPanel(presenter,
-                i(WorkspaceSkeleton.class), i(I18nTranslationService.class), i(WsThemePresenter.class));
-        presenter.init(panel);
-        return presenter;
-    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -26,7 +26,7 @@
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 import com.calclab.suco.client.events.Listener2;
 
@@ -37,7 +37,7 @@
     private EntityHeaderView view;
     private final Session session;
 
-    public EntityHeaderPresenter(final StateManager stateManager, final WsThemePresenter theme, final Session session) {
+    public EntityHeaderPresenter(final StateManager stateManager, final WsThemeManager theme, final Session session) {
         this.session = session;
 
         stateManager.onGroupChanged(new Listener2<String, String>() {
@@ -45,7 +45,7 @@
                 setGroupLogo(session.getCurrentState().getGroup());
             }
         });
-        theme.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
+        theme.addOnThemeChanged(new Listener2<WsTheme, WsTheme>() {
             public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
                 view.setTheme(oldTheme, newTheme);
             }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/LicenseChangeAction.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -20,6 +20,7 @@
 package org.ourproject.kune.workspace.client.licensewizard;
 
 import org.ourproject.kune.platf.client.dto.LicenseDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
 import org.ourproject.kune.platf.client.rpc.GroupServiceAsync;
 import org.ourproject.kune.platf.client.state.Session;
@@ -36,27 +37,26 @@
     private final Session session;
     private final I18nTranslationService i18n;
 
-    public LicenseChangeAction(Provider<GroupServiceAsync> groupService, Session session, I18nTranslationService i18n,
-            StateManager stateManager) {
+    public LicenseChangeAction(final Provider<GroupServiceAsync> groupService, final Session session,
+            final I18nTranslationService i18n, final StateManager stateManager) {
         this.groupService = groupService;
         this.session = session;
         this.i18n = i18n;
         this.stateManager = stateManager;
     }
 
-    public void changeLicense(final LicenseDTO license, final Listener0 onSuccess) {
+    public void changeLicense(final StateToken token, final LicenseDTO license, final Listener0 onSuccess) {
         NotifyUser.showProgressProcessing();
-        groupService.get().changeDefLicense(session.getUserHash(), session.getCurrentStateToken(), license,
-                new AsyncCallback<Object>() {
-                    public void onFailure(Throwable caught) {
-                        NotifyUser.hideProgress();
-                        NotifyUser.error(i18n.t("Error changing default group license"));
-                    }
+        groupService.get().changeDefLicense(session.getUserHash(), token, license, new AsyncCallback<Object>() {
+            public void onFailure(final Throwable caught) {
+                NotifyUser.hideProgress();
+                NotifyUser.error(i18n.t("Error changing default group license"));
+            }
 
-                    public void onSuccess(Object result) {
-                        stateManager.reload();
-                        onSuccess.onEvent();
-                    }
-                });
+            public void onSuccess(final Object result) {
+                stateManager.reload();
+                onSuccess.onEvent();
+            }
+        });
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicensePresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicensePresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -21,6 +21,7 @@
 
 import org.ourproject.kune.platf.client.View;
 import org.ourproject.kune.platf.client.dto.LicenseDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
 import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard;
@@ -60,7 +61,7 @@
     public void onChange() {
         licenseWizard.get().start(new Listener<LicenseDTO>() {
             public void onEvent(final LicenseDTO license) {
-                licChangeAction.get().changeLicense(license, new Listener0() {
+                licChangeAction.get().changeLicense(getOperationToken(), license, new Listener0() {
                     public void onEvent() {
                         setLicense(license);
                     }
@@ -77,6 +78,8 @@
 
     protected abstract LicenseDTO getCurrentDefLicense();
 
+    protected abstract StateToken getOperationToken();
+
     protected void setState() {
         if (applicable()) {
             setLicense(getCurrentDefLicense());

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/GroupOptionsDefLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/GroupOptionsDefLicensePresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/GroupOptionsDefLicensePresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,6 +1,7 @@
 package org.ourproject.kune.workspace.client.options.license;
 
 import org.ourproject.kune.platf.client.dto.LicenseDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
@@ -32,4 +33,9 @@
     protected LicenseDTO getCurrentDefLicense() {
         return session.getCurrentState().getGroup().getDefaultLicense();
     }
+
+    @Override
+    protected StateToken getOperationToken() {
+        return session.getCurrentStateToken();
+    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/UserOptionsDefLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/UserOptionsDefLicensePresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/UserOptionsDefLicensePresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,6 +1,7 @@
 package org.ourproject.kune.workspace.client.options.license;
 
 import org.ourproject.kune.platf.client.dto.LicenseDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.dto.UserInfoDTO;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
@@ -24,11 +25,16 @@
 
     @Override
     protected boolean applicable() {
-        return session.isCurrentStateAGroup();
+        return session.isLogged();
     }
 
     @Override
     protected LicenseDTO getCurrentDefLicense() {
         return session.getCurrentState().getGroup().getDefaultLicense();
     }
+
+    @Override
+    protected StateToken getOperationToken() {
+        return session.getCurrentUser().getStateToken();
+    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -25,20 +25,20 @@
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
 import org.ourproject.kune.workspace.client.options.EntityOptionsView;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
 
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
 import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.ToolbarButton;
 
 public class EntityOptionsPublicSpaceConfPanel extends Panel implements EntityOptionsPublicSpaceConfView {
 
     public EntityOptionsPublicSpaceConfPanel(final EntityOptionsPublicSpaceConfPresenter presenter,
-            final WorkspaceSkeleton ws, final I18nTranslationService i18n, final WsThemePresenter wsPresenter) {
+            final WorkspaceSkeleton ws, final I18nTranslationService i18n, final WsThemeSelector wsSelector) {
         super.setTitle(i18n.t("Style"));
         super.setIconCls("k-colors-icon");
         super.setAutoScroll(true);
@@ -49,7 +49,7 @@
 
         final HorizontalPanel wsHP = new HorizontalPanel();
         final Label wsThemeInfo = new Label(i18n.t("Change this workspace theme:"));
-        final ToolbarButton toolbarWsChange = (ToolbarButton) wsPresenter.getView();
+        final Widget toolbarWsChange = (Widget) wsSelector.getView();
         toolbarWsChange.addStyleName("kune-Margin-Medium-l");
         wsHP.add(wsThemeInfo);
         wsHP.add(toolbarWsChange);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,29 +1,9 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
 package org.ourproject.kune.workspace.client.options.pscape;
 
 import org.ourproject.kune.platf.client.View;
 import org.ourproject.kune.workspace.client.options.EntityOptions;
 
-public class EntityOptionsPublicSpaceConfPresenter implements GroupOptionsPublicSpaceConf, UserOptionsPublicSpaceConf {
-
+public abstract class EntityOptionsPublicSpaceConfPresenter {
     private EntityOptionsPublicSpaceConfView view;
     private final EntityOptions entityOptions;
 
@@ -39,4 +19,5 @@
         this.view = view;
         entityOptions.addTab(view);
     }
+
 }

Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/GroupOptionsPublicSpaceConfPresenter.java (from rev 1131, trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java	2009-06-27 22:41:14 UTC (rev 1131)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/GroupOptionsPublicSpaceConfPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,51 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.options.pscape;
+
+import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.workspace.client.options.EntityOptions;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
+
+import com.calclab.suco.client.events.Listener;
+
+public class GroupOptionsPublicSpaceConfPresenter extends EntityOptionsPublicSpaceConfPresenter implements
+        GroupOptionsPublicSpaceConf {
+
+    public GroupOptionsPublicSpaceConfPresenter(final Session session, final StateManager stateManager,
+            final EntityOptions entityOptions, final WsThemeManager themeManager, final WsThemeSelector themeSelector) {
+        super(entityOptions);
+        themeSelector.addThemeSelected(new Listener<WsTheme>() {
+            public void onEvent(final WsTheme theme) {
+                themeManager.changeTheme(session.getCurrentStateToken(), theme);
+            }
+        });
+        stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
+            public void onEvent(final StateAbstractDTO state) {
+                final String theme = state.getGroup().getWorkspaceTheme();
+                themeSelector.select(theme);
+            }
+        });
+    }
+
+}
\ No newline at end of file

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,60 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.options.pscape;
+
+import org.ourproject.kune.platf.client.dto.UserInfoDTO;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.workspace.client.options.EntityOptions;
+import org.ourproject.kune.workspace.client.themes.WsTheme;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
+
+import com.calclab.suco.client.events.Listener;
+
+public class UserOptionsPublicSpaceConfPresenter extends EntityOptionsPublicSpaceConfPresenter implements
+        UserOptionsPublicSpaceConf {
+
+    private final WsThemeSelector themeSelector;
+
+    public UserOptionsPublicSpaceConfPresenter(final Session session, final EntityOptions entityOptions,
+            final WsThemeManager themeManager, final WsThemeSelector themeSelector) {
+        super(entityOptions);
+        this.themeSelector = themeSelector;
+        themeSelector.addThemeSelected(new Listener<WsTheme>() {
+            public void onEvent(final WsTheme theme) {
+                themeManager.changeTheme(session.getCurrentUser().getStateToken(), theme);
+            }
+        });
+        final UserInfoDTO userInfo = session.getCurrentUserInfo();
+        if (userInfo != null) {
+            setSelector(userInfo);
+        }
+        session.onUserSignIn(new Listener<UserInfoDTO>() {
+            public void onEvent(final UserInfoDTO parameter) {
+                setSelector(userInfo);
+            }
+        });
+    }
+
+    private void setSelector(final UserInfoDTO userInfo) {
+        themeSelector.select(userInfo.getUserGroup().getWorkspaceTheme());
+    }
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -21,18 +21,18 @@
     private EntityOptionsToolsConfView view;
     private final EntityOptions entityOptions;
     protected final Session session;
-    private final Provider<GroupServiceAsync> groupServiceProvider;
+    private final Provider<GroupServiceAsync> groupService;
     protected final I18nTranslationService i18n;
     protected final StateManager stateManager;
 
     public EntityOptionsToolsConfPresenter(final Session session, final StateManager stateManager,
             final I18nTranslationService i18n, final EntityOptions entityOptions,
-            final Provider<GroupServiceAsync> groupServiceProvider) {
+            final Provider<GroupServiceAsync> groupService) {
         this.session = session;
         this.stateManager = stateManager;
         this.i18n = i18n;
         this.entityOptions = entityOptions;
-        this.groupServiceProvider = groupServiceProvider;
+        this.groupService = groupService;
     }
 
     public View getView() {
@@ -51,8 +51,6 @@
         if (checked) {
             if (!(enabledTools.contains(toolName))) {
                 setToolCheckedInServer(checked, toolName);
-            } else {
-                // do nothing
             }
         } else {
             if (enabledTools.contains(toolName)) {
@@ -103,7 +101,7 @@
     }
 
     protected void setToolCheckedInServer(final boolean checked, final String toolName) {
-        groupServiceProvider.get().setToolEnabled(session.getUserHash(), getOperationToken(), toolName, checked,
+        groupService.get().setToolEnabled(session.getUserHash(), getOperationToken(), toolName, checked,
                 new AsyncCallback<Object>() {
                     public void onFailure(final Throwable caught) {
                         view.setChecked(toolName, !checked);

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/site/DefCssResource.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/DefCssResource.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/DefCssResource.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,11 @@
+package org.ourproject.kune.workspace.client.site;
+
+import com.google.gwt.libideas.resources.client.CssResource;
+import com.google.gwt.libideas.resources.client.ImmutableResourceBundle;
+
+public interface DefCssResource extends ImmutableResourceBundle {
+
+    @Resource("defCssResource.css")
+    CssResource css();
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteResources.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteResources.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/SiteResources.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,12 +1,13 @@
 package org.ourproject.kune.workspace.client.site;
 
-import com.google.gwt.core.client.GWT;
 import com.google.gwt.libideas.resources.client.ImmutableResourceBundle;
 import com.google.gwt.libideas.resources.client.TextResource;
 
 public interface SiteResources extends ImmutableResourceBundle {
-    public static final SiteResources INSTANCE = GWT.create(SiteResources.class);
 
+    @Deprecated
+    // not used now, only here for future use
     @Resource("about.html")
     public TextResource aboutKune();
+
 }
\ No newline at end of file

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/site/defCssResource.css
===================================================================

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -74,7 +74,7 @@
             }
         };
         bugsAction.putValue(Action.NAME, i18n.t("Report Kune issues/problems"));
-        bugsAction.putValue(Action.SMALL_ICON, img.info());
+        bugsAction.putValue(Action.SMALL_ICON, img.bug());
         final MenuItemDescriptor item = new MenuItemDescriptor(bugsAction);
         addAction(item);
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -19,10 +19,10 @@
  \*/
 package org.ourproject.kune.workspace.client.sitebar.siteoptions;
 
-import org.ourproject.kune.platf.client.actions.ui.AbstractActionExtensibleView;
+import org.ourproject.kune.platf.client.actions.ui.ActionExtensibleView;
 import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
 
-public interface SiteOptionsView extends AbstractActionExtensibleView {
+public interface SiteOptionsView extends ActionExtensibleView {
 
     void setMenu(MenuDescriptor menuDescriptor);
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -38,7 +38,6 @@
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
 import org.ourproject.kune.platf.client.ui.img.ImgResources;
-import org.ourproject.kune.workspace.client.options.UserOptions;
 
 import com.calclab.suco.client.events.Listener;
 import com.calclab.suco.client.events.Listener0;
@@ -49,7 +48,6 @@
     private SiteUserOptionsView view;
     private final StateManager stateManager;
     private final Session session;
-    private final Provider<UserOptions> userOptions;
     private final Provider<FileDownloadUtils> downloadProvider;
     private MenuDescriptor menuDescriptor;
     private final I18nTranslationService i18n;
@@ -58,12 +56,11 @@
     private MenuDescriptor partiMenu;;
 
     public SiteUserOptionsPresenter(final Session session, final StateManager stateManager,
-            final Provider<UserOptions> userOptions, final Provider<FileDownloadUtils> downloadProvider,
-            final I18nTranslationService i18n, final ImgResources img) {
+            final Provider<FileDownloadUtils> downloadProvider, final I18nTranslationService i18n,
+            final ImgResources img) {
         super();
         this.session = session;
         this.stateManager = stateManager;
-        this.userOptions = userOptions;
         this.downloadProvider = downloadProvider;
         this.i18n = i18n;
         this.img = img;
@@ -99,7 +96,8 @@
     private void addPartipation(final GroupDTO group) {
         final String logoImageUrl = group.hasLogo() ? downloadProvider.get().getLogoImageUrl(group.getStateToken())
                 : "images/group-def-icon.gif";
-        final GotoGroupAction gotoGroupAction = new GotoGroupAction(logoImageUrl, group.getLongName(), stateManager);
+        final GotoGroupAction gotoGroupAction = new GotoGroupAction(logoImageUrl, group.getShortName(),
+                group.getLongName(), stateManager);
         view.addAction(new MenuItemDescriptor(partiMenu, gotoGroupAction));
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -19,10 +19,10 @@
  \*/
 package org.ourproject.kune.workspace.client.sitebar.siteusermenu;
 
-import org.ourproject.kune.platf.client.actions.ui.AbstractActionExtensibleView;
+import org.ourproject.kune.platf.client.actions.ui.ActionExtensibleView;
 import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
 
-public interface SiteUserOptionsView extends AbstractActionExtensibleView {
+public interface SiteUserOptionsView extends ActionExtensibleView {
 
     void setLoggedUserName(String name);
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -31,7 +31,6 @@
 import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
 import org.ourproject.kune.workspace.client.skel.SummaryPanel;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
 
 import com.calclab.emiteuimodule.client.users.UserGridPanel;
 import com.calclab.suco.client.events.Listener;
@@ -52,7 +51,7 @@
     private final Label noMembersPublic;
 
     public GroupMembersSummaryPanel(final GroupMembersSummaryPresenter presenter, final I18nUITranslationService i18n,
-            final WorkspaceSkeleton ws, ActionToolbarView<StateToken> actionToolbarView) {
+            final WorkspaceSkeleton ws, final ActionToolbarView<StateToken> actionToolbarView) {
         super(i18n.t("Group members"), i18n.t("People and groups collaborating in this group"), ws);
         this.presenter = presenter;
         this.i18n = i18n;
@@ -62,7 +61,7 @@
                         + i18n.t("Drop into a room to invite the user to join the chat room"));
         gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This is an orphaned project, if you are interested "
                 + "please request to join to work on it"), dragConf, true, true, false, true, false);
-        Listener<String> go = new Listener<String>() {
+        final Listener<String> go = new Listener<String>() {
             public void onEvent(final String groupShortName) {
                 presenter.onDoubleClick(groupShortName);
             }
@@ -126,10 +125,6 @@
         // gridMenuPanel.setDraggable(draggable);
     }
 
-    public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
-        // super.setTheme(oldTheme, newTheme);
-    }
-
     public void showMembersNotVisible() {
         noMembersPublic.setVisible(true);
         gridMenuPanel.setVisible(false);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -52,12 +52,9 @@
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
 import org.ourproject.kune.workspace.client.search.GroupLiveSearcher;
 import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionGroupSummaryToolbar;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
 
 import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
 import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener2;
 import com.calclab.suco.client.ioc.Provider;
 
 public class GroupMembersSummaryPresenter extends SocialNetworkPresenter implements GroupMembersSummary {
@@ -81,9 +78,9 @@
             final ImageUtils imageUtils, final Session session,
             final Provider<SocialNetworkServiceAsync> snServiceProvider,
             final Provider<GroupServiceAsync> groupServiceProvider,
-            final Provider<GroupLiveSearcher> liveSearcherProvider, final WsThemePresenter wsThemePresenter,
-            final Provider<ChatEngine> chatEngineProvider, final GroupActionRegistry groupActionRegistry,
-            final ActionGroupSummaryToolbar toolbar, final Provider<FileDownloadUtils> downloadProvider) {
+            final Provider<GroupLiveSearcher> liveSearcherProvider, final Provider<ChatEngine> chatEngineProvider,
+            final GroupActionRegistry groupActionRegistry, final ActionGroupSummaryToolbar toolbar,
+            final Provider<FileDownloadUtils> downloadProvider) {
         super(i18n, stateManager, session, snServiceProvider, groupActionRegistry, downloadProvider);
         this.i18n = i18n;
         this.stateManager = stateManager;
@@ -93,7 +90,7 @@
         this.liveSearcherProvider = liveSearcherProvider;
         this.groupActionRegistry = groupActionRegistry;
         final Listener<StateAbstractDTO> setStateListener = new Listener<StateAbstractDTO>() {
-            public void onEvent(StateAbstractDTO state) {
+            public void onEvent(final StateAbstractDTO state) {
                 setState(state);
                 toolbar.disableMenusAndClearButtons();
                 toolbar.addActions(groupActionRegistry.getCurrentActions(state.getGroup().getStateToken(),
@@ -103,11 +100,6 @@
         };
         stateManager.onStateChanged(setStateListener);
         stateManager.onSocialNetworkChanged(setStateListener);
-        wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
-            public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
-                view.setTheme(oldTheme, newTheme);
-            }
-        });
         session.onInitDataReceived(new Listener<InitDataDTO>() {
             public void onEvent(final InitDataDTO initData) {
                 addUserOperation(new MenuItem<GroupDTO>("images/new-chat.gif", i18n.t("Start a chat with this member"),
@@ -156,9 +148,9 @@
     }
 
     private void createActions() {
-        ActionToolbarMenuDescriptor<StateToken> addMember = new ActionToolbarMenuDescriptor<StateToken>(
+        final ActionToolbarMenuDescriptor<StateToken> addMember = new ActionToolbarMenuDescriptor<StateToken>(
                 AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
-                    public void onEvent(StateToken parameter) {
+                    public void onEvent(final StateToken parameter) {
                         liveSearcherProvider.get().onSelection(new Listener<LinkDTO>() {
                             public void onEvent(final LinkDTO link) {
                                 view.confirmAddCollab(link.getShortName(), link.getLongName());
@@ -183,21 +175,21 @@
         createNewMembersPolicyAction(i18n.t("auto accept request to join"), AdmissionTypeDTO.Open);
     }
 
-    private void createNewMembersPolicyAction(String textDescription, final AdmissionTypeDTO admissionPolicy) {
-        ActionToolbarMenuRadioDescriptor<StateToken> newMembersPolicy = new ActionToolbarMenuRadioDescriptor<StateToken>(
+    private void createNewMembersPolicyAction(final String textDescription, final AdmissionTypeDTO admissionPolicy) {
+        final ActionToolbarMenuRadioDescriptor<StateToken> newMembersPolicy = new ActionToolbarMenuRadioDescriptor<StateToken>(
                 AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
-                    public void onEvent(StateToken parameter) {
+                    public void onEvent(final StateToken parameter) {
                         groupServiceProvider.get().setGroupNewMembersJoiningPolicy(session.getUserHash(),
                                 session.getCurrentState().getGroup().getStateToken(), admissionPolicy,
                                 new AsyncCallbackSimple<Object>() {
-                                    public void onSuccess(Object result) {
+                                    public void onSuccess(final Object result) {
                                         NotifyUser.info(i18n.t("Members joining policy changed"));
                                     }
                                 });
                     }
                 }, NEW_MEMBERS_POLICY_GROUP, new RadioMustBeChecked() {
                     public boolean mustBeChecked() {
-                        StateAbstractDTO currentState = session.getCurrentState();
+                        final StateAbstractDTO currentState = session.getCurrentState();
                         return currentState.getGroup().getAdmissionType().equals(admissionPolicy);
                     }
                 });
@@ -207,23 +199,24 @@
         groupActionRegistry.addAction(newMembersPolicy);
     }
 
-    private void createSetMembersVisibilityAction(String textDescription, final SocialNetworkVisibilityDTO visibility) {
-        ActionToolbarMenuRadioDescriptor<StateToken> showMembers = new ActionToolbarMenuRadioDescriptor<StateToken>(
+    private void createSetMembersVisibilityAction(final String textDescription,
+            final SocialNetworkVisibilityDTO visibility) {
+        final ActionToolbarMenuRadioDescriptor<StateToken> showMembers = new ActionToolbarMenuRadioDescriptor<StateToken>(
                 AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
-                    public void onEvent(StateToken parameter) {
+                    public void onEvent(final StateToken parameter) {
                         groupServiceProvider.get().setSocialNetworkVisibility(session.getUserHash(),
                                 session.getCurrentState().getGroup().getStateToken(), visibility,
                                 new AsyncCallbackSimple<Object>() {
-                                    public void onSuccess(Object result) {
+                                    public void onSuccess(final Object result) {
                                         NotifyUser.info(i18n.t("Members visibility changed"));
                                     }
                                 });
                     }
                 }, MEMBERS_VISIBILITY_GROUP, new RadioMustBeChecked() {
                     public boolean mustBeChecked() {
-                        StateAbstractDTO currentState = session.getCurrentState();
+                        final StateAbstractDTO currentState = session.getCurrentState();
                         if (!currentState.getGroup().isPersonal()) {
-                            SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
+                            final SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
                             return socialNetworkData.getSocialNetworkVisibility().equals(visibility);
                         }
                         return false;
@@ -245,7 +238,7 @@
 
         // final int numAdmins = adminsList.size();
 
-        boolean userIsAdmin = rights.isAdministrable();
+        final boolean userIsAdmin = rights.isAdministrable();
         final boolean userCanView = rights.isVisible();
 
         view.clear();

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -21,7 +21,6 @@
 
 import org.ourproject.kune.platf.client.dto.GroupDTO;
 import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
 
 public interface GroupMembersSummaryView {
 
@@ -33,8 +32,6 @@
 
     void setDraggable(boolean draggable);
 
-    void setTheme(WsTheme oldTheme, WsTheme newTheme);
-
     void setVisible(boolean visible);
 
     void showMembersNotVisible();

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -29,7 +29,6 @@
 import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
 import org.ourproject.kune.workspace.client.skel.SummaryPanel;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
 
 import com.calclab.suco.client.events.Listener;
 import com.google.gwt.user.client.ui.Widget;
@@ -42,11 +41,11 @@
     private final AbstractToolbar toolbar;
 
     public ParticipationSummaryPanel(final ParticipationSummaryPresenter presenter, final I18nTranslationService i18n,
-            final WorkspaceSkeleton ws, ActionToolbarView<StateToken> actionToolbarView) {
+            final WorkspaceSkeleton ws, final ActionToolbarView<StateToken> actionToolbarView) {
         super(i18n.t("Participates in"), i18n.t("Groups in which the user participates"), ws);
         gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This user does not belong to any group"), false, false,
                 false, false, false);
-        Listener<String> go = new Listener<String>() {
+        final Listener<String> go = new Listener<String>() {
             public void onEvent(final String groupShortName) {
                 presenter.onDoubleClick(groupShortName);
             }
@@ -77,8 +76,4 @@
         toolbar.removeAll();
     }
 
-    public void setTheme(WsTheme oldTheme, WsTheme newTheme) {
-        // TODO Auto-generated method stub
-    }
-
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -33,11 +33,8 @@
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
 import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
 import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionParticipationToolbar;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
 
 import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener2;
 import com.calclab.suco.client.ioc.Provider;
 
 public class ParticipationSummaryPresenter extends SocialNetworkPresenter implements ParticipationSummary {
@@ -49,9 +46,8 @@
 
     public ParticipationSummaryPresenter(final I18nUITranslationService i18n, final StateManager stateManager,
             final ImageUtils imageUtils, final Session session,
-            final Provider<SocialNetworkServiceAsync> snServiceProvider, final WsThemePresenter wsThemePresenter,
-            GroupActionRegistry groupActionRegistry, ActionParticipationToolbar actionParticipationToolbar,
-            final Provider<FileDownloadUtils> downloadProvider) {
+            final Provider<SocialNetworkServiceAsync> snServiceProvider, final GroupActionRegistry groupActionRegistry,
+            final ActionParticipationToolbar actionParticipationToolbar, final Provider<FileDownloadUtils> downloadProvider) {
         super(i18n, stateManager, session, snServiceProvider, groupActionRegistry, downloadProvider);
         adminCategory = new GridGroup("admin in:", " ", i18n.tWithNT("Administrate these groups",
                 "talking about a person"), false);
@@ -61,17 +57,12 @@
                 false);
         super.addGroupOperation(gotoGroupMenuItem, false);
         final Listener<StateAbstractDTO> setStateListener = new Listener<StateAbstractDTO>() {
-            public void onEvent(StateAbstractDTO state) {
+            public void onEvent(final StateAbstractDTO state) {
                 setState(state);
             }
         };
         stateManager.onStateChanged(setStateListener);
         stateManager.onSocialNetworkChanged(setStateListener);
-        wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
-            public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
-                view.setTheme(oldTheme, newTheme);
-            }
-        });
     }
 
     public void init(final ParticipationSummaryView view) {

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,6 @@
 import org.ourproject.kune.platf.client.View;
 import org.ourproject.kune.platf.client.dto.GroupDTO;
 import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
 
 public interface ParticipationSummaryView extends View {
 
@@ -30,8 +29,6 @@
 
     void clear();
 
-    void setTheme(WsTheme oldTheme, WsTheme newTheme);
-
     void setVisible(boolean b);
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -23,7 +23,6 @@
 import org.ourproject.kune.platf.client.ui.KuneUiUtils;
 import org.ourproject.kune.workspace.client.skel.SummaryPanel;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
 
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
@@ -76,8 +75,4 @@
     public void clear() {
         flowPanel.clear();
     }
-
-    public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
-        // TODO Auto-generated method stub
-    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -28,12 +28,9 @@
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.workspace.client.search.SiteSearcher;
 import org.ourproject.kune.workspace.client.search.SiteSearcherType;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
 
 import com.allen_sauer.gwt.log.client.Log;
 import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener2;
 import com.calclab.suco.client.ioc.Provider;
 
 public class TagsSummaryPresenter implements TagsSummary {
@@ -46,7 +43,7 @@
     private final Session session;
 
     public TagsSummaryPresenter(final Session session, final Provider<SiteSearcher> searcherProvider,
-            final StateManager stateManager, final WsThemePresenter wsThemePresenter) {
+            final StateManager stateManager) {
         this.session = session;
         this.searcherProvider = searcherProvider;
         stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
@@ -58,11 +55,6 @@
                 }
             }
         });
-        wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
-            public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
-                view.setTheme(oldTheme, newTheme);
-            }
-        });
     }
 
     public void doSearchTag(final String name) {
@@ -101,7 +93,7 @@
         final int min = tagCloudResult.getMinValue();
         final int diff = max - min;
         final int step = (MAXSIZE - MINSIZE) / (diff == 0 ? 1 : diff);
-        for (TagCountDTO tagCount : tagCloudResult.getTagCountList()) {
+        for (final TagCountDTO tagCount : tagCloudResult.getTagCountList()) {
             final int size = Math.round((MINSIZE + (tagCount.getCount().floatValue() - min) * step));
             view.addTag(tagCount.getName(), tagCount.getCount(), "kune-ft" + size + "px");
         }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -20,7 +20,6 @@
 package org.ourproject.kune.workspace.client.tags;
 
 import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
 
 public interface TagsSummaryView extends View {
 
@@ -30,8 +29,6 @@
 
     void expand();
 
-    void setTheme(WsTheme oldTheme, WsTheme newTheme);
-
     void setVisible(boolean visible);
 
 }

Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java (from rev 1121, trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java	2009-06-08 14:18:03 UTC (rev 1121)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,105 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.themes;
+
+import org.ourproject.kune.platf.client.dto.InitDataDTO;
+import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
+import org.ourproject.kune.platf.client.rpc.GroupServiceAsync;
+import org.ourproject.kune.platf.client.state.Session;
+import org.ourproject.kune.platf.client.state.StateManager;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+
+import com.calclab.suco.client.events.Event2;
+import com.calclab.suco.client.events.Listener;
+import com.calclab.suco.client.events.Listener2;
+import com.calclab.suco.client.ioc.Provider;
+
+public class WsThemeManager {
+
+    private WsTheme previousTheme;
+    private final Event2<WsTheme, WsTheme> onThemeChanged;
+    private final Provider<GroupServiceAsync> groupServiceProvider;
+    private final Session session;
+    private WsTheme defTheme;
+
+    public WsThemeManager(final Session session, final Provider<GroupServiceAsync> groupServiceProvider,
+            final StateManager stateManager) {
+        this.session = session;
+        this.groupServiceProvider = groupServiceProvider;
+        this.onThemeChanged = new Event2<WsTheme, WsTheme>("onThemeChanged");
+        session.onInitDataReceived(new Listener<InitDataDTO>() {
+            public void onEvent(final InitDataDTO initData) {
+                setDefTheme(initData);
+                setTheme(defTheme);
+            }
+        });
+        stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
+            public void onEvent(final StateAbstractDTO state) {
+                setState(state);
+            }
+        });
+    }
+
+    public void changeTheme(final StateToken token, final WsTheme newTheme) {
+        NotifyUser.showProgressProcessing();
+        groupServiceProvider.get().changeGroupWsTheme(session.getUserHash(), token, newTheme.getName(),
+                new AsyncCallbackSimple<Object>() {
+                    public void onSuccess(final Object result) {
+                        if (session.getCurrentState().getStateToken().getGroup().equals(token.getGroup())) {
+                            setTheme(newTheme);
+                        }
+                        NotifyUser.hideProgress();
+                    }
+                });
+    }
+
+    public void addOnThemeChanged(final Listener2<WsTheme, WsTheme> listener) {
+        onThemeChanged.add(listener);
+    }
+
+    protected void onChangeGroupWsTheme(final WsTheme newTheme) {
+        NotifyUser.showProgressProcessing();
+        groupServiceProvider.get().changeGroupWsTheme(session.getUserHash(), session.getCurrentState().getStateToken(),
+                newTheme.getName(), new AsyncCallbackSimple<Object>() {
+                    public void onSuccess(final Object result) {
+                        setTheme(newTheme);
+                        NotifyUser.hideProgress();
+                    }
+                });
+    }
+
+    private void setDefTheme(final InitDataDTO initData) {
+        defTheme = new WsTheme(initData.getWsThemes()[0]);
+    }
+
+    private void setState(final StateAbstractDTO state) {
+        setTheme(new WsTheme(state.getGroup().getWorkspaceTheme()));
+    }
+
+    private void setTheme(final WsTheme newTheme) {
+        if (previousTheme == null || !previousTheme.equals(newTheme)) {
+            onThemeChanged.fire(previousTheme, newTheme);
+        }
+        previousTheme = newTheme;
+    }
+
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManagerPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManagerPanel.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManagerPanel.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,15 @@
+package org.ourproject.kune.workspace.client.themes;
+
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import com.calclab.suco.client.events.Listener2;
+
+public class WsThemeManagerPanel {
+    public WsThemeManagerPanel(final WsThemeManager presenter, final WorkspaceSkeleton wskel) {
+        presenter.addOnThemeChanged(new Listener2<WsTheme, WsTheme>() {
+            public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
+                wskel.setTheme(oldTheme, newTheme);
+            }
+        });
+    }
+}

Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePanel.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.themes;
-
-import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
-import com.calclab.suco.client.events.Listener2;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.widgets.ToolbarButton;
-import com.gwtext.client.widgets.menu.BaseItem;
-import com.gwtext.client.widgets.menu.Menu;
-import com.gwtext.client.widgets.menu.MenuItem;
-import com.gwtext.client.widgets.menu.event.BaseItemListenerAdapter;
-
-public class WsThemePanel extends ToolbarButton implements WsThemeView {
-
-    private final Menu menu;
-    private final WsThemePresenter presenter;
-    private final I18nUITranslationService i18n;
-
-    public WsThemePanel(final WorkspaceSkeleton ws, final WsThemePresenter presenter,
-            final I18nUITranslationService i18n) {
-        this.presenter = presenter;
-        this.i18n = i18n;
-        menu = new Menu();
-
-        menu.setDefaultAlign("br-tr");
-        super.setMenu(menu);
-        super.setIcon("images/colors.gif");
-        // super.setTooltip(i18n.t("Select Workspace theme for this group"));
-        // ws.getSiteTraybar().addButton(this);
-        presenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
-            public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
-                ws.setTheme(oldTheme, newTheme);
-            }
-        });
-    }
-
-    public void setThemes(final String[] themes) {
-        for (String theme2 : themes) {
-            final WsTheme theme = new WsTheme(theme2);
-            final MenuItem item = new MenuItem();
-            final String name = theme.getName();
-            item.setIconCls("k-wstheme-icon-" + name);
-            item.setText(i18n.t(name));
-            menu.addItem(item);
-            item.addListener(new BaseItemListenerAdapter() {
-                @Override
-                public void onClick(final BaseItem item, final EventObject e) {
-                    presenter.onChangeGroupWsTheme(theme);
-                }
-            });
-        }
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemePresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,102 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.themes;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.dto.InitDataDTO;
-import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
-import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple;
-import org.ourproject.kune.platf.client.rpc.GroupServiceAsync;
-import org.ourproject.kune.platf.client.state.Session;
-import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-
-import com.calclab.suco.client.events.Event2;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener2;
-import com.calclab.suco.client.ioc.Provider;
-
-public class WsThemePresenter {
-
-    private WsThemeView view;
-    private WsTheme previousTheme;
-    private final Event2<WsTheme, WsTheme> onThemeChanged;
-    private final Provider<GroupServiceAsync> groupServiceProvider;
-    private final Session session;
-    private WsTheme defTheme;
-
-    public WsThemePresenter(final Session session, final Provider<GroupServiceAsync> groupServiceProvider,
-            final StateManager stateManager) {
-        this.session = session;
-        this.groupServiceProvider = groupServiceProvider;
-        this.onThemeChanged = new Event2<WsTheme, WsTheme>("onThemeChanged");
-        session.onInitDataReceived(new Listener<InitDataDTO>() {
-            public void onEvent(final InitDataDTO initData) {
-                view.setThemes(initData.getWsThemes());
-                setDefTheme(initData);
-                setTheme(defTheme);
-            }
-        });
-        stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
-            public void onEvent(final StateAbstractDTO state) {
-                setState(state);
-            }
-        });
-    }
-
-    public View getView() {
-        return view;
-    }
-
-    public void init(final WsThemeView view) {
-        this.view = view;
-    }
-
-    public void onThemeChanged(final Listener2<WsTheme, WsTheme> listener) {
-        onThemeChanged.add(listener);
-    }
-
-    protected void onChangeGroupWsTheme(final WsTheme newTheme) {
-        NotifyUser.showProgressProcessing();
-        groupServiceProvider.get().changeGroupWsTheme(session.getUserHash(), session.getCurrentState().getStateToken(),
-                newTheme.getName(), new AsyncCallbackSimple<Object>() {
-                    public void onSuccess(final Object result) {
-                        setTheme(newTheme);
-                        NotifyUser.hideProgress();
-                    }
-                });
-    }
-
-    private void setDefTheme(final InitDataDTO initData) {
-        defTheme = new WsTheme(initData.getWsThemes()[0]);
-    }
-
-    private void setState(final StateAbstractDTO state) {
-        setTheme(new WsTheme(state.getGroup().getWorkspaceTheme()));
-    }
-
-    private void setTheme(final WsTheme newTheme) {
-        if (previousTheme == null || !previousTheme.equals(newTheme)) {
-            onThemeChanged.fire(previousTheme, newTheme);
-        }
-        previousTheme = newTheme;
-    }
-
-}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelector.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelector.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelector.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,15 @@
+package org.ourproject.kune.workspace.client.themes;
+
+import org.ourproject.kune.platf.client.View;
+
+import com.calclab.suco.client.events.Listener;
+
+public interface WsThemeSelector {
+
+    void addThemeSelected(Listener<WsTheme> listener);
+
+    View getView();
+
+    void select(String theme);
+
+}

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -0,0 +1,108 @@
+package org.ourproject.kune.workspace.client.themes;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
+import org.ourproject.kune.platf.client.actions.Action;
+import org.ourproject.kune.platf.client.actions.ActionEvent;
+import org.ourproject.kune.platf.client.actions.ui.ActionExtensibleView;
+import org.ourproject.kune.platf.client.actions.ui.CssStyleDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.dto.InitDataDTO;
+import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
+import org.ourproject.kune.platf.client.state.Session;
+
+import com.calclab.suco.client.events.Event;
+import com.calclab.suco.client.events.Listener;
+
+public class WsThemeSelectorPresenter implements WsThemeSelector {
+
+    class ThemeAction extends AbstractExtendedAction {
+
+        private final String theme;
+
+        public ThemeAction(final String theme) {
+            super();
+            this.theme = theme;
+            putValue(NAME, i18n.t(theme));
+            putValue(SMALL_ICON, CssStyleDescriptor.create("k-wstheme-icon-" + theme));
+        }
+
+        public void actionPerformed(final ActionEvent event) {
+            themeSelected.fire(new WsTheme(theme));
+            menu.setText(i18n.t(theme));
+        }
+    }
+
+    private final Event<WsTheme> themeSelected;
+    private final Event<String> selectItemInUI;
+    private final I18nTranslationService i18n;
+    private MenuDescriptor menu;
+    private ActionExtensibleView view;
+    private final Session session;
+
+    public WsThemeSelectorPresenter(final Session session, final I18nTranslationService i18n) {
+        this.session = session;
+        this.i18n = i18n;
+        this.themeSelected = new Event<WsTheme>("themeSelected");
+        this.selectItemInUI = new Event<String>("selectItemInUI");
+    }
+
+    public void addThemeSelected(final Listener<WsTheme> listener) {
+        themeSelected.add(listener);
+    }
+
+    public View getView() {
+        return view;
+    }
+
+    public void init(final ActionExtensibleView view) {
+        this.view = view;
+        createActions();
+    }
+
+    public void select(final String theme) {
+        selectItemInUI.fire(theme);
+    }
+
+    private void createActions() {
+        createMenu();
+        final InitDataDTO initData = session.getInitData();
+        if (initData == null) {
+            session.onInitDataReceived(new Listener<InitDataDTO>() {
+                public void onEvent(final InitDataDTO initData) {
+                    setThemes(initData);
+                }
+            });
+        } else {
+            setThemes(initData);
+        }
+    }
+
+    private void createMenu() {
+        menu = new MenuDescriptor("&nbsp;");
+        menu.putValue(Action.SMALL_ICON, "images/colors.gif");
+    }
+
+    private void createTheme(final String theme) {
+        final ThemeAction action = new ThemeAction(theme);
+        final MenuItemDescriptor themeItem = new MenuItemDescriptor(menu, action);
+        selectItemInUI.add(new Listener<String>() {
+            public void onEvent(final String themeToSelect) {
+                if (theme.equals(themeToSelect)) {
+                    menu.setText(i18n.t(theme));
+                    // themeItem.setChecked(true);
+                }
+            }
+        });
+        view.addAction(themeItem);
+    }
+
+    private void setThemes(final InitDataDTO initData) {
+        view.addAction(menu);
+        for (final String theme : initData.getWsThemes()) {
+            createTheme(theme);
+        }
+    }
+
+}

Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeView.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeView.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -1,30 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.themes;
-
-import org.ourproject.kune.platf.client.View;
-
-public interface WsThemeView extends View {
-
-    void setThemes(String[] themes);
-
-    void setVisible(boolean visible);
-
-}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/AbstractClientTool.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -20,12 +20,12 @@
 package org.ourproject.kune.workspace.client.tool;
 
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 public abstract class AbstractClientTool implements ClientTool {
 
     public AbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector,
-            final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws) {
+            final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws) {
         final ToolSelectorItemPresenter presenter = new ToolSelectorItemPresenter(shortName, longName, toolSelector,
                 wsThemePresenter);
         final ToolSelectorItemPanel panel = new ToolSelectorItemPanel(presenter, ws);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/FoldableAbstractClientTool.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,7 @@
 import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO;
 import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 public abstract class FoldableAbstractClientTool extends AbstractClientTool {
     public static final String UPLOADEDFILE_SUFFIX = "uploaded";
@@ -30,7 +30,7 @@
     protected final ContentCapabilitiesRegistry contentCapabilitiesRegistry;
 
     public FoldableAbstractClientTool(final String shortName, final String longName, final ToolSelector toolSelector,
-            final WsThemePresenter wsThemePresenter, final WorkspaceSkeleton ws,
+            final WsThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
             final ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
         super(shortName, longName, toolSelector, wsThemePresenter, ws);
         this.contentCapabilitiesRegistry = contentCapabilitiesRegistry;

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorItemPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -22,7 +22,7 @@
 import org.ourproject.kune.platf.client.View;
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 import com.calclab.suco.client.events.Listener2;
 
@@ -30,12 +30,12 @@
 
     private ToolSelectorItemView view;
     private final ToolSelector toolSelector;
-    private final WsThemePresenter wsThemePresenter;
+    private final WsThemeManager wsThemePresenter;
     private final String shortName;
     private final String longName;
 
     public ToolSelectorItemPresenter(final String shortName, final String longName, final ToolSelector toolSelector,
-            final WsThemePresenter wsThemePresenter) {
+            final WsThemeManager wsThemePresenter) {
         this.shortName = shortName;
         this.longName = longName;
         this.toolSelector = toolSelector;
@@ -53,7 +53,7 @@
     public void init(final ToolSelectorItemView view) {
         this.view = view;
         toolSelector.addTool(this);
-        wsThemePresenter.onThemeChanged(new Listener2<WsTheme, WsTheme>() {
+        wsThemePresenter.addOnThemeChanged(new Listener2<WsTheme, WsTheme>() {
             public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
                 setTheme(oldTheme, newTheme);
             }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenter.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -25,7 +25,7 @@
 import org.ourproject.kune.platf.client.dto.StateAbstractDTO;
 import org.ourproject.kune.platf.client.errors.UIException;
 import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 import com.allen_sauer.gwt.log.client.Log;
 import com.calclab.suco.client.events.Listener;
@@ -35,7 +35,7 @@
 
     private final HashMap<String, ToolSelectorItem> tools;
 
-    public ToolSelectorPresenter(final StateManager stateManager, final WsThemePresenter wsThemePresenter) {
+    public ToolSelectorPresenter(final StateManager stateManager, final WsThemeManager wsThemePresenter) {
         tools = new HashMap<String, ToolSelectorItem>();
         stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
             public void onEvent(final StateAbstractDTO state) {

Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/entityheader/EntityLogoPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/entityheader/EntityLogoPresenterTest.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/entityheader/EntityLogoPresenterTest.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -8,7 +8,7 @@
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 public class EntityLogoPresenterTest {
 
@@ -21,7 +21,7 @@
     public void before() {
         stateManager = Mockito.mock(StateManager.class);
         session = Mockito.mock(Session.class);
-        WsThemePresenter theme = Mockito.mock(WsThemePresenter.class);
+        WsThemeManager theme = Mockito.mock(WsThemeManager.class);
         entityLogoPresenter = new EntityHeaderPresenter(stateManager, theme, session);
         view = Mockito.mock(EntityHeaderView.class);
         entityLogoPresenter.init(view);

Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -11,7 +11,7 @@
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.platf.client.state.StateManager;
 import org.ourproject.kune.workspace.client.search.SiteSearcher;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 
 import com.calclab.suco.client.ioc.Provider;
 
@@ -25,12 +25,12 @@
     public void before() {
         final Session session = Mockito.mock(Session.class);
         final StateManager stateManager = Mockito.mock(StateManager.class);
-        final WsThemePresenter theme = Mockito.mock(WsThemePresenter.class);
+        final WsThemeManager theme = Mockito.mock(WsThemeManager.class);
         final SiteSearcher searcher = Mockito.mock(SiteSearcher.class);
         final Provider searcherProvider = Mockito.mock(Provider.class);
         Mockito.when(searcherProvider.get()).thenReturn(searcher);
         view = Mockito.mock(TagsSummaryView.class);
-        tagsSummaryPresenter = new TagsSummaryPresenter(session, searcherProvider, stateManager, theme);
+        tagsSummaryPresenter = new TagsSummaryPresenter(session, searcherProvider, stateManager);
         tagsSummaryPresenter.init(view);
     }
 

Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenterTest.java	2009-06-29 19:41:17 UTC (rev 1132)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/tool/ToolSelectorPresenterTest.java	2009-07-01 23:06:27 UTC (rev 1133)
@@ -4,7 +4,7 @@
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.ourproject.kune.platf.client.state.StateManager;
-import org.ourproject.kune.workspace.client.themes.WsThemePresenter;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
 import org.ourproject.kune.workspace.client.tool.ToolSelectorItem;
 import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenter;
 
@@ -50,7 +50,7 @@
     @Before
     public void begin() {
         final StateManager stateManager = Mockito.mock(StateManager.class);
-        final WsThemePresenter themePresenter = Mockito.mock(WsThemePresenter.class);
+        final WsThemeManager themePresenter = Mockito.mock(WsThemeManager.class);
         toolSelector = new ToolSelectorPresenter(stateManager, themePresenter);
         toolSelectorItem1 = Mockito.mock(ToolSelectorItem.class);
         toolSelectorItem2 = Mockito.mock(ToolSelectorItem.class);




More information about the kune-commits mailing list