[kune-commits] r1260 - in trunk/src/main/java/cc/kune: chat/client client common/client/shortcuts core/client core/public
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Tue Feb 22 03:22:11 CET 2011
Author: vjrj_
Date: 2011-02-22 03:22:10 +0100 (Tue, 22 Feb 2011)
New Revision: 1260
Modified:
trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/common/client/shortcuts/DefaultGlobalShortcutRegister.java
trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
trunk/src/main/java/cc/kune/core/public/ws.css
Log:
Shortcuts fixed
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-02-22 00:00:03 UTC (rev 1259)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-02-22 02:22:10 UTC (rev 1260)
@@ -30,7 +30,6 @@
import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.KeyStroke;
import cc.kune.common.client.actions.Shortcut;
-import cc.kune.common.client.actions.ui.ParentWidget;
import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
@@ -54,6 +53,7 @@
import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
import com.calclab.emite.im.client.chat.ChatManager;
import com.calclab.emite.im.client.roster.XmppRoster;
+import com.calclab.emite.reconnect.client.SessionReconnect;
import com.calclab.emite.xep.avatar.client.AvatarManager;
import com.calclab.emite.xep.muc.client.Room;
import com.calclab.emite.xep.muc.client.RoomManager;
@@ -145,6 +145,7 @@
this.roster = Suco.get(XmppRoster.class);
this.chatManager = Suco.get(ChatManager.class);
this.roomManager = Suco.get(RoomManager.class);
+ Suco.get(SessionReconnect.class);
eventBus.addHandler(AppStartEvent.getType(), new AppStartEvent.AppStartHandler() {
@Override
@@ -222,9 +223,9 @@
chatIcon.setStyles("k-no-backimage, k-btn-sitebar, k-chat-icon");
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'));
+ final KeyStroke shortcut = Shortcut.getShortcut(false, true, false, false, Character.valueOf('C'));
shorcutRegister.put(shortcut, action);
- action.setShortcut(shortcut);
+ // action.setShortcut(shortcut);
chatIcon.setVisible(session.isLogged());
siteActions.getLeftToolbar().addAction(
new ToolbarSeparatorDescriptor(Type.spacer, SitebarActionsPresenter.LEFT_TOOLBAR));
@@ -252,8 +253,9 @@
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());
+ // final Widget btn = (Widget)
+ // chatIcon.getValue(ParentWidget.PARENT_UI);
+ dialog.setPosition(118, 2);
dialog.setIcon(AbstractImagePrototype.create(chatResources.chat()));
// dialog.getItem(0).getFocusSupport().setIgnore(true);
initEmite();
@@ -416,6 +418,7 @@
}
private void showDialog(final boolean show) {
+ Log.info("Show dialog: " + show);
if (session.isLogged()) {
createDialogIfNeeded();
if (show) {
@@ -429,6 +432,7 @@
}
private void toggleShowDialog() {
+ Log.info("Toggle!");
showDialog(dialog == null ? true : !dialogVisible());
}
Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-02-22 00:00:03 UTC (rev 1259)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-02-22 02:22:10 UTC (rev 1260)
@@ -63,6 +63,7 @@
*/
public void onModuleLoadCont() {
DelayedBindRegistry.bind(ginjector);
+ ginjector.getGlobalShortcutRegister().enable();
AsyncCallbackSimple.init(ginjector.getErrorHandler());
ginjector.getEventLogger();
NotifyUser.init(ginjector.getEventBus(), ginjector.getI18n());
@@ -71,7 +72,6 @@
ginjector.getSiteTokenListeners();
ginjector.getGwtGuiProvider();
ginjector.getUserNotifierPresenter();
- ginjector.getGlobalShortcutRegister();
ginjector.getSpinerPresenter();
ginjector.getGroupMembersPresenter();
ginjector.getSiteLogoPresenter();
Modified: trunk/src/main/java/cc/kune/common/client/shortcuts/DefaultGlobalShortcutRegister.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/shortcuts/DefaultGlobalShortcutRegister.java 2011-02-22 00:00:03 UTC (rev 1259)
+++ trunk/src/main/java/cc/kune/common/client/shortcuts/DefaultGlobalShortcutRegister.java 2011-02-22 02:22:10 UTC (rev 1260)
@@ -20,6 +20,7 @@
package cc.kune.common.client.shortcuts;
import cc.kune.common.client.actions.AbstractAction;
+import cc.kune.common.client.actions.Action;
import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.ChangeableObject;
import cc.kune.common.client.actions.InputMap;
@@ -49,7 +50,7 @@
final AbstractAction action = get(Shortcut.getShortcut(event.getCtrlKey(), event.getAltKey(),
event.getShiftKey(), event.getShiftKey(), (char) event.getKeyCode()));
if (action != null) {
- GWT.log("Not propagating event");
+ GWT.log("Not propagating event for action: " + action.getValue(Action.NAME));
nativeEvent.stopPropagation();
action.actionPerformed(new ActionEvent(nativeEvent.getCurrentEventTarget(), event));
nativeEventPrev.cancel();
@@ -57,7 +58,6 @@
}
}
};
- enableImpl();
}
@Override
Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-22 00:00:03 UTC (rev 1259)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-22 02:22:10 UTC (rev 1260)
@@ -118,6 +118,7 @@
bind(ProxyFailureHandler.class).to(DefaultProxyFailureHandler.class).in(Singleton.class);
bind(I18nUITranslationService.class).in(Singleton.class);
bind(I18nTranslationService.class).to(I18nUITranslationService.class).in(Singleton.class);
+ bind(GlobalShortcutRegister.class).to(DefaultGlobalShortcutRegister.class).in(Singleton.class);
// Presenters
bindPresenter(CorePresenter.class, CorePresenter.CoreView.class, CoreViewImpl.class,
@@ -161,7 +162,7 @@
bind(GuiProvider.class).to(DefaultGuiProvider.class).in(Singleton.class);
bind(GxtGuiProvider.class).in(Singleton.class);
bind(GwtGuiProvider.class).in(Singleton.class);
- bind(GlobalShortcutRegister.class).to(DefaultGlobalShortcutRegister.class).in(Singleton.class);
+
bind(MaskWidgetView.class).to(MaskWidget.class).in(Singleton.class);
// Core App
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-22 00:00:03 UTC (rev 1259)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-22 02:22:10 UTC (rev 1260)
@@ -903,7 +903,7 @@
}
.k-sn-bottomPanel {
- padding: 0 10px;
+ padding: 8px 10px 0;
float: right;
}
More information about the kune-commits
mailing list