Re: [Vala] Splash screen test



Thanks.
It works.

Walter


2016-01-14 15:55 GMT+01:00 Günther Wutz <info gunibert de>:

Hi,

last time i programmed in vala is quite long time but i think, you have to
invoke Gtk.init(ref args); as first line in your main-function. Because Gtk
has to run some initialisation first.

Greets
Günther

Quoting Walter Valenti (2016-01-14 15:23:36)
Hi,
i'm trying Vala/Gtk.

I've written a simple code for a splash screen:

using Gtk;

public class Splash : Gtk.Window{
    /* Costruttore */
    public Splash() {
        new Gtk.Window();
        Grid maingrid = new Gtk.Grid();
        this.add(maingrid);
        maingrid.set_border_width(80);
        Label label = new Gtk.Label("Firefox !!!");
        maingrid.attach(label, 0, 0, 1, 1);
    }
}

public int main(string[] args){
    var win = new Splash();
    win.set_decorated(false);
    win.set_resizable(false);
    win.set_position(Gtk.WindowPosition.CENTER);
    win.show_all();
    Gtk.main();
    return 0;
}

Where I try to execute:
(process:7087): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion
'GDK_IS_SCREEN (screen)' failed

(process:7087): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion
'G_IS_OBJECT (object)' failed

Any idea?

Thanks
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]