fix two warnings

This commit is contained in:
Artem Anufrij 2020-11-17 14:05:03 +01:00
parent 04773acb25
commit 0b67144e16
3 changed files with 3 additions and 2 deletions

View file

@ -73,7 +73,7 @@ namespace Webpin.Widgets {
container = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
if (desktop_file.color != null) {
var css_provider = Gtk.CssProvider.get_default ();
var css_provider = new Gtk.CssProvider();
try {
css_provider.load_from_data (""" .box { background: """ + desktop_file.color.to_string () + """; } """);
} catch (Error err) {

View file

@ -121,6 +121,7 @@ namespace Webpin.Widgets.Views {
primary_color_button = new Gtk.ColorButton.with_rgba (default_color);
primary_color_button.use_alpha = false;
primary_color_button.color_activated.connect ((color) => {
validate ();
stdout.printf ("COLOR %s\n", color.to_string ());
});

View file

@ -40,7 +40,7 @@ namespace Webpin.Windows {
public WebApp (DesktopFile desktop_file) {
this.desktop_file = desktop_file;
this.set_wmclass (desktop_file.url, desktop_file.url);
this.set_role (desktop_file.url);
this.events |= Gdk.EventMask.STRUCTURE_MASK;
var color = desktop_file.color;