From 51a58aacaed1e63f5bfb1c12d876587a4810ba9c Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 3 Nov 2015 05:26:52 +0100 Subject: [PATCH 1/4] 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. --- src/gui/window-manager.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/window-manager.cpp b/src/gui/window-manager.cpp index 20898e46d..73c295546 100644 --- a/src/gui/window-manager.cpp +++ b/src/gui/window-manager.cpp @@ -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); From 9718a02082d614765a902e10e49d955e4749a896 Mon Sep 17 00:00:00 2001 From: Hermann Vosseler Date: Thu, 5 Nov 2015 02:20:08 +0100 Subject: [PATCH 2/4] lower GDL dependency to 3.8 to support Trusty and Mint For Lumiera, what we actually need is a GTK-3 compliant libGDL. Since Mint Rafaela (17.2) has only the rather old version 3.8, we lower the dependency requirements. Not sure if this causes any problems... lumiera (0.pre.03-1~rafaela) Lumiera-rafaela; urgency=low * Rebuild for Mint 17.2 (Rafaela) * lower requirements on libGDL to 3.8 (a bit outdated, but should do) * use custom installed gcc-4.9 and libstdc++ 4.9 for building, since Mint 17.2 has only gcc-4.8 and we need full c++14 compliance Hint: use add-apt-repository ppa:ubuntu-toolchain-r/test Author: Hermann Vosseler --- admin/scons/Platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/scons/Platform.py b/admin/scons/Platform.py index 81bf1d448..adb2ac758 100644 --- a/admin/scons/Platform.py +++ b/admin/scons/Platform.py @@ -120,7 +120,7 @@ def configure(env): if not conf.CheckPkgConfig('cairomm-1.0', 0.6): problems.append('Unable to configure Cairo--') - verGDL = '3.12' + verGDL = '3.8' # NOTE: lowered requriements here (was originally '3.12') verGDLmm = '3.7.3' urlGDLmm = 'http://ftp.gnome.org/pub/GNOME/sources/gdlmm/' urlGDLmmDEB = 'http://lumiera.org/debian/' From 15df21ceb59ed42364772ecd11a520b1dbca0f09 Mon Sep 17 00:00:00 2001 From: Hermann Vosseler Date: Sat, 14 Nov 2015 21:20:32 +0100 Subject: [PATCH 3/4] fix 32 vs 64bit problem in test yet another instance of that obnoxious problem that "long" is just 32bit on i386 platforms. Why the hell does such a broken type get the preference of convenient notation?? --- tests/15library.tests | 2 +- tests/library/diff/diff-tree-application-test.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/15library.tests b/tests/15library.tests index c451a05bd..612eacaa8 100644 --- a/tests/15library.tests +++ b/tests/15library.tests @@ -265,7 +265,7 @@ out: GenNode.+"spam".+«lib::diff::Record».Rec.ham.+eggs.+s out: GenNode.+_CHILD_string.+«std::string».eggs out: GenNode.+_CHILD_string.+«std::string».spam out: GenNode.+_CHILD_TimeSpan.+«lib::time::TimeSpan» -out: GenNode.+_CHILD_long.+«long».42 +out: GenNode.+_CHILD_long.+«long.+42 return: 0 END diff --git a/tests/library/diff/diff-tree-application-test.cpp b/tests/library/diff/diff-tree-application-test.cpp index 2f37f39c1..4d112f26f 100644 --- a/tests/library/diff/diff-tree-application-test.cpp +++ b/tests/library/diff/diff-tree-application-test.cpp @@ -49,7 +49,7 @@ namespace test{ // to act as templates within the concrete diff // NOTE: everything in this diff language is by-value const GenNode ATTRIB1("α", 1), // attribute α = 1 - ATTRIB2("β", 2L), // attribute α = 2L (int64_t) + ATTRIB2("β", int64_t(2)), // attribute α = 2L (int64_t) ATTRIB3("γ", 3.45), // attribute γ = 3.45 (double) TYPE_X("type", "X"), // a "magic" type attribute "X" TYPE_Y("type", "Y"), // @@ -190,7 +190,7 @@ namespace test{ auto subScope = nested.scope(); // and within the nested sub-scope we find CHECK ( *subScope == CHILD_A); // CHILD_A CHECK (*++subScope == MakeRec().type("Y") // a yet-again nested sub-Record of type "Y" - .set("β", 2L ) // with just an attribute "β" == 2L + .set("β", int64_t(2)) // with just an attribute "β" == 2L .genNode(CHILD_NODE.idi.getSym())); // (and an empty child scope) CHECK (*++subScope == CHILD_T); // followed by another copy of CHILD_T CHECK (isnil (++subScope)); // From d68b881fab5f94b3d51fda0dd41407e8e9a70319 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 15 Nov 2015 01:30:08 +0100 Subject: [PATCH 4/4] fix test failure due to compilation order (see #973) some tests rely on additional diagnostics code being linked in, which happens, when lib/format-util.hpp is included prior to the instantiation of lib::diff::Record rsp. lib::Variant. The reason why i opended this can of worms was to avoid includion of this formatting and diagnostics code into such basic headers as lib/variant.hpp or lib/diff/gen-node.hpp Now it turns out, that on some platforms the linker will use a later instantiation of lib::Variant::Buff::operator string in spite of a complete instantiation of this virtual function being available already in liblumierasupport.so But the real reason is that -- with this trickery -- we're violating the single definition rule, so we get what we deserved. TODO (Ticket #973): at a later point in development we have to re-assess, the precise impact of including lib/format-util.hpp into lib/diff/gen-node.hpp Right now I expect GenNode to be used pervasively, so I am reluctant to make that header too heavyweight. --- src/lib/diff/gen-node.hpp | 4 +--- tests/library/diff/diff-tree-application-test.cpp | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/diff/gen-node.hpp b/src/lib/diff/gen-node.hpp index 16411afab..cfccf8a3c 100644 --- a/src/lib/diff/gen-node.hpp +++ b/src/lib/diff/gen-node.hpp @@ -96,9 +96,7 @@ #include "lib/error.hpp" #include "lib/idi/entry-id.hpp" #include "lib/time/timevalue.hpp" -//#include "lib/util.hpp" -//#include "lib/format-string.hpp" -//#include "lib/format-util.hpp" +//#include "lib/format-util.hpp" ///////////////////////////////TICKET #973 : investigate the impact of this inclusion on code size #include "lib/diff/record.hpp" #include "lib/variant.hpp" #include "lib/util.hpp" diff --git a/tests/library/diff/diff-tree-application-test.cpp b/tests/library/diff/diff-tree-application-test.cpp index 4d112f26f..2b2d77c4f 100644 --- a/tests/library/diff/diff-tree-application-test.cpp +++ b/tests/library/diff/diff-tree-application-test.cpp @@ -22,6 +22,7 @@ #include "lib/test/run.hpp" +#include "lib/format-util.hpp" #include "lib/diff/tree-diff-application.hpp" #include "lib/iter-adapter-stl.hpp" #include "lib/time/timevalue.hpp"