diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2023-02-20 21:29:02 +0100 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2023-02-20 21:32:32 +0100 |
commit | 5d5c20047f26819d0049c0d88b51036fa32daaaa (patch) | |
tree | 9597c1d29f8ae5ba3dcef24bfa5aa81722b9060c /data | |
parent | b918da4c569fe40e8cd4afdeb4dcaf5f34a6785c (diff) | |
download | gnome-contacts-5d5c20047f26819d0049c0d88b51036fa32daaaa.tar.gz |
Stop using GtkDialognielsdg/no-more-gtkdialog
GtkDialog is going to be deprecated in the next version of GTK, so stop
using it upfront to avoid the deprecation warnings.
Diffstat (limited to 'data')
-rw-r--r-- | data/contacts.gresource.xml | 1 | ||||
-rw-r--r-- | data/ui/contacts-avatar-selector.ui | 61 | ||||
-rw-r--r-- | data/ui/contacts-crop-dialog.ui | 59 | ||||
-rw-r--r-- | data/ui/contacts-linked-personas-dialog.ui | 50 |
4 files changed, 81 insertions, 90 deletions
diff --git a/data/contacts.gresource.xml b/data/contacts.gresource.xml index 3daf6d6..3d46685 100644 --- a/data/contacts.gresource.xml +++ b/data/contacts.gresource.xml @@ -20,7 +20,6 @@ <file compressed="true" preprocess="xml-stripblanks">ui/contacts-crop-dialog.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/contacts-editor-menu.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/contacts-link-suggestion-grid.ui</file> - <file compressed="true" preprocess="xml-stripblanks">ui/contacts-linked-personas-dialog.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/contacts-main-window.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/contacts-preferences-window.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/contacts-qr-code-dialog.ui</file> diff --git a/data/ui/contacts-avatar-selector.ui b/data/ui/contacts-avatar-selector.ui index 5f34fe9..f09c6ec 100644 --- a/data/ui/contacts-avatar-selector.ui +++ b/data/ui/contacts-avatar-selector.ui @@ -1,32 +1,57 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> - <template class="ContactsAvatarSelector" parent="GtkDialog"> + <template class="ContactsAvatarSelector" parent="GtkWindow"> <property name="modal">True</property> <property name="default_width">400</property> <property name="default_height">400</property> - <property name="title" translatable="yes">Select a new avatar</property> + <binding name="title"> + <lookup name="title">title_widget</lookup> + </binding> - <child type="action"> - <object class="GtkButton" id="cancel_button"> - <property name="label" translatable="yes">Cancel</property> - <property name="receives_default">True</property> + <child> + <object class='GtkShortcutController'> + <child> + <object class='GtkShortcut'> + <property name='trigger'>Escape</property> + <property name='action'>action(window.close)</property> + </object> + </child> </object> </child> - <child type="action"> - <object class="GtkButton" id="done_button"> - <property name="label" translatable="yes">Done</property> - <style> - <class name="suggested-action"/> - </style> + + <child type="titlebar"> + <object class="GtkHeaderBar"> + <property name="show-title-buttons">False</property> + + <child type="start"> + <object class="GtkButton"> + <property name="label" translatable="yes">_Cancel</property> + <property name="use-underline">True</property> + <property name="receives-default">True</property> + <property name="action-name">window.close</property> + </object> + </child> + + <property name="title-widget"> + <object class="AdwWindowTitle" id="title_widget"> + <property name="title" translatable="yes">Select a new avatar</property> + </object> + </property> + + <child type="end"> + <object class="GtkButton" id="done_button"> + <property name="label" translatable="yes">_Done</property> + <property name="use-underline">True</property> + <property name="action-name">set-avatar</property> + <style> + <class name="suggested-action"/> + </style> + </object> + </child> </object> </child> - <action-widgets> - <action-widget response="cancel">cancel_button</action-widget> - <action-widget response="accept" default="true">done_button</action-widget> - </action-widgets> - - <child internal-child="content_area"> + <child> <object class="GtkBox"> <property name="orientation">vertical</property> <child> diff --git a/data/ui/contacts-crop-dialog.ui b/data/ui/contacts-crop-dialog.ui index 2a79536..e691477 100644 --- a/data/ui/contacts-crop-dialog.ui +++ b/data/ui/contacts-crop-dialog.ui @@ -1,33 +1,50 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> - <template class="ContactsCropDialog" parent="GtkDialog"> + <template class="ContactsCropDialog" parent="GtkWindow"> <property name="modal">True</property> <property name="default-width">400</property> <property name="default-height">400</property> - <property name="destroy-with-parent">True</property> - <property name="title"></property> - <child type="action"> - <object class="GtkButton" id="cancel_button"> - <property name="label" translatable="yes">Cancel</property> + <child> + <object class='GtkShortcutController'> + <child> + <object class='GtkShortcut'> + <property name='trigger'>Escape</property> + <property name='action'>action(window.close)</property> + </object> + </child> </object> </child> - <child type="action"> - <object class="GtkButton" id="done_button"> - <property name="label" translatable="yes">Done</property> - <style> - <class name="suggested-action"/> - </style> - </object> - </child> - <action-widgets> - <action-widget response="cancel">cancel_button</action-widget> - <action-widget response="accept" default="true">done_button</action-widget> - </action-widgets> - <child internal-child="content_area"> - <object class="GtkBox" id="box"> - <property name="orientation">vertical</property> + <child type="titlebar"> + <object class="GtkHeaderBar"> + <property name="show-title-buttons">False</property> + + <child type="start"> + <object class="GtkButton"> + <property name="label" translatable="yes">_Cancel</property> + <property name="use-underline">True</property> + <property name="receives-default">True</property> + <property name="action-name">window.close</property> + </object> + </child> + + <property name="title-widget"> + <object class="AdwWindowTitle" id="title_widget"> + <property name="title"></property> + </object> + </property> + + <child type="end"> + <object class="GtkButton" id="done_button"> + <property name="label" translatable="yes">_Done</property> + <property name="use-underline">True</property> + <property name="action-name">crop</property> + <style> + <class name="suggested-action"/> + </style> + </object> + </child> </object> </child> </template> diff --git a/data/ui/contacts-linked-personas-dialog.ui b/data/ui/contacts-linked-personas-dialog.ui deleted file mode 100644 index e783d52..0000000 --- a/data/ui/contacts-linked-personas-dialog.ui +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<interface> - <template class="ContactsLinkedPersonasDialog" parent="GtkDialog"> - <property name="modal">True</property> - <property name="default_width">600</property> - <property name="default_height">400</property> - <child type="titlebar"> - <object class="GtkHeaderBar"> - <property name="subtitle" translatable="yes">Linked Accounts</property> - </object> - </child> - <child internal-child="vbox"> - <object class="GtkBox"> - <property name="orientation">vertical</property> - <child> - <object class="GtkGrid"> - <property name="orientation">vertical</property> - <property name="column_spacing">8</property> - <property name="row_spacing">12</property> - <child> - <object class="GtkScrolledWindow"> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="shadow_type">in</property> - <child> - <object class="GtkViewport"> - <property name="scroll-to-focus">True</property> - <child> - <object class="GtkListBox" id="linked_accounts_view"> - <property name="selection_mode">none</property> - </object> - </child> - </object> - </child> - </object> - </child> - <child> - <object class="GtkLabel"> - <property name="halign">center</property> - <property name="label" translatable="yes">You can link contacts by selecting them from the contacts list</property> - </object> - </child> - </object> - </child> - </object> - </child> - </template> -</interface> |