mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
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:
parent
888c3a72b5
commit
d132b616e2
10
ChangeLog
10
ChangeLog
@ -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>
|
||||
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user