diff options
author | Elliot Lee <sopwith@cuc.ml.org> | 1998-11-30 19:07:15 +0000 |
---|---|---|
committer | Elliot Lee <sopwith@src.gnome.org> | 1998-11-30 19:07:15 +0000 |
commit | 060978e069b3c1726c7a1fb3916c3e8c8348a813 (patch) | |
tree | b92907dd3d6ca58cb5e5bf7e7481277feada033c /gtk/gtkfontsel.c | |
parent | 58ca2448eb7d0a337fd83bd2951f5d9adde81b7c (diff) | |
download | gtk+-060978e069b3c1726c7a1fb3916c3e8c8348a813.tar.gz |
I submitted this patch twice to gtk-devel-list, and received no comments,
I submitted this patch twice to gtk-devel-list, and received no comments, so
am committing it. Although not exhaustively tested, I have been using this
gtk+ for a week w/o problems, and I did read the code to ensure that nothing
ever writes to these data structures. If by chance people encounter SEGV's in
gtk+ code that is setting values in global data structures, this patch could
be a possible culprit.
1998-11-30 Elliot Lee <sopwith@cuc.ml.org>
* {gdk,gtk}/*.c: Make read-only data structures "static const" to
allow them to be shared, mainly including (but not limited to) the
GtkTypeInfo structures for each class.
* gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
Diffstat (limited to 'gtk/gtkfontsel.c')
-rw-r--r-- | gtk/gtkfontsel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index 7deff31465..7c193d3538 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -93,7 +93,7 @@ /* These are what we use as the standard font sizes, for the size clist. Note that when using points we still show these integer point values but we work internally in decipoints (and decipoint values can be typed in). */ -static guint16 font_sizes[] = { +static const guint16 font_sizes[] = { 8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, 32, 36, 40, 48, 56, 64, 72 }; @@ -198,7 +198,7 @@ typedef enum } FontField; /* These are the names of the fields, used on the info & filter page. */ -static gchar* xlfd_field_names[GTK_XLFD_NUM_FIELDS] = { +static const gchar* xlfd_field_names[GTK_XLFD_NUM_FIELDS] = { "Foundry:", "Family:", "Weight:", @@ -228,7 +228,7 @@ typedef enum /* This is used to look up a field in a fontname given one of the above property indices. */ -static FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = { +static const FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = { XLFD_WEIGHT, XLFD_SLANT, XLFD_SET_WIDTH, @@ -238,10 +238,10 @@ static FontField xlfd_index[GTK_NUM_FONT_PROPERTIES] = { }; /* These are the positions of the properties in the filter table - x, y. */ -static gint filter_positions[GTK_NUM_FONT_PROPERTIES][2] = { +static const gint filter_positions[GTK_NUM_FONT_PROPERTIES][2] = { { 1, 0 }, { 0, 2 }, { 1, 2 }, { 2, 2 }, { 2, 0 }, { 0, 0 } }; -static gint filter_heights[GTK_NUM_FONT_PROPERTIES] = { +static const gint filter_heights[GTK_NUM_FONT_PROPERTIES] = { 100, 70, 70, 40, 100, 100 }; @@ -396,7 +396,7 @@ gtk_font_selection_get_type() if(!font_selection_type) { - GtkTypeInfo fontsel_type_info = + static const GtkTypeInfo fontsel_type_info = { "GtkFontSelection", sizeof (GtkFontSelection), |