[monkey-bubble: 392/753] Renamed DirEntry.localized_values to DirEntry.subvalues Improved reading



commit ecd39cbc0e5b57ea2d7f033d08235c612b4e567b
Author: Martin Baulig <martin src gnome org>
Date:   Wed Jun 6 16:16:17 2001 +0000

    Renamed DirEntry.localized_values to DirEntry.subvalues Improved reading
    
    * Renamed DirEntry.localized_values to DirEntry.subvalues
    * Improved reading of anys.

 monikers/test-ditem.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/monikers/test-ditem.c b/monikers/test-ditem.c
index ce0b8e8..e438684 100644
--- a/monikers/test-ditem.c
+++ b/monikers/test-ditem.c
@@ -1,8 +1,22 @@
 /* -*- Mode: C; c-set-style: gnu indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
 #include <libbonobo.h>
+#include <libgnome/Gnome.h>
 
 #include "bonobo-config-ditem.h"
 
+static void G_GNUC_UNUSED
+boot_ditem (Bonobo_ConfigDatabase db)
+{
+	BonoboArg *arg;
+
+	arg = bonobo_arg_new (TC_GNOME_LocalizedStringList);
+	bonobo_pbclient_set_value (db, "/Desktop Entry/Name", arg, NULL);
+	bonobo_pbclient_set_value (db, "/Desktop Entry/Comment", arg, NULL);
+	bonobo_arg_release (arg);
+
+	Bonobo_ConfigDatabase_sync (db, NULL);
+}
+
 int
 main (int argc, char **argv)
 {
@@ -29,6 +43,8 @@ main (int argc, char **argv)
 	g_assert (db != NULL);
 	g_assert (default_db != NULL);
 
+	boot_ditem (default_db);
+
         CORBA_exception_init (&ev);
 	Bonobo_ConfigDatabase_addDatabase (db, default_db, "", "/gnome-ditem/", &ev);
 	g_assert (!BONOBO_EX (&ev));
@@ -75,7 +91,9 @@ main (int argc, char **argv)
         CORBA_exception_free (&ev);
 
         CORBA_exception_init (&ev);
-	value = bonobo_pbclient_get_value (db, "/Desktop Entry/Name", TC_string, &ev);
+	value = bonobo_pbclient_get_value (db, "/Desktop Entry/Comment",
+					   TC_GNOME_LocalizedStringList, &ev);
+	g_message (G_STRLOC ": %p", value);
 	if (value)
 		printf ("got value as string (%s)\n", BONOBO_ARG_GET_STRING (value));
         CORBA_exception_free (&ev);



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