Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: flattool/ignition
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c59fc0ab4946337a60c473f2f918ad9a21e93c00
Choose a base ref
..
head repository: flattool/ignition
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 80d885ec383b5226718e8c35ef096d0d9fe505ff
Choose a head ref
Showing with 13 additions and 0 deletions.
  1. +2 −0 src/main.js
  2. +11 −0 src/utils.js
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -37,6 +37,8 @@ export const IgnitionApplication = GObject.registerClass(
constructor() {
super({application_id: 'io.github.flattool.Ignition', flags: Gio.ApplicationFlags.DEFAULT_FLAGS});

SharedVars.application = this;

const gtk_version = `${Gtk.MAJOR_VERSION}.${Gtk.MINOR_VERSION}.${Gtk.MICRO_VERSION}`;
const adw_version = `${Adw.MAJOR_VERSION}.${Adw.MINOR_VERSION}.${Adw.MICRO_VERSION}`;
const os_string = `${GLib.get_os_info("NAME")} ${GLib.get_os_info("VERSION")}`;
11 changes: 11 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -45,6 +45,16 @@ export class SharedVars {
}

static get autostart_dir() {
// Create the autostart directory if it doesn't exist. Needed for non-flatpak packages
if (!autostart_dir.query_exists(null)) {
try {
autostart_dir.make_directory(null);
} catch (error) {
console.error(`FATAL: Failed to make autostart directory at: ${autostart_path}`);
console.error(error);
SharedVars.application.quit();
}
}
return autostart_dir;
}

@@ -60,6 +70,7 @@ export class SharedVars {
return is_sandboxed;
}
static main_window = null; // set in main
static application = null; // set in main
}