After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 720067 - header bar title not updated by gtk_window_set_title
header bar title not updated by gtk_window_set_title
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-12-08 17:18 UTC by William Jon McCann
Modified: 2013-12-11 01:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set title on titlebox if titlebar isn't set (859 bytes, patch)
2013-12-08 18:29 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2013-12-08 17:18:19 UTC
When a window has a header bar title it is not updated by gtk_window_set_title.
Comment 1 William Jon McCann 2013-12-08 18:29:55 UTC
Created attachment 263768 [details] [review]
Set title on titlebox if titlebar isn't set

Not sure this is right - seems weird - but also seems to kinda work.
Comment 2 Matthias Clasen 2013-12-09 04:26:52 UTC
I don't think that's right. If the headerbar is app-provided, they should deal with it themselves, instead of indirectly relying on GtkWindow to do something behind the scenes.
Comment 3 William Jon McCann 2013-12-09 08:17:28 UTC
Hmm, that's pretty awkward for most apps though. It is pretty easy to get at the toplevel window from any point in the code but getting at the headerbar isn't. If we want to do this maybe we should have a gtk_window_get_titlebar.
Comment 4 Matthias Clasen 2013-12-09 11:49:18 UTC
I don't think 

gtk_widget_class_bind_template_child_private (YourClass, headerbar)

is hard.
Comment 5 William Jon McCann 2013-12-09 12:00:44 UTC
I'm not sure what the objection is here. But it is just nasty that gtk_window_set_title inexplicably does nothing when we're using CSD - some of the time and some of the time it works. At the very least this should be explained in the docs.
Comment 6 Matthias Clasen 2013-12-09 13:38:33 UTC
I don't know. Maybe it is harmless enough to allow this. But I still think it is somewhat odd to set a custom titlebar, and then have manipulated behind the scenes by the toolkit.
Comment 7 William Jon McCann 2013-12-09 13:45:53 UTC
Yeah, if you set up a custom title widget in headerbar I'd expect that to override the plain text title. It does get a little icky when you have the ability to set each independently - say, setting both a title property on the window and the headerbar in glade.