mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
Merge branch 'master' of https://stash.kopano.io/scm/koe/kopano_ol_extension_source
Conflicts: translations/nb.po
This commit is contained in:
commit
45d81fd29c
@ -56,7 +56,7 @@ namespace Acacia.Controls
|
||||
CheckStateChanged(this, new CheckStateChangedEventArgs(node));
|
||||
}
|
||||
}
|
||||
|
||||
private ToolTip toolTip;
|
||||
private KCheckManager _checkManager;
|
||||
[Browsable(false)]
|
||||
public KCheckManager CheckManager
|
||||
@ -97,7 +97,7 @@ namespace Acacia.Controls
|
||||
|
||||
private void ToggleCheck(KTreeNode node)
|
||||
{
|
||||
if (_checkManager == null || node == null)
|
||||
if (_checkManager == null || node == null || !node.CheckBoxEnabled)
|
||||
return;
|
||||
|
||||
if (!SelectedNodes.Contains(node) || SelectedNodes.Count == 1)
|
||||
@ -181,6 +181,8 @@ namespace Acacia.Controls
|
||||
SetStyle(ControlStyles.Selectable, true);
|
||||
BackColor = SystemColors.Window;
|
||||
|
||||
toolTip = new ToolTip();
|
||||
|
||||
_rootNodes = new KTreeNodes(this);
|
||||
SetupRenderer();
|
||||
InitScrollBars();
|
||||
@ -449,6 +451,12 @@ namespace Acacia.Controls
|
||||
// Render new node
|
||||
if (_highlightNode != null)
|
||||
Rerender(_highlightNode);
|
||||
|
||||
// Update any tooltips
|
||||
if (old?.ToolTip != null)
|
||||
toolTip.SetToolTip(this, null);
|
||||
if (_highlightNode?.ToolTip != null)
|
||||
toolTip.SetToolTip(this, _highlightNode.ToolTip);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1147,20 +1155,5 @@ namespace Acacia.Controls
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Winforms Autogenerated
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// KTree
|
||||
//
|
||||
this.Name = "KTree";
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ namespace Acacia.Controls
|
||||
|
||||
public int? ImageIndex { get; set; }
|
||||
public object Tag { get; set; }
|
||||
public string ToolTip { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -126,6 +127,20 @@ namespace Acacia.Controls
|
||||
}
|
||||
}
|
||||
|
||||
private bool _checkBoxEnabled = true;
|
||||
public bool CheckBoxEnabled
|
||||
{
|
||||
get { return _checkBoxEnabled; }
|
||||
set
|
||||
{
|
||||
if (_checkBoxEnabled != value)
|
||||
{
|
||||
_checkBoxEnabled = value;
|
||||
Owner?.Rerender(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isExpanded;
|
||||
public bool IsExpanded
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ namespace Acacia.Controls
|
||||
// Checkbox
|
||||
if (_tree.CheckManager != null && node.HasCheckBox)
|
||||
{
|
||||
RenderCheckBox(graphics, node, dims.GetPartRect(KTreeNodeMeasurements.Part.CheckBox, true), highlight);
|
||||
RenderCheckBox(graphics, node, dims.GetPartRect(KTreeNodeMeasurements.Part.CheckBox, true), highlight, node.CheckBoxEnabled);
|
||||
}
|
||||
|
||||
// Images
|
||||
@ -159,10 +159,12 @@ namespace Acacia.Controls
|
||||
protected abstract void RenderNodeOutline(Graphics graphics, KTreeNode node, Rectangle rect, KTreeNodeMeasurements.Part? highlight);
|
||||
internal protected abstract void RenderNodeExpander(Graphics graphics, KTreeNode node, Rectangle rect, KTreeNodeMeasurements.Part? highlight);
|
||||
|
||||
protected virtual void RenderCheckBox(Graphics graphics, KTreeNode node, Rectangle rect, KTreeNodeMeasurements.Part? highlight)
|
||||
protected virtual void RenderCheckBox(Graphics graphics, KTreeNode node, Rectangle rect, KTreeNodeMeasurements.Part? highlight, bool enabled)
|
||||
{
|
||||
int state = (int)node.CheckState * 4 + 1;
|
||||
if (highlight != null && highlight.Value == KTreeNodeMeasurements.Part.CheckBox)
|
||||
if (!enabled)
|
||||
state += 3;
|
||||
else if (highlight != null && highlight.Value == KTreeNodeMeasurements.Part.CheckBox)
|
||||
state += 1;
|
||||
|
||||
CheckBoxRenderer.DrawCheckBox(graphics, rect.Location, (CheckBoxState)state);
|
||||
|
@ -515,11 +515,11 @@ namespace Acacia.Features.GAB
|
||||
contact.CustomerID = id;
|
||||
|
||||
// Create the contact data
|
||||
if (Get<string>(value, "displayName") != null) contact.FullName = Get<string>(value, "displayName");
|
||||
if (Get<string>(value, "givenName") != null) contact.FirstName = Get<string>(value, "givenName");
|
||||
if (Get<string>(value, "initials") != null) contact.Initials = Get<string>(value, "initials");
|
||||
if (Get<string>(value, "surname") != null) contact.LastName = Get<string>(value, "surname");
|
||||
if (Get<string>(value, "title") != null) contact.JobTitle = Get<string>(value, "title");
|
||||
if (Get<string>(value, "displayName") != null) contact.FullName = Get<string>(value, "displayName");
|
||||
|
||||
if (Get<string>(value, "smtpAddress") != null)
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
private bool CanManageFolder(MenuItem<IFolder> b, IFolder folder)
|
||||
{
|
||||
return folder.SyncId?.IsShared == true;
|
||||
return folder.SyncId?.IsCustom == true;
|
||||
}
|
||||
|
||||
private void ManageFolder(IFolder folder)
|
||||
@ -151,7 +151,7 @@ namespace Acacia.Features.SharedFolders
|
||||
// Check that we can get the id
|
||||
SyncId folderId = folder.SyncId;
|
||||
Logger.Instance.Trace(this, "GetSharedFolder1: {0}", folderId);
|
||||
if (folderId == null || !folderId.IsShared)
|
||||
if (folderId == null || !folderId.IsCustom)
|
||||
return null;
|
||||
|
||||
// Get the ZPush account
|
||||
@ -310,7 +310,7 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
public override bool IsApplicable(IFolder folder)
|
||||
{
|
||||
if (folder.SyncId != null && folder.SyncId.IsShared)
|
||||
if (folder.SyncId != null && folder.SyncId.IsCustom)
|
||||
return true;
|
||||
|
||||
using (IFolder parent = folder.Parent)
|
||||
@ -354,7 +354,7 @@ namespace Acacia.Features.SharedFolders
|
||||
private void OnSharedFolderDiscovered(IFolder folder)
|
||||
{
|
||||
Logger.Instance.Trace(this, "Shared folder discovered: {0} - {1}", folder.Name, folder.SyncId);
|
||||
if (folder.SyncId == null || !folder.SyncId.IsShared)
|
||||
if (folder.SyncId == null || !folder.SyncId.IsCustom)
|
||||
{
|
||||
Logger.Instance.Warning(this, "Local folder created in shared folder, deleting: {0} - {1}", folder.Name, folder.SyncId);
|
||||
// This is a new, locally created folder. Warn and remove
|
||||
@ -376,7 +376,7 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
private void Folder_BeforeFolderMove(IFolder src, IFolder moveTo, ref bool cancel)
|
||||
{
|
||||
if (src.SyncId?.IsShared == true || moveTo.SyncId?.IsShared == true)
|
||||
if (src.SyncId?.IsCustom == true || moveTo.SyncId?.IsCustom == true)
|
||||
{
|
||||
// Suppress any move of or into a shared folder
|
||||
Logger.Instance.Warning(this, "Shared folder move: {0} - {1}", src.Name, moveTo.Name);
|
||||
@ -399,7 +399,7 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
private void CheckSharedFolderRename(IFolder folder)
|
||||
{
|
||||
if (folder.SyncId != null && folder.SyncId.IsShared)
|
||||
if (folder.SyncId != null && folder.SyncId.IsCustom)
|
||||
{
|
||||
string originalName = (string)folder.GetProperty(OutlookConstants.PR_ZPUSH_NAME);
|
||||
// The folder.name property is sometimes cached, check against the MAPI property
|
||||
|
@ -30,6 +30,7 @@ namespace Acacia.Features.SharedFolders
|
||||
private readonly StoreTreeNode _store;
|
||||
private readonly AvailableFolder _folder;
|
||||
private SharedFolder _share;
|
||||
public readonly bool IsReadOnly;
|
||||
|
||||
public FolderTreeNode(StoreTreeNode store, AvailableFolder folder, SharedFolder share)
|
||||
{
|
||||
@ -39,6 +40,10 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
this.Text = folder.Name;
|
||||
|
||||
IsReadOnly = share?.SyncId?.Kind == SyncKind.Configured;
|
||||
HasCheckBox = true;
|
||||
CheckBoxEnabled = !IsReadOnly;
|
||||
|
||||
// Image
|
||||
// TODO: clean this up
|
||||
int index = ((int)OutlookConstants.BASIC_SYNC_TYPES[(int)folder.Type]) - 1;
|
||||
|
@ -17,7 +17,8 @@ namespace Acacia.Features.SharedFolders
|
||||
private readonly FeatureSharedFolders _feature;
|
||||
private readonly IFolder _folder;
|
||||
private SearchQuery _queryRoot;
|
||||
private SearchQuery.Or _queryCustom;
|
||||
private SearchQuery.Or _queryCustomShared;
|
||||
private SearchQuery.Or _queryCustomConfigured;
|
||||
private bool _queryCustomModified;
|
||||
|
||||
public RemindersQuery(FeatureSharedFolders feature, IStore store)
|
||||
@ -28,7 +29,7 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
public bool Open()
|
||||
{
|
||||
if (_queryCustom != null)
|
||||
if (_queryCustomShared != null && _queryCustomConfigured != null)
|
||||
return true;
|
||||
try
|
||||
{
|
||||
@ -39,30 +40,34 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
SearchQuery.And root = (SearchQuery.And)_queryRoot;
|
||||
// TODO: more strict checking of query
|
||||
if (root.Operands.Count == 3)
|
||||
if (root.Operands.Count == 5)
|
||||
{
|
||||
this._queryCustom = root.Operands.ElementAt(2) as SearchQuery.Or;
|
||||
if (this._queryCustom != null)
|
||||
this._queryCustomShared = root.Operands.ElementAt(2) as SearchQuery.Or;
|
||||
this._queryCustomConfigured = root.Operands.ElementAt(3) as SearchQuery.Or;
|
||||
if (this._queryCustomShared != null)
|
||||
{
|
||||
// TODO: check property test
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (root.Operands.Count == 3)
|
||||
{
|
||||
// KOE-98 introduced also checking of G and C prefixes, which are not yet present
|
||||
_queryCustomShared = root.Operands.ElementAt(2) as SearchQuery.Or;
|
||||
}
|
||||
|
||||
// We have the root, but not the custom query. Create it.
|
||||
Logger.Instance.Debug(this, "Creating custom query");
|
||||
_queryCustom = new SearchQuery.Or();
|
||||
|
||||
// Add the prefix exclusion for shared folders
|
||||
_queryCustom.Add(
|
||||
new SearchQuery.Not(
|
||||
new SearchQuery.PropertyContent(
|
||||
PROP_FOLDER, SearchQuery.ContentMatchOperation.Prefix, SearchQuery.ContentMatchModifiers.None, "S"
|
||||
)
|
||||
if (_queryCustomShared == null)
|
||||
_queryCustomShared = AddCustomQuery(root, "S");
|
||||
_queryCustomConfigured = AddCustomQuery(root, "C");
|
||||
// Add the G (GAB) exclusion. Folders will never have a flag with this prefix, so it's simpler
|
||||
root.Operands.Add(new SearchQuery.Not(
|
||||
new SearchQuery.PropertyContent(
|
||||
PROP_FOLDER, SearchQuery.ContentMatchOperation.Prefix, SearchQuery.ContentMatchModifiers.None, "G"
|
||||
)
|
||||
);
|
||||
));
|
||||
|
||||
root.Operands.Add(_queryCustom);
|
||||
Logger.Instance.Debug(this, "Modified query:\n{0}", root.ToString());
|
||||
// Store it
|
||||
FolderQuery = root;
|
||||
@ -72,7 +77,24 @@ namespace Acacia.Features.SharedFolders
|
||||
{
|
||||
Logger.Instance.Error(this, "Exception in Open: {0}", e);
|
||||
}
|
||||
return _queryCustom != null;
|
||||
return _queryCustomShared != null && _queryCustomConfigured != null;
|
||||
}
|
||||
|
||||
private SearchQuery.Or AddCustomQuery(SearchQuery.And root, string prefix)
|
||||
{
|
||||
SearchQuery.Or custom = new SearchQuery.Or();
|
||||
|
||||
// Add the prefix exclusion
|
||||
custom.Add(
|
||||
new SearchQuery.Not(
|
||||
new SearchQuery.PropertyContent(
|
||||
PROP_FOLDER, SearchQuery.ContentMatchOperation.Prefix, SearchQuery.ContentMatchModifiers.None, prefix
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
root.Operands.Add(custom);
|
||||
return custom;
|
||||
}
|
||||
|
||||
public string LogContextId
|
||||
@ -117,15 +139,28 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
public void UpdateReminders(SyncId folderId, bool wantReminders)
|
||||
{
|
||||
Logger.Instance.Trace(this, "Setting reminders for folder {0}: {1}", wantReminders, folderId);
|
||||
Logger.Instance.Trace(this, "Setting reminders for folder {0}: {1} ({2})", wantReminders, folderId, folderId?.Kind);
|
||||
switch(folderId.Kind)
|
||||
{
|
||||
case SyncKind.Configured:
|
||||
UpdateReminders(_queryCustomConfigured, folderId, wantReminders);
|
||||
break;
|
||||
case SyncKind.Shared:
|
||||
UpdateReminders(_queryCustomShared, folderId, wantReminders);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateReminders(SearchQuery.Or query, SyncId folderId, bool wantReminders)
|
||||
{
|
||||
string prefix = MakeFolderPrefix(folderId);
|
||||
if (prefix == null)
|
||||
return;
|
||||
|
||||
// Find existing
|
||||
for (int i = 0; i < _queryCustom.Operands.Count;)
|
||||
for (int i = 0; i < query.Operands.Count;)
|
||||
{
|
||||
SearchQuery.PropertyContent element = _queryCustom.Operands[i] as SearchQuery.PropertyContent;
|
||||
SearchQuery.PropertyContent element = query.Operands[i] as SearchQuery.PropertyContent;
|
||||
if (element != null && prefix == (string)element.Content)
|
||||
{
|
||||
Logger.Instance.Trace(this, "Found at {0}: {1}", i, folderId);
|
||||
@ -134,7 +169,8 @@ namespace Acacia.Features.SharedFolders
|
||||
return;
|
||||
|
||||
// Otherwise remove it. Still continue looking for others, just in case of duplicates
|
||||
_queryCustom.Operands.RemoveAt(i);
|
||||
query.Operands.RemoveAt(i);
|
||||
_queryCustomModified = true;
|
||||
}
|
||||
else ++i;
|
||||
}
|
||||
@ -143,7 +179,7 @@ namespace Acacia.Features.SharedFolders
|
||||
if (wantReminders)
|
||||
{
|
||||
Logger.Instance.Trace(this, "Adding reminders for {0}", folderId);
|
||||
_queryCustom.Operands.Add(new SearchQuery.PropertyContent(
|
||||
query.Operands.Add(new SearchQuery.PropertyContent(
|
||||
PROP_FOLDER, SearchQuery.ContentMatchOperation.Prefix, SearchQuery.ContentMatchModifiers.None, prefix
|
||||
));
|
||||
_queryCustomModified = true;
|
||||
@ -152,19 +188,37 @@ namespace Acacia.Features.SharedFolders
|
||||
|
||||
public void RemoveStaleReminders(IEnumerable<SyncId> wanted)
|
||||
{
|
||||
// Collect the valid prefixes
|
||||
HashSet<string> prefixes = new HashSet<string>();
|
||||
// Group the valid prefixes on type
|
||||
HashSet<string> prefixesS = new HashSet<string>();
|
||||
HashSet<string> prefixesC = new HashSet<string>();
|
||||
foreach (SyncId id in wanted)
|
||||
{
|
||||
string prefix = MakeFolderPrefix(id);
|
||||
if (prefix != null)
|
||||
prefixes.Add(prefix);
|
||||
{
|
||||
switch (id.Kind)
|
||||
{
|
||||
case SyncKind.Configured:
|
||||
prefixesC.Add(prefix);
|
||||
break;
|
||||
case SyncKind.Shared:
|
||||
prefixesS.Add(prefix);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update the queries
|
||||
RemoveStaleReminders(prefixesS, _queryCustomShared);
|
||||
RemoveStaleReminders(prefixesC, _queryCustomConfigured);
|
||||
}
|
||||
|
||||
private void RemoveStaleReminders(ISet<string> prefixes, SearchQuery.Or query)
|
||||
{
|
||||
// Remove all operands for which we do not want the prefix
|
||||
for (int i = 0; i < _queryCustom.Operands.Count;)
|
||||
for (int i = 0; i < query.Operands.Count;)
|
||||
{
|
||||
SearchQuery.PropertyContent element = _queryCustom.Operands[i] as SearchQuery.PropertyContent;
|
||||
SearchQuery.PropertyContent element = query.Operands[i] as SearchQuery.PropertyContent;
|
||||
if (element != null)
|
||||
{
|
||||
string prefix = (string)element.Content;
|
||||
@ -175,7 +229,7 @@ namespace Acacia.Features.SharedFolders
|
||||
}
|
||||
|
||||
Logger.Instance.Trace(this, "Unwanted prefix at {0}: {1}", i, prefix);
|
||||
_queryCustom.Operands.RemoveAt(i);
|
||||
query.Operands.RemoveAt(i);
|
||||
_queryCustomModified = true;
|
||||
}
|
||||
else ++i;
|
||||
@ -186,7 +240,7 @@ namespace Acacia.Features.SharedFolders
|
||||
{
|
||||
// Sanity check. The check for shared folders also excludes any weird ids; e.g. if permissions are wrong,
|
||||
// this will not be a sync id, but a backend id.
|
||||
if (folderId == null || !folderId.IsShared)
|
||||
if (folderId == null || !folderId.IsCustom)
|
||||
return null;
|
||||
return folderId.ToString() + ":";
|
||||
}
|
||||
|
@ -409,6 +409,7 @@ namespace Acacia.Features.SharedFolders
|
||||
OptionSendAs = null;
|
||||
OptionReminders = null;
|
||||
OptionPermissions = null;
|
||||
bool readOnly = false;
|
||||
|
||||
foreach (KTreeNode node in nodes)
|
||||
{
|
||||
@ -421,6 +422,10 @@ namespace Acacia.Features.SharedFolders
|
||||
if (!folderNode.IsShared)
|
||||
continue;
|
||||
|
||||
// Set all controls to read-only if any of the nodes is read-only
|
||||
if (folderNode.IsReadOnly)
|
||||
readOnly = true;
|
||||
|
||||
SharedFolder share = folderNode.SharedFolder;
|
||||
AvailableFolder folder = folderNode.AvailableFolder;
|
||||
|
||||
@ -497,6 +502,9 @@ namespace Acacia.Features.SharedFolders
|
||||
checkReminders.ThreeState = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply read-only state
|
||||
_layoutOptions.Enabled = !readOnly;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -607,7 +607,7 @@
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="_layoutOptions.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="_labelName" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="textName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="_labelSendAs" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkSendAs" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="_labelReminders" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkReminders" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="_labelPermissions" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelPermissionsValue" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings></value>
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="_labelName" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="textName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="_labelSendAs" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkSendAs" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="_labelReminders" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkReminders" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="_labelPermissions" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="labelPermissionsValue" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,Absolute,20" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="_layoutMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
|
@ -46,6 +46,8 @@ namespace Acacia.Features.SharedFolders
|
||||
private readonly GABHandler _gab;
|
||||
private readonly GABUser _user;
|
||||
|
||||
public readonly bool IsReadOnly;
|
||||
|
||||
public StoreTreeNode(SharedFoldersManager folders, GABHandler gab, GABUser user, string text,
|
||||
Dictionary<BackendId, SharedFolder> currentFolders)
|
||||
:
|
||||
@ -55,6 +57,7 @@ namespace Acacia.Features.SharedFolders
|
||||
this._feature = folders.Feature;
|
||||
this._gab = gab;
|
||||
this._user = user;
|
||||
this.IsReadOnly = false;
|
||||
|
||||
// Create an empty current state. When loading the nodes, the shares will be added. This has the benefit of
|
||||
// cleaning up automatically any obsolote shares.
|
||||
@ -63,6 +66,7 @@ namespace Acacia.Features.SharedFolders
|
||||
ChildLoader = new UserFolderLoader(this, folders, user);
|
||||
ChildLoader.ReloadOnCloseOpen = true;
|
||||
HasCheckBox = false;
|
||||
ApplyReadOnly(this, IsReadOnly);
|
||||
|
||||
// TODO: better icons, better way of handling this
|
||||
ImageIndex = user == GABUser.USER_PUBLIC ? 0 : 11;
|
||||
@ -78,6 +82,11 @@ namespace Acacia.Features.SharedFolders
|
||||
Control = _reloader;
|
||||
}
|
||||
|
||||
private static void ApplyReadOnly(KTreeNode node, bool isReadOnly)
|
||||
{
|
||||
node.ToolTip = isReadOnly ? Properties.Resources.SharedFolders_Node_Readonly_ToolTip : null;
|
||||
}
|
||||
|
||||
public GABUser User
|
||||
{
|
||||
get { return ((UserFolderLoader)ChildLoader).User; }
|
||||
@ -264,6 +273,7 @@ namespace Acacia.Features.SharedFolders
|
||||
// Create the tree node
|
||||
SharedFolder share = rootNode.GetInitialShareState(folder);
|
||||
FolderTreeNode child = new FolderTreeNode(rootNode, folder, share);
|
||||
ApplyReadOnly(child, child.IsReadOnly);
|
||||
|
||||
// Add
|
||||
children.Add(child);
|
||||
|
@ -1093,6 +1093,16 @@ namespace Acacia.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The folder has been configured by your system administrator and cannot be modified.
|
||||
///Please contact your system administrator for any required changes..
|
||||
/// </summary>
|
||||
internal static string SharedFolders_Node_Readonly_ToolTip {
|
||||
get {
|
||||
return ResourceManager.GetString("SharedFolders_Node_Readonly_ToolTip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No shared folders are available or you do not have permissions to view the root of the inbox..
|
||||
/// </summary>
|
||||
|
@ -520,4 +520,8 @@
|
||||
<data name="SharedFolders_LocalFolder_Title" xml:space="preserve">
|
||||
<value>Shared folders</value>
|
||||
</data>
|
||||
<data name="SharedFolders_Node_Readonly_ToolTip" xml:space="preserve">
|
||||
<value>The folder has been configured by your system administrator and cannot be modified.
|
||||
Please contact your system administrator for any required changes.</value>
|
||||
</data>
|
||||
</root>
|
@ -156,8 +156,8 @@ namespace Acacia
|
||||
foreach (Feature feature in Features)
|
||||
feature.AfterStartup();
|
||||
|
||||
// Initial send receive
|
||||
ThisAddIn.Instance.SendReceive();
|
||||
// [KOE-148] Initial send receive
|
||||
Instance.SendReceive();
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
|
@ -69,6 +69,14 @@ namespace Acacia.ZPush
|
||||
#endregion
|
||||
}
|
||||
|
||||
public enum SyncKind
|
||||
{
|
||||
Normal,
|
||||
Shared,
|
||||
Configured,
|
||||
GAB
|
||||
}
|
||||
|
||||
public class SyncId : ZPushId
|
||||
{
|
||||
public static readonly SyncId NONE = new SyncId("0");
|
||||
@ -76,10 +84,24 @@ namespace Acacia.ZPush
|
||||
public SyncId(string id) : base(id) { }
|
||||
public SyncId(int id) : base(id) { }
|
||||
|
||||
|
||||
public SyncKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_id.StartsWith("S"))
|
||||
return SyncKind.Shared;
|
||||
if (_id.StartsWith("C"))
|
||||
return SyncKind.Configured;
|
||||
if (_id.StartsWith("G"))
|
||||
return SyncKind.GAB;
|
||||
return SyncKind.Normal;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Checks if this is a SyncId for a shared folders
|
||||
/// </summary>
|
||||
public bool IsShared { get { return _id.StartsWith("S") || _id.StartsWith("C") || _id.StartsWith("G"); } }
|
||||
public bool IsCustom { get { return Kind != SyncKind.Normal; } }
|
||||
|
||||
#region Standard overrides
|
||||
|
||||
|
@ -1057,6 +1057,14 @@ msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Tit
|
||||
msgid "Shared folders"
|
||||
msgstr ""
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
|
||||
#: AcaciaZPushPlugin\UI\ProgressDialog\labelMessage.Text
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\UI\\ProgressDialog\\labelMessage.Text"
|
||||
|
@ -1379,3 +1379,11 @@ msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Tit
|
||||
msgid "Shared folders"
|
||||
msgstr ""
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
|
||||
|
@ -1059,6 +1059,16 @@ msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Tit
|
||||
msgid "Shared folders"
|
||||
msgstr "Shared folders"
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
|
||||
#: AcaciaZPushPlugin\UI\ProgressDialog\labelMessage.Text
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\UI\\ProgressDialog\\labelMessage.Text"
|
||||
|
@ -1377,3 +1377,11 @@ msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Tit
|
||||
msgid "Shared folders"
|
||||
msgstr ""
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
|
||||
|
@ -1380,3 +1380,11 @@ msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Tit
|
||||
msgid "Shared folders"
|
||||
msgstr ""
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
|
||||
|
@ -1344,3 +1344,11 @@ msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Tit
|
||||
msgid "Shared folders"
|
||||
msgstr ""
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,7 @@ msgstr ""
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2017-11-03 10:55+0000\n"
|
||||
"Last-Translator: Bob <b.huisman@kopano.com>\n"
|
||||
"Language-Team: Dutch <http://translate.kopano.io/projects/kopano/kopano-ol-"
|
||||
"extension/nl/>\n"
|
||||
"Language-Team: Dutch <http://translate.kopano.io/projects/kopano/kopano-ol-extension/nl/>\n"
|
||||
"Language: nl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=iso-8859-1\n"
|
||||
@ -1372,12 +1371,19 @@ msgstr "Kopieer filter"
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Body"
|
||||
msgid "Modifying shared folders locally is not supported. Please use the 'Shared Folders' dialog to modify these folders."
|
||||
msgstr ""
|
||||
"Het lokaal aanpassen van gedeelde mappen word niet ondersteund. Gebruik het "
|
||||
"venster 'Gedeelde Mappen' om deze mappen aan te passen."
|
||||
msgstr "Het lokaal aanpassen van gedeelde mappen word niet ondersteund. Gebruik het venster 'Gedeelde Mappen' om deze mappen aan te passen."
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_LocalFolder_Title
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Title"
|
||||
msgid "Shared folders"
|
||||
msgstr "Gedeelde mappen"
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
|
||||
|
@ -1134,3 +1134,11 @@ msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_LocalFolder_Tit
|
||||
msgid "Shared folders"
|
||||
msgstr ""
|
||||
|
||||
#: AcaciaZPushPlugin\Properties\Resources\SharedFolders_Node_Readonly_ToolTip
|
||||
#, csharp-format
|
||||
msgctxt "AcaciaZPushPlugin\\Properties\\Resources\\SharedFolders_Node_Readonly_ToolTip"
|
||||
msgid ""
|
||||
"The folder has been configured by your system administrator and cannot be modified. \n"
|
||||
"Please contact your system administrator for any required changes."
|
||||
msgstr ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user