Skip to content

Commit

Permalink
app: use GApplicationCommandLine.done() if available
Browse files Browse the repository at this point in the history
  • Loading branch information
amezin committed Sep 28, 2024
1 parent 0f6d9e7 commit 0287657
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions ddterm/app/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ class Application extends Gtk.Application {
logError(ex);

// https://gitlab.gnome.org/GNOME/glib/-/issues/596
schedule_gc();
if (command_line.done)
command_line.done();
else
schedule_gc();

return 1;
}
Expand Down Expand Up @@ -431,7 +434,10 @@ class Application extends Gtk.Application {
this.activate();

// https://gitlab.gnome.org/GNOME/glib/-/issues/596
schedule_gc();
if (command_line.done)
command_line.done();
else
schedule_gc();

return;
}
Expand Down Expand Up @@ -468,8 +474,12 @@ class Application extends Gtk.Application {
command_line.set_exit_status(value);

// https://gitlab.gnome.org/GNOME/glib/-/issues/596
command_line = null;
schedule_gc();
if (command_line.done) {
command_line.done();
} else {
command_line = null;
schedule_gc();
}
};

const wait = options.lookup('wait');
Expand Down

0 comments on commit 0287657

Please sign in to comment.