~victored/+junk/huddle

« back to all changes in this revision

Viewing changes to core/settings.vala

  • Committer: Victor Eduardo
  • Date: 2012-10-09 05:17:40 UTC
  • Revision ID: victor@elementaryos.org-20121009051740-vg6nik7mqjy8mwns
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-
 
2
/**
 
3
 * Copyright (C) 2012 Victor Eduardo <victoreduardm@gmail.com>
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2.1 of the License, or (at your option) any later version.
 
9
 *
 
10
 * See the file COPYING for the full license text.
 
11
 */
 
12
 
 
13
namespace Huddle.Settings {
 
14
 
 
15
    public class Main : Granite.Services.Settings {
 
16
        private static Main? _instance;
 
17
        public static Main instance {
 
18
            get {
 
19
                if (_instance == null)
 
20
                    _instance = new Main ();
 
21
                 return _instance;
 
22
            }
 
23
        }
 
24
 
 
25
        public bool hide_on_close { get; set; }
 
26
 
 
27
        private Main () {
 
28
            assert (_instance == null);
 
29
            base ("net.launchpad.huddle.Main");
 
30
        }
 
31
    }
 
32
 
 
33
    public class SavedState : Granite.Services.Settings {
 
34
        private static SavedState? _instance;
 
35
        public static SavedState instance {
 
36
            get {
 
37
                if (_instance == null)
 
38
                    _instance = new SavedState ();
 
39
                 return _instance;
 
40
            }
 
41
        }
 
42
 
 
43
        public uint window_width { get; set; }
 
44
        public uint window_height { get; set; }
 
45
        public int window_state { get; set; }
 
46
        public uint sidebar_width { get; set; }
 
47
 
 
48
        private SavedState () {
 
49
            assert (_instance == null);
 
50
            base ("net.launchpad.huddle.SavedState");
 
51
        }
 
52
    }
 
53
}