diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-08 09:18:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-08 14:48:04 +0200 |
commit | bc43f0e8643abdba19207c3c6f40d9439e971c80 (patch) | |
tree | ef7fbb48139aa37609e68ce6817d15eb5176ac78 | |
parent | ec20aee719aef1ff6fec6e09685dafcfd28fb2a7 (diff) |
add 'destructive-action' to the yes of delete header/footer messageboxes
Change-Id: If4d22caac6d1c6ce12b22e0f3d4395f349539e36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123254
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svx/uiconfig/ui/deletefooterdialog.ui | 56 | ||||
-rw-r--r-- | svx/uiconfig/ui/deleteheaderdialog.ui | 56 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 |
3 files changed, 93 insertions, 21 deletions
diff --git a/svx/uiconfig/ui/deletefooterdialog.ui b/svx/uiconfig/ui/deletefooterdialog.ui index c16040605324..d86eed95b747 100644 --- a/svx/uiconfig/ui/deletefooterdialog.ui +++ b/svx/uiconfig/ui/deletefooterdialog.ui @@ -1,35 +1,71 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.2 --> +<!-- Generated with glade 3.38.2 --> <interface domain="svx"> <requires lib="gtk+" version="3.20"/> <object class="GtkMessageDialog" id="DeleteFooterDialog"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="title" translatable="yes" context="deletefooterdialog|DeleteFooterDialog">Delete footer?</property> <property name="resizable">False</property> <property name="modal">True</property> - <property name="type_hint">dialog</property> - <property name="skip_taskbar_hint">True</property> - <property name="message_type">warning</property> - <property name="buttons">yes-no</property> + <property name="type-hint">dialog</property> + <property name="skip-taskbar-hint">True</property> + <property name="message-type">warning</property> <property name="text" translatable="yes" context="deletefooterdialog|DeleteFooterDialog">Are you sure you want to delete the footer?</property> - <property name="secondary_text" translatable="yes" context="deletefooterdialog|DeleteFooterDialog">All contents of the footer will be deleted and can not be restored.</property> + <property name="secondary-text" translatable="yes" context="deletefooterdialog|DeleteFooterDialog">All contents of the footer will be deleted and can not be restored.</property> <child internal-child="vbox"> <object class="GtkBox" id="messagedialog-vbox"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="messagedialog-action_area"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> + <child> + <object class="GtkButton" id="no"> + <property name="label" translatable="yes" context="stock">_No</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="yes"> + <property name="label" translatable="yes" context="stock">_Yes</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use-underline">True</property> + <style> + <class name="destructive-action"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> </object> </child> + <action-widgets> + <action-widget response="-9">no</action-widget> + <action-widget response="-8">yes</action-widget> + </action-widgets> </object> </interface> diff --git a/svx/uiconfig/ui/deleteheaderdialog.ui b/svx/uiconfig/ui/deleteheaderdialog.ui index f114eab1eecd..dfa2dbda6f64 100644 --- a/svx/uiconfig/ui/deleteheaderdialog.ui +++ b/svx/uiconfig/ui/deleteheaderdialog.ui @@ -1,35 +1,71 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.2 --> +<!-- Generated with glade 3.38.2 --> <interface domain="svx"> <requires lib="gtk+" version="3.20"/> <object class="GtkMessageDialog" id="DeleteHeaderDialog"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="title" translatable="yes" context="deleteheaderdialog|DeleteHeaderDialog">Delete header?</property> <property name="resizable">False</property> <property name="modal">True</property> - <property name="type_hint">dialog</property> - <property name="skip_taskbar_hint">True</property> - <property name="message_type">warning</property> - <property name="buttons">yes-no</property> + <property name="type-hint">dialog</property> + <property name="skip-taskbar-hint">True</property> + <property name="message-type">warning</property> <property name="text" translatable="yes" context="deleteheaderdialog|DeleteHeaderDialog">Are you sure you want to delete the header?</property> - <property name="secondary_text" translatable="yes" context="deleteheaderdialog|DeleteHeaderDialog">All contents of the header will be deleted and can not be restored.</property> + <property name="secondary-text" translatable="yes" context="deleteheaderdialog|DeleteHeaderDialog">All contents of the header will be deleted and can not be restored.</property> <child internal-child="vbox"> <object class="GtkBox" id="messagedialog-vbox"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="messagedialog-action_area"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> + <child> + <object class="GtkButton" id="no"> + <property name="label" translatable="yes" context="stock">_No</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="yes"> + <property name="label" translatable="yes" context="stock">_Yes</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use-underline">True</property> + <style> + <class name="destructive-action"/> + </style> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> </object> </child> + <action-widgets> + <action-widget response="-9">no</action-widget> + <action-widget response="-8">yes</action-widget> + </action-widgets> </object> </interface> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 45237e03fb83..8d927e0edd1c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3870,7 +3870,7 @@ std::vector<vcl::EnumContext::Context> VclBuilder::handleStyle(xmlreader::XmlRea OUString aPriority2(aPriority.getStr(), aPriority.getLength(), RTL_TEXTENCODING_UTF8); nPriority = aPriority2.toInt32(); } - else if (classStyle != "small-button") + else if (classStyle != "small-button" && classStyle != "destructive-action") { SAL_WARN("vcl.builder", "unknown class: " << classStyle); } |