[goobox] Revert "removed some deprecated functions"
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goobox] Revert "removed some deprecated functions"
- Date: Thu, 20 Jun 2013 19:02:18 +0000 (UTC)
commit 9c0c1d28b2e1ec1c378b1a8ad8f5ea74b2358c80
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Jun 20 20:59:04 2013 +0200
Revert "removed some deprecated functions"
This reverts commit d4189b9e93b8ac2fa5784985af21a72568e0745b.
This branch must compile with gtk+ version 3.6
src/glib-utils.c | 8 ++++----
src/gtk-utils.c | 2 +-
src/main.c | 2 ++
3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/glib-utils.c b/src/glib-utils.c
index 0eb5d50..d321f81 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -946,18 +946,18 @@ _g_list_insert_list_before (GList *list1,
GHashTable *static_strings = NULL;
+static GStaticMutex static_strings_mutex = G_STATIC_MUTEX_INIT;
const char *
get_static_string (const char *s)
{
- static GMutex static_strings_mutex;
- const char *result;
+ const char *result;
if (s == NULL)
return NULL;
- g_mutex_lock (&static_strings_mutex);
+ g_static_mutex_lock (&static_strings_mutex);
if (static_strings == NULL)
static_strings = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
@@ -969,7 +969,7 @@ get_static_string (const char *s)
GINT_TO_POINTER (1));
}
- g_mutex_unlock (&static_strings_mutex);
+ g_static_mutex_unlock (&static_strings_mutex);
return result;
}
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index d1c4b59..90a85a0 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -340,7 +340,7 @@ get_themed_icon_pixbuf (GThemedIcon *icon,
g_clear_error (&error);
}
- g_object_unref (icon_info);
+ gtk_icon_info_free (icon_info);
g_strfreev (icon_names);
return pixbuf;
diff --git a/src/main.c b/src/main.c
index 862a5fb..8fdd5e2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -701,6 +701,8 @@ goo_application_class_init (GooApplicationClass *klass)
static GtkApplication *
goo_application_new (void)
{
+ g_type_init ();
+
return g_object_new (goo_application_get_type (),
"application-id", "org.gnome.Goobox",
"flags", 0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]