[gnome-control-center] Seperate timezone and date controls as per recent design mockups.



commit 5b573b7e257b63a758e87fe60a2bbfdef298c62d
Author: lionirdeadman <lionirdeadman lionirdeadman pc>
Date:   Sat Jul 11 14:06:56 2020 -0400

    Seperate timezone and date controls as per recent design mockups.

 panels/datetime/cc-datetime-panel.c  |  3 ++
 panels/datetime/cc-datetime-panel.ui | 56 +++++++++++++++++++++++++-----------
 2 files changed, 42 insertions(+), 17 deletions(-)
---
diff --git a/panels/datetime/cc-datetime-panel.c b/panels/datetime/cc-datetime-panel.c
index c9e59f5cd4..eb7e78bdc0 100644
--- a/panels/datetime/cc-datetime-panel.c
+++ b/panels/datetime/cc-datetime-panel.c
@@ -101,6 +101,7 @@ struct _CcDateTimePanel
   GtkWidget *h_spinbutton;
   GtkWidget *listbox1;
   GtkWidget *listbox2;
+  GtkWidget *listbox3;
   GtkLockButton *lock_button;
   GtkWidget *month_combobox;
   GtkListStore *month_liststore;
@@ -936,6 +937,7 @@ cc_date_time_panel_class_init (CcDateTimePanelClass *klass)
   gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, format_combobox);
   gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, listbox1);
   gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, listbox2);
+  gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, listbox3);
   gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, lock_button);
   gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, month_liststore);
   gtk_widget_class_bind_template_child (widget_class, CcDateTimePanel, network_time_switch);
@@ -1039,6 +1041,7 @@ cc_date_time_panel_init (CcDateTimePanel *self)
 
   setup_listbox (self, self->listbox1);
   setup_listbox (self, self->listbox2);
+  setup_listbox (self, self->listbox3);
 
   /* set up network time switch */
   bind_switch_to_row (self,
diff --git a/panels/datetime/cc-datetime-panel.ui b/panels/datetime/cc-datetime-panel.ui
index 624a556f26..cc4d8e9473 100644
--- a/panels/datetime/cc-datetime-panel.ui
+++ b/panels/datetime/cc-datetime-panel.ui
@@ -177,13 +177,13 @@
                 <property name="orientation">vertical</property>
                 <property name="spacing">32</property>
                 <child>
-                  <object class="GtkFrame" id="frame">
+                  <object class="GtkFrame" id="datetime_frame">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">in</property>
                     <child>
-                      <object class="GtkListBox" id="listbox1">
+                      <object class="GtkListBox" id="listbox2">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="selection_mode">none</property>
@@ -211,33 +211,55 @@
                           </object>
                         </child>
                         <child>
-                          <object class="HdyActionRow" id="auto_timezone_row">
+                          <object class="HdyActionRow" id="datetime_button">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="title" translatable="yes">Automatic Time _Zone</property>
-                            <property name="subtitle" translatable="yes">Requires location services enabled 
and internet access</property>
+                            <property name="title" translatable="yes">Date &amp; _Time</property>
                             <property name="use_underline">True</property>
                             <child type="action">
-                              <object class="GtkSwitch" id="auto_timezone_switch">
+                              <object class="GtkLabel" id="datetime_label">
                                 <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="valign">center</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label">20 June 2012, 6:45 AM</property>
                               </object>
                             </child>
                           </object>
                         </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="timezone_frame">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkListBox" id="listbox1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="selection_mode">none</property>
+                        <signal name="row-activated" handler="list_box_row_activated" 
object="CcDateTimePanel" swapped="no"/>
+                        <signal name="keynav-failed" handler="keynav_failed" object="CcDateTimePanel" 
swapped="no"/>
                         <child>
-                          <object class="HdyActionRow" id="datetime_button">
+                          <object class="HdyActionRow" id="auto_timezone_row">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <property name="title" translatable="yes">Date &amp; _Time</property>
+                            <property name="title" translatable="yes">Automatic Time _Zone</property>
+                            <property name="subtitle" translatable="yes">Requires location services enabled 
and internet access</property>
                             <property name="use_underline">True</property>
                             <child type="action">
-                              <object class="GtkLabel" id="datetime_label">
+                              <object class="GtkSwitch" id="auto_timezone_switch">
                                 <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">0</property>
-                                <property name="label">20 June 2012, 6:45 AM</property>
+                                <property name="can_focus">True</property>
+                                <property name="valign">center</property>
                               </object>
                             </child>
                           </object>
@@ -265,7 +287,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
@@ -275,7 +297,7 @@
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">in</property>
                     <child>
-                      <object class="GtkListBox" id="listbox2">
+                      <object class="GtkListBox" id="listbox3">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="selection_mode">none</property>
@@ -307,7 +329,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>


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