Skip to content

Commit

Permalink
Launch greeter in activate
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Sep 13, 2024
1 parent 111644d commit 37c9ee0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ public class Greeter.Application : Gtk.Application {
Intl.bindtextdomain (Constants.GETTEXT_PACKAGE, Constants.LOCALE_DIR);
}

public static int main (string[] args) {
Gtk.init (ref args);

var window = new Greeter.MainWindow ();
window.show_all ();

Gtk.main ();
public override void activate () {
add_window (new Greeter.MainWindow ());
active_window.show_all ();
}

public static int main (string[] args) {
return new Greeter.Application ().run (args);
}
}

0 comments on commit 37c9ee0

Please sign in to comment.