From d80ed105923e706b6f8d6fea74540e22d5dd9ba0 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Mon, 8 Feb 2021 03:27:59 -0800 Subject: [PATCH] malcontent-control: Use HdyWindow and HdyHeaderBar --- malcontent-control/application.c | 3 + malcontent-control/main.ui | 516 ++++++++++++++++--------------- malcontent-control/meson.build | 1 + 3 files changed, 265 insertions(+), 255 deletions(-) diff --git a/malcontent-control/application.c b/malcontent-control/application.c index d226a83..c6c1b57 100644 --- a/malcontent-control/application.c +++ b/malcontent-control/application.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -250,6 +251,8 @@ mct_application_startup (GApplication *application) /* Chain up. */ G_APPLICATION_CLASS (mct_application_parent_class)->startup (application); + hdy_init (); + g_action_map_add_action_entries (G_ACTION_MAP (application), app_entries, G_N_ELEMENTS (app_entries), application); diff --git a/malcontent-control/main.ui b/malcontent-control/main.ui index 43baf25..d78a352 100644 --- a/malcontent-control/main.ui +++ b/malcontent-control/main.ui @@ -2,74 +2,124 @@ - + 540 580 - - - True - - Parental Controls - True - - - True - none - True - True - primary-menu - - - - - end - - - - - + True + vertical - + + True + + Parental Controls True - vertical - 0 - + True - user_manager - False - - - + none + True + True + primary-menu + + - False - False + end + + + + + True - + True - never - 370 + vertical + 0 - - 18 - vertical - 18 + True + user_manager + False + + + + + + False + False + + + + + True + never + 370 - - - It’s recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider. + + 18 + vertical + 18 True - True - 0.0 - 0.0 + + + + It’s recommended that restrictions are set as part of an ongoing conversation with $name. Read guidance on what to consider. + True + True + 0.0 + 0.0 + + + static + + + + + + + center + True + dbus_connection + + + + + + + True + + + + + controls + + + + + + True + vertical + True + True + + + True + vertical + 12 + 18 + + + True + Permission Required + + + static @@ -78,221 +128,177 @@ - - center + True - dbus_connection + Permission is required to view and change user parental controls settings. + True + + + static + + + + + + + True + center + True + True + True + + 6 - True + unlock + + + + + + True + vertical + True + True + + + True + vertical + 12 + 18 + + + system-users-symbolic + 96 + True + + + static + + + + + + + True + No Standard User Accounts + + + + + + static + + + + + + + True + center + Parental controls can only be applied to standard user + accounts. These can be created in the user settings. + True + + + static + + + + + + + True + _User Settings + center + True + True + True + True + + 6 + + + + + + + + no-other-users + + + + + + True + vertical + True + True + + + True + Loading… + + + + + + static + + + + + + + loading + + + + + + True + vertical + True + True + + + True + vertical + 12 + + + True + + + + + + + + + True + + + + + + + + alert + + + + + error - - controls - - - - - - True - vertical - True - True - - - True - vertical - 12 - 18 - - - True - Permission Required - - - - - - static - - - - - - - True - Permission is required to view and change user parental controls settings. - True - - - static - - - - - - - True - center - True - True - True - - 6 - - - - - - - unlock - - - - - - True - vertical - True - True - - - True - vertical - 12 - 18 - - - system-users-symbolic - 96 - True - - - static - - - - - - - True - No Standard User Accounts - - - - - - static - - - - - - - True - center - Parental controls can only be applied to standard user -accounts. These can be created in the user settings. - True - - - static - - - - - - - True - _User Settings - center - True - True - True - True - - 6 - - - - - - - - no-other-users - - - - - - True - vertical - True - True - - - True - Loading… - - - - - - static - - - - - - - loading - - - - - - True - vertical - True - True - - - True - vertical - 12 - - - True - - - - - - - - - True - - - - - - - - alert - - - - - error - diff --git a/malcontent-control/meson.build b/malcontent-control/meson.build index 9b9bb68..bd9f037 100644 --- a/malcontent-control/meson.build +++ b/malcontent-control/meson.build @@ -28,6 +28,7 @@ malcontent_control = executable('malcontent-control', dependency('glib-2.0', version: '>= 2.54.2'), dependency('gobject-2.0', version: '>= 2.54'), dependency('gtk+-3.0'), + dependency('libhandy-1', version: '>=1.1.0'), dependency('polkit-gobject-1'), libmalcontent_dep, libmalcontent_ui_dep,