~alexlauni/do-plugins/jolicloud

« back to all changes in this revision

Viewing changes to PingFM/src/PingFMServiceItemSource.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
 
/* PingFMServiceItemSource.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
// PingFMServiceItemSource.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/>.
19
17
 
20
18
using System;
21
19
using System.Collections.Generic;
22
20
using System.Linq;
23
21
using System.Threading;
24
 
using Mono.Unix;
 
22
using Mono.Addins;
25
23
 
26
24
using Do.Platform.Linux;
27
25
using Do.Universe;
32
30
        public sealed class PingFMServiceItemSource : ItemSource, IConfigurable
33
31
        {
34
32
                public override string Name {
35
 
                        get { return Catalog.GetString ("Ping.FM Services");}
 
33
                        get { return AddinManager.CurrentLocalizer.GetString ("Ping.FM Services");}
36
34
                }
37
35
                
38
36
                public override string Description {
39
 
                        get { return Catalog.GetString ("Web services suppported by Ping.FM"); }
 
37
                        get { return AddinManager.CurrentLocalizer.GetString ("Web services suppported by Ping.FM"); }
40
38
                }
41
39
                
42
40
                public override string Icon {
43
41
                        get { return "pingfm.png@" + GetType ().Assembly.FullName; }
44
42
                }
45
 
 
 
43
                
46
44
                public override IEnumerable<Type> SupportedItemTypes {
47
 
                        get {
48
 
                                return new Type [] {
49
 
                                        typeof (PingFMServiceItem),
50
 
                                };
51
 
                        }
 
45
                        get { yield return typeof (PingFMServiceItem); }
52
46
                }
53
 
 
 
47
                
54
48
                public override IEnumerable<Item> Items {
55
49
                        get { return PingFM.Services.Cast<Item> (); }
56
50
                }
57
 
 
 
51
                
58
52
                public override void UpdateItems ()
59
53
                {
60
54
                        Thread updateServices = new Thread (new ThreadStart (PingFM.UpdateServices));