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
This commit is contained in:
Michael Natterer 2008-08-04 13:52:56 +00:00 committed by Michael Natterer
parent 888c3a72b5
commit d132b616e2
2 changed files with 28 additions and 9 deletions

View File

@ -1,3 +1,13 @@
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> 2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkbindings.c: move the code of the deprecated * gtk/gtkbindings.c: move the code of the deprecated

View File

@ -1532,14 +1532,12 @@ gtk_window_get_default_widget (GtkWindow *window)
return window->default_widget; return window->default_widget;
} }
void static void
gtk_window_set_policy (GtkWindow *window, gtk_window_set_policy_internal (GtkWindow *window,
gboolean allow_shrink, gboolean allow_shrink,
gboolean allow_grow, gboolean allow_grow,
gboolean auto_shrink) gboolean auto_shrink)
{ {
g_return_if_fail (GTK_IS_WINDOW (window));
window->allow_shrink = (allow_shrink != FALSE); window->allow_shrink = (allow_shrink != FALSE);
window->allow_grow = (allow_grow != 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), "allow-grow");
g_object_notify (G_OBJECT (window), "resizable"); g_object_notify (G_OBJECT (window), "resizable");
g_object_thaw_notify (G_OBJECT (window)); g_object_thaw_notify (G_OBJECT (window));
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (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 static gboolean
handle_keys_changed (gpointer data) handle_keys_changed (gpointer data)
{ {
@ -7003,7 +7012,7 @@ gtk_window_set_resizable (GtkWindow *window,
{ {
g_return_if_fail (GTK_IS_WINDOW (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);
} }
/** /**