[gtk+] Expand the docs for gtk_window_set_default_size()
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Expand the docs for gtk_window_set_default_size()
- Date: Mon, 15 Feb 2016 13:24:09 +0000 (UTC)
commit 4e2674edbb155163d0d50c8ccc19e88428cd8cd4
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 15 08:23:12 2016 -0500
Expand the docs for gtk_window_set_default_size()
Mention that this function should be used together with
gtk_window_get_size() when saving and restoring window sizes.
gtk/gtkwindow.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index c2a83e0..4b686a1 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5184,7 +5184,7 @@ gtk_window_set_default_size_internal (GtkWindow *window,
* geometry hints for the window (gtk_window_set_geometry_hints() can
* be used to set these explicitly), the default size will be clamped
* to the nearest permitted size.
- *
+ *
* Unlike gtk_widget_set_size_request(), which sets a size request for
* a widget and thus would keep users from shrinking the window, this
* function only sets the initial size, just as if the user had
@@ -5206,7 +5206,12 @@ gtk_window_set_default_size_internal (GtkWindow *window,
*
* Windows can’t actually be 0x0 in size, they must be at least 1x1, but
* passing 0 for @width and @height is OK, resulting in a 1x1 default size.
- **/
+ *
+ * If you use this function to reestablish a previously saved window size,
+ * note that the appropriate size to save is the one returned by
+ * gtk_window_get_size(). Using the window allocation directly will not
+ * work in all circumstances and can lead to growing or shrinking windows.
+ */
void
gtk_window_set_default_size (GtkWindow *window,
gint width,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]