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:
parent
8cdb6ec798
commit
bfa62f6116
21 changed files with 40 additions and 39 deletions
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue