[kune-commits] r1512 - in trunk/src/main/java: cc/kune/common/client/ui/dialogs cc/kune/common/client/ui/dialogs/tabbed cc/kune/common/client/ui/dialogs/wizard cc/kune/common/public cc/kune/core/client/auth cc/kune/core/client/groups/newgroup cc/kune/core/client/rpcservices cc/kune/core/client/sitebar cc/kune/core/client/state cc/kune/core/server/rpc cc/kune/gspace/client cc/kune/gspace/client/i18n cc/kune/gspace/client/licensewizard cc/kune/gspace/client/options org/ourproject/kune/workspace/client

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Sep 7 15:44:14 CEST 2011


Author: vjrj_
Date: 2011-09-07 15:44:13 +0200 (Wed, 07 Sep 2011)
New Revision: 1512

Added:
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPresenter.java
Removed:
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java
   trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java
   trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/
Modified:
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java
   trunk/src/main/java/cc/kune/common/client/ui/dialogs/wizard/WizardDialog.java
   trunk/src/main/java/cc/kune/common/public/kune-common.css
   trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java
   trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java
   trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java
   trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
   trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPresenter.java
   trunk/src/main/java/cc/kune/core/client/rpcservices/GroupService.java
   trunk/src/main/java/cc/kune/core/client/rpcservices/GroupServiceAsync.java
   trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java
   trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
   trunk/src/main/java/cc/kune/core/server/rpc/GroupRPC.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceGinjector.java
   trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml
   trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java
   trunk/src/main/java/cc/kune/gspace/client/licensewizard/LicenseWizardPanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java
   trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java
   trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java
Log:
CLOSED - # 124: New group creation sometime don't go to group's home 
http://kune.ourproject.org/issues/ticket/124
CLOSED - # 39: Dialogs height must be some percent of Client height to prevent overflows 
http://kune.ourproject.org/issues/ticket/39

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -41,7 +41,7 @@
     private final String dialogId;
     private String firstButtonId;
     private String firstButtonTitle;
-    private String height = "70%";
+    private String height;
     private String icon;
     private final boolean modal;
     private String sndButtonId;
@@ -83,8 +83,7 @@
     }
 
     public Builder height(final int height) {
-      // FIXME
-      this.height = String.valueOf(height); // + "px";
+      this.height = String.valueOf(height + "px");
       return this;
     }
 
@@ -119,8 +118,7 @@
     }
 
     public Builder width(final int width) {
-      // FIXME
-      this.width = String.valueOf(width); // + "px";
+      this.width = String.valueOf(width + "px");
       return this;
     }
 
@@ -154,7 +152,7 @@
     super.getTitleText().setText(builder.title);
     setWidthImpl(builder.width);
     setHeightImpl(builder.height);
