~cszikszoy/do-plugins/pastebin

« back to all changes in this revision

Viewing changes to GNOME-Session/src/SessionCommandsItemSource.cs

  • Committer: Christopher James Halse Rogers
  • Date: 2008-01-14 06:19:28 UTC
  • Revision ID: chalserogers@gmail.com-20080114061928-18eh4jziddt21ag0
Add a trivial autogen.sh to make the build process look more standard
Add yet more *.dll to .bzrignore

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* SessionCommandsItemSource.cs
2
 
 *
3
 
 * GNOME Do is the legal property of its developers. Please refer to the
4
 
 * COPYRIGHT file distributed with this
5
 
 * source distribution.
6
 
 *
7
 
 * This program is free software: you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation, either version 3 of the License, or
10
 
 * (at your option) any later version.
11
 
 *
12
 
 * This program is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
 
 */
20
 
 
21
 
using System;
22
 
using System.Threading;
23
 
using System.Collections.Generic;
24
 
 
25
 
using Do.Universe;
26
 
 
27
 
namespace GNOME.Session
28
 
{
29
 
        public class SessionCommandsItemSource : IItemSource
30
 
        {
31
 
                public SessionCommandsItemSource ()
32
 
                {
33
 
                }
34
 
 
35
 
                public Type[] SupportedItemTypes
36
 
                {
37
 
                        get {
38
 
                                return new Type[] {
39
 
                                        typeof (SessionCommandItem),
40
 
                                };
41
 
                        }
42
 
                }
43
 
 
44
 
                public string Name { get { return "GNOME Session Commands"; } }
45
 
                public string Description { get { return "Log out, Shutdown, Restart, etc."; } }
46
 
                public string Icon { get { return "system-log-out"; } }
47
 
 
48
 
                public ICollection<IItem> Items
49
 
                {
50
 
                        get {
51
 
                                return new IItem[] {
52
 
 
53
 
                                        new SessionCommandItem (
54
 
                                                "Log Out",
55
 
                                                "Close your session and return to the login screen.",
56
 
                                                "system-log-out",
57
 
                                                PowerManagement.Logout),
58
 
 
59
 
                                        new SessionCommandItem (
60
 
                                                "Shutdown",
61
 
                                                "Turn your computer off.",
62
 
                                                "system-shutdown",
63
 
                                                PowerManagement.Shutdown),
64
 
 
65
 
                                        new SessionCommandItem (
66
 
                                                "Hibernate",
67
 
                                                "Put your computer into hibernation mode.",
68
 
                                                "gnome-session-hibernate",
69
 
                                                PowerManagement.Hibernate),
70
 
 
71
 
                                        new SessionCommandItem (
72
 
                                                "Suspend",
73
 
                                                "Put your computer into suspend mode.",
74
 
                                                "gnome-session-suspend",
75
 
                                                PowerManagement.Suspend),
76
 
 
77
 
                                        new SessionCommandItem (
78
 
                                                "Restart",
79
 
                                                "Restart your computer.",
80
 
                                                "reload",
81
 
                                                PowerManagement.Reboot),
82
 
 
83
 
                                        new SessionCommandItem (
84
 
                                                "Lock Screen",
85
 
                                                "Lock your screen.",
86
 
                                                "system-lock-screen",
87
 
                                                ScreenSaver.Lock),
88
 
 
89
 
                                };
90
 
                        }
91
 
                }
92
 
 
93
 
                public ICollection<IItem> ChildrenOfItem (IItem item)
94
 
                {
95
 
                        return null;
96
 
                }
97
 
 
98
 
                public void UpdateItems ()
99
 
                {
100
 
                }
101
 
        }
102
 
}