/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/application.vala

  • Committer: Gustav Hartvigsson
  • Date: 2025-06-04 14:25:01 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20250604142501-uhe0ukoxuwcku2bt
Fixed crash caused from missing config file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 along with LoggerOuter. If not, see <https://www.gnu.org/licenses/>.
17
17
 */
18
18
 
19
 
public class LO.App : Gtk.Application {
 
19
public class LO.Application : Gtk.Application {
20
20
 
21
21
  LO.Action actions;
22
22
  LO.Settings settings = LO.Settings.get_instance ();
82
82
    return -1; // Let the base class handle the rest.
83
83
  }
84
84
 
 
85
  public Application () {
 
86
 
 
87
  }
85
88
 
86
89
  public override void activate () {
87
90
 
122
125
      row.child.activate ();
123
126
    });
124
127
 
125
 
    if (opts.config_path != null) {
126
 
      settings.load_settings (opts.config_path);
127
 
    } else {
128
 
      settings.load_setting_from_xdg ();
129
 
    }
130
 
 
131
 
    Gtk.Settings.get_default ().gtk_application_prefer_dark_theme = settings.dark_theme;
132
128
 
133
129
    add_buttons (actions.get_entries ());
134
130
 
136
132
    window.present ();
137
133
    window.set_focus (list_box.get_selected_row  ());
138
134
 
 
135
    bool dark_theme = settings.dark_theme;
 
136
    Gtk.Settings.get_default ().gtk_application_prefer_dark_theme = dark_theme;
 
137
 
139
138
  }
140
139
 
141
140