[gnome-control-center/user-accounts-properly-initiate-avatar-chooser: 2/2] user-accounts: Explicitly initialize CcAvatarChooser
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/user-accounts-properly-initiate-avatar-chooser: 2/2] user-accounts: Explicitly initialize CcAvatarChooser
- Date: Thu, 3 Mar 2022 16:13:47 +0000 (UTC)
commit dc032c338d84f58bc4317d81bf5451ef160521ad
Author: Felipe Borges <felipeborges gnome org>
Date: Thu Mar 3 10:59:06 2022 +0100
user-accounts: Explicitly initialize CcAvatarChooser
Setting the Gtk.MenuButton.popover property to a CcAvatarChooser
object doesn't initialize the CcAvatarChooser object.
Fixes #1689
panels/user-accounts/cc-user-panel.c | 5 ++++-
panels/user-accounts/cc-user-panel.ui | 3 ---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/panels/user-accounts/cc-user-panel.c b/panels/user-accounts/cc-user-panel.c
index caae211e9..96278fad5 100644
--- a/panels/user-accounts/cc-user-panel.c
+++ b/panels/user-accounts/cc-user-panel.c
@@ -1383,6 +1383,10 @@ setup_main_window (CcUserPanel *self)
} else {
g_signal_connect_object (self->um, "notify::is-loaded", G_CALLBACK (users_loaded), self,
G_CONNECT_SWAPPED);
}
+
+ self->avatar_chooser = cc_avatar_chooser_new ();
+ gtk_menu_button_set_popover (self->user_avatar_edit_button,
+ GTK_WIDGET (self->avatar_chooser));
}
static GSettings *
@@ -1484,7 +1488,6 @@ cc_user_panel_class_init (CcUserPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, add_user_button);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, autologin_row);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, autologin_switch);
- gtk_widget_class_bind_template_child (widget_class, CcUserPanel, avatar_chooser);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, back_button);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, fingerprint_state_label);
gtk_widget_class_bind_template_child (widget_class, CcUserPanel, fingerprint_row);
diff --git a/panels/user-accounts/cc-user-panel.ui b/panels/user-accounts/cc-user-panel.ui
index 847086db4..c09776b03 100644
--- a/panels/user-accounts/cc-user-panel.ui
+++ b/panels/user-accounts/cc-user-panel.ui
@@ -106,9 +106,6 @@
<property name="halign">end</property>
<property name="valign">end</property>
<property name="icon-name">document-edit-symbolic</property>
- <property name="popover">
- <object class="CcAvatarChooser" id="avatar_chooser"/>
- </property>
<style>
<class name="circular"/>
</style>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]