~santi698/gazette/gazette

« back to all changes in this revision

Viewing changes to src/Gazette.vala

  • Committer: Santiago Ocamica
  • Date: 2013-04-20 15:54:59 UTC
  • Revision ID: santi6982@gmail.com-20130420155459-8fpwfxatbwq44n32
simplified the code a bit

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
                window.stage.add_child (welcome);
57
57
        
58
58
        Timeout.add(2000, () => {
 
59
            
59
60
                    var list = GlobalSettings.get_default ().services_enabled;
60
61
                    for (var i = 0; i < list.length; i++) {
61
62
                            string id;
66
67
                            switch (id) {
67
68
                                    case "files":
68
69
                                        var files = new Files ();
69
 
                                            files.load ();
70
70
                                            files.x = x > 0 ? x : size[0] - MARGIN - 340;
71
71
                                            files.y = y > 0 ? y : MARGIN + 260;
72
72
                                            window.stage.add_child (files);
73
73
                                            break;
74
74
                                    case "weather":
75
 
                                        stdout.printf("detected weather");
76
75
                                        var weather = new Weather ();
77
 
                        weather.load ();
78
76
                                            weather.x = x > 0 ? x : size[0] - MARGIN - 340;
79
77
                                            weather.y = y > 0 ? y : MARGIN;
80
78
                                            window.stage.add_child (weather);
81
79
                                            break;
82
80
                                    case "news":
83
 
                                        stdout.printf("detected news");
84
81
                                        var news = new News ();
85
 
                        news.load ();
86
82
                                            news.x = x > 0 ? x : size[0] - MARGIN - 340;
87
83
                                        news.y = y > 0 ? y : MARGIN + 560;
88
84
                                        window.stage.add_child (news);