Commit d8f6f2ec authored by Christopher Davis's avatar Christopher Davis
Browse files

user-accounts: Use rounded lists and HdyPreferencesGroup

parent 59036c4f
Pipeline #259094 failed with stages
in 38 seconds
......@@ -32,6 +32,7 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <libhandy-1/handy.h>
#include <polkit/polkit.h>
#include <act/act.h>
#include <cairo-gobject.h>
......@@ -70,7 +71,7 @@ struct _CcUserPanel {
GSettings *login_screen_settings;
GtkBox *accounts_box;
GtkBox *account_settings_box;
HdyPreferencesGroup *account_settings_group;
GtkListBox *account_settings_listbox;
GtkListBox *authentication_and_login_listbox;
GtkListBoxRow *account_type_row;
......@@ -872,7 +873,7 @@ show_user (ActUser *user, CcUserPanel *self)
/* Do not show the "Account Type" option when there's a single user account. */
show = (self->other_accounts != 0);
gtk_widget_set_visible (GTK_WIDGET (self->account_settings_box), show);
gtk_widget_set_visible (GTK_WIDGET (self->account_settings_group), show);
gtk_label_set_label (self->password_button_label, get_password_mode_text (user));
enable = act_user_is_local_account (user);
......@@ -1498,13 +1499,6 @@ setup_main_window (CcUserPanel *self)
users_loaded (self);
else
g_signal_connect_object (self->um, "notify::is-loaded", G_CALLBACK (users_loaded), self, G_CONNECT_SWAPPED);
gtk_list_box_set_header_func (self->account_settings_listbox,
cc_list_box_update_header_func,
NULL, NULL);
gtk_list_box_set_header_func (self->authentication_and_login_listbox,
cc_list_box_update_header_func,
NULL, NULL);
}
static GSettings *
......@@ -1608,7 +1602,7 @@ cc_user_panel_class_init (CcUserPanelClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/user-accounts/cc-user-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, accounts_box);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, account_settings_box);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, account_settings_group);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, account_settings_listbox);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, authentication_and_login_listbox);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, account_type_row);
......
......@@ -235,27 +235,16 @@
</child>
<child>
<object class="GtkBox" id="account_settings_box">
<object class="HdyPreferencesGroup" id="account_settings_group">
<property name="visible">True</property>
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Account Settings</property>
<property name="halign">GTK_ALIGN_START</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<property name="title" translatable="yes">Account Settings</property>
<child>
<object class="GtkListBox" id="account_settings_listbox">
<property name="visible">True</property>
<property name="selection-mode">GTK_SELECTION_NONE</property>
<signal name="row-activated" handler="activate_row"/>
<style>
<class name="frame"/>
<class name="content"/>
</style>
<child>
<object class="GtkListBoxRow" id="account_type_row">
......@@ -441,28 +430,17 @@
</child>
<child>
<object class="GtkBox" id="authentication_and_login_box">
<object class="HdyPreferencesGroup" id="authentication_and_login_group">
<property name="visible">True</property>
<property name="orientation">GTK_ORIENTATION_VERTICAL</property>
<property name="spacing">10</property>
<property name="margin-top">10</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" translatable="yes">Authentication &amp; Login</property>
<property name="halign">GTK_ALIGN_START</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<property name="title" translatable="yes">Authentication &amp; Login</property>
<property name="margin-top">12</property>
<child>
<object class="GtkListBox" id="authentication_and_login_listbox">
<property name="visible">True</property>
<property name="selection-mode">GTK_SELECTION_NONE</property>
<signal name="row-activated" handler="activate_row"/>
<style>
<class name="frame"/>
<class name="content"/>
</style>
<child>
<object class="GtkListBoxRow" id="password_row">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment