]> Pileus Git - ~andy/gtk/commitdiff
Sanity check default font family name and size.
authorOwen Taylor <otaylor@redhat.com>
Sun, 24 Feb 2002 05:05:15 +0000 (05:05 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sun, 24 Feb 2002 05:05:15 +0000 (05:05 +0000)
Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c (gtk_style_init): Sanity check default
        font family name and size.

        * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
        incorrect comment about the geometry widget.

        * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
        gtk_window_resize)() information once we've set the size
        once, to avoid it coming back next time we queue a resize.
        (#72359)

        * gtk/gtkwindow.c (gtk_window_move_resize): Remove
        setthing of ->need_default_size from here, Havoc
        says that it should correspond more or less exactly
        to GTK_WIDGET_MAPPED (window).

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkstyle.c
gtk/gtkwindow.c

index 4810372fae4d31ae9e4f099a735b84f3b215fc24..e68e2174b4518f347762efe6fa709a72be65a7ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_init): Sanity check default
+       font family name and size.
+
+       * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
+       incorrect comment about the geometry widget.
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
+       gtk_window_resize)() information once we've set the size
+       once, to avoid it coming back next time we queue a resize.
+       (#72359)
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Remove
+       setthing of ->need_default_size from here, Havoc
+       says that it should correspond more or less exactly
+       to GTK_WIDGET_MAPPED (window).
+
 Sat Feb 23 23:00:48 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreemodel.h: add () to function macros as per owen's
index 4810372fae4d31ae9e4f099a735b84f3b215fc24..e68e2174b4518f347762efe6fa709a72be65a7ff 100644 (file)
@@ -1,3 +1,21 @@
+Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_init): Sanity check default
+       font family name and size.
+
+       * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
+       incorrect comment about the geometry widget.
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
+       gtk_window_resize)() information once we've set the size
+       once, to avoid it coming back next time we queue a resize.
+       (#72359)
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Remove
+       setthing of ->need_default_size from here, Havoc
+       says that it should correspond more or less exactly
+       to GTK_WIDGET_MAPPED (window).
+
 Sat Feb 23 23:00:48 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreemodel.h: add () to function macros as per owen's
index 4810372fae4d31ae9e4f099a735b84f3b215fc24..e68e2174b4518f347762efe6fa709a72be65a7ff 100644 (file)
@@ -1,3 +1,21 @@
+Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_init): Sanity check default
+       font family name and size.
+
+       * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
+       incorrect comment about the geometry widget.
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
+       gtk_window_resize)() information once we've set the size
+       once, to avoid it coming back next time we queue a resize.
+       (#72359)
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Remove
+       setthing of ->need_default_size from here, Havoc
+       says that it should correspond more or less exactly
+       to GTK_WIDGET_MAPPED (window).
+
 Sat Feb 23 23:00:48 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreemodel.h: add () to function macros as per owen's
index 4810372fae4d31ae9e4f099a735b84f3b215fc24..e68e2174b4518f347762efe6fa709a72be65a7ff 100644 (file)
@@ -1,3 +1,21 @@
+Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_init): Sanity check default
+       font family name and size.
+
+       * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
+       incorrect comment about the geometry widget.
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
+       gtk_window_resize)() information once we've set the size
+       once, to avoid it coming back next time we queue a resize.
+       (#72359)
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Remove
+       setthing of ->need_default_size from here, Havoc
+       says that it should correspond more or less exactly
+       to GTK_WIDGET_MAPPED (window).
+
 Sat Feb 23 23:00:48 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreemodel.h: add () to function macros as per owen's
index 4810372fae4d31ae9e4f099a735b84f3b215fc24..e68e2174b4518f347762efe6fa709a72be65a7ff 100644 (file)
@@ -1,3 +1,21 @@
+Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_init): Sanity check default
+       font family name and size.
+
+       * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
+       incorrect comment about the geometry widget.
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
+       gtk_window_resize)() information once we've set the size
+       once, to avoid it coming back next time we queue a resize.
+       (#72359)
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Remove
+       setthing of ->need_default_size from here, Havoc
+       says that it should correspond more or less exactly
+       to GTK_WIDGET_MAPPED (window).
+
 Sat Feb 23 23:00:48 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreemodel.h: add () to function macros as per owen's
index 4810372fae4d31ae9e4f099a735b84f3b215fc24..e68e2174b4518f347762efe6fa709a72be65a7ff 100644 (file)
@@ -1,3 +1,21 @@
+Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_init): Sanity check default
+       font family name and size.
+
+       * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
+       incorrect comment about the geometry widget.
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
+       gtk_window_resize)() information once we've set the size
+       once, to avoid it coming back next time we queue a resize.
+       (#72359)
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Remove
+       setthing of ->need_default_size from here, Havoc
+       says that it should correspond more or less exactly
+       to GTK_WIDGET_MAPPED (window).
+
 Sat Feb 23 23:00:48 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreemodel.h: add () to function macros as per owen's
index 4810372fae4d31ae9e4f099a735b84f3b215fc24..e68e2174b4518f347762efe6fa709a72be65a7ff 100644 (file)
@@ -1,3 +1,21 @@
+Sat Feb 23 22:37:23 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkstyle.c (gtk_style_init): Sanity check default
+       font family name and size.
+
+       * gtk/gtkwindow.c (gtk_window_set_default_size): Remove
+       incorrect comment about the geometry widget.
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Unset the
+       gtk_window_resize)() information once we've set the size
+       once, to avoid it coming back next time we queue a resize.
+       (#72359)
+
+       * gtk/gtkwindow.c (gtk_window_move_resize): Remove
+       setthing of ->need_default_size from here, Havoc
+       says that it should correspond more or less exactly
+       to GTK_WIDGET_MAPPED (window).
+
 Sat Feb 23 23:00:48 2002  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreemodel.h: add () to function macros as per owen's
index 608f5aed6a3a1fe34f61cb739fe3b675c73bd02b..eca446b3d038e7b15ad094d2a414bc8a61ebd8ad 100644 (file)
@@ -486,9 +486,20 @@ gtk_style_init (GtkStyle *style)
 {
   gint i;
   const gchar *font_name = _gtk_rc_context_get_default_font_name (gtk_settings_get_default ());
-  
+
   style->font_desc = pango_font_description_from_string (font_name);
 
+  if (!pango_font_description_get_family (style->font_desc))
+    {
+      g_warning ("Default font does not have a family set");
+      pango_font_description_set_family (style->font_desc, "Sans");
+    }
+  if (pango_font_description_get_size (style->font_desc) <= 0)
+    {
+      g_warning ("Default font does not have a positive size");
+      pango_font_description_set_size (style->font_desc, 10 * PANGO_SCALE);
+    }
+  
   style->attach_count = 0;
   style->colormap = NULL;
   style->depth = -1;
index 7f860fc5875463cb56c93344131105e3629554a1..dbfd9c69f74538b69cd8025f06417c6819f0f4d8 100644 (file)
@@ -2405,11 +2405,6 @@ gtk_window_set_default_size_internal (GtkWindow    *window,
  * For more control over a window's initial size and how resizing works,
  * investigate gtk_window_set_geometry_hints().
  *
- * A useful feature: if you set the "geometry widget" via
- * gtk_window_set_geometry_hints(), the default size specified by
- * gtk_window_set_default_size() will be the default size of that
- * widget, not of the entire window.
- *
  * For some uses, gtk_window_resize() is a more appropriate function.
  * gtk_window_resize() changes the current size of the window, rather
  * than the size to be used on initial display. gtk_window_resize() always
@@ -2467,8 +2462,8 @@ gtk_window_get_default_size (GtkWindow *window,
 /**
  * gtk_window_resize:
  * @window: a #GtkWindow
- * @width: width to resize the window to
- * @height: height to resize the window to
+ * @width: width in pixels to resize the window to
+ * @height: height in pixels to resize the window to
  *
  * Resizes the window as if the user had done so, obeying geometry
  * constraints. The default geometry constraint is that windows may
@@ -4384,8 +4379,9 @@ gtk_window_move_resize (GtkWindow *window)
        * GTK_RESIZE_IMMEDIATE containers)
        */
       info->position_constraints_changed = FALSE;
-      window->need_default_position = FALSE;
       info->initial_pos_set = FALSE;
+      info->resize_width = -1;
+      info->resize_height = -1;
 
       /* for GTK_RESIZE_QUEUE toplevels, we are now awaiting a new
        * configure event in response to our resizing request.