Re: GTK remove minimize & maximize buttons



On Tue, 2004-12-28 at 01:34 +0100, Gian Mario Tagliaretti wrote:
On Tuesday 28 December 2004 00:56, Fleck wrote:
 Hi, i wonder, how to remove minimize & maximize/un-maximize buttons?
I'm using Glade and can't figure it out, i tried gtk_window_set_decorations
with no luck :(
I'm also looking for way to disable resizeable borders
(gtk_window_set_resizeable() ? ) and ... with no luck :((

To disable minimize/maximize you can use the method
gtk_window_set_type_hint, have a look at the API here:
http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-type-hint

you can set the value of GdkWindowTypeHint to one of these:
  
  GDK_WINDOW_TYPE_HINT_NORMAL,
  GDK_WINDOW_TYPE_HINT_DIALOG,
  GDK_WINDOW_TYPE_HINT_MENU,
  GDK_WINDOW_TYPE_HINT_TOOLBAR,
  GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
  GDK_WINDOW_TYPE_HINT_UTILITY,
  GDK_WINDOW_TYPE_HINT_DOCK,
  GDK_WINDOW_TYPE_HINT_DESKTOP

The one that disable the two buttons on the decoration is 
GDK_WINDOW_TYPE_HINT_MENU.


If you don't agree with the decorations which your window manager uses
for windows of a certain type, you should use a different window manager
or configure the one you use, rather than lie to it about the window
type.

The method gtk_window_set_decorations completely remove all the decoration of 
the window if set to False, better don't use it.

gtk_window_set_resizeable il set to False will keep the dimension of the 
window immutable, the user cannot change it.

http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-
set-resizable

should be used to mark a window as not user-resizable. Decent window
managers will use that information as a hint to suppress the minimize
and maximize buttons.

Regards,

Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]