GNOME Bugzilla – Bug 779862
Deprecate/rename gtk_header_bar_set_show_close_button() et. al.
Last modified: 2017-12-08 03:46:00 UTC
In https://bugzilla.redhat.com/show_bug.cgi?id=1429154#c9 we see a developer who forced his header bar to show maximize and minimize buttons always because he didn't realize that the gtk_header_bar_set_show_close_button() functions handles this. This function is totally misnamed as it controls all window decorations, not just the close button. It should be renamed to something better in GTK+ 4, e.g. gtk_header_bar_set_show_window_controls().
Yeah, this always bugged me.
I wonder if it could be made a boolean at the same time, or is it doomed to be a weird int property forever...?
Renaming it to something better seems like a good idea, indeed. But GtkHeaderBar::show-close-button is a plain boolean already, no weird int. You may be thinking of GtkDialog::use-header-bar.
(In reply to Matthias Clasen from comment #3) > You may be thinking of GtkDialog::use-header-bar. Yes. (In reply to Michael Catanzaro from comment #0) > It should be renamed to > something better in GTK+ 4, e.g. gtk_header_bar_set_show_window_controls(). This was a bad suggestion, though. There is already gtk_header_bar_set_decoration_layout(), so the name should parallel that. Probably gtk_header_bar_set_show_decorations() would be good. Or gtk_header_bar_set_show_window_decorations().
That seems problematic. Decorations include the title bar and other borders too. But this setting doesn't turn off those, only the buttons. And it would conflict with GtkWindow.set_decorated(). And so on. :show-window-buttons or :show-title-buttons or etc seem better (the latter because we use this term already for the .titlebutton class)
...which does then indicate that maybe "decoration layout" is not the best name for *that*, either.
i think show-title-buttons is the best suggestion so far