mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-11 08:20:17 +00:00
Fix string handling for Turkish locale
This commit is contained in:
@@ -1260,11 +1260,11 @@ key_action_scroll_page (GtkWidget * wid, GdkEventKey * evt, char *d1,
|
||||
|
||||
if (d1)
|
||||
{
|
||||
if (!strcasecmp (d1, "up"))
|
||||
if (!g_ascii_strcasecmp (d1, "up"))
|
||||
type = PAGE_UP;
|
||||
else if (!strcasecmp (d1, "+1"))
|
||||
else if (!g_ascii_strcasecmp (d1, "+1"))
|
||||
type = LINE_DOWN;
|
||||
else if (!strcasecmp (d1, "-1"))
|
||||
else if (!g_ascii_strcasecmp (d1, "-1"))
|
||||
type = LINE_UP;
|
||||
}
|
||||
|
||||
|
||||
@@ -1688,7 +1688,7 @@ mg_dnd_drop_file (session *sess, char *target, char *uri)
|
||||
while (*p)
|
||||
{
|
||||
next = strchr (p, '\r');
|
||||
if (strncasecmp ("file:", p, 5) == 0)
|
||||
if (g_ascii_strncasecmp ("file:", p, 5) == 0)
|
||||
{
|
||||
if (next)
|
||||
*next = 0;
|
||||
@@ -2911,7 +2911,7 @@ mg_tabs_compare (session *a, session *b)
|
||||
if (a->type != SESS_CHANNEL && b->type == SESS_CHANNEL)
|
||||
return 1;
|
||||
|
||||
return strcasecmp (a->channel, b->channel);
|
||||
return g_ascii_strcasecmp (a->channel, b->channel);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -484,18 +484,18 @@ menu_create (GtkWidget *menu, GSList *list, char *target, int check_path)
|
||||
{
|
||||
pop = (struct popup *) list->data;
|
||||
|
||||
if (!strncasecmp (pop->name, "SUB", 3))
|
||||
if (!g_ascii_strncasecmp (pop->name, "SUB", 3))
|
||||
{
|
||||
childcount = 0;
|
||||
tempmenu = menu_quick_sub (pop->cmd, tempmenu, &subitem, XCMENU_DOLIST|XCMENU_MNEMONIC, -1);
|
||||
|
||||
} else if (!strncasecmp (pop->name, "TOGGLE", 6))
|
||||
} else if (!g_ascii_strncasecmp (pop->name, "TOGGLE", 6))
|
||||
{
|
||||
childcount++;
|
||||
menu_toggle_item (pop->name + 7, tempmenu, toggle_cb, pop->cmd,
|
||||
cfg_get_bool (pop->cmd));
|
||||
|
||||
} else if (!strncasecmp (pop->name, "ENDSUB", 6))
|
||||
} else if (!g_ascii_strncasecmp (pop->name, "ENDSUB", 6))
|
||||
{
|
||||
/* empty sub menu due to no programs in PATH? */
|
||||
if (check_path && childcount < 1)
|
||||
@@ -506,7 +506,7 @@ menu_create (GtkWidget *menu, GSList *list, char *target, int check_path)
|
||||
tempmenu = menu_quick_endsub ();
|
||||
/* If we get here and tempmenu equals menu that means we havent got any submenus to exit from */
|
||||
|
||||
} else if (!strncasecmp (pop->name, "SEP", 3))
|
||||
} else if (!g_ascii_strncasecmp (pop->name, "SEP", 3))
|
||||
{
|
||||
menu_quick_item (0, 0, tempmenu, XCMENU_SHADED, 0, 0);
|
||||
|
||||
@@ -2190,7 +2190,7 @@ menu_create_main (void *accel_group, int bar, int away, int toplevel,
|
||||
g_object_get (settings, "gtk-key-theme-name", &key_theme, NULL);
|
||||
if (key_theme)
|
||||
{
|
||||
if (!strcasecmp (key_theme, "Emacs"))
|
||||
if (!g_ascii_strcasecmp (key_theme, "Emacs"))
|
||||
{
|
||||
close_mask = GDK_SHIFT_MASK | GDK_CONTROL_MASK;
|
||||
mymenu[SEARCH_OFFSET].key = 0;
|
||||
|
||||
@@ -321,7 +321,7 @@ notifygui_add_cb (GtkDialog *dialog, gint response, gpointer entry)
|
||||
if (text[0] && response == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
networks = GTK_ENTRY (g_object_get_data (G_OBJECT (entry), "net"))->text;
|
||||
if (strcasecmp (networks, "ALL") == 0 || networks[0] == 0)
|
||||
if (g_ascii_strcasecmp (networks, "ALL") == 0 || networks[0] == 0)
|
||||
notify_adduser (text, NULL);
|
||||
else
|
||||
notify_adduser (text, networks);
|
||||
|
||||
@@ -176,12 +176,12 @@ plugingui_unload (GtkWidget * wid, gpointer unused)
|
||||
|
||||
len = strlen (file);
|
||||
#ifdef WIN32
|
||||
if (len > 4 && strcasecmp (file + len - 4, ".dll") == 0)
|
||||
if (len > 4 && g_ascii_strcasecmp (file + len - 4, ".dll") == 0)
|
||||
#else
|
||||
#if defined(__hpux)
|
||||
if (len > 3 && strcasecmp (file + len - 3, ".sl") == 0)
|
||||
if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".sl") == 0)
|
||||
#else
|
||||
if (len > 3 && strcasecmp (file + len - 3, ".so") == 0)
|
||||
if (len > 3 && g_ascii_strcasecmp (file + len - 3, ".so") == 0)
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
|
||||
@@ -976,7 +976,7 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry)
|
||||
enchant_langs = sexy_spell_entry_get_languages(entry);
|
||||
|
||||
/*for (i = 0; langs[i]; i++) {
|
||||
if ((g_strncasecmp(langs[i], "C", 1) != 0) &&
|
||||
if ((g_ascii_strncasecmp(langs[i], "C", 1) != 0) &&
|
||||
(strlen(langs[i]) >= 2) &&
|
||||
enchant_has_lang(langs[i], enchant_langs)) {
|
||||
if ((lastprefix == NULL) || (g_str_has_prefix(langs[i], lastprefix) == FALSE))
|
||||
@@ -1013,7 +1013,7 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry)
|
||||
lang = (gchar *) g_getenv("LANG");
|
||||
|
||||
if (lang != NULL) {
|
||||
if (g_strncasecmp(lang, "C", 1) == 0)
|
||||
if (g_ascii_strncasecmp(lang, "C", 1) == 0)
|
||||
lang = NULL;
|
||||
else if (lang[0] == '\0')
|
||||
lang = NULL;
|
||||
|
||||
@@ -198,7 +198,7 @@ nocasestrstr (const char *s, const char *tofind)
|
||||
|
||||
if (len == 0)
|
||||
return (char *)s;
|
||||
while (toupper(*s) != toupper(*tofind) || strncasecmp (s, tofind, len))
|
||||
while (toupper(*s) != toupper(*tofind) || g_ascii_strncasecmp (s, tofind, len))
|
||||
if (*s++ == '\0')
|
||||
return (char *)NULL;
|
||||
return (char *)s;
|
||||
|
||||
Reference in New Issue
Block a user