[gtk+/client-side-decorations: 65/92] remove gtk_window_disable_client_side_decorations function, add construct-only property
- From: Cody Russell <bratsche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/client-side-decorations: 65/92] remove gtk_window_disable_client_side_decorations function, add construct-only property
- Date: Fri, 16 Apr 2010 19:32:34 +0000 (UTC)
commit ce5a7d4cfbd37427e060f475ed90e07f3f4b3b74
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 | 52 +++++++++++++++++++++++++++++-----------------------
2 files changed, 32 insertions(+), 26 deletions(-)
---
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 5522210..8433710 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -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);
}
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 52eb158..034ff80 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]