3
// GNOME Do is the legal property of its developers, whose names are too numerous
4
// to list here. Please refer to the COPYRIGHT file distributed with this
5
// source distribution.
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/>.
21
using System.Threading;
22
using System.Diagnostics;
29
class BrowseMusicItem: Item
31
string name, description;
33
public BrowseMusicItem (string name, string description)
36
this.description = description;
39
public override string Name { get { return name; } }
40
public override string Description { get { return description; } }
41
public override string Icon { get { return "gtk-cdrom"; } }
44
class BrowseArtistsMusicItem : BrowseMusicItem
46
public BrowseArtistsMusicItem ():
47
base ("Browse Artists", "Browse MPD Music by Artist")
52
class BrowseAlbumsMusicItem : BrowseMusicItem
54
public BrowseAlbumsMusicItem ():
55
base ("Browse Albums", "Browse MPD Music by Album")
59
class BrowseAllMusicItem : BrowseMusicItem
61
ArtistMusicItem artist;
62
public BrowseAllMusicItem (ArtistMusicItem artist):
63
base ("Browse Music", "All songs by " + artist.Artist)
67
public ArtistMusicItem Artist { get { return artist; } }
69
public class MPDRunnableItem : Item, IRunnableItem
71
public static readonly MPDRunnableItem[] DefaultItems =
72
new MPDRunnableItem[] {
74
new MPDRunnableItem ("Play",
75
"Play Current Track in MPD",
79
new MPDRunnableItem ("Pause",
84
new MPDRunnableItem ("Next",
85
"Play Next Track in MPD",
89
new MPDRunnableItem ("Previous",
90
"Play Previous Track in MPD",
94
new MPDRunnableItem ("Volume Up",
95
"Increase MPD Playback Volume",
99
new MPDRunnableItem ("Volume Down",
100
"Decrease MPD Playback Volume",
104
new MPDRunnableItem ("Update",
105
"Refresh MPD Database",
110
string name, description, icon, command;
112
public MPDRunnableItem (string name, string description, string icon, string command)
115
this.description = description;
117
this.command = command;
120
public override string Name { get { return name; } }
121
public override string Description { get { return description; } }
122
public override string Icon { get { return icon; } }
126
new Thread ((ThreadStart) delegate {
127
MPD.Client (command);