project: Port to GtkStack API changes

This commit is contained in:
Georges Basile Stavracas Neto 2022-07-08 16:57:10 -03:00
parent 6cd201166b
commit 3e1c14bda3
1 changed files with 91 additions and 79 deletions

View File

@ -41,102 +41,114 @@
</child> </child>
<child> <child>
<object class="GtkStack" id="main_stack"> <object class="GtkStack" id="main_stack">
<child> <child>
<object class="GtkBox"> <object class="GtkStackPage">
<property name="orientation">vertical</property>
<child>
<object class="MctUserSelector" id="user_selector">
<property name="user-manager">user_manager</property>
<property name="show-administrators">False</property>
<accessibility>
<relation name="controls">user_controls</relation>
</accessibility>
</object>
</child>
<child>
<object class="MctUserControls" id="user_controls">
<!-- Content is set in code; this string is just a placeholder -->
<property name="description">Its recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider.</property>
<property name="height-request">270</property>
<property name="dbus-connection">dbus_connection</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
<packing>
<property name="name">controls</property> <property name="name">controls</property>
</packing> <property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="MctUserSelector" id="user_selector">
<property name="user-manager">user_manager</property>
<property name="show-administrators">False</property>
<accessibility>
<relation name="controls">user_controls</relation>
</accessibility>
</object>
</child>
<child>
<object class="MctUserControls" id="user_controls">
<!-- Content is set in code; this string is just a placeholder -->
<property name="description">Its recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider.</property>
<property name="height-request">270</property>
<property name="dbus-connection">dbus_connection</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</property>
</object>
</child> </child>
<child> <child>
<object class="AdwStatusPage"> <object class="GtkStackPage">
<property name="title" translatable="yes">Permission Required</property>
<property name="description" translatable="yes">Permission is required to view and change user parental controls settings.</property>
<property name="icon-name">org.freedesktop.MalcontentControl</property>
<child>
<object class="GtkLockButton" id="lock_button">
<property name="halign">center</property>
<property name="can-default">True</property>
<property name="has-default">True</property>
</object>
</child>
</object>
<packing>
<property name="name">unlock</property> <property name="name">unlock</property>
</packing> <property name="child">
<object class="AdwStatusPage">
<property name="title" translatable="yes">Permission Required</property>
<property name="description" translatable="yes">Permission is required to view and change user parental controls settings.</property>
<property name="icon-name">org.freedesktop.MalcontentControl</property>
<child>
<object class="GtkLockButton" id="lock_button">
<property name="halign">center</property>
<property name="can-default">True</property>
<property name="has-default">True</property>
</object>
</child>
</object>
</property>
</object>
</child> </child>
<child> <child>
<object class="AdwStatusPage"> <object class="GtkStackPage">
<property name="icon-name">system-users-symbolic</property>
<property name="title" translatable="yes">No Standard User Accounts</property>
<property name="description" translatable="yes">Parental controls can only be applied to standard user
accounts. These can be created in the user settings.</property>
<child>
<object class="GtkButton" id="user_accounts_panel_button">
<property name="label" translatable="yes">_User Settings</property>
<property name="halign">center</property>
<property name="can-default">True</property>
<property name="has-default">True</property>
<property name="use-underline">True</property>
<style>
<class name="suggested-action"/>
</style>
</object>
</child>
</object>
<packing>
<property name="name">no-other-users</property> <property name="name">no-other-users</property>
</packing> <property name="child">
</child> <object class="AdwStatusPage">
<property name="icon-name">system-users-symbolic</property>
<child> <property name="title" translatable="yes">No Standard User Accounts</property>
<object class="GtkBox"> <property name="description" translatable="yes">Parental controls can only be applied to standard user
<property name="orientation">vertical</property> accounts. These can be created in the user settings.</property>
<property name="hexpand">True</property> <child>
<property name="vexpand">True</property> <object class="GtkButton" id="user_accounts_panel_button">
<child type="center"> <property name="label" translatable="yes">_User Settings</property>
<object class="GtkLabel"> <property name="halign">center</property>
<property name="label" translatable="yes">Loading…</property> <property name="can-default">True</property>
<attributes> <property name="has-default">True</property>
<attribute name="scale" value="1.4"/> <property name="use-underline">True</property>
</attributes> <style>
<class name="suggested-action"/>
</style>
</object>
</child>
</object> </object>
</child> </property>
</object> </object>
<packing>
<property name="name">loading</property>
</packing>
</child> </child>
<child> <child>
<object class="AdwStatusPage" id="error_page"> <object class="GtkStackPage">
<property name="icon-name">dialog-error-symbolic</property> <property name="name">loading</property>
<property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child type="center">
<object class="GtkLabel">
<property name="label" translatable="yes">Loading…</property>
<attributes>
<attribute name="scale" value="1.4"/>
</attributes>
</object>
</child>
</object>
</property>
</object> </object>
<packing>
<property name="name">error</property>
</packing>
</child> </child>
<child>
<object class="GtkStackPage">
<property name="name">error</property>
<property name="child">
<object class="AdwStatusPage" id="error_page">
<property name="icon-name">dialog-error-symbolic</property>
</object>
</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>