On Fri, 2014-02-21 at 09:18 +0100, David Nečas wrote: > On Fri, Feb 21, 2014 at 03:29:07PM +0800, Wiky wrote: > > The default GtkWindow has a minimize , a maximize and a close button in > > the right or left top coner. > > But I want a window which only has a close button. How can I remove the > > minimize and maximize button? > > You can't. In my window manager the windows may have a completely > different set of buttons. Or no title bar at all. Or whatever. And > the window manager has the last word. > > You can override the "decoration-button-layout" style property, but you > need 3.10+ and it will only work in something like GNOME 3 anyway. > > The meaningful thing you can do is setting the window type hint with > gdk_window_get_type_hint() (and possibly other hints) to specify what > the window *is* instead, and let the window manager treat it > appropriately and consistently with other widows with the same role. > > Yeti >
Alternatively, you could create a GtkBox that contains a close GtkButton and a centred GtkLabel as the title, set it as the titlebar with gtk_window_set_titlebar(), then connect "clicked" to gtk_main_quit() or something, though its a very hacky solution, and IDK if it will handle dragging the window with the mouse. -- Marco Scannadinari <m...@scannadinari.co.uk> _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list