forked from AuroraMiddleware/gtk
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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* gtk/gtkwidget.h gtk/gtkclist.c: Make prototypes
|
||||
|
@ -1391,10 +1391,11 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
|
||||
FontInfo *font;
|
||||
FontStyle *styles, *style;
|
||||
const guint16 *standard_sizes;
|
||||
guint16 *bitmapped_sizes, bitmap_size;
|
||||
guint16 *bitmapped_sizes;
|
||||
gint nstandard_sizes, nbitmapped_sizes;
|
||||
gchar buffer[16], *size;
|
||||
gfloat bitmap_size_float;
|
||||
gfloat bitmap_size_float = 0.;
|
||||
guint16 bitmap_size = 0;
|
||||
gboolean can_match;
|
||||
gint type_filter;
|
||||
|
||||
@ -1437,18 +1438,20 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
|
||||
while (nstandard_sizes || nbitmapped_sizes)
|
||||
{
|
||||
can_match = TRUE;
|
||||
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
|
||||
{
|
||||
if (*bitmapped_sizes % 10 != 0)
|
||||
can_match = FALSE;
|
||||
bitmap_size = *bitmapped_sizes / 10;
|
||||
bitmap_size_float = *bitmapped_sizes / 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap_size = *bitmapped_sizes;
|
||||
bitmap_size_float = *bitmapped_sizes;
|
||||
}
|
||||
|
||||
if (nbitmapped_sizes)
|
||||
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
|
||||
{
|
||||
if (*bitmapped_sizes % 10 != 0)
|
||||
can_match = FALSE;
|
||||
bitmap_size = *bitmapped_sizes / 10;
|
||||
bitmap_size_float = *bitmapped_sizes / 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
bitmap_size = *bitmapped_sizes;
|
||||
bitmap_size_float = *bitmapped_sizes;
|
||||
}
|
||||
|
||||
if (can_match && nstandard_sizes && nbitmapped_sizes
|
||||
&& *standard_sizes == bitmap_size)
|
||||
|
Loading…
Reference in New Issue
Block a user