mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 04:31:09 +00:00
Don't access *bitmapped_sizes if nbitmapped_sizes == 0. (Pointed out by
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkfontsel.c: Don't access *bitmapped_sizes if nbitmapped_sizes == 0. (Pointed out by zucchi@zedzone.fsi.com.au (Michael Zucchi))
This commit is contained in:
parent
b1135416f2
commit
b515672a1e
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
|
||||||
|
if nbitmapped_sizes == 0. (Pointed out by
|
||||||
|
zucchi@zedzone.fsi.com.au (Michael Zucchi))
|
||||||
|
|
||||||
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
|
||||||
|
if nbitmapped_sizes == 0. (Pointed out by
|
||||||
|
zucchi@zedzone.fsi.com.au (Michael Zucchi))
|
||||||
|
|
||||||
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
|
||||||
|
if nbitmapped_sizes == 0. (Pointed out by
|
||||||
|
zucchi@zedzone.fsi.com.au (Michael Zucchi))
|
||||||
|
|
||||||
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
|
||||||
|
if nbitmapped_sizes == 0. (Pointed out by
|
||||||
|
zucchi@zedzone.fsi.com.au (Michael Zucchi))
|
||||||
|
|
||||||
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
|
||||||
|
if nbitmapped_sizes == 0. (Pointed out by
|
||||||
|
zucchi@zedzone.fsi.com.au (Michael Zucchi))
|
||||||
|
|
||||||
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
|
||||||
|
if nbitmapped_sizes == 0. (Pointed out by
|
||||||
|
zucchi@zedzone.fsi.com.au (Michael Zucchi))
|
||||||
|
|
||||||
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Thu Feb 25 00:48:51 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkfontsel.c: Don't access *bitmapped_sizes
|
||||||
|
if nbitmapped_sizes == 0. (Pointed out by
|
||||||
|
zucchi@zedzone.fsi.com.au (Michael Zucchi))
|
||||||
|
|
||||||
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
Wed Feb 24 23:12:09 1999 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||||
|
@ -1391,10 +1391,11 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
|
|||||||
FontInfo *font;
|
FontInfo *font;
|
||||||
FontStyle *styles, *style;
|
FontStyle *styles, *style;
|
||||||
const guint16 *standard_sizes;
|
const guint16 *standard_sizes;
|
||||||
guint16 *bitmapped_sizes, bitmap_size;
|
guint16 *bitmapped_sizes;
|
||||||
gint nstandard_sizes, nbitmapped_sizes;
|
gint nstandard_sizes, nbitmapped_sizes;
|
||||||
gchar buffer[16], *size;
|
gchar buffer[16], *size;
|
||||||
gfloat bitmap_size_float;
|
gfloat bitmap_size_float = 0.;
|
||||||
|
guint16 bitmap_size = 0;
|
||||||
gboolean can_match;
|
gboolean can_match;
|
||||||
gint type_filter;
|
gint type_filter;
|
||||||
|
|
||||||
@ -1437,18 +1438,20 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
|
|||||||
while (nstandard_sizes || nbitmapped_sizes)
|
while (nstandard_sizes || nbitmapped_sizes)
|
||||||
{
|
{
|
||||||
can_match = TRUE;
|
can_match = TRUE;
|
||||||
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
|
|
||||||
{
|
if (nbitmapped_sizes)
|
||||||
if (*bitmapped_sizes % 10 != 0)
|
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
|
||||||
can_match = FALSE;
|
{
|
||||||
bitmap_size = *bitmapped_sizes / 10;
|
if (*bitmapped_sizes % 10 != 0)
|
||||||
bitmap_size_float = *bitmapped_sizes / 10;
|
can_match = FALSE;
|
||||||
}
|
bitmap_size = *bitmapped_sizes / 10;
|
||||||
else
|
bitmap_size_float = *bitmapped_sizes / 10;
|
||||||
{
|
}
|
||||||
bitmap_size = *bitmapped_sizes;
|
else
|
||||||
bitmap_size_float = *bitmapped_sizes;
|
{
|
||||||
}
|
bitmap_size = *bitmapped_sizes;
|
||||||
|
bitmap_size_float = *bitmapped_sizes;
|
||||||
|
}
|
||||||
|
|
||||||
if (can_match && nstandard_sizes && nbitmapped_sizes
|
if (can_match && nstandard_sizes && nbitmapped_sizes
|
||||||
&& *standard_sizes == bitmap_size)
|
&& *standard_sizes == bitmap_size)
|
||||||
|
Loading…
Reference in New Issue
Block a user