gtk_window_set_user_resizable()



Hey everyone. Havoc and I talked briefly a few weeks ago about replacing
gtk_window_set_policy () with gtk_window_set_user_resizable(). I finally
remembered that and go around to doing it. Attached is a patch for a first
try at this function. Havoc said to make it call gtk_window_set_policy(). 

What're the thoughts on this? 
  - David :) 

Index: gtkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwindow.c,v
retrieving revision 1.79
diff -u -r1.79 gtkwindow.c
--- gtkwindow.c	1999/12/11 23:04:55	1.79
+++ gtkwindow.c	2000/04/26 05:37:20
@@ -492,6 +492,16 @@
 }
 
 void
+gtk_window_set_user_resizable (GtkWindow     *window,
+			       gboolean       setting)
+{
+  if (setting) 
+    gtk_window_set_policy (window, FALSE, TRUE, FALSE);
+  else 
+    gtk_window_set_policy (window, FALSE, FALSE, TRUE); 
+}
+
+void
 gtk_window_add_accel_group (GtkWindow        *window,
 			    GtkAccelGroup    *accel_group)
 {
Index: gtkwindow.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwindow.h,v
retrieving revision 1.20
diff -u -r1.20 gtkwindow.h
--- gtkwindow.h	2000/02/13 08:16:48	1.20
+++ gtkwindow.h	2000/04/26 05:37:20
@@ -100,6 +100,8 @@
 						gint                 allow_shrink,
 						gint                 allow_grow,
 						gint                 auto_shrink);
+void       gtk_window_set_user_resizable       (GtkWindow           *window,
+						gboolean             setting); 
 void       gtk_window_add_accel_group          (GtkWindow           *window,
 						GtkAccelGroup	    *accel_group);
 void       gtk_window_remove_accel_group       (GtkWindow           *window,


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