Merge branch 'wip/exalm/headerbar' into 'master'
headerbar: Don't use gtk_widget_unparent() with GtkBox See merge request GNOME/gtk!3169
This commit is contained in:
@@ -743,8 +743,17 @@ gtk_header_bar_set_show_title_buttons (GtkHeaderBar *bar,
|
|||||||
create_window_controls (bar);
|
create_window_controls (bar);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_clear_pointer (&bar->start_window_controls, gtk_widget_unparent);
|
if (bar->start_box && bar->start_window_controls)
|
||||||
g_clear_pointer (&bar->end_window_controls, gtk_widget_unparent);
|
{
|
||||||
|
gtk_box_remove (GTK_BOX (bar->start_box), bar->start_window_controls);
|
||||||
|
bar->start_window_controls = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bar->end_box && bar->end_window_controls)
|
||||||
|
{
|
||||||
|
gtk_box_remove (GTK_BOX (bar->end_box), bar->end_window_controls);
|
||||||
|
bar->end_window_controls = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (bar), header_bar_props[PROP_SHOW_TITLE_BUTTONS]);
|
g_object_notify_by_pspec (G_OBJECT (bar), header_bar_props[PROP_SHOW_TITLE_BUTTONS]);
|
||||||
|
|||||||
Reference in New Issue
Block a user