/* splashscreen.vala * * Copyright (C) 2008 Nicolas Joseph * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Author: * Nicolas Joseph */ using Gtk; public class Valide.SplashScreen : Gtk.Window { private static Valide.SplashScreen instance = null; construct { this.set_position (Gtk.WindowPosition.CENTER); var vbox = new Gtk.VBox (false, 0); this.add (vbox); /** * @todo Change URI */ var image = new Gtk.Image.from_file ("./pixmaps/logo.png"); vbox.pack_start (image, true, true, 0); /* var label = new Gtk.Label ("Val(a)IDE"); vbox.pack_start (label, true, true, 0);*/ } private SplashScreen () { this.type = Gtk.WindowType.POPUP; } public static Valide.SplashScreen get_instance () { if (Valide.SplashScreen.instance == null) { Valide.SplashScreen.instance = new Valide.SplashScreen (); } return Valide.SplashScreen.instance; } public static bool run () { var self = Valide.SplashScreen.get_instance (); self.show_all (); while (Gtk.events_pending ()) { Gtk.main_iteration (); } var window = Valide.Window.get_instance (); window.run (); self.destroy (); return false; } }