commit 34cd9aff0d4a36dcce2aa1645255525ad33d1eb1
Author: Christos KK Loverdos <loverdos@gmail.com>
Date:   Tue Apr 16 13:24:51 2013 +0300

    New button "Add everybody" to file Share dialog
    
    Refs #3575

diff --git a/src/gr/grnet/pithos/web/client/Const.java b/src/gr/grnet/pithos/web/client/Const.java
index 3b5916f..6a4d8b6 100644
--- a/src/gr/grnet/pithos/web/client/Const.java
+++ b/src/gr/grnet/pithos/web/client/Const.java
@@ -24,6 +24,8 @@ public final class Const {
     public static final String LOGIN_URL = "loginUrl";
 
     public static final String PERCENT_100 = "100%";
+    public static final String PERCENT_75 = "75%";
+
     public static final String DATE_FORMAT_1 = "EEE, dd MMM yyyy HH:mm:ss";
     public static final String AUTH_COOKIE = "authCookie";
 
diff --git a/src/gr/grnet/pithos/web/client/FileShareDialog.java b/src/gr/grnet/pithos/web/client/FileShareDialog.java
index b1cf903..e547bdf 100644
--- a/src/gr/grnet/pithos/web/client/FileShareDialog.java
+++ b/src/gr/grnet/pithos/web/client/FileShareDialog.java
@@ -272,9 +272,8 @@ public class FileShareDialog extends AbstractPropertiesDialog {
         });
         addUser.addStyleName("button");
         permButtons.add(addUser);
-        permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER);
 
-        Button add = new Button("Add Group", new ClickHandler() {
+        Button addGroup = new Button("Add Group", new ClickHandler() {
             @Override
             public void onClick(ClickEvent event) {
                 if (app.getAccount().getGroups().isEmpty()) {
@@ -298,10 +297,23 @@ public class FileShareDialog extends AbstractPropertiesDialog {
                 }
             }
         });
-        add.addStyleName("button");
-        permButtons.add(add);
-        permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER);
+        addGroup.addStyleName("button");
+        permButtons.add(addGroup);
 
+
+        Button addEverybody = new Button("Add everybody", new ClickHandler() {
+            @Override
+            public void onClick(ClickEvent event) {
+                Pithos.LOG("Adding to Everybody");
+                Pithos.LOG("");
+                permList.addPermission("*", true, false);
+                permList.updatePermissionTable();
+            }
+        });
+        addEverybody.addStyleName("button");
+        permButtons.add(addEverybody);
+
+        permButtons.setCellHorizontalAlignment(addGroup, HasHorizontalAlignment.ALIGN_CENTER);
         privatePermPanel.add(permList);
         privatePermPanel.add(permButtons);
 
diff --git a/src/gr/grnet/pithos/web/client/PermissionsAddDialog.java b/src/gr/grnet/pithos/web/client/PermissionsAddDialog.java
index cc143f2..6ebca4f 100644
--- a/src/gr/grnet/pithos/web/client/PermissionsAddDialog.java
+++ b/src/gr/grnet/pithos/web/client/PermissionsAddDialog.java
@@ -189,6 +189,7 @@ public class PermissionsAddDialog extends DialogBox {
                 public void onSuccess(UserCatalogs requestedUserCatalogs, UserCatalogs updatedUserCatalogs) {
                     final String userID = updatedUserCatalogs.getID(userDisplayName);
                     if(userID == null) {
+                        Pithos.LOG("PermissionsDialog::addUserPermission(), UpdateUserCatalogs() => Unknown user ", userDisplayName);
                         app.displayWarning("Unknown user " + userDisplayName);
                     }
                     else if(!alreadyHasPermission(userID)) {
diff --git a/src/gr/grnet/pithos/web/client/PermissionsList.java b/src/gr/grnet/pithos/web/client/PermissionsList.java
index e7e65ae..a04548f 100644
--- a/src/gr/grnet/pithos/web/client/PermissionsList.java
+++ b/src/gr/grnet/pithos/web/client/PermissionsList.java
@@ -130,6 +130,7 @@ public class PermissionsList extends Composite {
     }
 
     public void addPermission(String userID, boolean read, boolean write) {
+        Pithos.LOG("PermissionsList::addPermission(userID=", userID, ", read=", read, ", write=", write, ")");
         permissions.put(userID, new Boolean[]{Boolean.valueOf(read), Boolean.valueOf(write)});
         hasChanges = true;
         updatePermissionTable();
diff --git a/src/gr/grnet/pithos/web/client/Pithos.java b/src/gr/grnet/pithos/web/client/Pithos.java
index d809732..670d6f6 100644
--- a/src/gr/grnet/pithos/web/client/Pithos.java
+++ b/src/gr/grnet/pithos/web/client/Pithos.java
@@ -399,10 +399,12 @@ public class Pithos implements EntryPoint, ResizeHandler {
     }
 
     private void initialize() {
+        userCatalogs.updateWithIDAndName("*", "All Pithos users");
+
         lastModified = new Date(); //Initialize if-modified-since value with now.
         resources.pithosCss().ensureInjected();
         boolean bareContent = Window.Location.getParameter("noframe") != null;
-        String contentWidth = bareContent ? Const.PERCENT_100 : "75%";
+        String contentWidth = bareContent ? Const.PERCENT_100 : Const.PERCENT_75;
 
         VerticalPanel outer = new VerticalPanel();
         outer.setWidth(Const.PERCENT_100);
