Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('Workbench', ['vala', 'c'],
version: '43.3',
version: '44.0',
meson_version: '>= 0.59.0',
license: 'GPL-3.0-only'
)
Expand Down
2 changes: 1 addition & 1 deletion re.sonny.Workbench.Devel.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "re.sonny.Workbench.Devel",
"runtime": "org.gnome.Sdk",
"runtime-version": "43",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"sdk-extensions" : [
"org.freedesktop.Sdk.Extension.vala"
Expand Down
2 changes: 1 addition & 1 deletion src/Previewer/Internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export default function Internal({
const diagnostic = getCssDiagnostic(section, error);
builder.get_object("code_view_css").handleDiagnostics([diagnostic]);
});
css_provider.load_from_data(style);
css_provider.load_from_data(style, -1);
Gtk.StyleContext.add_provider_for_display(
output.get_display(),
css_provider,
Expand Down
2 changes: 1 addition & 1 deletion src/Previewer/previewer.vala
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace Workbench {
var end = section.get_end_location();
this.css_parser_error(error.message, (int)start.lines, (int)start.line_chars, (int)end.lines, (int)end.line_chars);
});
this.css.load_from_data (content.data);
this.css.load_from_data (content);
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), this.css , Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
}

Expand Down
21 changes: 5 additions & 16 deletions src/bin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!@GJS@ -m

import { exit } from "system";
import { exit, programArgs } from "system";
import GLib from "gi://GLib";
import { setConsoleLogDomain } from "console";
import Gio from "gi://Gio";
Expand All @@ -18,7 +18,7 @@ GLib.set_application_name("Workbench");

if (!Xdp.Portal.running_under_flatpak()) {
console.error(
"Workbench is only meant to be run sandboxed as a Flatpak and a specific target environment.\nBypassing this will exposes users to arbitrary code execution and breakage.",
"Flatpak required\nWorkbench is only meant to be run sandboxed in a specific target environment.\nBypassing this will exposes users to arbitrary code execution and breakage.",
);
exit(1);
}
Expand All @@ -31,17 +31,6 @@ if (__DEV__) {
pkg.sourcedir = "@sourcedir@";
}

const loop = new GLib.MainLoop(null, false);
import("resource:///re/sonny/Workbench/src/main.js")
.then((main) => {
// Workaround for issue
// https://gitlab.gnome.org/GNOME/gjs/-/issues/468
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
loop.quit();
const exit_code = imports.package.run(main);
exit(exit_code);
return GLib.SOURCE_REMOVE;
});
})
.catch(logError);
loop.run();
const module = await import("resource:///re/sonny/Workbench/src/main.js");
const exit_code = await module.main(programArgs);
exit(exit_code);
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import application from "./application.js";
pkg.initGettext();

export function main(argv) {
return application.run(argv);
return application.runAsync(argv);
}