[epiphany] Use HdyPreferencesPage within Firefox Sync dialog



commit 62dd4e0735d2f1f976e47111cdaaa7b7afdbff90
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Wed May 5 09:29:07 2021 +0200

    Use HdyPreferencesPage within Firefox Sync dialog
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/1518
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/963>

 src/resources/gtk/firefox-sync-dialog.ui | 272 +++++++++++++++----------------
 1 file changed, 132 insertions(+), 140 deletions(-)
---
diff --git a/src/resources/gtk/firefox-sync-dialog.ui b/src/resources/gtk/firefox-sync-dialog.ui
index dd9b53a7d..f5b00ff91 100644
--- a/src/resources/gtk/firefox-sync-dialog.ui
+++ b/src/resources/gtk/firefox-sync-dialog.ui
@@ -22,189 +22,181 @@
           </object>
         </child>
         <child>
-          <object class="HdyClamp">
+          <object class="HdyPreferencesPage">
             <property name="visible">True</property>
-            <property name="maximum-size">1024</property>
-            <property name="margin">12</property>
             <child>
-              <object class="GtkBox">
+              <object class="HdyPreferencesGroup" id="sync_page_group">
+                <property name="description" translatable="yes">Sign in with your Firefox account to sync 
your data with GNOME Web and Firefox on other computers. GNOME Web is not Firefox and is not produced or 
endorsed by Mozilla.</property>
                 <property name="visible">True</property>
-                <property name="orientation">vertical</property>
                 <child>
-                  <object class="HdyPreferencesGroup" id="sync_page_group">
-                    <property name="description" translatable="yes">Sign in with your Firefox account to 
sync your data with GNOME Web and Firefox on other computers. GNOME Web is not Firefox and is not produced or 
endorsed by Mozilla.</property>
+                  <object class="GtkBox" id="sync_firefox_iframe_box">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
                     <child>
-                      <object class="GtkBox" id="sync_firefox_iframe_box">
+                      <object class="GtkLabel" id="sync_firefox_iframe_label">
+                        <property name="visible">False</property>
+                        <property name="halign">start</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="HdyPreferencesGroup" id="sync_firefox_account_group">
+                <property name="title" translatable="yes">Firefox Account</property>
+                <property name="visible">True</property>
+                <child>
+                  <object class="HdyActionRow" id="sync_firefox_account_row">
+                    <property name="subtitle" translatable="yes">Logged in</property>
+                    <property name="use_underline">True</property>
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkButton" id="sync_sign_out_button">
+                        <property name="label" translatable="yes">Sign _out</property>
+                        <property name="use-underline">True</property>
+                        <property name="valign">center</property>
                         <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <property name="spacing">6</property>
-                        <child>
-                          <object class="GtkLabel" id="sync_firefox_iframe_label">
-                            <property name="visible">False</property>
-                            <property name="halign">start</property>
-                          </object>
-                        </child>
+                        <signal name="clicked" handler="on_sync_sign_out_button_clicked"/>
                       </object>
                     </child>
                   </object>
                 </child>
+              </object>
+            </child>
+            <child>
+              <object class="HdyPreferencesGroup" id="sync_options_group">
+                <property name="title" translatable="yes">Sync Options</property>
+                <property name="visible">True</property>
                 <child>
-                  <object class="HdyPreferencesGroup" id="sync_firefox_account_group">
-                    <property name="title" translatable="yes">Firefox Account</property>
+                  <object class="HdyActionRow">
+                    <property name="activatable_widget">sync_bookmarks_switch</property>
+                    <property name="title" translatable="yes">Sync _Bookmarks</property>
+                    <property name="use_underline">True</property>
                     <property name="visible">True</property>
                     <child>
-                      <object class="HdyActionRow" id="sync_firefox_account_row">
-                        <property name="subtitle" translatable="yes">Logged in</property>
-                        <property name="use_underline">True</property>
+                      <object class="GtkSwitch" id="sync_bookmarks_switch">
+                        <property name="valign">center</property>
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkButton" id="sync_sign_out_button">
-                            <property name="label" translatable="yes">Sign _out</property>
-                            <property name="use-underline">True</property>
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                            <signal name="clicked" handler="on_sync_sign_out_button_clicked"/>
-                          </object>
-                        </child>
                       </object>
                     </child>
                   </object>
                 </child>
                 <child>
-                  <object class="HdyPreferencesGroup" id="sync_options_group">
-                    <property name="title" translatable="yes">Sync Options</property>
+                  <object class="HdyActionRow">
+                    <property name="activatable_widget">sync_passwords_switch</property>
+                    <property name="title" translatable="yes">Sync _Passwords</property>
+                    <property name="use_underline">True</property>
                     <property name="visible">True</property>
                     <child>
-                      <object class="HdyActionRow">
-                        <property name="activatable_widget">sync_bookmarks_switch</property>
-                        <property name="title" translatable="yes">Sync _Bookmarks</property>
-                        <property name="use_underline">True</property>
+                      <object class="GtkSwitch" id="sync_passwords_switch">
+                        <property name="valign">center</property>
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkSwitch" id="sync_bookmarks_switch">
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                          </object>
-                        </child>
                       </object>
                     </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="HdyActionRow">
+                    <property name="activatable_widget">sync_history_switch</property>
+                    <property name="title" translatable="yes">Sync _History</property>
+                    <property name="use_underline">True</property>
+                    <property name="visible">True</property>
                     <child>
-                      <object class="HdyActionRow">
-                        <property name="activatable_widget">sync_passwords_switch</property>
-                        <property name="title" translatable="yes">Sync _Passwords</property>
-                        <property name="use_underline">True</property>
+                      <object class="GtkSwitch" id="sync_history_switch">
+                        <property name="valign">center</property>
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkSwitch" id="sync_passwords_switch">
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                          </object>
-                        </child>
                       </object>
                     </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="HdyActionRow">
