[polari] application: Stop guarding CssProvider.load_from_file()
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] application: Stop guarding CssProvider.load_from_file()
- Date: Sat, 4 Sep 2021 00:53:06 +0000 (UTC)
commit 57e4c95973cc0bee86585f9987f8b4a46959e81e
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Nov 27 23:56:05 2020 +0100
application: Stop guarding CssProvider.load_from_file()
All style provider loading functions no longer throw in Gtk4, so there's
nothing to guard against anymore.
Part-of: <https://gitlab.gnome.org/GNOME/polari/-/merge_requests/235>
src/application.js | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 2d208289..b61e2667 100644
--- a/src/application.js
+++ b/src/application.js
@@ -391,12 +391,7 @@ export default GObject.registerClass({
let provider = new Gtk.CssProvider();
let uri = 'resource:///org/gnome/Polari/css/application.css';
- try {
- provider.load_from_file(Gio.File.new_for_uri(uri));
- } catch (e) {
- console.warn('Failed to add application style');
- console.debug(e);
- }
+ provider.load_from_file(Gio.File.new_for_uri(uri));
Gtk.StyleContext.add_provider_for_display(Gdk.Display.get_default(),
provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]