forked from AuroraMiddleware/gtk
Update headerbar title from window title
This removes a possible source of confusion in our API. The title is now synchronized both ways between the window and the headerbar. https://bugzilla.gnome.org/show_bug.cgi?id=720067
This commit is contained in:
parent
5918a4dae8
commit
da08592ea1
@ -1796,8 +1796,13 @@ gtk_window_set_title_internal (GtkWindow *window,
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gdk_window_set_title (gtk_widget_get_window (widget), new_title);
|
||||
|
||||
if (priv->titlebar != NULL && update_titlebar)
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (priv->titlebar), new_title);
|
||||
if (update_titlebar)
|
||||
{
|
||||
if (GTK_IS_HEADER_BAR (priv->titlebar))
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (priv->titlebar), new_title);
|
||||
else if (GTK_IS_HEADER_BAR (priv->title_box))
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (priv->title_box), new_title);
|
||||
}
|
||||
|
||||
g_object_notify (G_OBJECT (window), "title");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user