mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Merge pull request #49 from igniterealtime/disable-sendafile
Should not show 'Send a file' menu when file transfer is disabled https://igniterealtime.org/issues/browse/SPARK-1592
This commit is contained in:
@ -95,6 +95,7 @@ import org.jivesoftware.spark.Workspace;
|
|||||||
import org.jivesoftware.spark.component.InputDialog;
|
import org.jivesoftware.spark.component.InputDialog;
|
||||||
import org.jivesoftware.spark.component.RolloverButton;
|
import org.jivesoftware.spark.component.RolloverButton;
|
||||||
import org.jivesoftware.spark.component.VerticalFlowLayout;
|
import org.jivesoftware.spark.component.VerticalFlowLayout;
|
||||||
|
import org.jivesoftware.spark.filetransfer.SparkTransferManager;
|
||||||
import org.jivesoftware.spark.plugin.ContextMenuListener;
|
import org.jivesoftware.spark.plugin.ContextMenuListener;
|
||||||
import org.jivesoftware.spark.plugin.Plugin;
|
import org.jivesoftware.spark.plugin.Plugin;
|
||||||
import org.jivesoftware.spark.util.ModelUtil;
|
import org.jivesoftware.spark.util.ModelUtil;
|
||||||
@ -104,6 +105,7 @@ import org.jivesoftware.spark.util.SwingWorker;
|
|||||||
import org.jivesoftware.spark.util.TaskEngine;
|
import org.jivesoftware.spark.util.TaskEngine;
|
||||||
import org.jivesoftware.spark.util.UIComponentRegistry;
|
import org.jivesoftware.spark.util.UIComponentRegistry;
|
||||||
import org.jivesoftware.spark.util.log.Log;
|
import org.jivesoftware.spark.util.log.Log;
|
||||||
|
import org.jivesoftware.sparkimpl.plugin.manager.Enterprise;
|
||||||
import org.jivesoftware.sparkimpl.profile.VCardManager;
|
import org.jivesoftware.sparkimpl.profile.VCardManager;
|
||||||
import org.jivesoftware.sparkimpl.settings.local.LocalPreferences;
|
import org.jivesoftware.sparkimpl.settings.local.LocalPreferences;
|
||||||
import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
|
import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
|
||||||
@ -1567,7 +1569,7 @@ public class ContactList extends JPanel implements ActionListener,
|
|||||||
sendAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.DOCUMENT_16x16));
|
sendAction.putValue(Action.SMALL_ICON, SparkRes.getImageIcon(SparkRes.DOCUMENT_16x16));
|
||||||
sendAction.putValue(Action.NAME, Res.getString("menuitem.send.a.file"));
|
sendAction.putValue(Action.NAME, Res.getString("menuitem.send.a.file"));
|
||||||
|
|
||||||
if (item.getPresence() != null) {
|
if ((item.getPresence() != null) && Enterprise.containsFeature(Enterprise.FILE_TRANSFER_FEATURE)) {
|
||||||
popup.add(sendAction);
|
popup.add(sendAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user