33 lines
840 B
Vala
33 lines
840 B
Vala
namespace Deskcandy.Candy {
|
|
public class XScreensaverConfig : GXml.Element {
|
|
[Description(nick="::name")]
|
|
public string name { get; set; }
|
|
|
|
[Description(nick="::_label")]
|
|
public string label { get; set; }
|
|
|
|
[Description(nick="::gl")]
|
|
public string gl { get; set; }
|
|
|
|
public string description { get; set; }
|
|
public string arg { get; set;}
|
|
|
|
public async XScreensaverConfig(File file) throws Error {
|
|
this.initialize("screensaver");
|
|
|
|
yield this.read_from_file_async(file);
|
|
|
|
var tag = this.get_child("command");
|
|
this.arg = tag.get_attribute("arg");
|
|
|
|
tag = this.get_child("_description");
|
|
this.description = tag.text_content.strip();
|
|
debug(@"Loaded $this");
|
|
}
|
|
|
|
public string to_string() {
|
|
return @"Screensaver: $(this.label) [$(this.name)]";
|
|
}
|
|
}
|
|
}
|