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;
GtkSwitch *restrict_web_browsers_switch;
GtkLabel *restrict_web_browsers_description;
GtkButton *restriction_button;
GtkPopover *restriction_popover;
GtkButton *oars_button;
GtkPopover *oars_popover;
MctRestrictApplicationsDialog *restrict_applications_dialog;
GtkLabel *restrict_applications_description;
@ -399,7 +399,7 @@ update_oars_level (MctUserControls *self)
if (rating_age_category == NULL || all_categories_unset)
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
@ -670,13 +670,13 @@ on_set_age_action_activated (GSimpleAction *action,
/* Update the button */
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++)
{
if (ages[i] == age)
{
gtk_button_set_label (self->restriction_button, entries[i]);
gtk_button_set_label (self->oars_button, entries[i]);
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_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, restriction_button);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, restriction_popover);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, oars_button);
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_description);
gtk_widget_class_bind_template_child (widget_class, MctUserControls, application_usage_permissions_listbox);
@ -1022,7 +1022,7 @@ mct_user_controls_init (MctUserControls *self)
"permissions",
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",
self->restrict_system_installation_switch, "sensitive",

View File

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