[gnome-control-center] background: change "Light" to "Default"



commit 91f3a7ec4fa1d0ba8542b1dfdb5505c8796699f4
Author: Cassidy James Blaede <c ssidyjam es>
Date:   Wed Jun 15 19:12:10 2022 +0000

    background: change "Light" to "Default"

 panels/background/cc-background-panel.c  | 26 +++++++++++++-------------
 panels/background/cc-background-panel.ui | 16 ++++++++--------
 2 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 2314e3ce8..f748e9a13 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -63,9 +63,9 @@ struct _CcBackgroundPanel
   CcBackgroundItem *current_background;
 
   CcBackgroundChooser *background_chooser;
-  CcBackgroundPreview *light_preview;
+  CcBackgroundPreview *default_preview;
   CcBackgroundPreview *dark_preview;
-  GtkToggleButton *light_toggle;
+  GtkToggleButton *default_toggle;
   GtkToggleButton *dark_toggle;
 };
 
@@ -84,7 +84,7 @@ load_custom_css (CcBackgroundPanel *self)
 }
 
 static void
-reload_light_dark_toggles (CcBackgroundPanel *self)
+reload_color_scheme_toggles (CcBackgroundPanel *self)
 {
   GDesktopColorScheme scheme;
 
@@ -92,7 +92,7 @@ reload_light_dark_toggles (CcBackgroundPanel *self)
 
   if (scheme == G_DESKTOP_COLOR_SCHEME_DEFAULT)
     {
-      gtk_toggle_button_set_active (self->light_toggle, TRUE);
+      gtk_toggle_button_set_active (self->default_toggle, TRUE);
     }
   else if (scheme == G_DESKTOP_COLOR_SCHEME_PREFER_DARK)
     {
@@ -100,7 +100,7 @@ reload_light_dark_toggles (CcBackgroundPanel *self)
     }
   else
     {
-      gtk_toggle_button_set_active (self->light_toggle, FALSE);
+      gtk_toggle_button_set_active (self->default_toggle, FALSE);
       gtk_toggle_button_set_active (self->dark_toggle, FALSE);
     }
 }
@@ -149,9 +149,9 @@ set_color_scheme (CcBackgroundPanel   *self,
 /* Color schemes */
 
 static void
-on_light_dark_toggle_active_cb (CcBackgroundPanel *self)
+on_color_scheme_toggle_active_cb (CcBackgroundPanel *self)
 {
-  if (gtk_toggle_button_get_active (self->light_toggle))
+  if (gtk_toggle_button_get_active (self->default_toggle))
     set_color_scheme (self, G_DESKTOP_COLOR_SCHEME_DEFAULT);
   else if (gtk_toggle_button_get_active (self->dark_toggle))
     set_color_scheme (self, G_DESKTOP_COLOR_SCHEME_PREFER_DARK);
@@ -182,7 +182,7 @@ update_preview (CcBackgroundPanel *panel)
   CcBackgroundItem *current_background;
 
   current_background = panel->current_background;
-  cc_background_preview_set_item (panel->light_preview, current_background);
+  cc_background_preview_set_item (panel->default_preview, current_background);
   cc_background_preview_set_item (panel->dark_preview, current_background);
 }
 
@@ -389,12 +389,12 @@ cc_background_panel_class_init (CcBackgroundPanelClass *klass)
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/control-center/background/cc-background-panel.ui");
 
   gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, background_chooser);
-  gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, light_preview);
+  gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, default_preview);
   gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, dark_preview);
-  gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, light_toggle);
+  gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, default_toggle);
   gtk_widget_class_bind_template_child (widget_class, CcBackgroundPanel, dark_toggle);
 
-  gtk_widget_class_bind_template_callback (widget_class, on_light_dark_toggle_active_cb);
+  gtk_widget_class_bind_template_callback (widget_class, on_color_scheme_toggle_active_cb);
   gtk_widget_class_bind_template_callback (widget_class, on_chooser_background_chosen_cb);
   gtk_widget_class_bind_template_callback (widget_class, on_add_picture_button_clicked_cb);
 }
@@ -433,11 +433,11 @@ cc_background_panel_init (CcBackgroundPanel *panel)
   g_signal_connect_object (panel->settings, "changed", G_CALLBACK (on_settings_changed), panel, 
G_CONNECT_SWAPPED);
 
   /* Interface settings */
-  reload_light_dark_toggles (panel);
+  reload_color_scheme_toggles (panel);
 
   g_signal_connect_object (panel->interface_settings,
                            "changed::" INTERFACE_COLOR_SCHEME_KEY,
-                           G_CALLBACK (reload_light_dark_toggles),
+                           G_CALLBACK (reload_color_scheme_toggles),
                            panel,
                            G_CONNECT_SWAPPED);
 
diff --git a/panels/background/cc-background-panel.ui b/panels/background/cc-background-panel.ui
index 88cf9fb9c..33a86385e 100644
--- a/panels/background/cc-background-panel.ui
+++ b/panels/background/cc-background-panel.ui
@@ -27,13 +27,13 @@
                         <property name="margin-bottom">12</property>
                         <property name="hexpand">True</property>
                         <child>
-                          <object class="GtkToggleButton" id="light_toggle">
+                          <object class="GtkToggleButton" id="default_toggle">
                             <accessibility>
-                              <relation name="labelled-by">light_label</relation>
+                              <relation name="labelled-by">default_label</relation>
                             </accessibility>
-                            <signal name="notify::active" handler="on_light_dark_toggle_active_cb" 
swapped="true"/>
+                            <signal name="notify::active" handler="on_color_scheme_toggle_active_cb" 
swapped="true"/>
                             <child>
-                              <object class="CcBackgroundPreview" id="light_preview"/>
+                              <object class="CcBackgroundPreview" id="default_preview"/>
                             </child>
                             <style>
                               <class name="background-preview-button"/>
@@ -45,8 +45,8 @@
                           </object>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="light_label">
-                            <property name="label" translatable="yes">Light</property>
+                          <object class="GtkLabel" id="default_label">
+                            <property name="label" translatable="yes">Default</property>
                             <layout>
                               <property name="column">0</property>
                               <property name="row">1</property>
@@ -55,11 +55,11 @@
                         </child>
                         <child>
                           <object class="GtkToggleButton" id="dark_toggle">
-                            <property name="group">light_toggle</property>
+                            <property name="group">default_toggle</property>
                             <accessibility>
                               <relation name="labelled-by">dark_label</relation>
                             </accessibility>
-                            <signal name="notify::active" handler="on_light_dark_toggle_active_cb" 
swapped="true"/>
+                            <signal name="notify::active" handler="on_color_scheme_toggle_active_cb" 
swapped="true"/>
                             <child>
                               <object class="CcBackgroundPreview" id="dark_preview">
                                 <property name="is-dark">True</property>


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