56
56
window.stage.add_child (welcome);
58
var files = new Files ();
59
var weather = new Weather ();
60
var news = new News ();
61
//var calendar = new Calendar();
63
Timeout.add (2000, () => {
64
var list = GlobalSettings.get_default ().services_enabled;
65
for (var i = 0; i < list.length; i++) {
69
parse_coords (list[i], out id, out x, out y);
74
files.x = x > 0 ? x : size[0] - MARGIN - 340;
75
files.y = y > 0 ? y : MARGIN + 260;
77
window.stage.add_child (files);
81
weather.x = x > 0 ? x : size[0] - MARGIN - 340;
82
weather.y = y > 0 ? y : MARGIN;
84
window.stage.add_child (weather);
88
news.x = x > 0 ? x : size[0] - MARGIN - 340;
89
news.y = y > 0 ? y : MARGIN + 560;
91
window.stage.add_child (news);
94
warning ("Unrecognized service requested!");
100
//calendar.x = size[0] - MARGIN - 340;
101
//calendar.y = MARGIN + 750;
102
//calendar.display ();
103
//window.stage.add_child (calendar);
58
Timeout.add(2000, () => {
59
var list = GlobalSettings.get_default ().services_enabled;
60
for (var i = 0; i < list.length; i++) {
64
parse_coords (list[i], out id, out x, out y);
68
var files = new Files ();
70
files.x = x > 0 ? x : size[0] - MARGIN - 340;
71
files.y = y > 0 ? y : MARGIN + 260;
72
window.stage.add_child (files);
75
stdout.printf("detected weather");
76
var weather = new Weather ();
78
weather.x = x > 0 ? x : size[0] - MARGIN - 340;
79
weather.y = y > 0 ? y : MARGIN;
80
window.stage.add_child (weather);
83
stdout.printf("detected news");
84
var news = new News ();
86
news.x = x > 0 ? x : size[0] - MARGIN - 340;
87
news.y = y > 0 ? y : MARGIN + 560;
88
window.stage.add_child (news);
91
warning ("Unrecognized service requested!");
96
//calendar.x = size[0] - MARGIN - 340;
97
//calendar.y = MARGIN + 750;
98
//calendar.display ();
99
//window.stage.add_child (calendar);
109
104
void parse_coords (string service, out string id, out int x, out int y)
111
106
var parts = service.split (":");