~alexlauni/do-plugins/jolicloud

« back to all changes in this revision

Viewing changes to RememberTheMilk/src/RTMListItemSource.cs

  • Committer: Alex Launi
  • Date: 2009-06-24 13:17:29 UTC
  • mfrom: (618.1.17 do-plugins)
  • Revision ID: alex.launi@gmail.com-20090624131729-1l9g76ejqq4leka4
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* RTMListItemSource.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
 
 */
 
1
// RTMListItemSource.cs
 
2
// 
 
3
// Copyright (C) 2009 GNOME Do
 
4
// 
 
5
// This program is free software: you can redistribute it and/or modify
 
6
// it under the terms of the GNU General Public License as published by
 
7
// the Free Software Foundation, either version 3 of the License, or
 
8
// (at your option) any later version.
 
9
// 
 
10
// This program is distributed in the hope that it will be useful,
 
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
// GNU General Public License for more details.
 
14
// 
 
15
// You should have received a copy of the GNU General Public License
 
16
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
// 
19
18
 
20
19
using System;
21
20
using System.Collections.Generic;
22
21
using System.Threading;
23
22
 
 
23
using Mono.Addins;
 
24
 
24
25
using Do.Platform.Linux;
25
26
using Do.Universe;
26
27
 
27
28
namespace RememberTheMilk
28
 
{       
 
29
{
 
30
        /// <summary>
 
31
        /// ItemSource class for the Remember The Milk lists
 
32
        /// </summary>
29
33
        public class RTMListItemSource : ItemSource, IConfigurable
30
34
        {               
31
35
                public override string Name {
32
 
                        get { return "Remember The Milk Task Lists"; }
 
36
                        get { return AddinManager.CurrentLocalizer.GetString ("Remember The Milk Lists"); }
33
37
                }
34
38
                
35
39
                public override string Description {
36
 
                        get { return "Task Lists in your Remember The Milk account."; }
 
40
                        get { return AddinManager.CurrentLocalizer.GetString ("Task Lists in your Remember The Milk account."); }
37
41
                }
38
42
                
39
43
                public override string Icon {
42
46
                
43
47
                public override IEnumerable<Type> SupportedItemTypes
44
48
                {
45
 
                        get {
46
 
                                return new Type[] {
47
 
                                        typeof (RTMListItem),
48
 
                                };
49
 
                        }
 
49
                        get { yield return typeof (RTMListItem); }
50
50
                }
51
51
                
52
52
                public override IEnumerable<Item> Items
64
64
                        Thread updateLists = new Thread (new ThreadStart (RTM.UpdateLists));
65
65
                        updateLists.IsBackground = true;
66
66
                        updateLists.Start ();
67
 
                        
68
 
                        Thread updateTasks = new Thread (new ThreadStart (RTM.UpdateTasks));
69
 
                        updateTasks.IsBackground = true;
70
 
                        updateTasks.Start ();
71
67
                }
72
68
                
73
69
                public Gtk.Bin GetConfiguration ()