remove gtk_window_disable_client_side_decorations function, add construct-only property

This commit is contained in:
Cody Russell
2009-07-14 18:23:24 -05:00
parent 9ccc8fa2ee
commit ce5a7d4cfb
2 changed files with 32 additions and 26 deletions

View File

@@ -213,8 +213,6 @@ gtk_plug_init (GtkPlug *plug)
window = GTK_WINDOW (plug);
window->type = GTK_WINDOW_TOPLEVEL;
gtk_window_disable_client_side_decorations (window);
}
static void
@@ -557,7 +555,9 @@ gtk_plug_new_for_display (GdkDisplay *display,
{
GtkPlug *plug;
plug = g_object_new (GTK_TYPE_PLUG, NULL);
plug = g_object_new (GTK_TYPE_PLUG,
"disable-client-side-decorations", TRUE,
NULL);
gtk_plug_construct_for_display (plug, display, socket_id);
return GTK_WIDGET (plug);
}

View File

@@ -72,6 +72,7 @@ enum {
/* Construct */
PROP_TYPE,
PROP_DISABLE_CLIENT_SIDE_DECORATIONS,
/* Normal Props */
PROP_TITLE,
@@ -844,7 +845,35 @@ gtk_window_class_init (GtkWindowClass *klass)
1.0,
GTK_PARAM_READWRITE));
/**
* GtkWindow:disable-client-side-decorations:
*
* Disable the use of client-side window decorations for this window.
* This is intended to be used by subclasses of GtkWindow that need to
* always disable client-side window decorations, for example GtkPlug.
* Normally client-side decorations should be controlled through
* GtkWindow's 'client-side-decorated' style property.
*
* Since: 2.18
*/
g_object_class_install_property (gobject_class,
PROP_DISABLE_CLIENT_SIDE_DECORATIONS,
g_param_spec_boolean ("disable-client-side-decorations",
P_("Disable client-side decorations"),
P_("Disable client-side window decorations"),
FALSE,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/* Style properties */
/**
* GtkWindow:client-side-decorated:
*
* Specifies that the window should draw its own decorations ratherthan
* relying upon a window manager to do so.
*
* Since: 2.18
*/
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boolean ("client-side-decorated",
P_("Client-side window decorations"),
@@ -3277,29 +3306,6 @@ gtk_window_get_decorated (GtkWindow *window)
return window->decorated;
}
/**
* gtk_window_disable_client_side_decorations:
* @window: a #GtkWindow
*
* Disables client-side window decorations for the given window.
* This is intended to be used by subclasses of GtkWindow that
* need to always disable client-side decorations, for example
* GtkPlug. Normally client-side decorations should be
* controlled through GtkWindow's client-side-decorated style
* property.
**/
void
gtk_window_disable_client_side_decorations (GtkWindow *window)
{
GtkWindowPrivate *priv;
g_return_if_fail (GTK_IS_WINDOW (window));
priv = GTK_WINDOW_GET_PRIVATE (window);
priv->disable_client_side_decorations = TRUE;
}
void
gtk_window_set_client_side_decorations (GtkWindow *window,
GdkWMDecoration setting)