Commit 5411a3a1 authored by Dom Lachowicz's avatar Dom Lachowicz Committed by Dom Lachowicz
Browse files

Bug #313627. Make win32 theme's handling of toolbars, handleboxes, and

2005-11-12  Dom Lachowicz <cinamod@hotmail.com>

	* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
	theme's handling of toolbars, handleboxes, and menubars more in-line
	with Microsoft's IE style.
	* modules/engines/ms-windows/*.c: Indentation cleanups
parent 82f12b61
2005-11-12 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
theme's handling of toolbars, handleboxes, and menubars more in-line
with Microsoft's IE style.
* modules/engines/ms-windows/*.c: Indentation cleanups
2005-11-12 Matthias Clasen <mclasen@redhat.com>
Make builtin icons work in gtk_window_set_icon_name()
......
2005-11-12 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
theme's handling of toolbars, handleboxes, and menubars more in-line
with Microsoft's IE style.
* modules/engines/ms-windows/*.c: Indentation cleanups
2005-11-12 Matthias Clasen <mclasen@redhat.com>
Make builtin icons work in gtk_window_set_icon_name()
......
/* MS-Windows Engine (aka GTK-Wimp)
*
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
* Includes code adapted from redmond95 by Owen Taylor, and
* gtk-nativewin by Evan Martin
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "msw_style.h"
#include "msw_rc_style.h"
static void msw_rc_style_init (MswRcStyle *style);
static void msw_rc_style_class_init (MswRcStyleClass *klass);
static GtkStyle *msw_rc_style_create_style (GtkRcStyle *rc_style);
static GtkRcStyleClass *parent_class;
GType msw_type_rc_style = 0;
void
msw_rc_style_register_type (GTypeModule *module)
{
static const GTypeInfo object_info =
{
sizeof (MswRcStyleClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) msw_rc_style_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (MswRcStyle),
0, /* n_preallocs */
(GInstanceInitFunc) msw_rc_style_init,
};
msw_type_rc_style = g_type_module_register_type (module,
GTK_TYPE_RC_STYLE,
"MswRcStyle",
&object_info, 0);
}
static void
msw_rc_style_init (MswRcStyle *style)
{
}
static void
msw_rc_style_class_init (MswRcStyleClass *klass)
{
GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
rc_style_class->create_style = msw_rc_style_create_style;
}
/* Create an empty style suitable to this RC style
*/
static GtkStyle *
msw_rc_style_create_style (GtkRcStyle *rc_style)
{
return g_object_new (MSW_TYPE_STYLE, NULL);
}
/* MS-Windows Engine (aka GTK-Wimp)
*
* Copyright (C) 2003, 2004 Raymond Penners <raymond@dotsphinx.com>
* Includes code adapted from redmond95 by Owen Taylor, and
* gtk-nativewin by Evan Martin
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "msw_style.h"
#include "msw_rc_style.h"
static void msw_rc_style_init (MswRcStyle * style);
static void msw_rc_style_class_init (MswRcStyleClass * klass);
static GtkStyle *msw_rc_style_create_style (GtkRcStyle * rc_style);
static GtkRcStyleClass *parent_class;
GType msw_type_rc_style = 0;
void
msw_rc_style_register_type (GTypeModule * module)
{
static const GTypeInfo object_info = {
sizeof (MswRcStyleClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) msw_rc_style_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (MswRcStyle),
0, /* n_preallocs */
(GInstanceInitFunc) msw_rc_style_init,
};
msw_type_rc_style = g_type_module_register_type (module,
GTK_TYPE_RC_STYLE,
"MswRcStyle",
&object_info, 0);
}
static void
msw_rc_style_init (MswRcStyle * style)
{
}
static void
msw_rc_style_class_init (MswRcStyleClass * klass)
{
GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
rc_style_class->create_style = msw_rc_style_create_style;
}
/* Create an empty style suitable to this RC style
*/
static GtkStyle *
msw_rc_style_create_style (GtkRcStyle * rc_style)
{
return g_object_new (MSW_TYPE_STYLE, NULL);
}
......@@ -39,6 +39,7 @@
#include "gtk/gtk.h"
#include "gtk/gtk.h"
/* #include <gdk/gdkwin32.h> */
#include "gdk/win32/gdkwin32.h"
......@@ -49,112 +50,143 @@ static const GtkBorder default_option_indicator_spacing = { 7, 5, 2, 2 };
static GtkStyleClass *parent_class;
typedef enum {
CHECK_AA,
CHECK_BASE,
CHECK_BLACK,
CHECK_DARK,
CHECK_LIGHT,
CHECK_MID,
CHECK_TEXT,
RADIO_BASE,
RADIO_BLACK,
RADIO_DARK,
RADIO_LIGHT,
RADIO_MID,
RADIO_TEXT
typedef enum
{
CHECK_AA,
CHECK_BASE,
CHECK_BLACK,
CHECK_DARK,
CHECK_LIGHT,
CHECK_MID,
CHECK_TEXT,
RADIO_BASE,
RADIO_BLACK,
RADIO_DARK,
RADIO_LIGHT,
RADIO_MID,
RADIO_TEXT
} Part;
#define PART_SIZE 13
static const guint8 check_aa_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static const guint8 check_base_bits[] = {
0x00,0x00,0x00,0x00,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,
0x07,0xfc,0x07,0xfc,0x07,0xfc,0x07,0x00,0x00,0x00,0x00};
0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x07, 0xfc, 0x07, 0xfc, 0x07,
0xfc, 0x07, 0xfc,
0x07, 0xfc, 0x07, 0xfc, 0x07, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00
};
static const guint8 check_black_bits[] = {
0x00,0x00,0xfe,0x0f,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,
0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00};
0x00, 0x00, 0xfe, 0x0f, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00,
0x02, 0x00, 0x02,
0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00
};
static const guint8 check_dark_bits[] = {
0xff,0x1f,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
0xff, 0x1f, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00
};
static const guint8 check_light_bits[] = {
0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,
0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0xfe,0x1f};
0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10,
0x00, 0x10, 0x00,
0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0xfe, 0x1f
};
static const guint8 check_mid_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x08,0x00,
0x08,0x00,0x08,0x00,0x08,0x00,0x08,0xfc,0x0f,0x00,0x00};
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08,
0x00, 0x08, 0x00,
0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x08, 0xfc, 0x0f, 0x00, 0x00
};
static const guint8 check_text_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x03,0x88,0x03,0xd8,0x01,0xf8,
0x00,0x70,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x88, 0x03,
0xd8, 0x01, 0xf8,
0x00, 0x70, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static const guint8 radio_base_bits[] = {
0x00,0x00,0x00,0x00,0xf0,0x01,0xf8,0x03,0xfc,0x07,0xfc,0x07,0xfc,0x07,0xfc,
0x07,0xfc,0x07,0xf8,0x03,0xf0,0x01,0x00,0x00,0x00,0x00};
0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0xf8, 0x03, 0xfc, 0x07, 0xfc, 0x07,
0xfc, 0x07, 0xfc,
0x07, 0xfc, 0x07, 0xf8, 0x03, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00
};
static const guint8 radio_black_bits[] = {
0x00,0x00,0xf0,0x01,0x0c,0x02,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,
0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
0x00, 0x00, 0xf0, 0x01, 0x0c, 0x02, 0x04, 0x00, 0x02, 0x00, 0x02, 0x00,
0x02, 0x00, 0x02,
0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static const guint8 radio_dark_bits[] = {
0xf0,0x01,0x0c,0x06,0x02,0x00,0x02,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00};
0xf0, 0x01, 0x0c, 0x06, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00,
0x01, 0x00, 0x01,
0x00, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00
};
static const guint8 radio_light_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x10,0x00,0x10,0x00,0x10,0x00,
0x10,0x00,0x10,0x00,0x08,0x00,0x08,0x0c,0x06,0xf0,0x01};
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x10, 0x00, 0x10,
0x00, 0x10, 0x00,
0x10, 0x00, 0x10, 0x00, 0x08, 0x00, 0x08, 0x0c, 0x06, 0xf0, 0x01
};
static const guint8 radio_mid_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x08,0x00,0x08,0x00,0x08,0x00,
0x08,0x00,0x08,0x00,0x04,0x0c,0x06,0xf0,0x01,0x00,0x00};
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08,
0x00, 0x08, 0x00,
0x08, 0x00, 0x08, 0x00, 0x04, 0x0c, 0x06, 0xf0, 0x01, 0x00, 0x00
};
static const guint8 radio_text_bits[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0xf0,0x01,0xf0,0x01,0xf0,
0x01,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
static struct {
const guint8 *bits;
GdkBitmap *bmap;
} parts[] = {
{ check_aa_bits, NULL },
{ check_base_bits, NULL },
{ check_black_bits, NULL },
{ check_dark_bits, NULL },
{ check_light_bits, NULL },
{ check_mid_bits, NULL },
{ check_text_bits, NULL },
{ radio_base_bits, NULL },
{ radio_black_bits, NULL },
{ radio_dark_bits, NULL },
{ radio_light_bits, NULL },
{ radio_mid_bits, NULL },
{ radio_text_bits, NULL }
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xf0, 0x01,
0xf0, 0x01, 0xf0,
0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static struct
{
const guint8 *bits;
GdkBitmap *bmap;
} parts[] =
{
{check_aa_bits, NULL},
{check_base_bits, NULL},
{check_black_bits, NULL},
{check_dark_bits, NULL},
{check_light_bits, NULL},
{check_mid_bits, NULL},
{check_text_bits, NULL},
{radio_base_bits, NULL},
{radio_black_bits, NULL},
{radio_dark_bits, NULL},
{radio_light_bits, NULL},
{radio_mid_bits, NULL},
{radio_text_bits, NULL}
};
static gboolean
get_system_font(XpThemeClass klazz, XpThemeFont type, LOGFONT *out_lf)
get_system_font (XpThemeClass klazz, XpThemeFont type, LOGFONT * out_lf)
{
#if 0
/* TODO: this causes crashes later because the font name is in UCS2, and the pango fns don't deal with that gracefully */
if (xp_theme_get_system_font(klazz, type, out_lf))
return TRUE;
else
/* TODO: this causes crashes later because the font name is in UCS2, and
the pango fns don't deal with that gracefully */
if (xp_theme_get_system_font (klazz, type, out_lf))
return TRUE;
else
#endif
{
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof(NONCLIENTMETRICS);
if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS,
sizeof(NONCLIENTMETRICS), &ncm, 0))
{
if (type == XP_THEME_FONT_CAPTION)
*out_lf = ncm.lfCaptionFont;
else if (type == XP_THEME_FONT_MENU)
*out_lf = ncm.lfMenuFont;
else if (type == XP_THEME_FONT_STATUS)
*out_lf = ncm.lfStatusFont;
else
*out_lf = ncm.lfMessageFont;
return TRUE;
}
}
return FALSE;
{
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof (NONCLIENTMETRICS);
if (SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
sizeof (NONCLIENTMETRICS), &ncm, 0))
{
if (type == XP_THEME_FONT_CAPTION)
*out_lf = ncm.lfCaptionFont;
else if (type == XP_THEME_FONT_MENU)
*out_lf = ncm.lfMenuFont;
else if (type == XP_THEME_FONT_STATUS)
*out_lf = ncm.lfStatusFont;
else
*out_lf = ncm.lfMessageFont;
return TRUE;
}
}
return FALSE;
}
/***************************** BEGIN STOLEN FROM PANGO *****************************/
......@@ -194,244 +226,251 @@ get_system_font(XpThemeClass klazz, XpThemeFont type, LOGFONT *out_lf)
struct name_header
{
guint16 format_selector;
guint16 num_records;
guint16 string_storage_offset;
guint16 format_selector;
guint16 num_records;
guint16 string_storage_offset;
};
struct name_record
{
guint16 platform_id;
guint16 encoding_id;
guint16 language_id;
guint16 name_id;
guint16 string_length;
guint16 string_offset;
guint16 platform_id;
guint16 encoding_id;
guint16 language_id;
guint16 name_id;
guint16 string_length;
guint16 string_offset;
};
static gboolean
pango_win32_get_name_header (HDC hdc,
struct name_header *header)
pango_win32_get_name_header (HDC hdc, struct name_header *header)
{
if (GetFontData (hdc, NAME, 0, header, sizeof (*header)) != sizeof (*header))
return FALSE;
if (GetFontData (hdc, NAME, 0, header, sizeof (*header)) !=
sizeof (*header))
return FALSE;
header->num_records = GUINT16_FROM_BE (header->num_records);
header->string_storage_offset = GUINT16_FROM_BE (header->string_storage_offset);
header->num_records = GUINT16_FROM_BE (header->num_records);
header->string_storage_offset =
GUINT16_FROM_BE (header->string_storage_offset);
return TRUE;
return TRUE;
}
static gboolean
pango_win32_get_name_record (HDC hdc,
gint i,
struct name_record *record)
pango_win32_get_name_record (HDC hdc, gint i, struct name_record *record)
{
if (GetFontData (hdc, NAME, 6 + i * sizeof (*record),
record, sizeof (*record)) != sizeof (*record))
return FALSE;
if (GetFontData (hdc, NAME, 6 + i * sizeof (*record),
record, sizeof (*record)) != sizeof (*record))
return FALSE;
record->platform_id = GUINT16_FROM_BE (record->platform_id);
record->encoding_id = GUINT16_FROM_BE (record->encoding_id);
record->language_id = GUINT16_FROM_BE (record->language_id);
record->name_id = GUINT16_FROM_BE (record->name_id);
record->string_length = GUINT16_FROM_BE (record->string_length);
record->string_offset = GUINT16_FROM_BE (record->string_offset);
record->platform_id = GUINT16_FROM_BE (record->platform_id);
record->encoding_id = GUINT16_FROM_BE (record->encoding_id);
record->language_id = GUINT16_FROM_BE (record->language_id);
record->name_id = GUINT16_FROM_BE (record->name_id);
record->string_length = GUINT16_FROM_BE (record->string_length);
record->string_offset = GUINT16_FROM_BE (record->string_offset);
return TRUE;
return TRUE;
}
static gchar *
get_family_name (LOGFONT *lfp, HDC pango_win32_hdc)
get_family_name (LOGFONT * lfp, HDC pango_win32_hdc)
{
HFONT hfont;
HFONT oldhfont;
HFONT hfont;
HFONT oldhfont;
struct name_header header;
struct name_record record;
struct name_header header;
struct name_record record;
gint unicode_ix = -1, mac_ix = -1, microsoft_ix = -1;
gint name_ix;
gchar *codeset;
gint unicode_ix = -1, mac_ix = -1, microsoft_ix = -1;
gint name_ix;
gchar *codeset;
gchar *string = NULL;
gchar *name;
gchar *string = NULL;
gchar *name;
size_t i, l, nbytes;
size_t i, l, nbytes;
/* If lfFaceName is ASCII, assume it is the common (English) name
* for the font. Is this valid? Do some TrueType fonts have
* different names in French, German, etc, and does the system
* return these if the locale is set to use French, German, etc?
*/
l = strlen (lfp->lfFaceName);
for (i = 0; i < l; i++)
if (lfp->lfFaceName[i] < ' ' || lfp->lfFaceName[i] > '~')
break;
/* If lfFaceName is ASCII, assume it is the common (English) name for the
font. Is this valid? Do some TrueType fonts have different names in
French, German, etc, and does the system return these if the locale is
set to use French, German, etc? */
l = strlen (lfp->lfFaceName);
for (i = 0; i < l; i++)
if (lfp->lfFaceName[i] < ' ' || lfp->lfFaceName[i] > '~')
break;
if (i == l)
return g_strdup (lfp->lfFaceName);
if (i == l)
return g_strdup (lfp->lfFaceName);
if ((hfont = CreateFontIndirect (lfp)) == NULL)
goto fail0;
if ((hfont = CreateFontIndirect (lfp)) == NULL)
goto fail0;
if ((oldhfont = (HFONT)SelectObject (pango_win32_hdc, hfont)) == NULL)
goto fail1;
if ((oldhfont = (HFONT) SelectObject (pango_win32_hdc, hfont)) == NULL)
goto fail1;
if (!pango_win32_get_name_header (pango_win32_hdc, &header))
goto fail2;
if (!pango_win32_get_name_header (pango_win32_hdc, &header))
goto fail2;
PING (("%d name records", header.num_records));
PING (("%d name records", header.num_records));
for (i = 0; i < header.num_records; i++)
{
if (!pango_win32_get_name_record (pango_win32_hdc, i, &record))
goto fail2;
for (i = 0; i < header.num_records; i++)
{
if (!pango_win32_get_name_record (pango_win32_hdc, i, &record))
goto fail2;
if ((record.name_id != 1 && record.name_id != 16)
|| record.string_length <= 0)
continue;
PING (("platform:%d encoding:%d language:%04x name_id:%d",
record.platform_id, record.encoding_id, record.language_id,
record.name_id));
if (record.platform_id == APPLE_UNICODE_PLATFORM_ID ||
record.platform_id == ISO_PLATFORM_ID)
unicode_ix = i;
else if (record.platform_id == MACINTOSH_PLATFORM_ID && record.encoding_id == 0 && /* Roman
*/
record.language_id == 0) /* English */
mac_ix = i;
else if (record.platform_id == MICROSOFT_PLATFORM_ID)
if ((microsoft_ix == -1 ||
PRIMARYLANGID (record.language_id) == LANG_ENGLISH) &&
(record.encoding_id == SYMBOL_ENCODING_ID ||
record.encoding_id == UNICODE_ENCODING_ID ||
record.encoding_id == UCS4_ENCODING_ID))
microsoft_ix = i;
}
if ((record.name_id != 1 && record.name_id != 16) || record.string_length <= 0)