/loggerouter/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerouter/trunk

« back to all changes in this revision

Viewing changes to src/settings.vala

  • Committer: Gustav Hartvigsson
  • Date: 2025-06-16 19:36:56 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20250616193656-22lmuvenhe3407ol
[timer.vala] Fixed the timeout being triggered even is user has pressed concle.
[*] Fixed spelling of function present_dialog ()
[options.vala] Added to_string method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
  
29
29
  //TODO: Timer countdown setting.
30
30
 
31
 
  string to_string () {
 
31
  public string to_string () {
32
32
    var builder = new StringBuilder ();
33
33
    builder.append_printf ("key_file: %px\n", key_file);
34
34
    builder.append_printf ("config_path: %s", config_path);
45
45
  private Settings () {}
46
46
 
47
47
  public void load_settings (string config_path) {
48
 
    print ("path\n");
49
48
    key_file = new GLib.KeyFile ();
50
49
    this.config_path = config_path;
51
50
    parse_key_file ();
52
51
  }
53
52
 
54
53
  public void load_setting_from_xdg () {
55
 
    print ("xdg\n");
56
54
    key_file = new GLib.KeyFile ();
57
55
    this.config_path = LO_XDG_CONFIG_PATH;
58
56
    if (GLib.File.new_for_path (this.config_path).query_exists ()) {
65
63
 
66
64
  private void parse_key_file ()
67
65
  requires (key_file != null) {
68
 
    print ("Hello!\n");
69
66
    try {
70
67
      key_file.load_from_file (this.config_path, GLib.KeyFileFlags.NONE);
71
68
    } catch (GLib.FileError e) {