65 lines
2.1 KiB
Diff
65 lines
2.1 KiB
Diff
Porting libgnome to newer glib:
|
|
* remove g_thread_init and g_thread_supported, which are longer needed
|
|
https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#g-thread-init
|
|
* replace GStaticRecMutex by GRecMutex
|
|
https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#GStaticRecMutex
|
|
|
|
diff --git a/libgnome/gnome-i18n.c b/libgnome/gnome-i18n.c
|
|
index 531c56c..f13d61e 100644
|
|
--- a/libgnome/gnome-i18n.c
|
|
+++ b/libgnome/gnome-i18n.c
|
|
@@ -55,12 +55,14 @@
|
|
const GList *
|
|
gnome_i18n_get_language_list (const gchar *ignored)
|
|
{
|
|
- static GStaticRecMutex lang_list_lock = G_STATIC_REC_MUTEX_INIT;
|
|
+ static GRecMutex lang_list_lock;
|
|
+ g_rec_mutex_init (&lang_list_lock);
|
|
+
|
|
static GList *list = NULL;
|
|
const char * const* langs;
|
|
int i;
|
|
|
|
- g_static_rec_mutex_lock (&lang_list_lock);
|
|
+ g_rec_mutex_lock (&lang_list_lock);
|
|
|
|
if (list == NULL) {
|
|
langs = g_get_language_names ();
|
|
@@ -71,7 +73,7 @@ gnome_i18n_get_language_list (const gchar *ignored)
|
|
list = g_list_reverse (list);
|
|
}
|
|
|
|
- g_static_rec_mutex_unlock (&lang_list_lock);
|
|
+ g_rec_mutex_unlock (&lang_list_lock);
|
|
|
|
return list;
|
|
}
|
|
diff --git a/libgnome/gnome-init.c b/libgnome/gnome-init.c
|
|
index fe3efd4..c6619af 100644
|
|
--- a/libgnome/gnome-init.c
|
|
+++ b/libgnome/gnome-init.c
|
|
@@ -115,9 +115,6 @@ gnome_bonobo_module_info_get (void)
|
|
static void
|
|
bonobo_activation_pre_args_parse (GnomeProgram *program, GnomeModuleInfo *mod_info)
|
|
{
|
|
- if (!g_thread_supported ())
|
|
- g_thread_init (NULL);
|
|
-
|
|
if (!bonobo_activation_is_initialized ())
|
|
bonobo_activation_preinit (program, mod_info);
|
|
}
|
|
diff --git a/libgnome/gnome-program.c b/libgnome/gnome-program.c
|
|
index 739765e..cd14999 100644
|
|
--- a/libgnome/gnome-program.c
|
|
+++ b/libgnome/gnome-program.c
|
|
@@ -1878,10 +1878,6 @@ gnome_program_init (const char *app_id, const char *app_version,
|
|
GnomeProgram *program;
|
|
va_list args;
|
|
|
|
- /* g_thread_init() has to be the first GLib function called ever */
|
|
- if (!g_threads_got_initialized)
|
|
- g_thread_init (NULL);
|
|
-
|
|
g_type_init ();
|
|
|
|
va_start(args, first_property_name);
|