[gtk+/client-side-decorations] remove gtk_window_disable_client_side_decorations function, add construct-only property
- From: Cody Russell <bratsche src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-decorations] remove gtk_window_disable_client_side_decorations function, add construct-only property
- Date: Tue, 14 Jul 2009 23:23:40 +0000 (UTC)
commit 0d2006306edf785778c9fc60ac3ffd2a856f2fc7
Author: Cody Russell <bratsche gnome org>
Date: Tue Jul 14 18:23:24 2009 -0500
remove gtk_window_disable_client_side_decorations function, add construct-only property
gtk/gtkplug.c | 6 +++---
gtk/gtkwindow.c | 54 ++++++++++++++++++++++++++++++------------------------
2 files changed, 33 insertions(+), 27 deletions(-)
---
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index bfa9c73..d499515 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -193,8 +193,6 @@ gtk_plug_init (GtkPlug *plug)
window = GTK_WINDOW (plug);
window->type = GTK_WINDOW_TOPLEVEL;
-
- gtk_window_disable_client_side_decorations (window);
}
static void
@@ -528,7 +526,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);
}
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index a2ff9f7..9307e6a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -71,6 +71,7 @@ enum {
/* Construct */
PROP_TYPE,
+ PROP_DISABLE_CLIENT_SIDE_DECORATIONS,
/* Normal Props */
PROP_TITLE,
@@ -104,7 +105,7 @@ enum {
/* Writeonly properties */
PROP_STARTUP_ID,
-
+
LAST_ARG
};
@@ -831,7 +832,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"),
@@ -3246,29 +3275,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]