~cszikszoy/do-plugins/pastebin

« back to all changes in this revision

Viewing changes to Tomboy/src/TomboySearchNotesCommand.cs

Spring cleaning. God Monodevelop is a luxury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//  RhythmboxPlayCommand.cs
 
1
//  TomboySearchNotesCommand.cs
2
2
//
3
3
//  GNOME Do is the legal property of its developers, whose names are too numerous
4
4
//  to list here.  Please refer to the COPYRIGHT file distributed with this
22
22
 
23
23
using Do.Universe;
24
24
 
25
 
namespace Do.Addins.Tomboy
 
25
namespace Tomboy
26
26
{
27
 
        
28
 
        
29
 
        public class TomboySearchNotesCommand : IAction
30
 
        {
31
 
                
32
 
                public TomboySearchNotesCommand()
33
 
                {
34
 
                }
35
 
                
36
 
                public string Name {
 
27
        public class TomboySearchNotesCommand : AbstractAction
 
28
        {                       
 
29
                public override string Name {
37
30
                        get { return "Search Tomboy Notes"; }
38
31
                }
39
32
                
40
 
                public string Description {
41
 
                        get { return "Search your Tomboy Notes bodies"; }
42
 
                }
43
 
                
44
 
                public string Icon {
45
 
                        get { return "/usr/share/icons/Tango/scalable/actions/gtk-find.svg"; }
46
 
                }
47
 
                
48
 
                public Type[] SupportedItemTypes {
 
33
                public override string Description {
 
34
                        get { return "Searches contents of Tomboy notes"; }
 
35
                }
 
36
                
 
37
                public override string Icon {
 
38
                        get { return "gtk-find"; }
 
39
                }
 
40
                
 
41
                public override Type[] SupportedItemTypes {
49
42
                        get {
50
43
                                return new Type[] {
51
44
                                        typeof (ITextItem),
53
46
                        }
54
47
                }
55
48
                
56
 
                public Type[] SupportedModifierItemTypes {
57
 
                        get { return null; }
58
 
                }
59
 
                
60
 
            public bool ModifierItemsOptional {
61
 
                  get { return false; }
62
 
            }
63
 
 
64
 
                public bool SupportsItem (IItem item) {
65
 
                        return true;
66
 
                }
67
 
                
68
 
            public bool SupportsModifierItemForItems (IItem[] items, IItem modItem) {
69
 
              return false;
70
 
            }
71
 
                        
72
 
            public IItem[] DynamicModifierItemsForItem (IItem item) {
73
 
              return null;
74
 
            }
75
 
                
76
 
                public IItem[] Perform (IItem[] items, IItem[] modifierItems)
 
49
                public override IItem[] Perform (IItem[] items, IItem[] modifierItems)
77
50
                {
78
 
                        TomboyDBus tomboy_instance = new TomboyDBus();
79
 
                        tomboy_instance.SearchNotes((items[0] as ITextItem).Text);
 
51
                        TomboyDBus tb = new TomboyDBus ();
 
52
                        tb.SearchNotes ((items [0] as ITextItem).Text);
80
53
                        return null;
81
54
                }
82
55
        }