malcontent-control: Add link to guidance on how to set parental controls
Try and nudge parents/carers towards the best practice for how to set parental controls on a user, by linking them to appropriate external content from people who know what they’re talking about. This external content can vary in the translations so that parents are pointed to appropriate localised guidelines. In the UK, for example, this may be https://www.nspcc.org.uk/keeping-children-safe/online-safety/. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
01e861f317
commit
2010898947
|
@ -4,7 +4,6 @@
|
||||||
<requires lib="gtk+" version="3.12"/>
|
<requires lib="gtk+" version="3.12"/>
|
||||||
<template class="MctUserControls" parent="GtkGrid">
|
<template class="MctUserControls" parent="GtkGrid">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="margin-top">18</property>
|
|
||||||
<property name="row-spacing">6</property>
|
<property name="row-spacing">6</property>
|
||||||
<property name="column-spacing">12</property>
|
<property name="column-spacing">12</property>
|
||||||
<property name="valign">start</property>
|
<property name="valign">start</property>
|
||||||
|
|
|
@ -80,6 +80,7 @@ struct _MctApplication
|
||||||
GtkLabel *error_message;
|
GtkLabel *error_message;
|
||||||
GtkLockButton *lock_button;
|
GtkLockButton *lock_button;
|
||||||
GtkButton *user_accounts_panel_button;
|
GtkButton *user_accounts_panel_button;
|
||||||
|
GtkLabel *help_label;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (MctApplication, mct_application, GTK_TYPE_APPLICATION)
|
G_DEFINE_TYPE (MctApplication, mct_application, GTK_TYPE_APPLICATION)
|
||||||
|
@ -211,6 +212,7 @@ mct_application_activate (GApplication *application)
|
||||||
self->error_message = GTK_LABEL (gtk_builder_get_object (builder, "error_message"));
|
self->error_message = GTK_LABEL (gtk_builder_get_object (builder, "error_message"));
|
||||||
self->lock_button = GTK_LOCK_BUTTON (gtk_builder_get_object (builder, "lock_button"));
|
self->lock_button = GTK_LOCK_BUTTON (gtk_builder_get_object (builder, "lock_button"));
|
||||||
self->user_accounts_panel_button = GTK_BUTTON (gtk_builder_get_object (builder, "user_accounts_panel_button"));
|
self->user_accounts_panel_button = GTK_BUTTON (gtk_builder_get_object (builder, "user_accounts_panel_button"));
|
||||||
|
self->help_label = GTK_LABEL (gtk_builder_get_object (builder, "help_label"));
|
||||||
|
|
||||||
/* Connect signals. */
|
/* Connect signals. */
|
||||||
g_signal_connect_object (self->user_selector, "notify::user",
|
g_signal_connect_object (self->user_selector, "notify::user",
|
||||||
|
@ -391,6 +393,24 @@ update_main_stack (MctApplication *self)
|
||||||
}
|
}
|
||||||
else if (is_permission_loaded && is_user_manager_loaded)
|
else if (is_permission_loaded && is_user_manager_loaded)
|
||||||
{
|
{
|
||||||
|
g_autofree gchar *help_label = NULL;
|
||||||
|
|
||||||
|
/* Translators: Replace the link to commonsensemedia.org with some
|
||||||
|
* localised guidance for parents/carers on how to set restrictions on
|
||||||
|
* their child/caree in a responsible way which is in keeping with the
|
||||||
|
* best practice and culture of the region. If no suitable localised
|
||||||
|
* guidance exists, and if the default commonsensemedia.org link is not
|
||||||
|
* suitable, please file an issue against malcontent so we can discuss
|
||||||
|
* further!
|
||||||
|
* https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/new
|
||||||
|
*/
|
||||||
|
help_label = g_strdup_printf (_("It’s recommended that restrictions are "
|
||||||
|
"set as part of an ongoing conversation "
|
||||||
|
"with %s. <a href='https://www.commonsensemedia.org/privacy-and-internet-safety'>"
|
||||||
|
"Read guidance</a> on what to consider."),
|
||||||
|
act_user_get_real_name (selected_user));
|
||||||
|
gtk_label_set_markup (self->help_label, help_label);
|
||||||
|
|
||||||
mct_user_controls_set_user (self->user_controls, selected_user);
|
mct_user_controls_set_user (self->user_controls, selected_user);
|
||||||
|
|
||||||
new_page_name = "controls";
|
new_page_name = "controls";
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.12"/>
|
<requires lib="gtk+" version="3.12"/>
|
||||||
<object class="GtkApplicationWindow" id="main_window">
|
<object class="GtkApplicationWindow" id="main_window">
|
||||||
<property name="default-width">500</property>
|
<property name="default-width">540</property>
|
||||||
<property name="default-height">520</property>
|
<property name="default-height">580</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="header">
|
<object class="GtkHeaderBar" id="header">
|
||||||
<property name="show-close-button">True</property>
|
<property name="show-close-button">True</property>
|
||||||
|
@ -55,13 +55,35 @@
|
||||||
<object class="GtkScrolledWindow">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="hscrollbar-policy">never</property>
|
<property name="hscrollbar-policy">never</property>
|
||||||
<property name="min-content-height">350</property>
|
<property name="min-content-height">370</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="MctUserControls" id="user_controls">
|
<object class="GtkBox">
|
||||||
<property name="halign">center</property>
|
<property name="margin">18</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">18</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="margin">12</property>
|
<child>
|
||||||
<property name="dbus-connection">dbus_connection</property>
|
<object class="GtkLabel" id="help_label">
|
||||||
|
<!-- Content is set in code; this string is just a placeholder -->
|
||||||
|
<property name="label">It’s recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider.</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="wrap">True</property>
|
||||||
|
<property name="xalign">0.0</property>
|
||||||
|
<property name="yalign">0.0</property>
|
||||||
|
<child internal-child="accessible">
|
||||||
|
<object class="AtkObject">
|
||||||
|
<property name="AtkObject::accessible-role">static</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="MctUserControls" id="user_controls">
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="dbus-connection">dbus_connection</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|
Loading…
Reference in New Issue