-    setSizes();
+    recalculateSize();
     Window.addResizeHandler(new ResizeHandler() {
       @Override
       public void onResize(final ResizeEvent event) {
@@ -175,6 +173,10 @@
     popup.hide();
   }
 
+  public void recalculateSize() {
+    setSizes(Window.getClientWidth(), Window.getClientHeight());
+  }
+
   private void setCloseBtn(final boolean closeBtn) {
     setCloseBtnVisible(closeBtn);
     if (closeBtn) {
@@ -205,7 +207,7 @@
 
   private void setHeightImpl(final String height) {
     this.height = height;
-    setSizes();
+    recalculateSize();
   }
 
   @Override
@@ -214,10 +216,6 @@
     setHeightImpl(height);
   }
 
-  private void setSizes() {
-    setSizes(Window.getClientWidth(), Window.getClientHeight());
-  }
-
   private void setSizes(final int windowWidth, final int windowHeight) {
     String newWidth = null;
     String newHeight = null;
@@ -250,7 +248,7 @@
 
   private void setWidthImpl(final String width) {
     this.width = width;
-    setSizes();
+    recalculateSize();
   }
 
   public void showCentered() {

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -23,9 +23,12 @@
 import cc.kune.common.client.notify.NotifyLevel;
 import cc.kune.common.client.notify.NotifyLevelImages;
 import cc.kune.common.client.ui.dialogs.BasicTopDialog;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog.Builder;
 import cc.kune.common.client.ui.dialogs.MessageToolbar;
 import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter.AbstractTabbedDialogView;
 
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.dom.client.Style.Unit;
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
@@ -40,15 +43,17 @@
 import com.google.gwt.user.client.ui.IsWidget;
 import com.google.gwt.user.client.ui.TabLayoutPanel;
 import com.google.gwt.user.client.ui.Widget;
+import com.gwtplatform.mvp.client.ViewImpl;
 
-public abstract class AbstractTabbedDialogPanel implements AbstractTabbedDialogView {
+public abstract class AbstractTabbedDialogPanel extends ViewImpl implements AbstractTabbedDialogView {
+  private static final int NO_SIZE = -1;
   private final boolean autohide;
   private BasicTopDialog dialog;
   private final String dialogId;
   private final String errorLabelId;
   private final String firstBtnId;
   private final String firstBtnTitle;
-  private int height;
+  private int height = NO_SIZE;
   private ImageResource icon;
   private String iconCls;
   private final NotifyLevelImages images;
@@ -59,7 +64,7 @@
   private final String sndBtnTitle;
   private TabLayoutPanel tabPanel;
   private String title;
-  private int width;
+  private int width = NO_SIZE;
 
   public AbstractTabbedDialogPanel(final String dialogId, final String title, final boolean modal,
       final boolean autoHide, final NotifyLevelImages images, final String errorLabelId,
@@ -82,8 +87,8 @@
       final NotifyLevelImages images, final String errorLabelId, final String firstBtnTitle,
       final String firstBtnId, final String sndBtnTitle, final String sndBtnId,
       final ProvidersCollection provCollection) {
-    this(dialogId, title, modal, false, images, errorLabelId, firstBtnTitle, firstBtnId, sndBtnTitle,
-        sndBtnId, provCollection);
+    this(dialogId, title, NO_SIZE, NO_SIZE, modal, false, images, errorLabelId, firstBtnTitle,
+        firstBtnId, sndBtnTitle, sndBtnId, provCollection);
   }
 
   public AbstractTabbedDialogPanel(final String dialogId, final String title, final int width,
@@ -124,23 +129,42 @@
   }
 
   private void createDialog() {
-    dialog = new BasicTopDialog.Builder(dialogId, autohide, modal).autoscroll(true).width(
-        String.valueOf(width + 20)).height(String.valueOf(height + 20)).icon(iconCls).firstButtonId(
-        firstBtnId).firstButtonTitle(firstBtnTitle).sndButtonId(dialogId).sndButtonTitle(sndBtnTitle).sndButtonId(
-        sndBtnId).title(title).build();
+    final Builder builder = new BasicTopDialog.Builder(dialogId, autohide, modal).autoscroll(true).icon(
+        iconCls).firstButtonId(firstBtnId).firstButtonTitle(firstBtnTitle).sndButtonId(dialogId).sndButtonTitle(
+        sndBtnTitle).sndButtonId(sndBtnId).title(title);
+    if (width != NO_SIZE) {
+      builder.width(String.valueOf(width + 20) + "px");
+    }
+    if (height != NO_SIZE) {
+      builder.height(String.valueOf(height + 20) + "px");
+    }
+    dialog = builder.build();
     if (icon != null) {
       dialog.setTitleIcon(icon);
     }
     messageErrorBar = new MessageToolbar(images, errorLabelId);
     tabPanel = new TabLayoutPanel(25, Unit.PX);
+    tabPanel.addStyleName("oc-noselec");
     tabPanel.addSelectionHandler(new SelectionHandler<Integer>() {
       @Override
       public void onSelection(final SelectionEvent<Integer> event) {
+        // dialog.recalculateSize();
         dialog.showCentered();
+        Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+          @Override
+          public void execute() {
+            dialog.showCentered();
+          }
+        });
       }
     });
     provCollection.createAll();
-    tabPanel.setSize(String.valueOf(width) + "px", String.valueOf(height) + "px");
+    if (width != NO_SIZE) {
+      tabPanel.setWidth(String.valueOf(width) + "px");
+    }
+    if (height != NO_SIZE) {
+      tabPanel.setHeight(String.valueOf(height) + "px");
+    }
     dialog.getInnerPanel().add(tabPanel);
     tabPanel.addStyleName("k-tabpanel-aditionalpadding");
     tabPanel.addStyleName("k-tabs");

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -21,12 +21,18 @@
 
 import cc.kune.common.client.notify.NotifyLevel;
 
+import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.user.client.ui.IsWidget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
 
-public abstract class AbstractTabbedDialogPresenter implements AbstractTabbedDialog {
+public abstract class AbstractTabbedDialogPresenter<V extends View, Proxy_ extends Proxy<?>> extends
+    Presenter<View, Proxy<?>> implements AbstractTabbedDialog {
 
-  public interface AbstractTabbedDialogView extends IsWidget {
-
+  public interface AbstractTabbedDialogView extends View, IsWidget {
     void activateTab(int index);
 
     void addTab(IsWidget tab, IsWidget tabTitle);
@@ -44,50 +50,56 @@
     void show();
   }
 
-  private AbstractTabbedDialogView view;
+  @Inject
+  public AbstractTabbedDialogPresenter(final EventBus eventBus, final AbstractTabbedDialogView view,
+      final Proxy<?> proxy) {
+    super(eventBus, view, proxy);
+  }
 
   @Override
   public void activateTab(final int index) {
-    view.activateTab(index);
+    getView().activateTab(index);
   }
 
   @Override
   public void addTab(final IsWidget tab, final IsWidget tabTitle) {
-    view.addTab(tab, tabTitle);
+    getView().addTab(tab, tabTitle);
   }
 
-  public IsWidget getView() {
-    return view;
+  @Override
+  public AbstractTabbedDialogView getView() {
+    return (AbstractTabbedDialogView) super.getView();
   }
 
   @Override
   public void hide() {
-    view.hide();
+    getView().hide();
   }
 
   @Override
   public void hideMessages() {
-    view.hideMessages();
+    getView().hideMessages();
   }
 
-  public void init(final AbstractTabbedDialogView view) {
-    this.view = view;
+  @Override
+  public void insertTab(final IsWidget tab, final IsWidget tabTitle, final int index) {
+    getView().insertTab(tab, tabTitle, index);
   }
 
   @Override
-  public void insertTab(final IsWidget tab, final IsWidget tabTitle, final int index) {
-    view.insertTab(tab, tabTitle, index);
+  protected void revealInParent() {
+    RevealRootContentEvent.fire(this, this);
   }
 
   @Override
   public void setErrorMessage(final String message, final NotifyLevel level) {
-    view.setErrorMessage(message, level);
+    getView().setErrorMessage(message, level);
   }
 
   @Override
   public void show() {
     hideMessages();
-    view.show();
+    getView().show();
   }
 
 }

Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/wizard/WizardDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/wizard/WizardDialog.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/wizard/WizardDialog.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -61,12 +61,10 @@
       final I18nTranslationService i18n, final MaskWidget maskWidget, final WizardListener listener) {
     this.maskWidget = maskWidget;
     this.listener = listener;
+    this.i18n = i18n;
     final Builder dialogBuilder = new BasicTopDialog.Builder(dialogId, false, modal).width(width).height(
         height).firstButtonId(cancelId).sndButtonId(finishId).title(header);
-
     dialog = dialogBuilder.build();
-    this.i18n = i18n;
-
     dialog.setFirstBtnText(i18n.tWithNT("Cancel", "used in button"));
     dialog.getFirstBtn().addClickHandler(new ClickHandler() {
       @Override

Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css	2011-09-07 13:44:13 UTC (rev 1512)
@@ -22,7 +22,7 @@
 
 .k-opacity80 {
   kfilter: alpha(opacity =
-    80);
+     80);
   -moz-opacity: 0.80;
   -khtml-opacity: 0.80;
   opacity: 0.80;
@@ -30,7 +30,7 @@
 
 .k-opacity90 {
   kfilter: alpha(opacity =
-    90);
+     90);
   -moz-opacity: 0.90;
   -khtml-opacity: 0.90;
   opacity: 0.90;
@@ -38,7 +38,7 @@
 
 .k-opacity95 {
   kfilter: alpha(opacity =
-    95);
+     95);
   -moz-opacity: 0.95;
   -khtml-opacity: 0.95;
   opacity: 0.95;
@@ -47,7 +47,7 @@
 .gwt-PopupPanelGlass {
   background-color: #f7ebe3 !important;
   kfilter: alpha(opacity =
-    68) !important;
+     68) !important;
   -moz-opacity: 0.68 !important;
   -khtml-opacity: 0.68 !important;
   opacity: 0.68 !important;
@@ -308,7 +308,7 @@
   -webkit-border-bottom-left-radius: 5px;
   -moz-border-radius-bottomleft: 5px;
   border-bottom-left-radius: 5px;
-  kfilter: alpha(opacity =                                 90);
+  kfilter: alpha(opacity =                                   90);
   -moz-opacity: 0.90;
   -khtml-opacity: 0.90;
   opacity: 0.90;
@@ -551,7 +551,7 @@
   _border-left-color: pink;
   _border-bottom-color: pink;
   _border-right-color: pink;
-  _filter: chroma(color =                       pink);
+  _filter: chroma(color =                         pink);
 }
 
 /* end tooltip */
@@ -707,4 +707,4 @@
   -webkit-border-radius: 3px;
   border-radius: 3px;
   padding: 3px;
-}
+}
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -48,11 +48,11 @@
   @Inject
   public RegisterPanel(final I18nTranslationService i18n, final Session session,
       final MaskWidgetView mask, final NotifyLevelImages images) {
-    super(REGISTER_DIALOG, mask, i18n, i18n.t(CoreMessages.REGISTER_TITLE), true, true, true, 400, 420,
-        "", i18n.t(CoreMessages.REGISTER_TITLE), REGISTER_BUTTON_ID, i18n.tWithNT("Cancel",
-            "used in button"), CANCEL_BUTTON_ID, images, ERRMSG, 5);
+    super(REGISTER_DIALOG, mask, i18n, i18n.t(CoreMessages.REGISTER_TITLE), true, true, true, "",
+        i18n.t(CoreMessages.REGISTER_TITLE), REGISTER_BUTTON_ID,
+        i18n.tWithNT("Cancel", "used in button"), CANCEL_BUTTON_ID, images, ERRMSG, 5);
     registerForm = new RegisterForm(i18n, session);
-    registerForm.setWidth(370);
+    registerForm.setWidth(330);
     registerForm.getFormPanel().setId(REGISTER_FORM);
     messageErrorBar = new MessageToolbar(images, errorLabelId);
     registerForm.add(messageErrorBar);

Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -45,13 +45,12 @@
 
   public SignInAbstractPanel(final String dialogId, final MaskWidgetView mask,
       final I18nTranslationService i18n, final String title, final boolean autohide,
-      final boolean modal, final boolean autoscroll, final int width, final int heigth,
-      final String icon, final String firstButtonTitle, final String firstButtonId,
-      final String cancelButtonTitle, final String cancelButtonId, final NotifyLevelImages images,
-      final String errorLabelId, final int tabIndexStart) {
+      final boolean modal, final boolean autoscroll, final String icon, final String firstButtonTitle,
+      final String firstButtonId, final String cancelButtonTitle, final String cancelButtonId,
+      final NotifyLevelImages images, final String errorLabelId, final int tabIndexStart) {
 
-    final Builder builder = new BasicTopDialog.Builder(dialogId, autohide, modal).autoscroll(autoscroll);
-    builder.width(width).height(heigth).title(title);
+    final Builder builder = new BasicTopDialog.Builder(dialogId, autohide, modal).autoscroll(autoscroll).title(
+        title);
     builder.icon(icon);
     builder.firstButtonTitle(firstButtonTitle).firstButtonId(firstButtonId);
     builder.sndButtonTitle(cancelButtonTitle).sndButtonId(cancelButtonId);

Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -48,12 +48,12 @@
   @Inject
   public SignInPanel(final I18nTranslationService i18n, final MaskWidgetView mask,
       final NotifyLevelImages images) {
-    super(SIGNIN_DIALOG, mask, i18n, i18n.t(CoreMessages.SIGN_IN_TITLE), true, true, true, 360, 430, "",
+    super(SIGNIN_DIALOG, mask, i18n, i18n.t(CoreMessages.SIGN_IN_TITLE), true, true, true, "",
         i18n.t(CoreMessages.SIGN_IN_TITLE), SIGN_IN_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"),
         CANCEL_BUTTON_ID, images, ERROR_MSG, 102);
 
     signInForm = new SignInForm(i18n);
-    signInForm.setWidth(370);
+    signInForm.setWidth(330);
     signInForm.add(createNoAccountRegister());
     messageErrorBar = new MessageToolbar(images, errorLabelId);
     signInForm.add(messageErrorBar);

Modified: trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -80,8 +80,8 @@
   @Inject
   public NewGroupPanel(final I18nTranslationService i18n, final NotifyLevelImages img,
       final MaskWidgetView mask) {
-    final Builder builder = new BasicTopDialog.Builder(NEWGROUP_WIZARD, false, true).autoscroll(true).height(
-        340).title(i18n.t("Register a new group"));
+    final Builder builder = new BasicTopDialog.Builder(NEWGROUP_WIZARD, false, true).autoscroll(true).title(
+        i18n.t("Register a new group"));
     builder.icon("k-newgroup-icon");
     builder.firstButtonTitle(i18n.t("Register")).firstButtonId(REGISTER_BUTTON);
     builder.sndButtonTitle(i18n.t("Cancel")).sndButtonId(CANCEL_BUTTON);

Modified: trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPresenter.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPresenter.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -32,11 +32,11 @@
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.SiteTokens;
 import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.GroupDTO;
 import cc.kune.core.shared.dto.GroupType;
 import cc.kune.core.shared.dto.LicenseDTO;
 import cc.kune.core.shared.dto.ReservedWordsRegistryDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.gspace.client.options.GroupOptions;
 
@@ -174,7 +174,7 @@
       final GroupDTO group = new GroupDTO(shortName, longName, getTypeOfGroup());
       group.setDefaultLicense(license);
 
-      final AsyncCallback<StateToken> callback = new AsyncCallback<StateToken>() {
+      final AsyncCallback<StateAbstractDTO> callback = new AsyncCallback<StateAbstractDTO>() {
         @Override
         public void onFailure(final Throwable caught) {
           if (caught instanceof GroupShortNameInUseException) {
@@ -195,12 +195,13 @@
         }
 
         @Override
-        public void onSuccess(final StateToken token) {
+        public void onSuccess(final StateAbstractDTO state) {
           getView().hide();
           Scheduler.get().scheduleDeferred(new ScheduledCommand() {
             @Override
             public void execute() {
-              stateManager.gotoStateToken(token);
+              stateManager.setRetrievedStateAndGo(state);
+              NotifyUser.info("Test", true);
               groupOptions.showTooltip();
             }
           });

Modified: trunk/src/main/java/cc/kune/core/client/rpcservices/GroupService.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/rpcservices/GroupService.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/rpcservices/GroupService.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -39,7 +39,7 @@
 
   GroupDTO clearGroupBackImage(String userHash, StateToken token);
 
-  StateToken createNewGroup(String userHash, GroupDTO group, String publicDesc, String tags,
+  StateAbstractDTO createNewGroup(String userHash, GroupDTO group, String publicDesc, String tags,
       String[] enabledTools) throws DefaultException;
 
   GroupDTO getGroup(String userHash, StateToken token);

Modified: trunk/src/main/java/cc/kune/core/client/rpcservices/GroupServiceAsync.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/rpcservices/GroupServiceAsync.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/rpcservices/GroupServiceAsync.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -39,7 +39,7 @@
   void clearGroupBackImage(String userHash, StateToken token, AsyncCallback<GroupDTO> asyncCallback);
 
   void createNewGroup(String userHash, GroupDTO group, String publicDesc, String tags,
-      String[] enabledTools, AsyncCallback<StateToken> callback);
+      String[] enabledTools, AsyncCallback<StateAbstractDTO> callback);
 
   void getGroup(String userHash, StateToken token, AsyncCallback<GroupDTO> asyncCallback);
 

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -49,7 +49,7 @@
   public AboutKuneDialog(final I18nTranslationService i18n) {
     dialog = new BasicTopDialog.Builder(ABOUT_KUNE_ID, true, true).title(i18n.t("About Kune")).autoscroll(
         false).firstButtonTitle(i18n.t("Ok")).firstButtonId(ABOUT_KUNE_BTN_ID).tabIndexStart(1).height(
-        "300px").width("400px").build();
+        "300px").width("410px").build();
     dialog.getInnerPanel().add(BINDER.createAndBindUi(this));
     dialog.getFirstBtn().addClickHandler(new ClickHandler() {
       @Override

Modified: trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -81,6 +81,11 @@
         signOut();
       }
     });
+    check(new AsyncCallbackSimple<Void>() {
+      @Override
+      public void onSuccess(final Void result) {
+      }
+    });
   }
 
   @Override

Modified: trunk/src/main/java/cc/kune/core/server/rpc/GroupRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/GroupRPC.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/core/server/rpc/GroupRPC.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -99,7 +99,7 @@
   @Override
   @Authenticated
   @Transactional(rollbackOn = DefaultException.class)
-  public StateToken createNewGroup(final String userHash, final GroupDTO groupDTO,
+  public StateAbstractDTO createNewGroup(final String userHash, final GroupDTO groupDTO,
       final String publicDesc, final String tags, final String[] enabledTools) throws DefaultException {
     final User user = getUserLogged();
     reserverdWords.check(groupDTO.getShortName(), groupDTO.getLongName());
@@ -108,7 +108,7 @@
     // This is necessary?
     contentManager.save(newGroup.getDefaultContent());
     // contentManager.setTags(user, defContentId, tags);
-    return newGroup.getDefaultContent().getStateToken();
+    return contentRPC.getContent(userHash, newGroup.getDefaultContent().getStateToken());
   };
 
   @Override

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -24,10 +24,10 @@
 import cc.kune.core.client.sitebar.search.SitebarSearchPresenter;
 import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;
 import cc.kune.gspace.client.actions.RenameAction;
-import cc.kune.gspace.client.i18n.I18nNewTranslatorPanel;
-import cc.kune.gspace.client.i18n.I18nNewTranslatorPresenter;
-import cc.kune.gspace.client.i18n.I18nNewTranslatorPresenter.I18nNewTranslatorView;
 import cc.kune.gspace.client.i18n.I18nTranslator;
+import cc.kune.gspace.client.i18n.I18nTranslatorPanel;
+import cc.kune.gspace.client.i18n.I18nTranslatorPresenter;
+import cc.kune.gspace.client.i18n.I18nTranslatorPresenter.I18nTranslatorView;
 import cc.kune.gspace.client.i18n.SiteOptionsI18nTranslatorAction;
 import cc.kune.gspace.client.i18n.TranslatorTabsCollection;
 import cc.kune.gspace.client.licensewizard.LicenseChangeAction;
@@ -47,12 +47,12 @@
 import cc.kune.gspace.client.options.GroupOptionsCollection;
 import cc.kune.gspace.client.options.GroupOptionsPanel;
 import cc.kune.gspace.client.options.GroupOptionsPresenter;
-import cc.kune.gspace.client.options.GroupOptionsView;
+import cc.kune.gspace.client.options.GroupOptionsPresenter.GroupOptionsView;
 import cc.kune.gspace.client.options.UserOptions;
 import cc.kune.gspace.client.options.UserOptionsCollection;
 import cc.kune.gspace.client.options.UserOptionsPanel;
 import cc.kune.gspace.client.options.UserOptionsPresenter;
-import cc.kune.gspace.client.options.UserOptionsView;
+import cc.kune.gspace.client.options.UserOptionsPresenter.UserOptionsView;
 import cc.kune.gspace.client.options.general.GroupOptGeneral;
 import cc.kune.gspace.client.options.general.GroupOptGeneralPanel;
 import cc.kune.gspace.client.options.general.GroupOptGeneralPresenter;
@@ -143,10 +143,13 @@
 
     s(NoHomePageViewer.class);
 
+    bindPresenter(GroupOptionsPresenter.class, GroupOptionsView.class, GroupOptionsPanel.class,
+        GroupOptionsPresenter.GroupOptionsProxy.class);
     s(GroupOptions.class, GroupOptionsPresenter.class);
-    s(GroupOptionsView.class, GroupOptionsPanel.class);
+
+    bindPresenter(UserOptionsPresenter.class, UserOptionsView.class, UserOptionsPanel.class,
+        UserOptionsPresenter.UserOptionsProxy.class);
     s(UserOptions.class, UserOptionsPresenter.class);
-    s(UserOptionsView.class, UserOptionsPanel.class);
 
     s(UserOptionsCollection.class);
     s(GroupOptionsCollection.class);
@@ -193,8 +196,9 @@
     s(LicenseChangeAction.class);
 
     // I18nTranslator
-    s(I18nNewTranslatorView.class, I18nNewTranslatorPanel.class);
-    s(I18nTranslator.class, I18nNewTranslatorPresenter.class);
+    bindPresenter(I18nTranslatorPresenter.class, I18nTranslatorView.class, I18nTranslatorPanel.class,
+        I18nTranslatorPresenter.I18nTranslatorProxy.class);
+    s(I18nTranslator.class, I18nTranslatorPresenter.class);
     s(SiteOptionsI18nTranslatorAction.class);
   }
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceGinjector.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceGinjector.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -20,7 +20,10 @@
 package cc.kune.gspace.client;
 
 import cc.kune.core.client.sitebar.search.SitebarSearchPresenter;
+import cc.kune.gspace.client.i18n.I18nTranslatorPresenter;
 import cc.kune.gspace.client.licensewizard.LicenseWizardPresenter;
+import cc.kune.gspace.client.options.GroupOptionsPresenter;
+import cc.kune.gspace.client.options.UserOptionsPresenter;
 import cc.kune.gspace.client.tags.TagsSummaryPresenter;
 import cc.kune.gspace.client.tool.ContentViewerSelector;
 import cc.kune.gspace.client.tool.selector.ToolSelectorPresenter;
@@ -41,8 +44,12 @@
 
   AsyncProvider<FolderViewerPresenter> getFolderViewerPresenter();
 
+  AsyncProvider<GroupOptionsPresenter> getGroupOptionsPresenter();
+
   GSpaceParts getGSpaceParts();
 
+  AsyncProvider<I18nTranslatorPresenter> getI18nTranslatorPresenter();
+
   AsyncProvider<LicenseWizardPresenter> getLicenseWizardPresenter();
 
   AsyncProvider<SitebarSearchPresenter> getSitebarSearchPresenter();
@@ -50,4 +57,6 @@
   AsyncProvider<TagsSummaryPresenter> getTagsSummaryPresenter();
 
   AsyncProvider<ToolSelectorPresenter> getToolSelectorPresenter();
+
+  AsyncProvider<UserOptionsPresenter> getUserOptionsPresenter();
 }

Deleted: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -1,71 +0,0 @@
-package cc.kune.gspace.client.i18n;
-
-import cc.kune.common.client.notify.NotifyLevelImages;
-import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
-import cc.kune.common.client.utils.SimpleCallback;
-import cc.kune.core.client.resources.CoreResources;
-import cc.kune.core.shared.dto.I18nLanguageSimpleDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.i18n.I18nNewTranslatorPresenter.I18nNewTranslatorView;
-
-import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
-import com.google.inject.Inject;
-
-public class I18nNewTranslatorPanel extends AbstractTabbedDialogPanel implements I18nNewTranslatorView {
-
-  private static final int HEIGHT = 280;
-  private static final String TRANSLATOR_ERROR_ID = "i18n-trans-panel-error";
-  private static final String TRANSLATOR_PANEL_ID = "i18n-trans-panel";
-  private static final int WIDTH = 570;
-  private final LanguageSelectorPanel lanSelectorPanel;
-  private final I18nToTranslateGridPanel toTranslateGrid;
-  private final I18nTranslatedGridPanel translatedGrid;
-  private final I18nTranslateRecomendPanel transRecommend;
-
-  @Inject
-  public I18nNewTranslatorPanel(final I18nTranslationService i18n, final NotifyLevelImages images,
-      final TranslatorTabsCollection transGroup, final LanguageSelectorPanel lanSelectorPanel,
-      final I18nToTranslateGridPanel toTranslateGrid, final I18nTranslatedGridPanel translatedGrid,
-      final I18nTranslateRecomendPanel transRecommend, final CoreResources res) {
-    super(TRANSLATOR_PANEL_ID, "", WIDTH, HEIGHT, false, false, images, TRANSLATOR_ERROR_ID,
-        i18n.t("Close"), null, null, null, transGroup);
-    setIcon(res.language());
-    this.lanSelectorPanel = lanSelectorPanel;
-    lanSelectorPanel.addChangeListener(new SimpleCallback() {
-      @Override
-      public void onCallback() {
-        setLanguage(lanSelectorPanel.getLanguage());
-      }
-    });
-    this.toTranslateGrid = toTranslateGrid;
-    this.translatedGrid = translatedGrid;
-    this.transRecommend = transRecommend;
-    transRecommend.setSize(WIDTH, HEIGHT);
-    super.setIconCls("k-options-icon");
-    super.setTitle(i18n.t("Help to translate kune"));
-    super.getInnerPanel().insert(lanSelectorPanel, 0);
-    lanSelectorPanel.setLangTitle(i18n.t("to"));
-    lanSelectorPanel.setLabelAlign(LabelAlign.RIGHT);
-    lanSelectorPanel.setLangSeparator(":");
-  }
-
-  @Override
-  public void init() {
-    addTab(toTranslateGrid, toTranslateGrid.getTabTitle());
-    addTab(translatedGrid, translatedGrid.getTabTitle());
-    addTab(transRecommend, transRecommend.getTabTitle());
-  }
-
-  @Override
-  public void setLanguage(final I18nLanguageSimpleDTO language) {
-    lanSelectorPanel.setLanguage(language);
-    toTranslateGrid.setLanguage(language);
-    translatedGrid.setLanguage(language);
-  }
-
-  @Override
-  public void show() {
-    super.show();
-  }
-
-}

Deleted: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -1,96 +0,0 @@
-package cc.kune.gspace.client.i18n;
-
-import cc.kune.common.client.notify.NotifyUser;
-import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialog;
-import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.I18nServiceAsync;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.shared.dto.I18nLanguageDTO;
-import cc.kune.core.shared.dto.I18nLanguageSimpleDTO;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.ui.IsWidget;
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-
-public class I18nNewTranslatorPresenter extends AbstractTabbedDialogPresenter implements
-    AbstractTabbedDialog, I18nTranslator {
-
-  public interface I18nNewTranslatorView extends AbstractTabbedDialogView {
-
-    @Override
-    void hide();
-
-    void init();
-
-    void setLanguage(I18nLanguageSimpleDTO currentLanguage);
-
-    @Override
-    void show();
-  }
-  private final I18nUITranslationService i18n;
-  private final Provider<I18nServiceAsync> i18nService;
-  private final Session session;
-  private I18nNewTranslatorView view;
-
-  @Inject
-  public I18nNewTranslatorPresenter(final Session session, final I18nUITranslationService i18n,
-      final I18nNewTranslatorView view, final Provider<I18nServiceAsync> i18nService) {
-    this.session = session;
-    this.i18n = i18n;
-    this.i18nService = i18nService;
-    init(view);
-  }
-
-  public void doClose() {
-    view.hide();
-  }
-
-  public void doTranslation(final String id, final String trKey, final String translation) {
-    NotifyUser.showProgress(i18n.t("Saving"));
-    i18nService.get().setTranslation(session.getUserHash(), id, translation,
-        new AsyncCallback<String>() {
-          @Override
-          public void onFailure(final Throwable caught) {
-            NotifyUser.hideProgress();
-            NotifyUser.error(i18n.t("Server error saving the translation"));
-          }
-
-          @Override
-          public void onSuccess(final String result) {
-            NotifyUser.hideProgress();
-            i18n.setTranslationAfterSave(trKey, result);
-          }
-        });
-  }
-
-  @Override
-  public IsWidget getView() {
-    return view;
-  }
-
-  @Override
-  public void hide() {
-    view.hide();
-  }
-
-  public void init(final I18nNewTranslatorView view) {
-    super.init(view);
-    this.view = view;
-    view.init();
-  }
-
-  @Override
-  public void show() {
-    NotifyUser.showProgressLoading();
-    if (session.isLogged()) {
-      final I18nLanguageDTO userLang = session.getCurrentLanguage();
-      view.setLanguage(new I18nLanguageSimpleDTO(userLang.getCode(), userLang.getEnglishName()));
-      view.show();
-    } else {
-      NotifyUser.info(i18n.t("Sign in or register to help with the translation"));
-    }
-    NotifyUser.hideProgress();
-  }
-}

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml	2011-09-07 13:44:13 UTC (rev 1512)
@@ -50,17 +50,25 @@
       width: 180px;
       height: 95px;
       border: 1px dashed #BBBBBB;
+    }
+
+    div.toTranslate {
       -moz-border-radius: 3px;
       -webkit-border-radius: 3px;
       border-radius: 3px;
       padding: 3px;
     }
+
+    .toTranlateLabel {
+      height: 95px !important;
+      overflow-y: scroll;
+    }
   </ui:style>
   <g:FlowPanel addStyleNames="{style.table}">
     <g:FlowPanel addStyleNames="{style.row}">
       <g:Label ui:field="toTranslateTitle" addStyleNames="{style.titles} {style.cell}"/>
       <g:FlowPanel addStyleNames="{style.cell}" styleName="{style.toTranslate}">
-        <g:Label ui:field="toTranslate"/>
+        <g:Label ui:field="toTranslate" styleName="{style.toTranlateLabel}"/>
       </g:FlowPanel>
       <g:Label addStyleNames="{style.row}"/>
     </g:FlowPanel>

Copied: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java (from rev 1510, trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -0,0 +1,71 @@
+package cc.kune.gspace.client.i18n;
+
+import cc.kune.common.client.notify.NotifyLevelImages;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import cc.kune.common.client.utils.SimpleCallback;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.dto.I18nLanguageSimpleDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.i18n.I18nTranslatorPresenter.I18nTranslatorView;
+
+import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
+import com.google.inject.Inject;
+
+public class I18nTranslatorPanel extends AbstractTabbedDialogPanel implements I18nTranslatorView {
+
+  private static final int HEIGHT = 280;
+  private static final String TRANSLATOR_ERROR_ID = "i18n-trans-panel-error";
+  private static final String TRANSLATOR_PANEL_ID = "i18n-trans-panel";
+  private static final int WIDTH = 570;
+  private final LanguageSelectorPanel lanSelectorPanel;
+  private final I18nToTranslateGridPanel toTranslateGrid;
+  private final I18nTranslatedGridPanel translatedGrid;
+  private final I18nTranslateRecomendPanel transRecommend;
+
+  @Inject
+  public I18nTranslatorPanel(final I18nTranslationService i18n, final NotifyLevelImages images,
+      final TranslatorTabsCollection transGroup, final LanguageSelectorPanel lanSelectorPanel,
+      final I18nToTranslateGridPanel toTranslateGrid, final I18nTranslatedGridPanel translatedGrid,
+      final I18nTranslateRecomendPanel transRecommend, final CoreResources res) {
+    super(TRANSLATOR_PANEL_ID, "", false, false, images, TRANSLATOR_ERROR_ID, i18n.t("Close"), null,
+        null, null, transGroup);
+    setIcon(res.language());
+    this.lanSelectorPanel = lanSelectorPanel;
+    lanSelectorPanel.addChangeListener(new SimpleCallback() {
+      @Override
+      public void onCallback() {
+        setLanguage(lanSelectorPanel.getLanguage());
+      }
+    });
+    this.toTranslateGrid = toTranslateGrid;
+    this.translatedGrid = translatedGrid;
+    this.transRecommend = transRecommend;
+    transRecommend.setSize(WIDTH, HEIGHT);
+    super.setIconCls("k-options-icon");
+    super.setTitle(i18n.t("Help to translate kune"));
+    super.getInnerPanel().insert(lanSelectorPanel, 0);
+    lanSelectorPanel.setLangTitle(i18n.t("to"));
+    lanSelectorPanel.setLabelAlign(LabelAlign.RIGHT);
+    lanSelectorPanel.setLangSeparator(":");
+  }
+
+  @Override
+  public void init() {
+    addTab(toTranslateGrid, toTranslateGrid.getTabTitle());
+    addTab(translatedGrid, translatedGrid.getTabTitle());
+    addTab(transRecommend, transRecommend.getTabTitle());
+  }
+
+  @Override
+  public void setLanguage(final I18nLanguageSimpleDTO language) {
+    lanSelectorPanel.setLanguage(language);
+    toTranslateGrid.setLanguage(language);
+    translatedGrid.setLanguage(language);
+  }
+
+  @Override
+  public void show() {
+    super.show();
+  }
+
+}

Copied: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPresenter.java (from rev 1509, trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPresenter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPresenter.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -0,0 +1,104 @@
+package cc.kune.gspace.client.i18n;
+
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialog;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter.AbstractTabbedDialogView;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.I18nServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.I18nLanguageDTO;
+import cc.kune.core.shared.dto.I18nLanguageSimpleDTO;
+import cc.kune.gspace.client.i18n.I18nTranslatorPresenter.I18nTranslatorView;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+
+public class I18nTranslatorPresenter extends
+    AbstractTabbedDialogPresenter<I18nTranslatorView, I18nTranslatorPresenter.I18nTranslatorProxy>
+    implements AbstractTabbedDialog, I18nTranslator {
+
+  @ProxyCodeSplit
+  public interface I18nTranslatorProxy extends Proxy<I18nTranslatorPresenter> {
+  }
+
+  public interface I18nTranslatorView extends AbstractTabbedDialogView {
+    void hide();
+
+    void init();
+
+    void setLanguage(I18nLanguageSimpleDTO currentLanguage);
+
+    void show();
+
+  }
+
+  private final I18nUITranslationService i18n;
+  private final Provider<I18nServiceAsync> i18nService;
+  private final Session session;
+
+  @Inject
+  public I18nTranslatorPresenter(final EventBus eventBus, final I18nTranslatorProxy proxy,
+      final Session session, final I18nUITranslationService i18n, final I18nTranslatorView view,
+      final Provider<I18nServiceAsync> i18nService) {
+    super(eventBus, view, proxy);
+    this.session = session;
+    this.i18n = i18n;
+    this.i18nService = i18nService;
+  }
+
+  public void doClose() {
+    getView().hide();
+  }
+
+  public void doTranslation(final String id, final String trKey, final String translation) {
+    NotifyUser.showProgress(i18n.t("Saving"));
+    i18nService.get().setTranslation(session.getUserHash(), id, translation,
+        new AsyncCallback<String>() {
+          @Override
+          public void onFailure(final Throwable caught) {
+            NotifyUser.hideProgress();
+            NotifyUser.error(i18n.t("Server error saving the translation"));
+          }
+
+          @Override
+          public void onSuccess(final String result) {
+            NotifyUser.hideProgress();
+            i18n.setTranslationAfterSave(trKey, result);
+          }
+        });
+  }
+
+  @Override
+  public I18nTranslatorView getView() {
+    return (I18nTranslatorView) super.getView();
+  }
+
+  @Override
+  public void hide() {
+    getView().hide();
+  }
+
+  @Override
+  protected void onBind() {
+    super.onBind();
+    getView().init();
+  }
+
+  @Override
+  public void show() {
+    NotifyUser.showProgressLoading();
+    if (session.isLogged()) {
+      final I18nLanguageDTO userLang = session.getCurrentLanguage();
+      getView().setLanguage(new I18nLanguageSimpleDTO(userLang.getCode(), userLang.getEnglishName()));
+      getView().show();
+    } else {
+      NotifyUser.info(i18n.t("Sign in or register to help with the translation"));
+    }
+    NotifyUser.hideProgress();
+  }
+}

Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -34,29 +34,24 @@
 @Singleton
 public class SiteOptionsI18nTranslatorAction extends AbstractExtendedAction {
   private I18nTranslator translator;
-  private final Provider<I18nNewTranslatorPanel> translatorPanel;
-  private final Provider<I18nNewTranslatorPresenter> translatorPresenter;
+  private final Provider<I18nTranslator> translatorProv;
 
   @Inject
   public SiteOptionsI18nTranslatorAction(final I18nTranslationService i18n, final CoreResources img,
-      final Provider<I18nNewTranslatorPresenter> translatorPresenter,
-      final Provider<I18nNewTranslatorPanel> translatorPanel, final SitebarActionsPresenter siteOptions) {
+      final Provider<I18nTranslator> translatorProv, final SitebarActionsPresenter siteOptions) {
     super();
-    this.translatorPresenter = translatorPresenter;
-    this.translatorPanel = translatorPanel;
+    this.translatorProv = translatorProv;
     putValue(Action.NAME, i18n.t("Help with the translation"));
     putValue(Action.SMALL_ICON, img.language());
     MenuItemDescriptor.build(siteOptions.getOptionsMenu(), this);
-    // item.setPosition(1);
   }
 
   @Override
   public void actionPerformed(final ActionEvent event) {
     if (translator == null) {
-      final I18nNewTranslatorPresenter presenter = translatorPresenter.get();
-      presenter.init(translatorPanel.get());
-      translator = presenter;
+      translator = translatorProv.get();
     }
     translator.show();
+    // item.setPosition(1);
   }
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/licensewizard/LicenseWizardPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/licensewizard/LicenseWizardPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/licensewizard/LicenseWizardPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -40,7 +40,7 @@
   @Inject
   public LicenseWizardPanel(final MaskWidget maskWidget, final I18nTranslationService i18n,
       final CoreResources res) {
-    super(LIC_WIZ_DIALOG, i18n.t("License wizard"), false, false, WIDTH, null, BACK_BTN_ID, NEXT_BTN_ID,
+    super(LIC_WIZ_DIALOG, i18n.t("License wizard"), true, false, WIDTH, null, BACK_BTN_ID, NEXT_BTN_ID,
         FINISH_BTN_ID, CANCEL_BTN_ID, CLOSE_BTN_ID, i18n, maskWidget);
     super.setFinishText(i18n.t("Select"));
     super.setIcon(res.copyleft());

Modified: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -25,6 +25,7 @@
 import cc.kune.core.client.resources.CoreMessages;
 import cc.kune.core.client.ws.entheader.EntityHeader;
 import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.GroupOptionsPresenter.GroupOptionsView;
 
 import com.google.inject.Inject;
 
@@ -37,8 +38,8 @@
   @Inject
   public GroupOptionsPanel(final EntityHeader entityHeader, final I18nTranslationService i18n,
       final NotifyLevelImages images, final GroupOptionsCollection entityOptionsGroup) {
-    super(GROUP_OP_PANEL_ID, "", WIDTH, HEIGHT + 80, false, false, images, GROUP_OPTIONS_ERROR_ID,
-        i18n.t("Close"), null, null, null, entityOptionsGroup);
+    super(GROUP_OP_PANEL_ID, "", false, false, images, GROUP_OPTIONS_ERROR_ID, i18n.t("Close"), null,
+        null, null, entityOptionsGroup);
     this.entityHeader = entityHeader;
     super.setIconCls("k-options-icon");
     super.setTitle(i18n.t(CoreMessages.GROUP_OPTIONS_DIALOG_TITLE));

Modified: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -23,6 +23,7 @@
 import cc.kune.common.client.actions.Action;
 import cc.kune.common.client.actions.ActionEvent;
 import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
 import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
 import cc.kune.core.client.resources.CoreResources;
 import cc.kune.core.client.state.Session;
@@ -33,26 +34,41 @@
 import cc.kune.core.client.state.UserSignOutEvent.UserSignOutHandler;
 import cc.kune.core.shared.dto.StateAbstractDTO;
 import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.GroupOptionsPresenter.GroupOptionsView;
 
+import com.google.gwt.event.shared.EventBus;
 import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Proxy;
 
-public class GroupOptionsPresenter extends AbstractTabbedDialogPresenter implements GroupOptions {
+public class GroupOptionsPresenter extends
+    AbstractTabbedDialogPresenter<GroupOptionsView, GroupOptionsPresenter.GroupOptionsProxy> implements
+    GroupOptions {
+
+  @ProxyCodeSplit
+  public interface GroupOptionsProxy extends Proxy<GroupOptionsPresenter> {
+  }
+
+  public interface GroupOptionsView extends EntityOptionsView {
+    void addAction(GuiActionDescrip descriptor);
+  }
+
   public static final String GROUP_OPTIONS_ICON = "k-eop-icon";
   private final I18nTranslationService i18n;
   private final CoreResources img;
   private ButtonDescriptor prefsItem;
   private final Session session;
   private final StateManager stateManager;
-  private GroupOptionsView view;
 
   @Inject
-  public GroupOptionsPresenter(final StateManager stateManager, final Session session,
-      final I18nTranslationService i18n, final CoreResources img, final GroupOptionsView view) {
+  public GroupOptionsPresenter(final EventBus eventBus, final GroupOptionsProxy proxy,
+      final StateManager stateManager, final Session session, final I18nTranslationService i18n,
+      final CoreResources img, final GroupOptionsView view) {
+    super(eventBus, view, proxy);
     this.stateManager = stateManager;
     this.session = session;
     this.i18n = i18n;
     this.img = img;
-    init(view);
   }
 
   private void createActions() {
@@ -72,12 +88,17 @@
     prefsItem.setId(GROUP_OPTIONS_ICON);
     prefsItem.withToolTip(i18n.t("Set your group preferences here"));
     prefsItem.setVisible(false);
-    view.addAction(prefsItem);
+    getView().addAction(prefsItem);
   }
 
-  private void init(final GroupOptionsView view) {
-    super.init(view);
-    this.view = view;
+  @Override
+  public GroupOptionsView getView() {
+    return (GroupOptionsView) super.getView();
+  }
+
+  @Override
+  protected void onBind() {
+    super.onBind();
     createActions();
     stateManager.onStateChanged(true, new StateChangedHandler() {
       @Override
@@ -86,7 +107,7 @@
         if (!state.getGroup().isPersonal() && state.getGroupRights().isAdministrable()) {
           prefsItem.setVisible(true);
         } else {
-          view.hide();
+          getView().hide();
           prefsItem.setVisible(false);
         }
       }
@@ -94,7 +115,7 @@
     session.onUserSignOut(false, new UserSignOutHandler() {
       @Override
       public void onUserSignOut(final UserSignOutEvent event) {
-        view.hide();
+        getView().hide();
       }
     });
   }

Deleted: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 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 cc.kune.gspace.client.options;
-
-import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
-
-public interface GroupOptionsView extends EntityOptionsView {
-
-    void addAction(GuiActionDescrip descriptor);
-
-}

Modified: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -24,8 +24,8 @@
 import cc.kune.core.client.resources.CoreMessages;
 import cc.kune.core.client.ws.entheader.EntityHeader;
 import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.UserOptionsPresenter.UserOptionsView;
 
-import com.google.gwt.event.shared.HandlerRegistration;
 import com.google.inject.Inject;
 
 public class UserOptionsPanel extends AbstractTabbedDialogPanel implements UserOptionsView {
@@ -33,15 +33,11 @@
   public static final String USER_OP_PANEL_ID = "k-uop-diagpan";
   public static final String USER_OPTIONS_ERROR_ID = "k-uop-err-mess";
 
-  private HandlerRegistration addClickHandler;
-  private final UserOptionsCollection userPreferencesGroup;
-
   @Inject
   public UserOptionsPanel(final EntityHeader entityHeader, final I18nTranslationService i18n,
       final NotifyLevelImages images, final UserOptionsCollection userOptionsGroup) {
-    super(USER_OP_PANEL_ID, "", WIDTH, HEIGHT + 80, false, images, USER_OPTIONS_ERROR_ID,
-        i18n.t("Close"), null, null, null, userOptionsGroup);
-    this.userPreferencesGroup = userOptionsGroup;
+    super(USER_OP_PANEL_ID, "", false, images, USER_OPTIONS_ERROR_ID, i18n.t("Close"), null, null, null,
+        userOptionsGroup);
     super.setIconCls("k-options-icon");
     super.setTitle(i18n.t(CoreMessages.USER_OPTIONS_DIALOG_TITLE));
   }

Modified: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -33,11 +33,24 @@
 import cc.kune.core.client.state.UserSignOutEvent;
 import cc.kune.core.client.state.UserSignOutEvent.UserSignOutHandler;
 import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.UserOptionsPresenter.UserOptionsView;
 
+import com.google.gwt.event.shared.EventBus;
 import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Proxy;
 
-public class UserOptionsPresenter extends AbstractTabbedDialogPresenter implements UserOptions {
+public class UserOptionsPresenter extends
+    AbstractTabbedDialogPresenter<UserOptionsView, UserOptionsPresenter.UserOptionsProxy> implements
+    UserOptions {
 
+  @ProxyCodeSplit
+  public interface UserOptionsProxy extends Proxy<UserOptionsPresenter> {
+  }
+
+  public interface UserOptionsView extends EntityOptionsView {
+  }
+
   private final I18nTranslationService i18n;
   private final CoreResources res;
   private final Session session;
@@ -45,9 +58,10 @@
   private final SiteUserOptions userOptions;
 
   @Inject
-  public UserOptionsPresenter(final Session session, final StateManager stateManager,
-      final I18nTranslationService i18n, final CoreResources res, final SiteUserOptions userOptions,
-      final UserOptionsView view) {
+  public UserOptionsPresenter(final EventBus eventBus, final UserOptionsProxy proxy,
+      final Session session, final StateManager stateManager, final I18nTranslationService i18n,
+      final CoreResources res, final SiteUserOptions userOptions, final UserOptionsView view) {
+    super(eventBus, view, proxy);
     this.session = session;
     this.stateManager = stateManager;
     this.i18n = i18n;
@@ -56,14 +70,18 @@
     session.onUserSignIn(false, new UserSignInHandler() {
       @Override
       public void onUserSignIn(final UserSignInEvent event) {
-        view.hide();
+        getView().hide();
       }
     });
-    init(view);
   }
 
-  private void init(final UserOptionsView view) {
-    super.init(view);
+  @Override
+  public UserOptionsView getView() {
+    return (UserOptionsView) super.getView();
+  }
+
+  @Override
+  protected void onBind() {
     final AbstractExtendedAction userPrefsAction = new AbstractExtendedAction() {
 
       @Override
@@ -77,7 +95,7 @@
     session.onUserSignOut(false, new UserSignOutHandler() {
       @Override
       public void onUserSignOut(final UserSignOutEvent event) {
-        view.hide();
+        getView().hide();
       }
     });
     userPrefsAction.putValue(Action.NAME, i18n.t("Your preferences"));

Deleted: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java	2011-09-07 08:45:51 UTC (rev 1511)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java	2011-09-07 13:44:13 UTC (rev 1512)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 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 cc.kune.gspace.client.options;
-
-public interface UserOptionsView extends EntityOptionsView {
-
-}




More information about the kune-commits mailing list