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 779862 - Deprecate/rename gtk_header_bar_set_show_close_button() et. al.
Deprecate/rename gtk_header_bar_set_show_close_button() et. al.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.92.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-03-10 14:38 UTC by Michael Catanzaro
Modified: 2017-12-08 03:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Catanzaro 2017-03-10 14:38:46 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().
Comment 1 Daniel Boles 2017-08-04 02:18:15 UTC
Yeah, this always bugged me.
Comment 2 Michael Catanzaro 2017-11-29 04:23:53 UTC
I wonder if it could be made a boolean at the same time, or is it doomed to be a weird int property forever...?
Comment 3 Matthias Clasen 2017-11-29 04:39:28 UTC
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.
Comment 4 Michael Catanzaro 2017-11-29 05:15:43 UTC
(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().
Comment 5 Daniel Boles 2017-11-29 12:50:32 UTC
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)
Comment 6 Daniel Boles 2017-11-29 12:51:12 UTC
...which does then indicate that maybe "decoration layout" is not the best name for *that*, either.
Comment 7 Matthias Clasen 2017-11-29 17:58:43 UTC
i think show-title-buttons is the best suggestion so far