Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with latest Vala 0.56.x #656

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions demo/Views/UtilsView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public class UtilsView : Gtk.Grid {
Granite.contrasting_foreground_color (bg_color).to_string ()
);

#if VALA_0_58
provider.load_from_data (css);
#if HAS_VALA_0_56_11
provider.load_from_data (css, -1);
#else
provider.load_from_data ((uint8[])css);
#endif
Expand Down
4 changes: 2 additions & 2 deletions lib/Widgets/Utils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ namespace Granite.Widgets.Utils {
var css = "@define-color color_primary %s;".printf (color.to_string ());

var css_provider = new Gtk.CssProvider ();
#if VALA_0_58
css_provider.load_from_data (css);
#if HAS_VALA_0_56_11
css_provider.load_from_data (css, -1);
#else
css_provider.load_from_data (css.data);
#endif
Expand Down
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ else
vala_os_arg = []
endif

if meson.get_compiler('vala').version().version_compare('>=0.56.11')
vala_os_arg += ['--define=HAS_VALA_0_56_11']
endif

glib_min_version = '2.50'
if build_machine.system() == 'windows'
gio_os_dep = dependency('gio-windows-2.0', version: '>=' + glib_min_version)
Expand Down