Removing minimize control for a GTK4 dialog box

I have an application that makes visible a modal dialog box (for settings) when a button is pressed on the application dialog.
Screenshot from 2024-03-13 17-21-29

If the user minimizes the this dialog it potentially gets lost to him. Pressing the settings button on the main dialog again does nothing (because it is already visible … but hidden).
I thought I’d un-minimize the window first but gtk_window_unminimize() does not work (the documentation says it functionality dependent upon the environment).
Is it possible to remove the minimize button from the title bar (without removing the title bar (decoration))?

A window (such as a dialog) that transient-for another window should not have a minimize button. And from what I can tell, a modal window can’t be minimized at all.

For a window that can be minimized, gtk_window_present() should be able to unminimize it.

P.S. GtkDialog is deprecated as of GTK 4.10, but there’s no immediate need to stop using it.

1 Like

Ahh… perfect! I just needed to know the right term…
I created the GUI in Cambalache but had not set the ‘transient for’ property. Once set for the dialog box, you are correct … no minimize button!
thanks

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.