[gnome-keyring] gcr: Fix for more glib deprecations



commit 436c4aeac4184741b0025c521b6f20c0dacf3f67
Author: Stef Walter <stefw collabora co uk>
Date:   Mon Sep 26 22:05:21 2011 +0200

    gcr: Fix for more glib deprecations

 configure.ac              |    2 +-
 gcr/gcr-library.c         |    2 +-
 gcr/gcr-live-search.c     |   10 ++++------
 gcr/gcr-unlock-renderer.c |    2 +-
 4 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ce56b89..ef58261 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ GTK_DOC_CHECK(1.9)
 DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc"
 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
 
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28.0)
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
diff --git a/gcr/gcr-library.c b/gcr/gcr-library.c
index 6f31753..b887ba3 100644
--- a/gcr/gcr-library.c
+++ b/gcr/gcr-library.c
@@ -115,7 +115,7 @@ _gcr_initialize_library (void)
 {
 	static gint gcr_initialize = 0;
 
-	if (g_atomic_int_exchange_and_add (&gcr_initialize, 1) == 0)
+	if (g_atomic_int_add (&gcr_initialize, 1) == 0)
 		return;
 
 	/* Initialize the libgcrypt library if needed */
diff --git a/gcr/gcr-live-search.c b/gcr/gcr-live-search.c
index b0f4414..71c8a06 100644
--- a/gcr/gcr-live-search.c
+++ b/gcr/gcr-live-search.c
@@ -64,7 +64,7 @@ stripped_char (gunichar ch)
 {
 	gunichar retval = 0;
 	GUnicodeType utype;
-	gunichar *decomp;
+	gunichar decomp[4];
 	gsize dlen;
 
 	utype = g_unichar_type (ch);
@@ -74,7 +74,7 @@ stripped_char (gunichar ch)
 	case G_UNICODE_FORMAT:
 	case G_UNICODE_UNASSIGNED:
 	case G_UNICODE_NON_SPACING_MARK:
-	case G_UNICODE_COMBINING_MARK:
+	case G_UNICODE_SPACING_MARK:
 	case G_UNICODE_ENCLOSING_MARK:
 		/* Ignore those */
 		break;
@@ -104,11 +104,9 @@ stripped_char (gunichar ch)
 	case G_UNICODE_SPACE_SEPARATOR:
 	default:
 		ch = g_unichar_tolower (ch);
-		decomp = g_unicode_canonical_decomposition (ch, &dlen);
-		if (decomp != NULL) {
+		dlen = g_unichar_fully_decompose (ch, FALSE, decomp, 4);
+		if (dlen > 0)
 			retval = decomp[0];
-			g_free (decomp);
-		}
 	}
 
 	return retval;
diff --git a/gcr/gcr-unlock-renderer.c b/gcr/gcr-unlock-renderer.c
index 2bd8cfc..106c2bc 100644
--- a/gcr/gcr-unlock-renderer.c
+++ b/gcr/gcr-unlock-renderer.c
@@ -179,7 +179,7 @@ _gcr_unlock_renderer_init (GcrUnlockRenderer *self)
 	g_signal_connect (self->pv->entry, "activate", G_CALLBACK (on_entry_activated), button);
 	gtk_widget_show (button);
 
-	vbox = gtk_vbox_new (GTK_ORIENTATION_VERTICAL, 6);
+	vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
 	gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
 	gtk_widget_show (box);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]