user-controls: Rename OARS widget variables to be more descriptive

This doesn’t introduce any functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #11
This commit is contained in:
Philip Withnall 2020-02-25 10:41:30 +00:00
parent 5a1bfb842a
commit 7ad804835a
2 changed files with 21 additions and 21 deletions

View File

@ -81,8 +81,8 @@ struct _MctUserControls
GtkLabel *restrict_user_installation_description; GtkLabel *restrict_user_installation_description;
GtkSwitch *restrict_web_browsers_switch; GtkSwitch *restrict_web_browsers_switch;
GtkLabel *restrict_web_browsers_description; GtkLabel *restrict_web_browsers_description;
GtkButton *restriction_button; GtkButton *oars_button;
GtkPopover *restriction_popover; GtkPopover *oars_popover;
MctRestrictApplicationsDialog *restrict_applications_dialog; MctRestrictApplicationsDialog *restrict_applications_dialog;
GtkLabel *restrict_applications_description; GtkLabel *restrict_applications_description;
@ -399,7 +399,7 @@ update_oars_level (MctUserControls *self)
if (rating_age_category == NULL || all_categories_unset) if (rating_age_category == NULL || all_categories_unset)
rating_age_category = _("All Ages"); rating_age_category = _("All Ages");
gtk_button_set_label (self->restriction_button, rating_age_category); gtk_button_set_label (self->oars_button, rating_age_category);
} }
static void static void
@ -670,13 +670,13 @@ on_set_age_action_activated (GSimpleAction *action,
/* Update the button */ /* Update the button */
if (age == oars_disabled_age) if (age == oars_disabled_age)
gtk_button_set_label (self->restriction_button, _("All Ages")); gtk_button_set_label (self->oars_button, _("All Ages"));
for (i = 0; age != oars_disabled_age && entries[i] != NULL; i++) for (i = 0; age != oars_disabled_age && entries[i] != NULL; i++)
{ {
if (ages[i] == age) if (ages[i] == age)
{ {
gtk_button_set_label (self->restriction_button, entries[i]); gtk_button_set_label (self->oars_button, entries[i]);
break; break;
} }
} }
@ -965,8 +965,8 @@ mct_user_controls_class_init (MctUserControlsClass *klass)
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_user_installation_description); gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_user_installation_description);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_web_browsers_switch); gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_web_browsers_switch);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_web_browsers_description); gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_web_browsers_description);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restriction_button); gtk_widget_class_bind_template_child (widget_class, MctUserControls, oars_button);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restriction_popover); gtk_widget_class_bind_template_child (widget_class, MctUserControls, oars_popover);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_applications_dialog); gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_applications_dialog);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_applications_description); gtk_widget_class_bind_template_child (widget_class, MctUserControls, restrict_applications_description);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, application_usage_permissions_listbox); gtk_widget_class_bind_template_child (widget_class, MctUserControls, application_usage_permissions_listbox);
@ -1022,7 +1022,7 @@ mct_user_controls_init (MctUserControls *self)
"permissions", "permissions",
G_ACTION_GROUP (self->action_group)); G_ACTION_GROUP (self->action_group));
gtk_popover_bind_model (self->restriction_popover, G_MENU_MODEL (self->age_menu), NULL); gtk_popover_bind_model (self->oars_popover, G_MENU_MODEL (self->age_menu), NULL);
g_object_bind_property (self->restrict_user_installation_switch, "active", g_object_bind_property (self->restrict_user_installation_switch, "active",
self->restrict_system_installation_switch, "sensitive", self->restrict_system_installation_switch, "sensitive",

View File

@ -436,7 +436,7 @@
<property name="row-spacing">4</property> <property name="row-spacing">4</property>
<property name="column-spacing">4</property> <property name="column-spacing">4</property>
<child> <child>
<object class="GtkLabel" id="restriction_label"> <object class="GtkLabel" id="oars_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
@ -445,10 +445,10 @@
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">Application _Suitability</property> <property name="label" translatable="yes">Application _Suitability</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">restriction_button</property> <property name="mnemonic_widget">oars_button</property>
<accessibility> <accessibility>
<relation target="restriction_button" type="label-for"/> <relation target="oars_button" type="label-for"/>
<relation target="restriction_button" type="flows-to"/> <relation target="oars_button" type="flows-to"/>
</accessibility> </accessibility>
</object> </object>
<packing> <packing>
@ -457,7 +457,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="restriction_description"> <object class="GtkLabel" id="oars_description">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="halign">start</property> <property name="halign">start</property>
@ -472,7 +472,7 @@
<class name="dim-label" /> <class name="dim-label" />
</style> </style>
<accessibility> <accessibility>
<relation target="restriction_button" type="description-for"/> <relation target="oars_button" type="description-for"/>
</accessibility> </accessibility>
</object> </object>
<packing> <packing>
@ -481,12 +481,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkMenuButton" id="restriction_button"> <object class="GtkMenuButton" id="oars_button">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="halign">end</property> <property name="halign">end</property>
<property name="valign">center</property> <property name="valign">center</property>
<property name="popover">restriction_popover</property> <property name="popover">oars_popover</property>
</object> </object>
<packing> <packing>
<property name="left-attach">1</property> <property name="left-attach">1</property>
@ -508,9 +508,9 @@
</child> </child>
</template> </template>
<object class="GtkPopoverMenu" id="restriction_popover"> <object class="GtkPopoverMenu" id="oars_popover">
<accessibility> <accessibility>
<relation target="restriction_button" type="popup-for"/> <relation target="oars_button" type="popup-for"/>
</accessibility> </accessibility>
</object> </object>
@ -519,8 +519,8 @@
<object class="GtkSizeGroup"> <object class="GtkSizeGroup">
<property name="mode">horizontal</property> <property name="mode">horizontal</property>
<widgets> <widgets>
<widget name="restriction_button" /> <widget name="oars_button" />
<widget name="restriction_popover" /> <widget name="oars_popover" />
</widgets> </widgets>
</object> </object>
@ -531,7 +531,7 @@
<widget name="restrict_web_browsers_description" /> <widget name="restrict_web_browsers_description" />
<widget name="restrict_applications_label" /> <widget name="restrict_applications_label" />
<widget name="restrict_applications_description" /> <widget name="restrict_applications_description" />
<widget name="restriction_label" /> <widget name="oars_label" />
<widget name="restrict_user_installation_label" /> <widget name="restrict_user_installation_label" />
<widget name="restrict_system_installation_label" /> <widget name="restrict_system_installation_label" />
</widgets> </widgets>