+                    <property name="activatable_widget">sync_open_tabs_switch</property>
+                    <property name="title" translatable="yes">Sync Open _Tabs</property>
+                    <property name="use_underline">True</property>
+                    <property name="visible">True</property>
                     <child>
-                      <object class="HdyActionRow">
-                        <property name="activatable_widget">sync_history_switch</property>
-                        <property name="title" translatable="yes">Sync _History</property>
-                        <property name="use_underline">True</property>
+                      <object class="GtkSwitch" id="sync_open_tabs_switch">
+                        <property name="valign">center</property>
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkSwitch" id="sync_history_switch">
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                          </object>
-                        </child>
                       </object>
                     </child>
                     <child>
-                      <object class="HdyActionRow">
-                        <property name="activatable_widget">sync_open_tabs_switch</property>
-                        <property name="title" translatable="yes">Sync Open _Tabs</property>
-                        <property name="use_underline">True</property>
+                      <object class="GtkButton" id="synced_tabs_button">
+                        <property name="label" translatable="yes">S_ynced tabs</property>
+                        <property name="use-underline">True</property>
+                        <property name="valign">center</property>
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkSwitch" id="sync_open_tabs_switch">
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="synced_tabs_button">
-                            <property name="label" translatable="yes">S_ynced tabs</property>
-                            <property name="use-underline">True</property>
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                            <signal name="clicked" handler="on_sync_synced_tabs_button_clicked"/>
-                          </object>
-                        </child>
+                        <signal name="clicked" handler="on_sync_synced_tabs_button_clicked"/>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="HdyComboRow" id="sync_frequency_row">
+                    <property name="title" translatable="yes">Frequency</property>
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkSeparator">
+                        <property name="margin_bottom">8</property>
+                        <property name="margin_top">8</property>
+                        <property name="visible">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="sync_now_button">
+                        <property name="label" translatable="yes">Sync _now</property>
+                        <property name="use-underline">True</property>
+                        <property name="valign">center</property>
+                        <property name="visible">True</property>
+                        <signal name="clicked" handler="on_sync_sync_now_button_clicked"/>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="HdyActionRow">
+                    <property name="activatable">False</property>
+                    <property name="title" translatable="yes">Device name</property>
+                    <property name="use_underline">True</property>
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkButton" id="sync_device_name_cancel_button">
+                        <property name="label" translatable="yes">_Cancel</property>
+                        <property name="use-underline">True</property>
+                        <property name="valign">center</property>
+                        <property name="visible">False</property>
+                        <signal name="clicked" handler="on_sync_device_name_cancel_button_clicked"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="sync_device_name_save_button">
+                        <property name="label" translatable="yes">_Save</property>
+                        <property name="use-underline">True</property>
+                        <property name="valign">center</property>
+                        <property name="visible">False</property>
+                        <signal name="clicked" handler="on_sync_device_name_save_button_clicked"/>
                       </object>
                     </child>
                     <child>
-                      <object class="HdyComboRow" id="sync_frequency_row">
-                        <property name="title" translatable="yes">Frequency</property>
+                      <object class="GtkButton" id="sync_device_name_change_button">
+                        <property name="label" translatable="yes">_Change</property>
+                        <property name="use-underline">True</property>
+                        <property name="valign">center</property>
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkSeparator">
-                            <property name="margin_bottom">8</property>
-                            <property name="margin_top">8</property>
-                            <property name="visible">True</property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="sync_now_button">
-                            <property name="label" translatable="yes">Sync _now</property>
-                            <property name="use-underline">True</property>
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                            <signal name="clicked" handler="on_sync_sync_now_button_clicked"/>
-                          </object>
-                        </child>
+                        <signal name="clicked" handler="on_sync_device_name_change_button_clicked"/>
                       </object>
                     </child>
                     <child>
-                      <object class="HdyActionRow">
-                        <property name="activatable">False</property>
-                        <property name="title" translatable="yes">Device name</property>
-                        <property name="use_underline">True</property>
+                      <object class="GtkEntry" id="sync_device_name_entry">
+                        <property name="sensitive">False</property>
+                        <property name="margin-start">12</property>
+                        <property name="margin-end">12</property>
+                        <property name="margin-top">8</property>
+                        <property name="margin-bottom">8</property>
                         <property name="visible">True</property>
-                        <child>
-                          <object class="GtkButton" id="sync_device_name_cancel_button">
-                            <property name="label" translatable="yes">_Cancel</property>
-                            <property name="use-underline">True</property>
-                            <property name="valign">center</property>
-                            <property name="visible">False</property>
-                            <signal name="clicked" handler="on_sync_device_name_cancel_button_clicked"/>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="sync_device_name_save_button">
-                            <property name="label" translatable="yes">_Save</property>
-                            <property name="use-underline">True</property>
-                            <property name="valign">center</property>
-                            <property name="visible">False</property>
-                            <signal name="clicked" handler="on_sync_device_name_save_button_clicked"/>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="sync_device_name_change_button">
-                            <property name="label" translatable="yes">_Change</property>
-                            <property name="use-underline">True</property>
-                            <property name="valign">center</property>
-                            <property name="visible">True</property>
-                            <signal name="clicked" handler="on_sync_device_name_change_button_clicked"/>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="GtkEntry" id="sync_device_name_entry">
-                            <property name="sensitive">False</property>
-                            <property name="margin-start">12</property>
-                            <property name="margin-end">12</property>
-                            <property name="margin-top">8</property>
-                            <property name="margin-bottom">8</property>
-                            <property name="visible">True</property>
-                          </object>
-                        </child>
                       </object>
                     </child>
                   </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]