gtk+ r20965 - in trunk: . gtk



Author: mitch
Date: Mon Aug  4 13:52:56 2008
New Revision: 20965
URL: http://svn.gnome.org/viewvc/gtk+?rev=20965&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/gtk/gtkwindow.c

Modified: trunk/gtk/gtkwindow.c
==============================================================================
--- trunk/gtk/gtkwindow.c	(original)
+++ trunk/gtk/gtkwindow.c	Mon Aug  4 13:52:56 2008
@@ -1532,14 +1532,12 @@
   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 @@
   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 @@
 {
   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);
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]