labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r793803 - in /labs/hupa/src/main/java/org/apache/hupa/client: mvp/IMAPMessageListPresenter.java mvp/IMAPMessageListView.java widgets/MyFixedWithGrid.java
Date Tue, 14 Jul 2009 06:56:27 GMT
Author: norman
Date: Tue Jul 14 06:56:26 2009
New Revision: 793803

URL: http://svn.apache.org/viewvc?rev=793803&view=rev
Log:
Fix bug when handling clickevents
only call super.onBrowserEvent() one time

Modified:
    labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
    labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
    labs/hupa/src/main/java/org/apache/hupa/client/widgets/MyFixedWithGrid.java

Modified: labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
URL: http://svn.apache.org/viewvc/labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java?rev=793803&r1=793802&r2=793803&view=diff
==============================================================================
--- labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java (original)
+++ labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java Tue Jul
14 06:56:26 2009
@@ -92,8 +92,10 @@
 		display.getDataTableClick().addClickHandler(new ClickHandler<IMAPMessage>() {
 
 			public void onClick(ClickEvent<IMAPMessage> event) {
-				GWT.log("FIRE", null);
-				bus.fireEvent(new ExpandMessageEvent(user,folder,event.getRowValue()));
+				if (event.getCell() >=0) {
+					GWT.log("FIRE", null);
+					bus.fireEvent(new ExpandMessageEvent(user,folder,event.getRowValue()));
+				}
 			}
 			
 		});

Modified: labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
URL: http://svn.apache.org/viewvc/labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java?rev=793803&r1=793802&r2=793803&view=diff
==============================================================================
--- labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java (original)
+++ labs/hupa/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java Tue Jul 14
06:56:26 2009
@@ -142,21 +142,26 @@
 		
 		dataTable.addClickHandler(new org.apache.hupa.client.events.ClickHandler<IMAPMessage>()
{
 
-			public void onClick(
-					org.apache.hupa.client.events.ClickEvent<IMAPMessage> event) {
-				Widget w = dataTable.getWidget(event.getRow(),event.getCell());
-				if (!(w instanceof Rating)) {
-					IMAPMessage m = event.getRowValue();
-					/*
-					if (m.getIMAPFlags().contains(IMAPFlag.SEEN) == false) {
-						mailTable.getDataTable().getRowFormatter().addStyleName(event.getRow(),"hupa-Mailtable-row-seen");
-						m.getIMAPFlags().add(IMAPFlag.SEEN);
-						mailTable.setRowValue(event.getRow(), m);
+					public void onClick(
+							org.apache.hupa.client.events.ClickEvent<IMAPMessage> event) {
+						if (event.getCell() >= 0) {
+							Widget w = dataTable.getWidget(event.getRow(),
+									event.getCell());
+							if (!(w instanceof Rating)) {
+								IMAPMessage m = event.getRowValue();
+								/*
+								 * if (m.getIMAPFlags().contains(IMAPFlag.SEEN)
+								 * == false) {
+								 * mailTable.getDataTable().getRowFormatter
+								 * ().addStyleName
+								 * (event.getRow(),"hupa-Mailtable-row-seen");
+								 * m.getIMAPFlags().add(IMAPFlag.SEEN);
+								 * mailTable.setRowValue(event.getRow(), m); }
+								 */
+							}
+						}
 					}
-					*/
-				}
-			}
-		});
+				});
 		
 		mailTable.getDataTable().setCellSpacing(0);
 

Modified: labs/hupa/src/main/java/org/apache/hupa/client/widgets/MyFixedWithGrid.java
URL: http://svn.apache.org/viewvc/labs/hupa/src/main/java/org/apache/hupa/client/widgets/MyFixedWithGrid.java?rev=793803&r1=793802&r2=793803&view=diff
==============================================================================
--- labs/hupa/src/main/java/org/apache/hupa/client/widgets/MyFixedWithGrid.java (original)
+++ labs/hupa/src/main/java/org/apache/hupa/client/widgets/MyFixedWithGrid.java Tue Jul 14
06:56:26 2009
@@ -39,7 +39,6 @@
 	@Override
 	public void onBrowserEvent(Event event) {
 		super.onBrowserEvent(event);
-		super.onBrowserEvent(event);
 		Element targetRow = null;
 		Element targetCell = null;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message