Destroy message dialog on error (#3805 regression) (#4625)

This commit is contained in:
Mike Gelfand 2023-01-21 18:56:38 +03:00 committed by GitHub
parent bd72b8c3fc
commit 0da0a55259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -99,17 +99,19 @@ bool RelocateDialog::Impl::onTimer()
TR_GTK_BUTTONS_TYPE(CLOSE), TR_GTK_BUTTONS_TYPE(CLOSE),
true); true);
timer_.block();
d->signal_response().connect( d->signal_response().connect(
[this, d](int /*response*/) mutable [this, d](int /*response*/) mutable
{ {
timer_.unblock();
d.reset(); d.reset();
message_dialog_.reset();
dialog_.close();
}); });
d->show(); d->show();
return false;
} }
else if (done_ == TR_LOC_DONE)
if (done_ == TR_LOC_DONE)
{ {
if (!torrent_ids_.empty()) if (!torrent_ids_.empty())
{ {
@ -117,11 +119,13 @@ bool RelocateDialog::Impl::onTimer()
} }
else else
{ {
message_dialog_.reset();
dialog_.close(); dialog_.close();
return false;
} }
} }
return G_SOURCE_CONTINUE; return true;
} }
void RelocateDialog::Impl::onResponse(int response) void RelocateDialog::Impl::onResponse(int response)