[kune-commits] r1258 - in trunk/src/main/java/cc/kune: chat/client chat/client/resources chat/client/snd chat/public common/client/actions/gwtui common/client/actions/gxtui common/client/actions/ui common/client/actions/ui/descrip common/public/gxt-custom/css core/client/logs core/client/resources/icons core/client/sitebar core/public pspace/client

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Mon Feb 21 21:51:42 CET 2011


Author: vjrj_
Date: 2011-02-21 21:51:42 +0100 (Mon, 21 Feb 2011)
New Revision: 1258

Added:
   trunk/src/main/java/cc/kune/chat/client/resources/chat-icons.css
   trunk/src/main/java/cc/kune/chat/client/resources/e-icon-a.gif
   trunk/src/main/java/cc/kune/chat/client/resources/e-icon.gif
   trunk/src/main/java/cc/kune/chat/client/snd/
   trunk/src/main/java/cc/kune/chat/client/snd/ClickEvent.java
   trunk/src/main/java/cc/kune/chat/client/snd/KuneSoundManager.java
   trunk/src/main/java/cc/kune/core/client/resources/icons/IconCssResource.java
Removed:
   trunk/src/main/java/cc/kune/core/client/resources/icons/IconBorrarCssResource.java
   trunk/src/main/java/cc/kune/core/client/resources/icons/e-icon-a.gif
   trunk/src/main/java/cc/kune/core/client/resources/icons/e-icon.gif
Modified:
   trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
   trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java
   trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java
   trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java
   trunk/src/main/java/cc/kune/chat/public/kune-chat.css
   trunk/src/main/java/cc/kune/chat/public/kune-hablar.css
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtButtonGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuCheckItemGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuItemGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtPushButtonGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java
   trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java
   trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
   trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
   trunk/src/main/java/cc/kune/common/public/gxt-custom/css/gxt-op-common.css
   trunk/src/main/java/cc/kune/core/client/logs/Log.java
   trunk/src/main/java/cc/kune/core/client/resources/icons/IconResources.java
   trunk/src/main/java/cc/kune/core/client/resources/icons/kicon.css
   trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
   trunk/src/main/java/cc/kune/core/public/ws.css
   trunk/src/main/java/cc/kune/core/public/ws.html
   trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
Log:
Actions improved, hablar integration

Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -23,6 +23,8 @@
 
 import cc.kune.chat.client.ShowChatDialogEvent.ShowChatDialogHandler;
 import cc.kune.chat.client.ToggleShowChatDialogEvent.ToggleShowChatDialogHandler;
+import cc.kune.chat.client.resources.ChatResources;
+import cc.kune.chat.client.snd.KuneSoundManager;
 import cc.kune.common.client.actions.AbstractExtendedAction;
 import cc.kune.common.client.actions.Action;
 import cc.kune.common.client.actions.ActionEvent;
@@ -34,13 +36,11 @@
 import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
 import cc.kune.common.client.noti.NotifyUser;
 import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
-import cc.kune.common.client.ui.PopupTopPanel;
 import cc.kune.common.client.utils.TextUtils;
 import cc.kune.common.client.utils.WindowUtils;
 import cc.kune.core.client.init.AppStartEvent;
 import cc.kune.core.client.init.AppStopEvent;
 import cc.kune.core.client.logs.Log;
-import cc.kune.core.client.resources.icons.IconResources;
 import cc.kune.core.client.sitebar.SitebarActionsPresenter;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.UserSignInEvent;
@@ -50,7 +50,6 @@
 import cc.kune.core.shared.dto.UserInfoDTO;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 
-import com.calclab.emite.browser.client.PageAssist;
 import com.calclab.emite.core.client.xmpp.session.XmppSession;
 import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
 import com.calclab.emite.im.client.chat.ChatManager;
@@ -64,30 +63,32 @@
 import com.calclab.hablar.console.client.HablarConsole;
 import com.calclab.hablar.core.client.Hablar;
 import com.calclab.hablar.core.client.HablarWidget;
+import com.calclab.hablar.core.client.ui.icon.Icons;
 import com.calclab.hablar.html.client.HtmlConfig;
-import com.calclab.hablar.icons.alt.client.AltIcons;
-import com.calclab.hablar.icons.def.client.DefaultIcons;
-import com.calclab.hablar.icons.ie6gif.client.IE6GifIcons;
+import com.calclab.hablar.icons.alt.client.AltIconsBundle;
 import com.calclab.hablar.login.client.HablarLogin;
 import com.calclab.hablar.login.client.LoginConfig;
 import com.calclab.suco.client.Suco;
