Commit dda7702b authored by Uwe Scholz's avatar Uwe Scholz

InternalViewer: Use define statements for charsets

parent 160c19f5
......@@ -357,91 +357,91 @@ void gviewer_window_set_settings(GViewerWindow *gViewerWindow, /*in*/ GViewerWin
settings->hex_decimal_offset);
gviewer_set_encoding(gViewerWindow->priv->viewer, settings->charset);
if (strcmp(settings->charset, (gchar*) "UTF8") == 0)
if (strcmp(settings->charset, (gchar*) UTF8) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[0]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ASCII") == 0)
else if (strcmp(settings->charset, (gchar*) ASCII) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[1]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP437") == 0)
else if (strcmp(settings->charset, (gchar*) CP437) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[2]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-6") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88596) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[3]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ARABIC") == 0)
else if (strcmp(settings->charset, (gchar*) ARABIC) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[4]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP864") == 0)
else if (strcmp(settings->charset, (gchar*) CP864) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[5]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-4") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88594) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[6]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-2") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88592) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[7]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP1250") == 0)
else if (strcmp(settings->charset, (gchar*) CP1250) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[8]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-5") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88595) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[9]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP1251") == 0)
else if (strcmp(settings->charset, (gchar*) CP1251) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[10]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-7") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88597) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[11]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP1253") == 0)
else if (strcmp(settings->charset, (gchar*) CP1253) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[12]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "HEBREW") == 0)
else if (strcmp(settings->charset, (gchar*) HEBREW) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[13]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP862") == 0)
else if (strcmp(settings->charset, (gchar*) CP862) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[14]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-8") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88598) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[15]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-15") == 0)
else if (strcmp(settings->charset, (gchar*) ISO885915) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[16]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-3") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88593) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[17]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-9") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88599) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[18]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP1254") == 0)
else if (strcmp(settings->charset, (gchar*) CP1254) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[19]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "CP1252") == 0)
else if (strcmp(settings->charset, (gchar*) CP1252) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[20]), TRUE);
}
else if (strcmp(settings->charset, (gchar*) "ISO-8859-1") == 0)
else if (strcmp(settings->charset, (gchar*) ISO88591) == 0)
{
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (gViewerWindow->priv->encoding_menu_item[21]), TRUE);
}
......
......@@ -38,6 +38,28 @@ InternalViewerSettings *iv_settings_new (void);
#define IS_GVIEWER_WINDOW(obj) \
GTK_CHECK_TYPE (obj, gviewer_window_get_type ())
#define UTF8 "UTF8" // UTF-8
#define ASCII "ASCII" // English (US-ASCII)
#define CP437 "CP437" // Terminal (CP437)
#define ISO88596 "ISO-8859-6" // Arabic (ISO-8859-6)
#define ARABIC "ARABIC" // Arabic (Windows, CP1256)
#define CP864 "CP864" // Arabic (Dos, CP864)
#define ISO88594 "ISO-8859-4" // Baltic (ISO-8859-4)
#define ISO88592 "ISO-8859-2" // Central European (ISO-8859-2)
#define CP1250 "CP1250" // Central European (CP1250)
#define ISO88595 "ISO-8859-5" // Cyrillic (ISO-8859-5)
#define CP1251 "CP1251" // Cyrillic (CP1251)
#define ISO88597 "ISO-8859-7" // Greek (ISO-8859-7)
#define CP1253 "CP1253" // Greek (CP1253)
#define HEBREW "HEBREW" // Hebrew (Windows, CP1255)
#define CP862 "CP862" // Hebrew (Dos, CP862)
#define ISO88598 "ISO-8859-8" // Hebrew (ISO-8859-8)
#define ISO885915 "ISO-8859-15" // Latin 9 (ISO-8859-15))
#define ISO88593 "ISO-8859-3" // Maltese (ISO-8859-3)
#define ISO88599 "ISO-8859-9" // Turkish (ISO-8859-9)
#define CP1254 "CP1254" // Turkish (CP1254)
#define CP1252 "CP1252" // Western (CP1252)
#define ISO88591 "ISO-8859-1" // Western (ISO-8859-1)
struct GViewerWindowSettings
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment