From 7b4ddd14f3013baa2e305a7d8f724ac5bedea6e1 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Fri, 12 Oct 2007 03:08:56 +0000 Subject: [PATCH] 2007-10-11 Jim Evins * configure.in: Extended checks for deprecated symbols. * libglabels/template.c: Removed g_strcasecmp references, which are deprecated. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@678 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/ChangeLog | 6 ++++++ glabels2/configure.in | 3 ++- glabels2/libglabels/template.c | 18 +++++++++--------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 8f80daac..48512bb6 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,9 @@ +2007-10-11 Jim Evins + * configure.in: + Extended checks for deprecated symbols. + * libglabels/template.c: + Removed g_strcasecmp references, which are deprecated. + 2007-10-09 Jim Evins * src/merge-evolution.c: diff --git a/glabels2/configure.in b/glabels2/configure.in index ed8a6b62..60e2c450 100644 --- a/glabels2/configure.in +++ b/glabels2/configure.in @@ -129,7 +129,8 @@ if test "x$enable_deprecations" = "xyes"; then -DGDK_DISABLE_DEPRECATED \ -DGTK_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \ --DGNOME_DISABLE_DEPRECATED" +-DGNOME_DISABLE_DEPRECATED \ +-DLIBGLADE_DISABLE_DEPRECATED" AC_SUBST(DISABLE_DEPRECATED_CFLAGS) fi diff --git a/glabels2/libglabels/template.c b/glabels2/libglabels/template.c index a628b4f5..dac143ca 100644 --- a/glabels2/libglabels/template.c +++ b/glabels2/libglabels/template.c @@ -119,7 +119,7 @@ lgl_template_register (const lglTemplate *template) for (pa1=template1->aliases; pa1!=NULL; pa1=pa1->next) { - if (g_strcasecmp (template->name, pa1->data) == 0) { + if (g_utf8_collate (template->name, pa1->data) == 0) { /* FIXME: make sure templates are really identical */ /* if not, apply hash to name to make unique. */ @@ -188,7 +188,7 @@ lgl_template_get_name_list_unique (const gchar *page_size, lgl_template_does_category_match (template, category)) { names = g_list_insert_sorted (names, g_strdup (template->name), - (GCompareFunc)g_strcasecmp); + (GCompareFunc)g_utf8_collate); } } @@ -235,7 +235,7 @@ lgl_template_get_name_list_all (const gchar *page_size, { str = g_strdup ((gchar *) p_alias->data); names = g_list_insert_sorted (names, str, - (GCompareFunc)g_strcasecmp); + (GCompareFunc)g_utf8_collate); } } } @@ -292,7 +292,7 @@ lgl_template_from_name (const gchar *name) template = (lglTemplate *) p_tmplt->data; for (p_alias = template->aliases; p_alias != NULL; p_alias = p_alias->next) { - if (g_strcasecmp (p_alias->data, name) == 0) { + if (g_utf8_collate (p_alias->data, name) == 0) { return lgl_template_dup (template); } @@ -499,7 +499,7 @@ lgl_template_does_page_size_match (const lglTemplate *template, return TRUE; } - return g_strcasecmp(page_size, template->page_size) == 0; + return g_ascii_strcasecmp(page_size, template->page_size) == 0; } /** @@ -528,7 +528,7 @@ lgl_template_does_category_match (const lglTemplate *template, for ( p=template->categories; p != NULL; p=p->next ) { - if (g_strcasecmp(category, p->data) == 0) + if (g_ascii_strcasecmp(category, p->data) == 0) { return TRUE; } @@ -929,7 +929,7 @@ lgl_template_dup (const lglTemplate *orig_template) for ( p=orig_template->aliases; p != NULL; p=p->next ) { - if (g_strcasecmp (template->name, p->data) != 0) { + if (g_utf8_collate (template->name, p->data) != 0) { lgl_template_add_alias (template, p->data); } @@ -1286,8 +1286,8 @@ read_template_files_from_dir (GList *templates, extension = strrchr (filename, '.'); extension2 = strrchr (filename, '-'); - if ( (extension && (g_strcasecmp (extension, ".template") == 0)) || - (extension2 && (g_strcasecmp (extension2, "-templates.xml") == 0)) ) { + if ( (extension && (g_ascii_strcasecmp (extension, ".template") == 0)) || + (extension2 && (g_ascii_strcasecmp (extension2, "-templates.xml") == 0)) ) { full_filename = g_build_filename (dirname, filename, NULL); new_templates = -- 2.39.5