### Eclipse Workspace Patch 1.0
#P Spark
Index: src/java/org/jivesoftware/spark/ui/rooms/ChatRoomImpl.java
===================================================================
--- src/java/org/jivesoftware/spark/ui/rooms/ChatRoomImpl.java	(revision 10959)
+++ src/java/org/jivesoftware/spark/ui/rooms/ChatRoomImpl.java	(working copy)
@@ -10,6 +10,7 @@
 
 package org.jivesoftware.spark.ui.rooms;
 
+import org.jivesoftware.resource.Default;
 import org.jivesoftware.resource.Res;
 import org.jivesoftware.resource.SparkRes;
 import org.jivesoftware.smack.Roster;
@@ -151,8 +152,9 @@
         addToRosterButton = new ChatRoomButton("", SparkRes.getImageIcon(SparkRes.ADD_IMAGE_24x24));
         if (entry == null && !StringUtils.parseResource(participantJID).equals(participantNickname)) {
             addToRosterButton.setToolTipText(Res.getString("message.add.this.user.to.your.roster"));
-            getToolBar().addChatRoomButton(addToRosterButton);
-
+            if (!"true".equals(Default.getString(Default.ADD_CONTACT_DISABLED))) {
+            	getToolBar().addChatRoomButton(addToRosterButton);
+            }
             addToRosterButton.addActionListener(this);
         }
 
Index: src/java/org/jivesoftware/resource/Default.java
===================================================================
--- src/java/org/jivesoftware/resource/Default.java	(revision 10959)
+++ src/java/org/jivesoftware/resource/Default.java	(working copy)
@@ -46,6 +46,7 @@
     public static final String PROXY_HOST = "PROXY_HOST";
     public static final String PROXY_PORT = "PROXY_PORT";
     public static final String ACCOUNT_DISABLED = "ACCOUNT_DISABLED";
+    public static final String ADD_CONTACT_DISABLED = "ADD_CONTACT_DISABLED";
     public static final String CHANGE_PASSWORD_DISABLED = "CHANGE_PASSWORD_DISABLED";
     public static final String TRAY_IMAGE = "TRAY_IMAGE";
     public static final String FRAME_IMAGE = "FRAME_IMAGE";
Index: src/java/org/jivesoftware/sparkimpl/search/users/UserSearchResults.java
===================================================================
--- src/java/org/jivesoftware/sparkimpl/search/users/UserSearchResults.java	(revision 10959)
+++ src/java/org/jivesoftware/sparkimpl/search/users/UserSearchResults.java	(working copy)
@@ -10,6 +10,7 @@
 
 package org.jivesoftware.sparkimpl.search.users;
 
+import org.jivesoftware.resource.Default;
 import org.jivesoftware.resource.SparkRes;
 import org.jivesoftware.resource.Res;
 import org.jivesoftware.smack.util.StringUtils;
@@ -177,10 +178,12 @@
             }
         };
 
-        final JMenuItem addAsContact = new JMenuItem(addContactAction);
-        addContactAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE));
-        addContactAction.putValue(Action.NAME, Res.getString("menuitem.add.as.contact"));
-        menu.add(addAsContact);
+        if (!"true".equals(Default.getString(Default.ADD_CONTACT_DISABLED))) {
+	        final JMenuItem addAsContact = new JMenuItem(addContactAction);
+	        addContactAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_ADD_IMAGE));
+	        addContactAction.putValue(Action.NAME, Res.getString("menuitem.add.as.contact"));
+	        menu.add(addAsContact);
+        }
 
         final JMenuItem chatMenu = new JMenuItem(chatAction);
         chatAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE));
Index: src/java/org/jivesoftware/spark/ui/ContactList.java
===================================================================
--- src/java/org/jivesoftware/spark/ui/ContactList.java	(revision 10959)
+++ src/java/org/jivesoftware/spark/ui/ContactList.java	(working copy)
@@ -12,6 +12,7 @@
 
 import org.jivesoftware.MainWindowListener;
 import org.jivesoftware.Spark;
+import org.jivesoftware.resource.Default;
 import org.jivesoftware.resource.Res;
 import org.jivesoftware.resource.SparkRes;
 import org.jivesoftware.smack.*;
@@ -208,7 +209,9 @@
 
 
         final RolloverButton addContactButton = new RolloverButton(SparkRes.getImageIcon(SparkRes.USER1_ADD_16x16));
-        commandPanel.add(addContactButton);
+        if (!"true".equals(Default.getString(Default.ADD_CONTACT_DISABLED))) {
+        	commandPanel.add(addContactButton);
+        }
         addContactButton.setToolTipText(Res.getString("message.add.a.contact"));
         addContactButton.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
@@ -1176,7 +1179,9 @@
 
 
         final JPopupMenu popup = new JPopupMenu();
-        popup.add(addContactMenu);
+        if (!"true".equals(Default.getString(Default.ADD_CONTACT_DISABLED))) {
+        	popup.add(addContactMenu);
+        }
         popup.add(addContactGroupMenu);
         popup.addSeparator();
 
@@ -1664,7 +1669,9 @@
         ResourceUtils.resButton(addContactsMenu, Res.getString("menuitem.add.contact"));
         ResourceUtils.resButton(addContactGroupMenu, Res.getString("menuitem.add.contact.group"));
 
-        contactsMenu.add(addContactsMenu);
+        if (!"true".equals(Default.getString(Default.ADD_CONTACT_DISABLED))) {
+        	contactsMenu.add(addContactsMenu);
+        }
         contactsMenu.add(addContactGroupMenu);
         addContactsMenu.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
Index: src/java/org/jivesoftware/resource/default.properties
===================================================================
--- src/java/org/jivesoftware/resource/default.properties	(revision 10959)
+++ src/java/org/jivesoftware/resource/default.properties	(working copy)
@@ -30,5 +30,8 @@
 # Account Disabled
 ACCOUNT_DISABLED =
 
+# add Contact Disabled
+ADD_CONTACT_DISABLED = true
+
 # Change Password Disabled
 CHANGE_PASSWORD_DISABLED = 
\ No newline at end of file
