~cszikszoy/do-plugins/fix-confluence

« back to all changes in this revision

Viewing changes to DiskMounter/src/MountAction.cs

  • Committer: Peng Deng
  • Date: 2009-06-17 01:07:23 UTC
  • Revision ID: dengpeng@gmail.com-20090617010723-wopvd2omtyp4rwfv
Clean up DiskMounter, make DiskItem using IUriItem interface, and let FileAndFolder support browsing IUriItem

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
using System.Collections.Generic;
20
20
using System.Linq;
21
21
 
22
 
using Gnome.Vfs;
23
22
using Mono.Unix;
24
23
 
25
24
using Do.Universe;
 
25
using Do.Platform;
26
26
 
27
27
namespace DiskMounter
28
28
{
41
41
                }
42
42
                
43
43
                public override IEnumerable<Type> SupportedItemTypes {
44
 
                        get {
45
 
                                return new Type[] {
46
 
                                        typeof (DriveItem),
47
 
                                };
48
 
                        }
 
44
                        get { yield return typeof (DriveItem); }
49
45
                }
50
46
                
51
47
                public override bool SupportsItem (Item item) 
60
56
                
61
57
                public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
62
58
                {
63
 
                        (items.First () as DriveItem).Mount ();
 
59
                        Services.Application.RunOnThread (() => {
 
60
                                (items.First () as DriveItem).Mount ();
 
61
                        });
64
62
                        yield break;
65
63
                }
66
64
        }