[monkey-bubble: 384/753] Started to implement getValue().
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 384/753] Started to implement getValue().
- Date: Wed, 14 Jul 2010 22:27:56 +0000 (UTC)
commit ea8d378acb76ac0f54fda5abc93cbec74f99f27a
Author: Martin Baulig <martin src gnome org>
Date: Tue Jun 5 13:56:30 2001 +0000
Started to implement getValue().
monikers/test-ditem.c | 37 +++++++++++++++++++++++--------------
1 files changed, 23 insertions(+), 14 deletions(-)
---
diff --git a/monikers/test-ditem.c b/monikers/test-ditem.c
index 27db061..e6c3c28 100644
--- a/monikers/test-ditem.c
+++ b/monikers/test-ditem.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; c-set-style: gnu indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
#include <libbonobo.h>
#include "bonobo-config-ditem.h"
@@ -33,15 +34,16 @@ main (int argc, char **argv)
g_assert (!BONOBO_EX (&ev));
if (dirlist) {
- for (i = 0; i < dirlist->_length; i++) {
- g_print ("DIR: |%s|\n", dirlist->_buffer [i]);
+ for (i = 0; i < dirlist->_length; i++) {
+ g_print ("DIR: |%s|\n", dirlist->_buffer [i]);
- keylist = Bonobo_ConfigDatabase_getKeys (db, dirlist->_buffer [i], &ev);
- g_assert (!BONOBO_EX (&ev));
+ keylist = Bonobo_ConfigDatabase_getKeys (db, dirlist->_buffer [i], &ev);
+ g_assert (!BONOBO_EX (&ev));
- if (keylist)
- for (j = 0; j < keylist->_length; j++)
- g_print ("KEY (%s): |%s|\n", dirlist->_buffer [i], keylist->_buffer [j]);
+ if (keylist)
+ for (j = 0; j < keylist->_length; j++)
+ g_print ("KEY (%s): |%s|\n", dirlist->_buffer [i],
+ keylist->_buffer [j]);
}
}
@@ -49,16 +51,23 @@ main (int argc, char **argv)
g_assert (!BONOBO_EX (&ev));
if (keylist)
- for (j = 0; j < keylist->_length; j++)
- g_print ("TEST KEY: |%s|\n", keylist->_buffer [j]);
+ for (j = 0; j < keylist->_length; j++)
+ g_print ("TEST KEY: |%s|\n", keylist->_buffer [j]);
- exit (0);
+ CORBA_exception_init (&ev);
+ value = bonobo_pbclient_get_value (db, "/Config/scrollbacklines", TC_long, &ev);
+ if (value)
+ printf ("got value as long %d\n", BONOBO_ARG_GET_LONG (value));
+ CORBA_exception_free (&ev);
+
+ CORBA_exception_init (&ev);
+ value = bonobo_pbclient_get_value (db, "/Config/scrollbacklines", TC_string, &ev);
+ if (value)
+ printf ("got value as string %s\n", BONOBO_ARG_GET_STRING (value));
+ CORBA_exception_free (&ev);
- value = bonobo_pbclient_get_value (db, "/test", TC_long, &ev);
+ exit (0);
- if (value) {
- printf ("got value %d\n", BONOBO_ARG_GET_LONG (value));
- }
CORBA_exception_init (&ev);
value = bonobo_pbclient_get_value (db, "/storagetype",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]