8
public class OpenCommand : ICommand
16
get { return "Open"; }
19
public string Description {
20
get { return "Opens many kinds of items."; }
24
get { return "gtk-open"; }
27
public Type[] SupportedTypes {
30
typeof (IOpenableItem),
36
public Type[] SupportedModifierTypes {
42
public bool SupportsItem (IItem item) {
46
public void Perform (IItem[] items, IItem[] modifierItems)
52
foreach (IItem item in items) {
53
if (item is IOpenableItem) {
54
(item as IOpenableItem).Open ();
57
else if (item is IURIItem) {
58
open_item = (item as IURIItem).URI;
60
Util.Desktop.Open (open_item, out error_message);