例如,我有类似的简单 gtk 应用程序:
public class Application : Gtk.Window {
public Application () {
this.title = "Zaebis";
this.window_position = Gtk.WindowPosition.CENTER;
this.destroy.connect (Gtk.main_quit);
this.set_default_size (170, 70);
Gtk.Button button = new Gtk.Button.with_label ("Make everything zaebis");
this.add (button);
button.clicked.connect (() => {
button.label = "Everything is zaebis now";
});
}
public static int main (string[] args) {
Gtk.init (ref args); (new Application ()).show_all ();
Gtk.main (); return 0;
}
}
我编译它,valac --pkg gtk+-2.0 main.vala
但是当我运行它时,我也看到空控制台。如何不显示/隐藏此控制台并仅显示我的窗口?