+import com.extjs.gxt.ui.client.Style.Scroll;
+import com.extjs.gxt.ui.client.widget.Dialog;
+import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Inject;
 
 public class ChatClientDefault implements ChatClient {
 
-    public static class ChatClientAction extends AbstractExtendedAction {
+    public class ChatClientAction extends AbstractExtendedAction {
 
         private final EventBus eventBus;
-        private final IconResources res;
+        private final ChatResources res;
 
-        @Inject
-        public ChatClientAction(final EventBus eventBus, final IconResources res) {
+        public ChatClientAction(final EventBus eventBus, final ChatResources res) {
             super();
             this.eventBus = eventBus;
             this.res = res;
-            res.css().ensureInjected();
             putValue(Action.SMALL_ICON, res.chat());
 
         }
@@ -98,42 +99,48 @@
         }
 
         public void setBlink(final boolean blink) {
-            putValue(Action.SMALL_ICON, blink ? res.chatBlink() : res.chat());
+            final ImageResource icon = blink ? res.chatBlink() : res.chat();
+            putValue(Action.SMALL_ICON, icon);
+            dialog.setIcon(AbstractImagePrototype.create(icon));
         }
 
     }
 
     protected static final String CHAT_CLIENT_ICON_ID = "k-chat-icon-id";
 
+    private static final String CHAT_TITLE = "Chat ;)";
+
     private final ChatClientAction action;
     protected IconLabelDescriptor chatIcon;
     private final ChatManager chatManager;
     private final ChatOptions chatOptions;
+    private final ChatResources chatResources;
+    private Dialog dialog;
+    private final EventBus eventBus;
     private final I18nTranslationService i18n;
-    private PopupTopPanel popup;
     private final RoomManager roomManager;
     private final XmppRoster roster;
     private final Session session;
     private final GlobalShortcutRegister shorcutRegister;
     private final SitebarActionsPresenter siteActions;
+
     private final XmppSession xmppSession;
 
     @Inject
-    public ChatClientDefault(final EventBus eventBus, final I18nTranslationService i18n, final ChatClientAction action,
+    public ChatClientDefault(final EventBus eventBus, final I18nTranslationService i18n,
             final SitebarActionsPresenter siteActions, final Session session,
-            final GlobalShortcutRegister shorcutRegister, final ChatOptions chatOptions) {
+            final GlobalShortcutRegister shorcutRegister, final ChatOptions chatOptions,
+            final ChatResources chatResources) {
 
-        // , final XmppSession xmppSession,
-        // final XmppRoster roster, final ChatManager chatManager, final
-        // RoomManager roomManager,
-        // final SessionReconnect sessionReconnect, final
-        // Provider<AvatarManager> avatarManager) {
+        this.eventBus = eventBus;
         this.i18n = i18n;
-        this.action = action;
+        action = new ChatClientAction(eventBus, chatResources);
         this.siteActions = siteActions;
         this.session = session;
         this.shorcutRegister = shorcutRegister;
         this.chatOptions = chatOptions;
+        this.chatResources = chatResources;
+        chatResources.css().ensureInjected();
         this.xmppSession = Suco.get(XmppSession.class);
         this.roster = Suco.get(XmppRoster.class);
         this.chatManager = Suco.get(ChatManager.class);
@@ -146,14 +153,6 @@
                 chatOptions.httpBase = event.getInitData().getChatHttpBase();
                 chatOptions.roomHost = event.getInitData().getChatRoomHost();
                 checkChatDomain(chatOptions.domain);
-                // if (session.isLogged()) {
-                // session.check(new AsyncCallbackSimple<Void>() {
-                // @Override
-                // public void onSuccess(final Void result) {
-                // doLogin();
-                // }
-                // });
-                // }
                 session.onUserSignIn(true, new UserSignInHandler() {
                     @Override
                     public void onUserSignIn(final UserSignInEvent event) {
@@ -221,7 +220,7 @@
             chatIcon = new IconLabelDescriptor(action);
             chatIcon.setId(CHAT_CLIENT_ICON_ID);
             chatIcon.setStyles("k-no-backimage, k-btn-sitebar, k-chat-icon");
-            chatIcon.putValue(Action.NAME, i18n.t("Chat ;)"));
+            chatIcon.putValue(Action.NAME, i18n.t(CHAT_TITLE));
             chatIcon.putValue(Action.SHORT_DESCRIPTION, i18n.t("Show/hide the chat window"));
             final KeyStroke shortcut = Shortcut.getShortcut(false, true, true, false, Character.valueOf('C'));
             shorcutRegister.put(shortcut, action);
@@ -240,22 +239,29 @@
     private void createDialog(final HablarWidget widget, final HtmlConfig htmlConfig) {
         widget.addStyleName("k-chat-panel");
         setSize(widget, htmlConfig);
-        popup.add(widget);
+        dialog.add(widget);
     }
 
     private void createDialogIfNeeded() {
-        if (popup == null) {
-            popup = new PopupTopPanel();
-            popup.setStyleName("k-popup-top-centered");
-            popup.addStyleName("k-bottom-10corners");
-            popup.addStyleName("k-box-10shadow");
-            popup.addStyleName("k-chat-window");
+        if (dialog == null) {
+            dialog = new Dialog();
+            dialog.setHeading(i18n.t(CHAT_TITLE));
+            dialog.setClosable(true);
+            dialog.setResizable(true);
+            dialog.setButtons("");
+            dialog.setBodyStyleName("k-chat-window");
+            dialog.setScrollMode(Scroll.NONE);
+            dialog.setHideOnButtonClick(true);
+            final Widget btn = (Widget) chatIcon.getValue(ParentWidget.PARENT_UI);
+            dialog.setPosition(btn.getAbsoluteLeft(), btn.getAbsoluteTop());
+            dialog.setIcon(AbstractImagePrototype.create(chatResources.chat()));
+            // dialog.getItem(0).getFocusSupport().setIgnore(true);
             initEmite();
         }
     }
 
     private boolean dialogVisible() {
-        return popup != null && popup.isShowing();
+        return dialog != null && dialog.isVisible();
     }
 
     @Override
@@ -278,21 +284,17 @@
     }
 
     private void initEmite() {
-        final String icons = PageAssist.getMeta("hablar.icons");
-        if ("alt".equals(icons)) {
-            AltIcons.load();
-        } else if ("ie6".equals(icons)) {
-            IE6GifIcons.load();
-        } else {
-            DefaultIcons.load();
-        }
+        loadIcons(chatResources);
 
         final HablarConfig config = HablarConfig.getFromMeta();
         final HtmlConfig htmlConfig = HtmlConfig.getFromMeta();
+        config.dockConfig.headerSize = 0;
+        config.dockConfig.rosterWidth = 150;
+        config.dockConfig.rosterDock = "right";
         final HablarWidget widget = new HablarWidget(config.layout, config.tabHeaderSize);
         final Hablar hablar = widget.getHablar();
         HablarComplete.install(hablar, config);
-        new KuneHablarSignals(xmppSession, hablar, action);
+        new KuneHablarSignals(eventBus, xmppSession, hablar, action);
         if (htmlConfig.hasLogger) {
             new HablarConsole(hablar);
         }
@@ -300,6 +302,7 @@
         if (htmlConfig.hasLogin) {
             new HablarLogin(hablar, LoginConfig.getFromMeta());
         }
+        new KuneSoundManager(eventBus, config.soundConfig);
         createDialog(widget, htmlConfig);
     }
 
@@ -341,6 +344,31 @@
         }
     }
 
+    public void loadIcons(final ChatResources others) {
+        final AltIconsBundle bundle = GWT.create(AltIconsBundle.class);
+        Icons.register(Icons.BUDDY_ADD, bundle.buddyAddIcon());
+        Icons.register(Icons.BUDDY, bundle.buddyIcon());
+        Icons.register(Icons.BUDDY_DND, others.busy());
+        Icons.register(Icons.BUDDY_OFF, others.offline());
+        Icons.register(Icons.BUDDY_ON, others.online());
+        Icons.register(Icons.BUDDY_WAIT, others.away());
+        Icons.register(Icons.ADD_CHAT, bundle.chatAddIcon());
+        Icons.register(Icons.CHAT, others.xa());
+        Icons.register(Icons.CLIPBOARD, bundle.clipboardIcon());
+        Icons.register(Icons.CLOSE, bundle.closeIcon());
+        Icons.register(Icons.CONSOLE, bundle.consoleIcon());
+        Icons.register(Icons.ADD_GROUP, bundle.groupAddIcon());
+        Icons.register(Icons.GROUP_CHAT, bundle.groupChatIcon());
+        Icons.register(Icons.GROUP_CHAT_ADD, bundle.groupChatAddIcon());
+        Icons.register(Icons.LOADING, bundle.loadingIcon());
+        Icons.register(Icons.MENU, bundle.menuIcon());
+        Icons.register(Icons.MISSING_ICON, bundle.missingIcon());
+        Icons.register(Icons.NOT_CONNECTED, others.offline());
+        Icons.register(Icons.CONNECTED, others.online());
+        Icons.register(Icons.ROSTER, bundle.rosterIcon());
+        Icons.register(Icons.SEARCH, bundle.searchIcon());
+    }
+
     @Override
     public void login(final XmppURI uri, final String passwd) {
         xmppSession.login(uri, passwd);
@@ -358,7 +386,7 @@
     @Override
     public void logout() {
         if (dialogVisible()) {
-            popup.hide();
+            dialog.hide();
         }
         if (isLoggedIn()) {
             xmppSession.logout();
@@ -371,11 +399,14 @@
     }
 
     private void setSize(final Widget widget, final HtmlConfig htmlConfig) {
+
         if (htmlConfig.width != null) {
-            widget.setWidth(htmlConfig.width);
+            widget.setWidth("98%");
+            dialog.setWidth(htmlConfig.width);
         }
         if (htmlConfig.height != null) {
-            widget.setHeight(htmlConfig.height);
+            widget.setHeight("98%");
+            dialog.setHeight(htmlConfig.height);
         }
     }
 
@@ -388,15 +419,17 @@
         if (session.isLogged()) {
             createDialogIfNeeded();
             if (show) {
-                popup.showNear((Widget) chatIcon.getValue(ParentWidget.PARENT_UI));
+                dialog.show();
+                dialog.setZIndex(0);
+                dialog.getHeader().setZIndex(0);
             } else {
-                popup.hide();
+                dialog.hide();
             }
         }
     }
 
     private void toggleShowDialog() {
-        showDialog(popup == null ? true : !popup.isShowing());
+        showDialog(dialog == null ? true : !dialogVisible());
     }
 
     private XmppURI uriFrom(final String shortName) {

Modified: trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -37,6 +37,7 @@
 import com.calclab.hablar.user.client.UserContainer;
 import com.calclab.suco.client.Suco;
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.HasText;
 
@@ -71,8 +72,9 @@
 
     // FIXME: move to gin
     @SuppressWarnings("deprecation")
-    public KuneHablarSignals(final XmppSession session, final Hablar hablar, final ChatClientAction action) {
-        final HablarEventBus eventBus = hablar.getEventBus();
+    public KuneHablarSignals(final EventBus eventBus, final XmppSession session, final Hablar hablar,
+            final ChatClientAction action) {
+        final HablarEventBus hablarEventBus = hablar.getEventBus();
         final PrivateStorageManager storageManager = Suco.get(PrivateStorageManager.class);
 
         final HasText titleDisplay = new HasText() {
@@ -88,11 +90,12 @@
         };
         final SignalPreferences preferences = new SignalPreferences();
 
-        final UnattendedPagesManager manager = new UnattendedPagesManager(eventBus, BrowserFocusHandler.getInstance());
-        new BrowserFocusManager(eventBus, manager, BrowserFocusHandler.getInstance());
-        new UnattendedPresenter(eventBus, preferences, manager, titleDisplay);
-        new KuneUnattendedPresenter(eventBus, preferences, manager, action);
-        final NotificationManager notificationManager = new NotificationManager(eventBus, preferences);
+        final UnattendedPagesManager manager = new UnattendedPagesManager(hablarEventBus,
+                BrowserFocusHandler.getInstance());
+        new BrowserFocusManager(hablarEventBus, manager, BrowserFocusHandler.getInstance());
+        new UnattendedPresenter(hablarEventBus, preferences, manager, titleDisplay);
+        new KuneUnattendedPresenter(eventBus, hablarEventBus, preferences, manager, action);
+        final NotificationManager notificationManager = new NotificationManager(hablarEventBus, preferences);
 
         // notificationManager.addNotifier((BrowserPopupHablarNotifier)
         // GWT.create(BrowserPopupHablarNotifier.class),
@@ -100,7 +103,7 @@
         notificationManager.addNotifier((KuneChatNotifier) GWT.create(KuneChatNotifier.class), true);
 
         final SignalsPreferencesPresenter preferencesPage = new SignalsPreferencesPresenter(session, storageManager,
-                eventBus, preferences, new SignalsPreferencesWidget(), notificationManager);
+                hablarEventBus, preferences, new SignalsPreferencesWidget(), notificationManager);
         hablar.addPage(preferencesPage, UserContainer.ROL);
     }
 

Modified: trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -20,15 +20,14 @@
 package cc.kune.chat.client;
 
 import cc.kune.chat.client.ChatClientDefault.ChatClientAction;
-import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.chat.client.snd.ClickEvent;
 
-import com.calclab.hablar.chat.client.ui.PairChatPresenter;
 import com.calclab.hablar.core.client.mvp.HablarEventBus;
-import com.calclab.hablar.rooms.client.room.RoomPresenter;
 import com.calclab.hablar.signals.client.SignalPreferences;
 import com.calclab.hablar.signals.client.unattended.UnattendedChatsChangedEvent;
 import com.calclab.hablar.signals.client.unattended.UnattendedChatsChangedHandler;
 import com.calclab.hablar.signals.client.unattended.UnattendedPagesManager;
+import com.google.gwt.event.shared.EventBus;
 
 /**
  * Handles the presentation of unattended chats
@@ -36,8 +35,9 @@
 public class KuneUnattendedPresenter {
     private boolean active;
 
-    public KuneUnattendedPresenter(final HablarEventBus hablarEventBus, final SignalPreferences preferences,
-            final UnattendedPagesManager unattendedManager, final ChatClientAction action) {
+    public KuneUnattendedPresenter(final EventBus eventBus, final HablarEventBus hablarEventBus,
+            final SignalPreferences preferences, final UnattendedPagesManager unattendedManager,
+            final ChatClientAction action) {
         active = false;
         hablarEventBus.addHandler(UnattendedChatsChangedEvent.TYPE, new UnattendedChatsChangedHandler() {
             @Override
@@ -45,10 +45,9 @@
                 final int unattendedChatsCount = unattendedManager.getSize();
                 if (unattendedChatsCount > 0 && active == false) {
                     active = true;
-                    NotifyUser.info("Num: " + unattendedChatsCount, true);
-                    if (isChatPage(event.getPage().getType())) {
-                        action.setBlink(true);
-                    }
+                    ClickEvent.fire(eventBus);
+                    action.setBlink(true);
+
                 } else if (unattendedChatsCount == 0 && active == true) {
                     action.setBlink(false);
                     active = false;
@@ -59,8 +58,4 @@
 
     }
 
-    private boolean isChatPage(final String pageType) {
-        return pageType.equals(PairChatPresenter.TYPE) || pageType.equals(RoomPresenter.TYPE);
-    }
-
 }

Modified: trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -1,9 +1,12 @@
 package cc.kune.chat.client.resources;
 
 import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.CssResource;
 import com.google.gwt.resources.client.ImageResource;
 
 public interface ChatResources extends ClientBundle {
+    public interface ChatIconCssResource extends CssResource {
+    }
 
     @Source("add.png")
     ImageResource add();
@@ -17,15 +20,24 @@
     @Source("cancel.png")
     ImageResource cancel();
 
-    @Source("chat.png")
+    @Source("e-icon.gif")
     ImageResource chat();
 
+    @Source("e-icon-a.gif")
+    ImageResource chatBlink();
+
     @Source("chat-new-message-small.png")
     ImageResource chatNewMessageSmall();
 
+    @Source("chat.png")
+    ImageResource chatNormal();
+
     @Source("chat-small.png")
     ImageResource chatSmall();
 
+    @Source("chat-icons.css")
+    ChatIconCssResource css();
+
     @Source("del.png")
     ImageResource del();
 

Added: trunk/src/main/java/cc/kune/chat/client/resources/chat-icons.css
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/resources/chat-icons.css	                        (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/resources/chat-icons.css	2011-02-21 20:51:42 UTC (rev 1258)
@@ -0,0 +1,10 @@
+ at CHARSET "UTF-8";
+ at external k-*;
+
+ at sprite div .k-icon-chatBlink {
+  gwt-image: "chatBlink";
+}
+
+ at sprite div .k-icon-chat {
+  gwt-image: "chat";
+}
\ No newline at end of file

Copied: trunk/src/main/java/cc/kune/chat/client/resources/e-icon-a.gif (from rev 1254, trunk/src/main/java/cc/kune/core/client/resources/icons/e-icon-a.gif)
===================================================================
(Binary files differ)

Copied: trunk/src/main/java/cc/kune/chat/client/resources/e-icon.gif (from rev 1254, trunk/src/main/java/cc/kune/core/client/resources/icons/e-icon.gif)
===================================================================
(Binary files differ)

Added: trunk/src/main/java/cc/kune/chat/client/snd/ClickEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/snd/ClickEvent.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/snd/ClickEvent.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -0,0 +1,58 @@
+package cc.kune.chat.client.snd;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.HandlerRegistration;
+
+import com.google.gwt.event.shared.HasHandlers;
+
+public class ClickEvent extends GwtEvent<ClickEvent.ClickHandler> { 
+
+  public interface HasClickHandlers extends HasHandlers {
+    HandlerRegistration addClickHandler(ClickHandler handler);
+  }
+
+  public interface ClickHandler extends EventHandler {
+    public void onClick(ClickEvent event);
+  }
+
+  private static final Type<ClickHandler> TYPE = new Type<ClickHandler>();
+
+  public static void fire(HasHandlers source) {
+    source.fireEvent(new ClickEvent());
+  }
+
+  public static Type<ClickHandler> getType() {
+    return TYPE;
+  }
+
+
+  public ClickEvent() {
+  }
+
+  @Override
+  public Type<ClickHandler> getAssociatedType() {
+    return TYPE;
+  }
+
+  @Override
+  protected void dispatch(ClickHandler handler) {
+    handler.onClick(this);
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    return super.equals(obj);
+  }
+
+  @Override
+  public int hashCode() {
+    return super.hashCode();
+  }
+
+  @Override
+  public String toString() {
+    return "ClickEvent["
+    + "]";
+  }
+}

Added: trunk/src/main/java/cc/kune/chat/client/snd/KuneSoundManager.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/snd/KuneSoundManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/snd/KuneSoundManager.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -0,0 +1,28 @@
+package cc.kune.chat.client.snd;
+
+import com.calclab.hablar.signals.sound.client.SoundManager;
+import com.calclab.hablar.signals.sound.client.SoundSignalsConfig;
+import com.google.gwt.event.shared.EventBus;
+
+public class KuneSoundManager {
+    private final SoundSignalsConfig soundConfig;
+    SoundManager soundManager;
+
+    public KuneSoundManager(final EventBus eventBus, final SoundSignalsConfig soundConfig) {
+        this.soundConfig = soundConfig;
+        eventBus.addHandler(ClickEvent.getType(), new ClickEvent.ClickHandler() {
+            @Override
+            public void onClick(final ClickEvent event) {
+                createSoundManagerIfNeeded();
+                soundManager.play();
+            }
+        });
+    }
+
+    private void createSoundManagerIfNeeded() {
+        if (soundManager == null) {
+            soundManager = new SoundManager(soundConfig);
+        }
+    }
+
+}

Modified: trunk/src/main/java/cc/kune/chat/public/kune-chat.css
===================================================================
--- trunk/src/main/java/cc/kune/chat/public/kune-chat.css	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/chat/public/kune-chat.css	2011-02-21 20:51:42 UTC (rev 1258)
@@ -61,8 +61,9 @@
     margin-top: 3px;
 }
 
-.k-chat-window {
-    background-color: #FFF;
+.k-chat-window { /* background-color: #FFF;
+    padding: 5px; */
+
 }
 
 .k-chat-panel {
@@ -74,7 +75,7 @@
 }
 
 .hablar-HablarWidget {
-    background-color: #888;
+    background-color: #F2F2F2;
     -moz-border-radius: 5px;
     -webkit-border-radius: 5px;
     border-radius: 5px;
@@ -95,9 +96,9 @@
 }
 
 .hablar-defaultBackground,.hablar-UserWidget,.hablar-defaultBordered {
-    -moz-border-radius: 5px;
+    /* -moz-border-radius: 5px;
     -webkit-border-radius: 5px;
-    border-radius: 5px;
+    border-radius: 5px; */
 }
 
 .hablar-Header { /*	-webkit-border-top-right-radius: 5px;*/
@@ -127,6 +128,10 @@
     border-top-left-radius: 5px;
 }
 
+.hablar-TabsHeaderWidget {
+    margin: -1px;
+}
+
 .hablar-ChatWidget {
     -webkit-border-bottom-right-radius: 5px;
     -moz-border-radius-bottomright: 5px;

Modified: trunk/src/main/java/cc/kune/chat/public/kune-hablar.css
===================================================================
--- trunk/src/main/java/cc/kune/chat/public/kune-hablar.css	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/chat/public/kune-hablar.css	2011-02-21 20:51:42 UTC (rev 1258)
@@ -209,7 +209,7 @@
 .chatMessage .metadata {
   display: inline;
   color: #808080;
-  font-size: 90%;
+  font-size: 14px;
 }
 
 .chatMessage .body {
@@ -237,7 +237,7 @@
 
 html {
   font-family: Tahoma, sans-serif;
-  font-size: 80%;
+  font-size: 12px;
 }
 
 body {

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -39,7 +39,7 @@
 public abstract class AbstractGwtButtonGui extends AbstractChildGuiItem {
 
     private ButtonBase button;
-    private final boolean enableTongle;
+    protected boolean enableTongle;
     private IconLabel iconLabel;
     private boolean isChild;
 

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -144,10 +144,8 @@
 
     @Override
     protected void setEnabled(final boolean enabled) {
-        item.setVisible(enabled);
         item.setEnabled(enabled);
-        iconLabel.setVisible(enabled);
-        layout();
+        setVisible(enabled);
     }
 
     @Override

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtButtonGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtButtonGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -19,18 +19,7 @@
  */
 package cc.kune.common.client.actions.gwtui;
 
-import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
 
 public class GwtButtonGui extends AbstractGwtButtonGui {
 
-    public GwtButtonGui() {
-    }
-
-    public GwtButtonGui(final ButtonDescriptor buttonDescriptor) {
-        super(buttonDescriptor);
-    }
-
-    public GwtButtonGui(final ButtonDescriptor buttonDescriptor, final boolean enableTongle) {
-        super(buttonDescriptor, enableTongle);
-    }
 }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -51,17 +51,17 @@
         toolbar.add((Widget) uiObject);
     }
 
-    public void addFill() {
+    public Widget addFill() {
         currentFlow = FlowDir.right;
-        toolbar.addFill();
+        return toolbar.addFill();
     }
 
-    public void addSeparator() {
-        toolbar.addSeparator();
+    public Widget addSeparator() {
+        return toolbar.addSeparator();
     }
 
-    public void addSpacer() {
-        toolbar.addSpacer();
+    public Widget addSpacer() {
+        return toolbar.addSpacer();
     }
 
     private String getFlow() {

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -26,7 +26,6 @@
 import cc.kune.common.client.actions.ui.AbstractGuiItem;
 import cc.kune.common.client.actions.ui.ParentWidget;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
-import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor;
 import cc.kune.common.client.ui.IconLabel;
 
 import com.google.gwt.event.dom.client.ClickEvent;
@@ -36,13 +35,6 @@
 public class GwtIconLabelGui extends AbstractGuiItem {
     private IconLabel iconLabel;
 
-    public GwtIconLabelGui() {
-    }
-
-    public GwtIconLabelGui(final IconLabelDescriptor iconLabelDescriptor) {
-        super(iconLabelDescriptor);
-    }
-
     @Override
     protected void addStyle(final String style) {
         iconLabel.addStyleName(style);
@@ -74,7 +66,7 @@
 
     @Override
     public void setEnabled(final boolean enabled) {
-        // Not implemented
+        super.setVisible(enabled);
     }
 
     @Override

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuCheckItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuCheckItemGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuCheckItemGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -19,12 +19,7 @@
  */
 package cc.kune.common.client.actions.gwtui;
 
-import cc.kune.common.client.actions.ui.descrip.MenuCheckItemDescriptor;
 
 public class GwtMenuCheckItemGui extends AbstractGwtMenuItemGui {
 
-    public GwtMenuCheckItemGui(final MenuCheckItemDescriptor descriptor) {
-        super(descriptor);
-    }
-
 }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -37,13 +37,6 @@
     private IconLabel iconLabel;
     private boolean notStandAlone;
 
-    public GwtMenuGui() {
-    }
-
-    public GwtMenuGui(final MenuDescriptor descriptor) {
-        super(descriptor);
-    }
-
     @Override
     protected void addStyle(final String style) {
         if (notStandAlone) {

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuItemGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuItemGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -19,16 +19,7 @@
  */
 package cc.kune.common.client.actions.gwtui;
 
-import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
 
 public class GwtMenuItemGui extends AbstractGwtMenuItemGui {
 
-    public GwtMenuItemGui() {
-        super();
-    }
-
-    public GwtMenuItemGui(final MenuItemDescriptor descriptor) {
-        super(descriptor);
-    }
-
 }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -19,14 +19,6 @@
  */
 package cc.kune.common.client.actions.gwtui;
 
-import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
 
 public class GwtMenuTitleItemGui extends AbstractGwtMenuItemGui {
-    public GwtMenuTitleItemGui() {
-        super();
-    }
-
-    public GwtMenuTitleItemGui(final MenuTitleItemDescriptor descriptor) {
-        super(descriptor);
-    }
 }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtPushButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtPushButtonGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtPushButtonGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -21,14 +21,16 @@
 
 import cc.kune.common.client.actions.PropertyChangeEvent;
 import cc.kune.common.client.actions.PropertyChangeListener;
+import cc.kune.common.client.actions.ui.AbstractGuiItem;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
 import cc.kune.common.client.actions.ui.descrip.PushButtonDescriptor;
 
 public class GwtPushButtonGui extends GwtButtonGui {
-    public GwtPushButtonGui() {
-    }
-
-    public GwtPushButtonGui(final PushButtonDescriptor btn) {
-        super(btn, true);
+    @Override
+    public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+        super.descriptor = descriptor;
+        super.enableTongle = true;
+        final PushButtonDescriptor btn = (PushButtonDescriptor) descriptor;
         setPressed(btn.isPushed());
         btn.addPropertyChangeListener(new PropertyChangeListener() {
             @Override
@@ -38,6 +40,7 @@
                 }
             }
         });
+        return this;
     }
 
 }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -21,7 +21,6 @@
 
 import cc.kune.common.client.actions.ui.AbstractGuiItem;
 import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
 import cc.kune.common.client.ui.IconLabel;
 
@@ -32,13 +31,6 @@
     private IconLabel iconLabel;
     private MenuItem item;
 
-    public GwtSubMenuGui() {
-    }
-
-    public GwtSubMenuGui(final AbstractGuiActionDescrip descriptor) {
-        super(descriptor);
-    }
-
     @Override
     public AbstractGuiItem create(final GuiActionDescrip descriptor) {
         super.descriptor = descriptor;
@@ -86,5 +78,7 @@
     @Override
     public void setVisible(final boolean visible) {
         item.setVisible(visible);
+        iconLabel.setVisible(visible);
+        layout();
     }
 }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -21,38 +21,30 @@
 
 import cc.kune.common.client.actions.ui.AbstractGuiItem;
 import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
 
 import com.google.gwt.user.client.ui.UIObject;
+import com.google.gwt.user.client.ui.Widget;
 
 public class GwtToolbarGui extends AbstractGuiItem implements ParentWidget {
 
     private GwtComplexToolbar toolbar;
 
-    public GwtToolbarGui() {
-    }
-
-    public GwtToolbarGui(final AbstractGuiActionDescrip descriptor) {
-        super(descriptor);
-
-    }
-
     @Override
     public void add(final UIObject uiObject) {
         toolbar.add(uiObject);
     }
 
-    public void addFill() {
-        toolbar.addFill();
+    public Widget addFill() {
+        return toolbar.addFill();
     }
 
-    public void addSeparator() {
-        toolbar.addSeparator();
+    public Widget addSeparator() {
+        return toolbar.addSeparator();
     }
 
-    public void addSpacer() {
-        toolbar.addSpacer();
+    public Widget addSpacer() {
+        return toolbar.addSpacer();
     }
 
     @Override

Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -26,10 +26,15 @@
 import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
 import cc.kune.common.client.errors.UIException;
 
+import com.google.gwt.user.client.ui.Widget;
+
 public class GwtToolbarSeparatorGui extends AbstractGuiItem {
 
+    private Widget widget;
+
     @Override
     public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+        super.descriptor = descriptor;
         final GwtToolbarGui toolbar = ((GwtToolbarGui) descriptor.getParent().getValue(ParentWidget.PARENT_UI));
         if (toolbar == null) {
             throw new UIException("To add a toolbar separator you need to add the toolbar before. Item: " + descriptor);
@@ -37,17 +42,18 @@
         final Type type = ((ToolbarSeparatorDescriptor) descriptor).getSeparatorType();
         switch (type) {
         case fill:
-            toolbar.addFill();
+            widget = toolbar.addFill();
             break;
         case spacer:
-            toolbar.addSpacer();
+            widget = toolbar.addSpacer();
             break;
         case separator:
-            toolbar.addSeparator();
+            widget = toolbar.addSeparator();
             break;
         default:
             break;
         }
+        configureItemFromProperties();
         return toolbar;
     }
 
@@ -68,6 +74,11 @@
     }
 
     @Override
+    public void setVisible(final boolean visible) {
+        widget.setVisible(visible);
+    }
+
+    @Override
     public boolean shouldBeAdded() {
         return false;
     }

Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -49,6 +49,7 @@
             break;
         }
         super.create(descriptor);
+        configureItemFromProperties();
         return toolbar;
     }
 

Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -148,6 +148,8 @@
     protected abstract void setToolTipText(String text);
 
     private void setVisible(final Boolean visible) {
+        // if you have problems with setVisible check if the GuiItem calls
+        // configureItemFromProperties on creation
         setVisible(visible == null ? true : visible);
     }
 

Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -57,6 +57,8 @@
      */
     public AbstractGuiActionDescrip(final AbstractAction action) {
         this.action = action;
+        putValue(Action.ENABLED, Boolean.TRUE);
+        putValue(VISIBLE, Boolean.TRUE);
         position = NO_POSITION;
         parent = NO_PARENT;
         addConditions = new ArrayList<GuiAddCondition>();
@@ -82,11 +84,6 @@
         return id;
     }
 
-    @Override
-    public Object getTarget() {
-        return getValue(TARGET);
-    }
-
     /**
      * Gets the location, a string used to group actions with locations (top
      * bar, bottom bar, user bar...).
@@ -114,6 +111,11 @@
     }
 
     @Override
+    public Object getTarget() {
+        return getValue(TARGET);
+    }
+
+    @Override
     public abstract Class<?> getType();
 
     @Override
@@ -162,7 +164,7 @@
 
     @Override
     public void setEnabled(final boolean enabled) {
-        super.putValue(Action.ENABLED, enabled);
+        putValue(Action.ENABLED, enabled);
     }
 
     @Override
@@ -170,11 +172,6 @@
         this.id = id;
     }
 
-    @Override
-    public void setTarget(final Object object) {
-        putValue(TARGET, object);
-    }
-
     /**
      * If we have several toolbars, we can group with the "location" string key
      * actions that must be in the same location (ex: top bar, bottom bar, and
@@ -211,6 +208,11 @@
     }
 
     @Override
+    public void setTarget(final Object object) {
+        putValue(TARGET, object);
+    }
+
+    @Override
     public void setVisible(final boolean visible) {
         putValue(VISIBLE, visible);
     }

Modified: trunk/src/main/java/cc/kune/common/public/gxt-custom/css/gxt-op-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/gxt-custom/css/gxt-op-common.css	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/common/public/gxt-custom/css/gxt-op-common.css	2011-02-21 20:51:42 UTC (rev 1258)
@@ -1647,50 +1647,52 @@
 }
 
 .x-window-proxy {
-    background-color: #1f2833;
-    border-color: #18181a;
+  /*  background-color: #1f2833;
+    border-color: #18181a; */
 }
 
 .x-window-tl .x-window-header {
-    color: #fff !important;
-    font: bold 14px tahoma, arial, verdana, sans-serif;
+    font-size: 14px;
+  /*  color: #fff !important;
+    font: bold 14px tahoma, arial, verdana, sans-serif; */
 }
 
 .x-window-tc {
-    background-image: url(../images/window/top-bottom.png);
+/*    background-image: url(../images/window/top-bottom.png);*/
 }
 
 .x-window-tl {
-    background-image: url(../images/window/left-corners.png);
+/*    background-image: url(../images/window/left-corners.png);*/
 }
 
 .x-window-tr {
-    background-image: url(../images/window/right-corners.png);
+ /*   background-image: url(../images/window/right-corners.png);*/
 }
 
 .x-window-bc {
-    background-image: url(../images/window/top-bottom.png);
+   /* background-image: url(../images/window/top-bottom.png);*/
 }
 
 .x-window-bl {
-    background-image: url(../images/window/left-corners.png);
+   /* background-image: url(../images/window/left-corners.png);*/
 }
 
 .x-window-br {
-    background-image: url(../images/window/right-corners.png);
+   /* background-image: url(../images/window/right-corners.png);*/
 }
 
 .x-window-mc {
-    border-color: #18181a;
-    font: normal 14px 'Ubuntu', Arial background-color :     #1f2833;
+    font-size: 16px;
+  /*  border-color: #18181a;
+    font: normal 14px 'Ubuntu', Arial background-color :     #1f2833; */
 }
 
 .x-window-ml {
-    background-image: url(../images/window/left-right.png);
+   /* background-image: url(../images/window/left-right.png);*/
 }
 
 .x-window-mr {
-    background-image: url(../images/window/left-right.png);
+   /* background-image: url(../images/window/left-right.png); */
 }
 
 .x-window-maximized .x-window-tc {

Modified: trunk/src/main/java/cc/kune/core/client/logs/Log.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/logs/Log.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/core/client/logs/Log.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -35,4 +35,8 @@
         debug(message);
     }
 
+    public static void info(final String message) {
+        GWT.log(message);
+    }
+
 }

Deleted: trunk/src/main/java/cc/kune/core/client/resources/icons/IconBorrarCssResource.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/icons/IconBorrarCssResource.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/core/client/resources/icons/IconBorrarCssResource.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -1,55 +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.core.client.resources.icons;
-
-import com.google.gwt.resources.client.CssResource;
-
-public interface IconBorrarCssResource extends CssResource {
-    //
-    // @ClassName("k-icon-addGreen")
-    // String kIconAddGreen();
-    //
-    // @ClassName("k-icon-bug")
-    // String kIconBug();
-    //
-    // @ClassName("k-icon-chat")
-    // String kIconChat();
-    //
-    // @ClassName("k-icon-groupHome")
-    // String kIconGroupHome();
-    //
-    // @ClassName("k-icon-info")
-    // String kIconInfo();
-    //
-    // @ClassName("k-icon-kuneIcon16")
-    // String kIconKuneIcon16();
-    //
-    // @ClassName("k-icon-language")
-    // String kIconLanguage();
-    //
-    // @ClassName("k-icon-maximize")
-    // String kIconMaaximize();
-    //
-    // @ClassName("k-icon-minimize")
-    // String kIconMinimize();
-    //
-    // @ClassName("k-icon-prefs")
-    // String kIconPrefs();
-}

Copied: trunk/src/main/java/cc/kune/core/client/resources/icons/IconCssResource.java (from rev 1254, trunk/src/main/java/cc/kune/core/client/resources/icons/IconBorrarCssResource.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/icons/IconCssResource.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/resources/icons/IconCssResource.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -0,0 +1,25 @@
+/*
+ *
+ * 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.core.client.resources.icons;
+
+import com.google.gwt.resources.client.CssResource;
+
+public interface IconCssResource extends CssResource {
+}

Modified: trunk/src/main/java/cc/kune/core/client/resources/icons/IconResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/icons/IconResources.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/core/client/resources/icons/IconResources.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -30,14 +30,8 @@
     @Source("bug.png")
     ImageResource bug();
 
-    @Source("e-icon.gif")
-    ImageResource chat();
-
-    @Source("e-icon-a.gif")
-    ImageResource chatBlink();
-
     @Source("kicon.css")
-    IconBorrarCssResource css();
+    IconCssResource css();
 
     @Source("del-green.png")
     ImageResource delGreen();

Deleted: trunk/src/main/java/cc/kune/core/client/resources/icons/e-icon-a.gif
===================================================================
(Binary files differ)

Deleted: trunk/src/main/java/cc/kune/core/client/resources/icons/e-icon.gif
===================================================================
(Binary files differ)

Modified: trunk/src/main/java/cc/kune/core/client/resources/icons/kicon.css
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/icons/kicon.css	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/core/client/resources/icons/kicon.css	2011-02-21 20:51:42 UTC (rev 1258)
@@ -1,44 +1,36 @@
 @external k-icon-info,k-icon-language,k-icon-kuneIcon16,k-icon-bug,k-icon-prefs,k-icon-groupHome,k-icon-addGreen,k-icon-maximize,k-icon-minimize,k-*;
 @sprite div .k-icon-info {
-	gwt-image: "info";
+  gwt-image: "info";
 }
 
 @sprite div .k-icon-language {
-	gwt-image: "language";
+  gwt-image: "language";
 }
 
 @sprite div .k-icon-kuneIcon16 {
-	gwt-image: "kuneIcon16";
+  gwt-image: "kuneIcon16";
 }
 
 @sprite div .k-icon-bug {
-	gwt-image: "bug";
+  gwt-image: "bug";
 }
 
 @sprite div .k-icon-prefs {
-	gwt-image: "prefs";
+  gwt-image: "prefs";
 }
 
 @sprite div .k-icon-groupHome {
-	gwt-image: "groupHome";
+  gwt-image: "groupHome";
 }
 
 @sprite div .k-icon-addGreen {
-	gwt-image: "addGreen";
+  gwt-image: "addGreen";
 }
 
 @sprite div .k-icon-maximize {
-	gwt-image: "maximize";
+  gwt-image: "maximize";
 }
 
- at sprite div .k-icon-chatBlink {
-	gwt-image: "chatBlink";
-}
-
- at sprite div .k-icon-chat {
-	gwt-image: "chat";
-}
-
 @sprite div .k-icon-minimize {
-	gwt-image: "minimize";
+  gwt-image: "minimize";
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -28,12 +28,14 @@
 import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
 import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
 import cc.kune.common.client.actions.ui.descrip.SubMenuDescriptor;
+import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
+import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
 import cc.kune.core.client.resources.CoreMessages;
 import cc.kune.core.client.resources.icons.IconResources;
 import cc.kune.core.client.services.FileDownloadUtils;
 import cc.kune.core.client.sn.actions.GotoGroupAction;
+import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.StateManager;
-import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.UserSignInEvent;
 import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
 import cc.kune.core.client.state.UserSignOutEvent;
@@ -54,6 +56,7 @@
     private final I18nTranslationService i18n;
     private final IconResources img;
     private SubMenuDescriptor partiMenu;
+    private ToolbarSeparatorDescriptor separator;
     private final Session session;
     private final SitebarActionsPresenter siteOptions;
     private final StateManager stateManager;
@@ -71,17 +74,19 @@
         this.siteOptions = siteOptions;
         this.gotoGroupAction = gotoGroupAction;
         createActions();
+        separator.setVisible(false);
         session.onUserSignIn(true, new UserSignInHandler() {
             @Override
             public void onUserSignIn(final UserSignInEvent event) {
                 SiteUserOptionsPresenter.this.onUserSignIn(event.getUserInfo());
+                separator.setVisible(true);
             }
         });
         session.onUserSignOut(true, new UserSignOutHandler() {
             @Override
             public void onUserSignOut(final UserSignOutEvent event) {
                 LOGGED_USER_MENU.setVisible(false);
-                LOGGED_USER_MENU.setEnabled(false);
+                separator.setVisible(false);
                 SiteUserOptionsPresenter.this.setLoggedUserName("");
             }
         });
@@ -110,9 +115,11 @@
 
     private void createActions() {
         LOGGED_USER_MENU.setId(LOGGED_USER_MENU_ID);
-        LOGGED_USER_MENU.setStyles("k-no-backimage, k-btn-sitebar");
-        siteOptions.getLeftToolbar().addAction(LOGGED_USER_MENU);
-
+        LOGGED_USER_MENU.setParent(SitebarActionsPresenter.RIGHT_TOOLBAR);
+        LOGGED_USER_MENU.setStyles("k-no-backimage, k-btn-sitebar, k-fl");
+        siteOptions.getRightToolbar().addAction(LOGGED_USER_MENU);
+        separator = new ToolbarSeparatorDescriptor(Type.separator, SitebarActionsPresenter.RIGHT_TOOLBAR);
+        siteOptions.getRightToolbar().addAction(separator);
         partiMenu = new SubMenuDescriptor(i18n.t("Your groups"));
         addActionImpl(partiMenu);
 

Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/core/public/ws.css	2011-02-21 20:51:42 UTC (rev 1258)
@@ -46,7 +46,7 @@
 }
 
 .gwt-MenuItem {
-    font-size: 80%;
+    font-size: 14px;
     margin: 1px;
     cursor: default;
 }
@@ -60,7 +60,7 @@
 }
 
 .gwt-Tree .gwt-TreeItem {
-    font-size: 80%;
+    font-size: 14px;
     cursor: default;
 }
 

Modified: trunk/src/main/java/cc/kune/core/public/ws.html
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.html	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/core/public/ws.html	2011-02-21 20:51:42 UTC (rev 1258)
@@ -13,6 +13,7 @@
 <meta name="hablar.login" content="false" />
 <meta name="hablar.hasVCard" content="false" />
 <meta name="hablar.search" content="false" />
+<meta name="hablar.hasSound" content="false" />
 <meta name="hablar.hasCopyToClipboard" content="false" />
 <!--<meta name="hablar.hasLogger" content="true" />-->
 <meta name="hablar.hasSignals" content="false" />

Modified: trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java	2011-02-21 04:32:11 UTC (rev 1257)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java	2011-02-21 20:51:42 UTC (rev 1258)
@@ -20,6 +20,7 @@
 package cc.kune.pspace.client;
 
 import cc.kune.common.client.actions.ui.IsActionExtensible;
+import cc.kune.core.client.init.AppStartEvent;
 import cc.kune.core.client.state.StateChangedEvent;
 import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
 import cc.kune.core.shared.domain.ContentStatus;
@@ -65,10 +66,15 @@
         super(eventBus, view, proxy);
         this.i18n = i18n;
         this.stateTokenUtils = stateTokenUtils;
-        eventBus.addHandler(StateChangedEvent.getType(), new StateChangedHandler() {
+        eventBus.addHandler(AppStartEvent.getType(), new AppStartEvent.AppStartHandler() {
             @Override
-            public void onStateChanged(final StateChangedEvent event) {
-                setState(event.getState());
+            public void onAppStart(final AppStartEvent event) {
+                eventBus.addHandler(StateChangedEvent.getType(), new StateChangedHandler() {
+                    @Override
+                    public void onStateChanged(final StateChangedEvent event) {
+                        setState(event.getState());
+                    }
+                });
             }
         });
     }




More information about the kune-commits mailing list