~iwarford/do-plugins/fart-plugin-fwiw

« back to all changes in this revision

Viewing changes to RememberTheMilk/src/RTMPriorityItem.cs

  • Committer: Jason Jones
  • Date: 2008-12-24 04:45:02 UTC
  • mfrom: (335.1.9 do-plugins)
  • Revision ID: jasonedwardjones@gmail.com-20081224044502-ra56ym06cp1iqs7t
MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* RTMPriorityItem.cs
 
2
 *
 
3
 * GNOME Do is the legal property of its developers. Please refer to the
 
4
 * COPYRIGHT file distributed with this source distribution.
 
5
 *
 
6
 * This program is free software: you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation, either version 3 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 */
 
19
 
 
20
 
 
21
 
 
22
using Do.Universe;
 
23
                
 
24
namespace Do.Addins.RTM
 
25
{
 
26
        public class RTMPriorityItem : Item
 
27
        {
 
28
                private string name;
 
29
                private string desc;
 
30
                
 
31
                public RTMPriorityItem (string name, string desc)
 
32
                {
 
33
                        this.name = name;
 
34
                        this.desc = desc;
 
35
                }
 
36
                
 
37
                public override string Name { get { return name; } }
 
38
                public override string Description { get { return desc; } }
 
39
                public override string Icon {
 
40
                        get {
 
41
                                if (name == "Low")
 
42
                                        return "task-low.png@" + GetType ().Assembly.FullName;
 
43
                                else if (name == "Medium")
 
44
                                        return "task-medium.png@" + GetType ().Assembly.FullName;
 
45
                                else if (name == "High")
 
46
                                        return "task-high.png@" + GetType ().Assembly.FullName;
 
47
                                else if (name == "Up")
 
48
                                        return "task-priority-up.png@" + GetType ().Assembly.FullName;
 
49
                                else if (name == "Down")
 
50
                                        return "task-priority-down.png@" + GetType ().Assembly.FullName;
 
51
                                else
 
52
                                        return "task.png@" + GetType ().Assembly.FullName;
 
53
                        }
 
54
                }
 
55
                
 
56
                public string Priority {
 
57
                        get {
 
58
                                if (name == "Low")
 
59
                                        return "3";
 
60
                                else if (name == "Medium")
 
61
                                        return "2";
 
62
                                else if (name == "High")
 
63
                                        return "1";
 
64
                                else if (name == "Up")
 
65
                                        return "up";
 
66
                                else if (name == "Down")
 
67
                                        return "down";
 
68
                                else
 
69
                                        return "N";
 
70
                        }
 
71
                }
 
72
                
 
73
        }
 
74
}