swallow errors on CSS loading
preliminary workaround for Ticket #972 On Debian/Jessie, we observed the following error "gtk-lumiera.css:38:19Theming engine 'adwaita' not found" even though the package gnome-themes-standard *is* installed This allows at least to bring the UI up, even if loading our custom theme and stylesheet fails.
This commit is contained in:
parent
3248741db1
commit
51a58aacae
1 changed files with 9 additions and 1 deletions
|
|
@ -64,8 +64,16 @@ namespace gui {
|
|||
{
|
||||
auto screen = Gdk::Screen::get_default();
|
||||
auto css_provider = CssProvider::create();
|
||||
css_provider->load_from_path (lib::resolveModulePath (stylesheetName, resourceSerachPath_));
|
||||
try
|
||||
{
|
||||
css_provider->load_from_path (lib::resolveModulePath (stylesheetName, resourceSerachPath_));
|
||||
/////////////////////////////////TICKET #953 should detect and notify CSS parsing errors. CssProvider offers a signal for this purpose
|
||||
/////////////////////////////////TICKET #953 ...seems to be supported properly starting with gtkmm 3.18 (Debian/Jessie has 3.14)
|
||||
}
|
||||
catch(Glib::Error const& failure)
|
||||
{
|
||||
WARN(gui, "Failure while loading stylesheet '%s': %s", cStr(stylesheetName), cStr(failure.what()));
|
||||
}
|
||||
|
||||
StyleContext::add_provider_for_screen (screen, css_provider,
|
||||
GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||
|
|
|
|||
Loading…
Reference in a new issue