[monkey-bubble: 416/753] Implemented.



commit 8edc93399815aa76204134841470ee8a4f31af73
Author: Martin Baulig <baulig suse de>
Date:   Sun Jun 10 13:11:11 2001 +0000

    Implemented.
    
    2001-06-10  Martin Baulig  <baulig suse de>
    
    	* bonobo-config-ditem.c (real_set_value): Implemented.
    
    	* bonobo-config-ditem-utils.c (bonobo_config_ditem_encode_any):
    	New function.

 monikers/ChangeLog           |    7 +++++++
 monikers/gnome-desktop.xmldb |    7 +++++--
 monikers/test-ditem.c        |   22 +++++++++++++---------
 3 files changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/monikers/ChangeLog b/monikers/ChangeLog
index 58c30cd..9efc0fb 100644
--- a/monikers/ChangeLog
+++ b/monikers/ChangeLog
@@ -1,5 +1,12 @@
 2001-06-10  Martin Baulig  <baulig suse de>
 
+	* bonobo-config-ditem.c (real_set_value): Implemented.
+
+	* bonobo-config-ditem-utils.c (bonobo_config_ditem_encode_any):
+	New function.
+
+2001-06-10  Martin Baulig  <baulig suse de>
+
 	* bonobo-config-ditem-utils.c (bonobo_config_ditem_decode_any):
 	Added all basic types.
 
diff --git a/monikers/gnome-desktop.xmldb b/monikers/gnome-desktop.xmldb
index 173f8cf..f86eb85 100644
--- a/monikers/gnome-desktop.xmldb
+++ b/monikers/gnome-desktop.xmldb
@@ -1,6 +1,9 @@
 <?xml version="1.0"?>
-<bonobo-conf>
+<bonobo-config>
   <section path="URL Handlers">
     <entry name="default-show" type="string" value="konqueror"/>
   </section>
-</bonobo-conf>
+  <section path="Foo">
+    <entry name="Test" type="long" value="0"/>
+  </section>
+</bonobo-config>
diff --git a/monikers/test-ditem.c b/monikers/test-ditem.c
index 332271c..0511dfd 100644
--- a/monikers/test-ditem.c
+++ b/monikers/test-ditem.c
@@ -73,6 +73,14 @@ test_ditem (Bonobo_ConfigDatabase db)
 
 		g_print ("ATTRIBUTE: |%s|\n", attr);
 	}
+
+#if 0
+	gnome_desktop_item_set_name (ditem, "de", "Neu gesetzt!");
+
+	gnome_desktop_item_save (ditem, NULL);
+#endif
+
+	// gnome_desktop_item_save (ditem, "~/work/foo.desktop");
 }
 
 int
@@ -143,16 +151,18 @@ main (int argc, char **argv)
 #endif
 
         CORBA_exception_init (&ev);
-	type = bonobo_pbclient_get_type (db, "/Config/scrollbacklines", &ev);
+	type = bonobo_pbclient_get_type (db, "/Foo/Test", &ev);
 	if (type)
 		printf ("type is %d - %s (%s)\n", type->kind, type->name, type->repo_id);
 
         CORBA_exception_init (&ev);
-	value = bonobo_pbclient_get_value (db, "/Config/scrollbacklines", TC_CORBA_long, &ev);
+	value = bonobo_pbclient_get_value (db, "/Foo/Test", TC_CORBA_long, &ev);
 	if (value) {
 		printf ("got value as long %d\n", BONOBO_ARG_GET_LONG (value));
-		bonobo_pbclient_set_value (db, "/Config/scrollbacklines", value, &ev);
+		BONOBO_ARG_SET_LONG (value, 512);
+		bonobo_pbclient_set_value (db, "/Foo/Test", value, &ev);
 	}
+	bonobo_arg_release (value);
         CORBA_exception_free (&ev);
 
         CORBA_exception_init (&ev);
@@ -160,12 +170,6 @@ main (int argc, char **argv)
         CORBA_exception_free (&ev);
 
         CORBA_exception_init (&ev);
-	value = bonobo_pbclient_get_value (db, "/Config/scrollbacklines", TC_CORBA_string, &ev);
-	if (value)
-		printf ("got value as string %s\n", BONOBO_ARG_GET_STRING (value));
-        CORBA_exception_free (&ev);
-
-        CORBA_exception_init (&ev);
 	value = bonobo_pbclient_get_value (db, "/Desktop Entry", TC_GNOME_DesktopEntry, &ev);
 	g_message (G_STRLOC ": %p", value);
 	if (value)



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