1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-30 10:52:00 +00:00

fix: handle DELETE_EVENT in create-torrent GTK dialog code (#5180)

This commit is contained in:
Charles Kerr 2023-03-09 15:01:22 -06:00 committed by GitHub
parent 8cdb6ec798
commit bfa62f6116
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 40 additions and 39 deletions

View file

@ -258,6 +258,7 @@ void MakeProgressDialog::onProgressDialogResponse(int response)
switch (response)
{
case TR_GTK_RESPONSE_TYPE(CANCEL):
case TR_GTK_RESPONSE_TYPE(DELETE_EVENT):
builder_.cancelChecksums();
close();
break;
@ -316,7 +317,7 @@ std::unique_ptr<MakeProgressDialog> MakeProgressDialog::create(
void MakeDialog::Impl::onResponse(int response)
{
if (response == TR_GTK_RESPONSE_TYPE(CLOSE))
if (response == TR_GTK_RESPONSE_TYPE(CLOSE) || response == TR_GTK_RESPONSE_TYPE(DELETE_EVENT))
{
dialog_.close();
return;

View file

@ -123,8 +123,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">open_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">open_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -1192,7 +1192,7 @@
</object>
</child>
<action-widgets>
<action-widget response="-7">close_button</action-widget>
<action-widget response="close">close_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="info_page_labels_width_group">

View file

@ -146,8 +146,8 @@ To add a new primary URL, add it after a blank line.</property>
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">save_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">save_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -415,8 +415,8 @@ To add a new primary URL, add it after a blank line.</property>
</object>
</child>
<action-widgets>
<action-widget response="-7">close_button</action-widget>
<action-widget response="-3">new_button</action-widget>
<action-widget response="close">close_button</action-widget>
<action-widget response="accept">new_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="labels_width_group">

View file

@ -109,9 +109,9 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-7">close_button</action-widget>
<action-widget response="-3">add_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="close">close_button</action-widget>
<action-widget response="accept">add_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -245,8 +245,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">open_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">open_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -2095,8 +2095,8 @@ To add a new primary URL, add it after a blank line.</property>
</object>
</child>
<action-widgets>
<action-widget response="-11">help_button</action-widget>
<action-widget response="-7">close_button</action-widget>
<action-widget response="help">help_button</action-widget>
<action-widget response="close">close_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="downloading_page_labels_width_group">

View file

@ -164,8 +164,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-10">apply_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="apply">apply_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -361,7 +361,7 @@
</child>
<action-widgets>
<action-widget response="1">reset_button</action-widget>
<action-widget response="-7">close_button</action-widget>
<action-widget response="close">close_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="labels_width_group">

View file

@ -123,8 +123,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">open_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">open_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -78,8 +78,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">open_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">open_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -848,7 +848,7 @@
</object>
</child>
<action-widgets>
<action-widget response="-7">close_button</action-widget>
<action-widget response="close">close_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="info_page_labels_width_group">

View file

@ -98,8 +98,8 @@ To add a new primary URL, add it after a blank line.</property>
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">save_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">save_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -295,8 +295,8 @@ To add a new primary URL, add it after a blank line.</property>
</object>
</child>
<action-widgets>
<action-widget response="-7">close_button</action-widget>
<action-widget response="-3">new_button</action-widget>
<action-widget response="close">close_button</action-widget>
<action-widget response="accept">new_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="labels_width_group">

View file

@ -58,9 +58,9 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-7">close_button</action-widget>
<action-widget response="-3">add_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="close">close_button</action-widget>
<action-widget response="accept">add_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -190,8 +190,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">open_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">open_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -1497,8 +1497,8 @@ To add a new primary URL, add it after a blank line.</property>
</object>
</child>
<action-widgets>
<action-widget response="-11">help_button</action-widget>
<action-widget response="-7">close_button</action-widget>
<action-widget response="help">help_button</action-widget>
<action-widget response="close">close_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="downloading_page_labels_width_group">

View file

@ -107,8 +107,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-10">apply_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="apply">apply_button</action-widget>
</action-widgets>
</object>
</interface>

View file

@ -260,7 +260,7 @@
</child>
<action-widgets>
<action-widget response="1">reset_button</action-widget>
<action-widget response="-7">close_button</action-widget>
<action-widget response="close">close_button</action-widget>
</action-widgets>
</object>
<object class="GtkSizeGroup" id="labels_width_group">

View file

@ -78,8 +78,8 @@
</object>
</child>
<action-widgets>
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-3">open_button</action-widget>
<action-widget response="cancel">cancel_button</action-widget>
<action-widget response="accept">open_button</action-widget>
</action-widgets>
</object>
</interface>