Commit d132b616 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer
Browse files

move the code of the deprecated gtk_window_set_policy() to a new private

2008-08-04  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwindow.c: move the code of the deprecated
	gtk_window_set_policy() to a new private function
	gtk_window_set_policy_internal() and call it from
	gtk_window_set_policy().

	(gtk_window_set_resizable): use the new internal function in order
	to avoid our own deprecated public API.


svn path=/trunk/; revision=20965
parent 888c3a72
2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkwindow.c: move the code of the deprecated
gtk_window_set_policy() to a new private function
gtk_window_set_policy_internal() and call it from
gtk_window_set_policy().
(gtk_window_set_resizable): use the new internal function in order
to avoid our own deprecated public API.
2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkbindings.c: move the code of the deprecated
......
......@@ -1532,14 +1532,12 @@ gtk_window_get_default_widget (GtkWindow *window)
return window->default_widget;
}
void
gtk_window_set_policy (GtkWindow *window,
gboolean allow_shrink,
gboolean allow_grow,
gboolean auto_shrink)
static void
gtk_window_set_policy_internal (GtkWindow *window,
gboolean allow_shrink,
gboolean allow_grow,
gboolean auto_shrink)
{
g_return_if_fail (GTK_IS_WINDOW (window));
window->allow_shrink = (allow_shrink != FALSE);
window->allow_grow = (allow_grow != FALSE);
......@@ -1548,10 +1546,21 @@ gtk_window_set_policy (GtkWindow *window,
g_object_notify (G_OBJECT (window), "allow-grow");
g_object_notify (G_OBJECT (window), "resizable");
g_object_thaw_notify (G_OBJECT (window));
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
}
void
gtk_window_set_policy (GtkWindow *window,
gboolean allow_shrink,
gboolean allow_grow,
gboolean auto_shrink)
{
g_return_if_fail (GTK_IS_WINDOW (window));
gtk_window_set_policy_internal (window, allow_shrink, allow_grow, auto_shrink);
}
static gboolean
handle_keys_changed (gpointer data)
{
......@@ -7003,7 +7012,7 @@ gtk_window_set_resizable (GtkWindow *window,
{
g_return_if_fail (GTK_IS_WINDOW (window));
gtk_window_set_policy (window, FALSE, resizable, FALSE);
gtk_window_set_policy_internal (window, FALSE, resizable, FALSE);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment