2
// DropboxUnshareAction.cs
4
// GNOME Do is the legal property of its developers. Please refer to the
5
// COPYRIGHT file distributed with this
6
// source distribution.
8
// This program is free software: you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation, either version 3 of the License, or
11
// (at your option) any later version.
13
// This program is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
// GNU General Public License for more details.
18
// You should have received a copy of the GNU General Public License
19
// along with this program. If not, see <http://www.gnu.org/licenses/>.
25
using System.Collections.Generic;
30
using Do.Universe.Common;
37
public class DropboxUnshareAction : DropboxAbstractAction
40
public override string Name {
41
get { return AddinManager.CurrentLocalizer.GetString ("Stop sharing with Dropbox"); }
44
public override string Description {
45
get { return AddinManager.CurrentLocalizer.GetString ("Unlinks a file from your Dropbox public folder."); }
48
public override string Icon {
49
get { return ("dropbox-remove.png@") + GetType ().Assembly.FullName; }
52
public override bool SupportsItem (Item item)
54
string path = GetPath(item);
56
return File.Exists (path) && HasLink (path);
59
public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
61
foreach (Item item in items) {
62
string path = GetPath (item);
63
string link_path = GetLink (path);
67
Notify (String.Format (AddinManager.CurrentLocalizer.GetString ("Stopped sharing") + " {0}", path));