1
/* SessionCommandsItemSource.cs
3
* GNOME Do is the legal property of its developers. Please refer to the
4
* COPYRIGHT file distributed with this
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.
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.
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/>.
22
using System.Threading;
23
using System.Collections.Generic;
27
namespace GNOME.Session
29
public class SessionCommandsItemSource : IItemSource
31
public SessionCommandsItemSource ()
35
public Type[] SupportedItemTypes
39
typeof (SessionCommandItem),
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"; } }
48
public ICollection<IItem> Items
53
new SessionCommandItem (
55
"Close your session and return to the login screen.",
57
PowerManagement.Logout),
59
new SessionCommandItem (
61
"Turn your computer off.",
63
PowerManagement.Shutdown),
65
new SessionCommandItem (
67
"Put your computer into hibernation mode.",
68
"gnome-session-hibernate",
69
PowerManagement.Hibernate),
71
new SessionCommandItem (
73
"Put your computer into suspend mode.",
74
"gnome-session-suspend",
75
PowerManagement.Suspend),
77
new SessionCommandItem (
79
"Restart your computer.",
81
PowerManagement.Reboot),
83
new SessionCommandItem (
93
public ICollection<IItem> ChildrenOfItem (IItem item)
98
public void UpdateItems ()