[kune-commits] r1585 - in trunk: . src/main/java/cc/kune/core/client/sn src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/public
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Sat Nov 5 20:34:15 CET 2011
Author: vjrj_
Date: 2011-11-05 20:34:12 +0100 (Sat, 05 Nov 2011)
New Revision: 1585
Modified:
trunk/CREDITS
trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java
trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java
trunk/src/main/java/cc/kune/core/client/state/ContentCache.java
trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/core/public/about.html
Log:
Minor fixes
Modified: trunk/CREDITS
===================================================================
--- trunk/CREDITS 2011-11-05 16:04:02 UTC (rev 1584)
+++ trunk/CREDITS 2011-11-05 19:34:12 UTC (rev 1585)
@@ -19,7 +19,7 @@
* Javier Picado Ladrón de Guevara and the <URL:http://iepala.es> staff for their
support and infrastructure
* Javier de la Cueva and Leovigildo García-Bobadilla for the legal support
-* Jonathan Araña Cruz, Roxu and all the <URL:http://xsto.info> staff for their
+* Jonathan Araña Cruz, Roxu and all the <URL:http://xsto.info> staff for their help with the infrastructure
* Juan Pablo Zafra Delgado for his research and support for the integration of additional modules
* Daniel Jiménez for the initial help and coordination
* Johnattan Rupire, William Austen Bradbury and Rana Hassan for their web contributions and
Modified: trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java 2011-11-05 16:04:02 UTC (rev 1584)
+++ trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java 2011-11-05 19:34:12 UTC (rev 1585)
@@ -41,6 +41,8 @@
public class UserSNPanel extends AbstractSNPanel implements UserSNView {
private final I18nTranslationService i18n;
+ private final Label noBuddies;
+ private final Label noPublic;
@Inject
public UserSNPanel(final I18nTranslationService i18n, final GuiProvider guiProvider,
@@ -65,6 +67,10 @@
bottomActionsToolbar.setStyleName("k-sn-bottomPanel-actions");
armor.getEntityToolsNorth().add(widget);
deck.showWidget(2);
+ noBuddies = new Label("This user has no buddies yet");
+ noBuddies.addStyleName("kune-Margin-Medium-l");
+ noPublic = new Label(CoreMessages.BUDDIES_NOT_PUBLIC);
+ noPublic.addStyleName("kune-Margin-Medium-l");
}
@Override
@@ -100,7 +106,9 @@
@Override
public void setNoBuddies() {
- firstCategoryLabel.setText(i18n.t("This user has no buddies yet"));
+ firstCategoryFlow.add(noBuddies);
+ firstCategoryLabel.setText(i18n.t("Buddies"));
+ super.setFirstCategoryVisible(true, true);
}
@Override
@@ -129,8 +137,9 @@
@Override
public void showBuddiesNotPublic() {
- firstDeckLabel.setText(i18n.t(CoreMessages.BUDDIES_NOT_PUBLIC));
- deck.showWidget(0);
+ firstCategoryFlow.add(noPublic);
+ firstCategoryLabel.setText(i18n.t("Buddies"));
+ super.setFirstCategoryVisible(true, true);
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java 2011-11-05 16:04:02 UTC (rev 1584)
+++ trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java 2011-11-05 19:34:12 UTC (rev 1585)
@@ -142,9 +142,9 @@
setParticipationState(state);
if (state.getSocialNetworkData().isBuddiesVisible()) {
// In fact now we show the user network or not.
- setBuddiesState(state);
getView().setBuddiesVisible(true,
areMany(state.getSocialNetworkData().getUserBuddies().getBuddies().size()));
+ setBuddiesState(state);
// getView().setVisible(buddies + participeIn > 0);
} else {
getView().showBuddiesNotPublic();
Modified: trunk/src/main/java/cc/kune/core/client/state/ContentCache.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/ContentCache.java 2011-11-05 16:04:02 UTC (rev 1584)
+++ trunk/src/main/java/cc/kune/core/client/state/ContentCache.java 2011-11-05 19:34:12 UTC (rev 1585)
@@ -26,10 +26,12 @@
public interface ContentCache {
- void cache(StateToken token, StateAbstractDTO content);
+ void cache(StateToken token, StateAbstractDTO content);
- void getContent(String user, StateToken newState, AsyncCallback<StateAbstractDTO> callback);
+ void clearCacheOfGroup(String group);
- void removeContent(StateToken token);
+ void getContent(String user, StateToken newState, AsyncCallback<StateAbstractDTO> callback);
+ void removeContent(StateToken token);
+
}
Modified: trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java 2011-11-05 16:04:02 UTC (rev 1584)
+++ trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java 2011-11-05 19:34:12 UTC (rev 1585)
@@ -24,6 +24,7 @@
import cc.kune.core.client.notify.spiner.ProgressShowEvent;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.state.UserSignInOrSignOutEvent.UserSignInOrSignOutHandler;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.StateAbstractDTO;
@@ -38,12 +39,19 @@
private final boolean useCache;
@Inject
- public ContentCacheDefault(final ContentServiceAsync server, final EventBus eventBus) {
+ public ContentCacheDefault(final ContentServiceAsync server, final EventBus eventBus,
+ final Session session) {
this.server = server;
this.eventBus = eventBus;
this.cacheMap = new HashMap<StateToken, StateAbstractDTO>();
// Don't use while we don't check changes in the server
useCache = true;
+ session.onUserSignInOrSignOut(false, new UserSignInOrSignOutHandler() {
+ @Override
+ public void onUserSignInOrSignOut(final UserSignInOrSignOutEvent event) {
+ cacheMap.clear();
+ }
+ });
}
@Override
@@ -54,6 +62,15 @@
}
}
+ @Override
+ public void clearCacheOfGroup(final String group) {
+ for (final StateToken entry : cacheMap.keySet()) {
+ if (entry.getGroup().equals(group)) {
+ cacheMap.remove(entry);
+ }
+ }
+ }
+
private StateAbstractDTO getCached(final StateToken newState) {
assert newState != null;
return useCache ? cacheMap.get(newState) : null;
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-11-05 16:04:02 UTC (rev 1584)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-11-05 19:34:12 UTC (rev 1585)
@@ -98,6 +98,12 @@
processCurrentHistoryToken();
}
});
+ onSocialNetworkChanged(false, new SocialNetworkChangedHandler() {
+ @Override
+ public void onSocialNetworkChanged(final SocialNetworkChangedEvent event) {
+ contentCache.clearCacheOfGroup(event.getState().getStateToken().getGroup());
+ }
+ });
}
@Override
Modified: trunk/src/main/java/cc/kune/core/public/about.html
===================================================================
--- trunk/src/main/java/cc/kune/core/public/about.html 2011-11-05 16:04:02 UTC (rev 1584)
+++ trunk/src/main/java/cc/kune/core/public/about.html 2011-11-05 19:34:12 UTC (rev 1585)
@@ -24,7 +24,7 @@
</img>
</a>
</span>
-<p>Version 0.0.9 (r1446+c0)</p>
+<p>Version 0.1.0-SNAPSHOT (r1556+c1)</p>
<h1><a name="section_1">CREDITS</a></h1>
<h2><a name="section_1_1">Authors</a></h2>
@@ -44,7 +44,7 @@
</li><li>Javier Picado Ladrón de Guevara and the <a href="http://iepala.es">http://iepala.es</a> staff for their
support and infrastructure
</li><li>Javier de la Cueva and Leovigildo García-Bobadilla for the legal support
- </li><li>Jonathan Araña Cruz, Roxu and all the <a href="http://xsto.info">http://xsto.info</a> staff for their
+ </li><li>Jonathan Araña Cruz, Roxu and all the <a href="http://xsto.info">http://xsto.info</a> staff for their help with the infrastructure
</li><li>Juan Pablo Zafra Delgado for his research and support for the integration of additional modules
</li><li>Daniel Jiménez for the initial help and coordination
</li><li>Johnattan Rupire, William Austen Bradbury and Rana Hassan for their web contributions and
@@ -235,6 +235,11 @@
Creative Commons Attribution 3.0 Unported license
<a href="https://secure.wikimedia.org/wikipedia/commons/wiki/File:Acer_japonicum_Vitifolium_JPG1fu.jpg">https://secure.wikimedia.org/wikipedia/commons/wiki/File:Acer_japonicum_Vitifolium_JPG1fu.jpg</a>
</p>
+<p><strong>Cursor</strong><br/>
+<a href="https://secure.wikimedia.org/wikipedia/commons/wiki/File:Black_Cursor.svg">https://secure.wikimedia.org/wikipedia/commons/wiki/File:Black_Cursor.svg</a>
+Ort43v<br/>
+Creative Commons Attribution-Share Alike 3.0 Unported license
+<a href="http://creativecommons.org/licenses/by-sa/3.0/deed.en">http://creativecommons.org/licenses/by-sa/3.0/deed.en</a></p>
</body>
</html>
More information about the kune-commits
mailing list