GNOME Bugzilla – Bug 734422
Enterprise toggle isn't shown
Last modified: 2014-08-15 15:33:22 UTC
Enterprise toggle isn't shown in Add user dialog and following errors are printed: (gnome-control-center:3559): Gtk-CRITICAL **: gtk_container_remove: assertion 'gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container) || GTK_IS_ACTION_BAR (container)' failed (gnome-control-center:3559): Gtk-CRITICAL **: gtk_box_pack: assertion 'gtk_widget_get_parent (child) == NULL' failed It is because header bar buttons are used.
Created attachment 282807 [details] [review] fix enterprise toggle Don't add the toggle into the dialog action area.
Created attachment 282808 [details] Screenshot Screenshot with the change...
Review of attachment 282807 [details] [review]: Rest looks good. ::: panels/user-accounts/data/account-dialog.ui @@ +33,3 @@ + <property name="orientation">vertical</property> + <child> + <object class="GtkNotebook" id="notebook"> Use GtkStack?
(In reply to comment #3) > Review of attachment 282807 [details] [review]: > > Rest looks good. Thanks for the review! > ::: panels/user-accounts/data/account-dialog.ui > @@ +33,3 @@ > + <property name="orientation">vertical</property> > + <child> > + <object class="GtkNotebook" id="notebook"> > > Use GtkStack? I just rename existing GtkNotebook: - <object class="GtkNotebook" id="account-dialog"> ... + <object class="GtkNotebook" id="notebook"> so I will transform the GtkNotebook to the GtkStack later in another commit (let the bug open until then).
Created attachment 283379 [details] [review] use GtkStack instead of GtkNotebook in Add user dialog The promised fix is here...
Review of attachment 283379 [details] [review]: ::: panels/user-accounts/um-account-dialog.c @@ +1389,3 @@ + switch (mode) { + case UM_LOCAL: + gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "_local"); Instead of this huge switch, define a separate array of strings: static const char * const mode_pages[] = { "_local", "_enterprise", "_offline" }; and use gtk_stack_set_visible_child_name (GTK_STACK (self->stack), mode_pages[mode]);
Created attachment 283514 [details] [review] use GtkStack instead of GtkNotebook in Add user dialog Thanks for the review, there is fixed one :-)
Review of attachment 283514 [details] [review]: Looks good.
Comment on attachment 283514 [details] [review] use GtkStack instead of GtkNotebook in Add user dialog commit 3695f858dde4d91243885c853302d9b9b2f64bf2