We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27300ee commit 3d806bbCopy full SHA for 3d806bb
src/Application.vala
@@ -216,12 +216,12 @@ namespace Scratch {
216
217
public async bool handle_quit_window (MainWindow window_to_close) {
218
unowned List<Gtk.Window> windows = get_windows ();
219
- var n_windows = windows.length ();
220
- if (!yield window_to_close.check_unsaved_changes (n_windows == 1)) {
+ var is_last_window = windows.length () == 1;
+ if (!yield window_to_close.check_unsaved_changes (is_last_window)) {
221
return false;
222
}
223
224
- if (n_windows == 1) {
+ if (is_last_window) {
225
window_to_close.before_quit (); // Update settings
226
227
// Just destroy window - we have already checked whether any docs need saving
0 commit comments