Skip to content

Commit d7305c7

Browse files
author
Mario Torre
committed
2008-02-09 Mario Torre <[email protected]>
* include/java_util_VMTimeZone.h: Removed. * native/jni/gconf-peer/GConfNativePeer.c: all native methods, replaced GConfEngine with GConfClient and use GConfClient API instead.
1 parent 7d707ff commit d7305c7

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

Diff for: .cproject

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<?fileVersion 4.0.0?>
3+
4+
<cproject>
5+
<storageModule moduleId="org.eclipse.cdt.core.settings">
6+
<cconfiguration id="converted.config.1290436310">
7+
<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.1290436310" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig">
8+
<externalSettings/>
9+
<extensions/>
10+
</storageModule>
11+
</cconfiguration>
12+
</storageModule>
13+
</cproject>

Diff for: ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2008-02-09 Mario Torre <[email protected]>
2+
3+
* include/java_util_VMTimeZone.h: Removed.
4+
* native/jni/gconf-peer/GConfNativePeer.c: all native methods, replaced
5+
GConfEngine with GConfClient and use GConfClient API instead.
6+
17
2008-02-08 Mark Wielaard <[email protected]>
28

39
* m4/acinclude.m4 (CLASSPATH_CHECK_JAVAC): Delete

Diff for: include/java_util_VMTimeZone.h

-19
This file was deleted.

Diff for: native/jni/gconf-peer/GConfNativePeer.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
/** Reference count */
5656
static int reference_count = 0;
5757

58-
/** GConfEngine backend */
59-
static GConfEngine *engine = NULL;
58+
/** GConfClient backend */
59+
static GConfClient *client = NULL;
6060

6161
/** java.util.ArrayList class */
6262
static jclass jlist_class = NULL;
@@ -70,7 +70,7 @@ static jmethodID jlist_add_id = NULL;
7070
/* ***** PRIVATE FUNCTIONS DELCARATION ***** */
7171

7272
/**
73-
* Gets the reference of the default GConfEngine..
73+
* Gets the reference of the default GConfClient..
7474
* The client reference should be released with g_object_unref after use.
7575
*/
7676
static void init_gconf (void);
@@ -133,12 +133,12 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_init_1id_1cache
133133

134134
init_gconf ();
135135

136-
/* if engine is null, there is probably an out of memory */
137-
if (engine == NULL)
136+
/* if client is null, there is probably an out of memory */
137+
if (client == NULL)
138138
{
139139
/* release the string and throw a runtime exception */
140140
throw_exception (env,
141-
"Unable to initialize GConfEngine in native code\n");
141+
"Unable to initialize GConfClient in native code\n");
142142
return;
143143
}
144144

@@ -179,7 +179,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1all_1keys
179179
return NULL;
180180
}
181181

182-
entries = gconf_engine_all_entries (engine, dir, &err);
182+
entries = gconf_client_all_entries (client, dir, &err);
183183
if (err != NULL)
184184
{
185185
throw_exception_by_name (env, "java/util/prefs/BackingStoreException",
@@ -253,7 +253,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1all_1nodes
253253
return NULL;
254254
}
255255

256-
entries = gconf_engine_all_dirs (engine, dir, &err);
256+
entries = gconf_client_all_dirs (client, dir, &err);
257257
if (err != NULL)
258258
{
259259
throw_exception_by_name (env, "java/util/prefs/BackingStoreException",
@@ -312,7 +312,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1suggest_1sync
312312
{
313313
GError *err = NULL;
314314

315-
gconf_engine_suggest_sync (engine, &err);
315+
gconf_client_suggest_sync (client, &err);
316316
if (err != NULL)
317317
{
318318
throw_exception_by_name (env, "java/util/prefs/BackingStoreException",
@@ -341,7 +341,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1unset
341341
return JNI_FALSE;
342342
}
343343

344-
result = gconf_engine_unset (engine, _key, &err);
344+
result = gconf_client_unset (client, _key, &err);
345345
if (err != NULL)
346346
{
347347
result = JNI_FALSE;
@@ -374,7 +374,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1get_1string
374374
return NULL;
375375
}
376376

377-
_value = gconf_engine_get_string (engine, _key, &err);
377+
_value = gconf_client_get_string (client, _key, &err);
378378
JCL_free_cstring (env, key, _key);
379379
if (err != NULL)
380380
{
@@ -394,7 +394,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1get_1string
394394
g_free ((gpointer) _value);
395395
}
396396

397-
gconf_engine_suggest_sync (engine, NULL);
397+
gconf_client_suggest_sync (client, NULL);
398398

399399
return result;
400400
}
@@ -423,7 +423,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1set_1string
423423
return JNI_FALSE;
424424
}
425425

426-
result = gconf_engine_set_string (engine, _key, _value, &err);
426+
result = gconf_client_set_string (client, _key, _value, &err);
427427
if (err != NULL)
428428
{
429429
g_error_free (err);
@@ -455,7 +455,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1dir_1exists
455455
return value;
456456

457457
/* on error return false */
458-
value = gconf_engine_dir_exists (engine, dir, &err);
458+
value = gconf_client_dir_exists (client, dir, &err);
459459
if (err != NULL)
460460
value = JNI_FALSE;
461461

@@ -476,7 +476,7 @@ Java_gnu_java_util_prefs_gconf_GConfNativePeer_finalize_1class
476476
if (reference_count == 0)
477477
{
478478
/* last reference, free all resources and return */
479-
g_object_unref (G_OBJECT (engine));
479+
g_object_unref (G_OBJECT (client));
480480

481481
(*env)->DeleteGlobalRef (env, jlist_class);
482482

@@ -571,7 +571,7 @@ throw_exception_by_name (JNIEnv *env, const char *name, const char *msg)
571571

572572
static void init_gconf (void)
573573
{
574-
engine = gconf_engine_get_default ();
574+
client = gconf_client_get_default ();
575575
}
576576

577577
static gboolean set_jlist_class (JNIEnv *env)

0 commit comments

Comments
 (0)