~cszikszoy/do-plugins/pastebin

« back to all changes in this revision

Viewing changes to DiskMounter/MountAction.cs

  • Committer: Alex Launi
  • Date: 2008-05-24 22:51:36 UTC
  • mfrom: (39.7.7 plugins-devel)
  • mto: This revision was merged to the branch mainline in revision 98.
  • Revision ID: alex@eriktorvaldsonn-20080524225136-ni1424yaozte846m
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// MountAction.cs
 
2
//
 
3
// This program is free software; you can redistribute it and/or modify
 
4
// it under the terms of the GNU General Public License as published by
 
5
// the Free Software Foundation; either version 3 of the License, or
 
6
// (at your option) any later version.
 
7
//
 
8
// This program is distributed in the hope that it will be useful,
 
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
11
// GNU General Public License for more details.
 
12
// 
 
13
// You should have received a copy of the GNU General Public License
 
14
// along with this program; if not, see <http://www.gnu.org/licenses/> or 
 
15
// write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
 
16
// Boston, MA 02111-1307 USA
 
17
//
 
18
using System;
 
19
using System.Collections.Generic;
 
20
 
 
21
using Gnome.Vfs;
 
22
 
 
23
using Mount;
 
24
using Do.Universe;
 
25
 
 
26
namespace Mount
 
27
{
 
28
        public class MountAction : AbstractAction
 
29
        {
 
30
        
 
31
                public MountAction ()
 
32
                {
 
33
                }
 
34
                
 
35
                public override string Name {
 
36
                        get { return "Mount"; }
 
37
                }
 
38
                
 
39
                public override string Description {
 
40
                        get { return "Mount volume"; }
 
41
                }
 
42
                
 
43
                public override string Icon {
 
44
                        get { return "harddrive"; }
 
45
                }
 
46
                
 
47
                public override Type[] SupportedItemTypes {
 
48
                        get {
 
49
                        return new Type[] {
 
50
                                
 
51
                                        typeof (UnmountedDriveItem),
 
52
                                };
 
53
                        }
 
54
                }
 
55
                
 
56
                public override bool SupportsItem (IItem item) 
 
57
                {
 
58
                        return true;
 
59
                }
 
60
                
 
61
                public override bool SupportsModifierItemForItems (IItem[] items, IItem modItem)
 
62
                {
 
63
                        return false;
 
64
                }
 
65
                
 
66
                public override IItem[] Perform (IItem[] items, IItem[] modItems)
 
67
                {
 
68
                        (items[0] as UnmountedDriveItem).Mount ();
 
69
                        return null;
 
70
                }
 
71
        }
 
72
}