[monkey-bubble: 404/753] Implemented. We can now write a file back to disk if it's modified.
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [monkey-bubble: 404/753] Implemented. We can now write a file back to disk if it's modified.
- Date: Wed, 14 Jul 2010 22:29:37 +0000 (UTC)
commit ac19bec8e5b42a72a9b6b1d6ac25fa96d5d32a26
Author: Martin Baulig <baulig suse de>
Date: Sat Jun 9 14:37:23 2001 +0000
Implemented. We can now write a file back to disk if it's modified.
2001-06-09 Martin Baulig <baulig suse de>
* bonobo-config-ditem.c (real_sync): Implemented. We can now
write a file back to disk if it's modified.
monikers/ChangeLog | 5 +++++
monikers/test-ditem.c | 36 +++++++++++++++++++++++++++++++++++-
2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/monikers/ChangeLog b/monikers/ChangeLog
index 8c93051..1cbb649 100644
--- a/monikers/ChangeLog
+++ b/monikers/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-09 Martin Baulig <baulig suse de>
+
+ * bonobo-config-ditem.c (real_sync): Implemented. We can now
+ write a file back to disk if it's modified.
+
2001-06-08 Martin Baulig <baulig suse de>
* bonobo-config-ditem-utils.c (bonobo_config_ditem_decode_any):
diff --git a/monikers/test-ditem.c b/monikers/test-ditem.c
index a311f42..8822869 100644
--- a/monikers/test-ditem.c
+++ b/monikers/test-ditem.c
@@ -29,9 +29,35 @@ static void G_GNUC_UNUSED
test_ditem (Bonobo_ConfigDatabase db)
{
GnomeDesktopItem *ditem;
+ const gchar *text;
ditem = gnome_desktop_item_new_from_file ("/home/martin/work/test.desktop",
GNOME_DESKTOP_ITEM_LOAD_ONLY_IF_EXISTS);
+
+ text = gnome_desktop_item_get_location (ditem);
+ g_print ("LOCATION: |%s|\n", text);
+
+ text = gnome_desktop_item_get_type (ditem);
+ g_print ("TYPE: |%s|\n", text);
+
+ text = gnome_desktop_item_get_command (ditem);
+ g_print ("COMMAND: |%s|\n", text);
+
+ text = gnome_desktop_item_get_icon_path (ditem);
+ g_print ("ICON PATH: |%s|\n", text);
+
+ text = gnome_desktop_item_get_name (ditem, NULL);
+ g_print ("NAME: |%s|\n", text);
+
+ text = gnome_desktop_item_get_name (ditem, "de");
+ g_print ("NAME (de): |%s|\n", text);
+
+ text = gnome_desktop_item_get_comment (ditem, NULL);
+ g_print ("COMMENT: |%s|\n", text);
+
+ text = gnome_desktop_item_get_comment (ditem, "de");
+ g_print ("COMMENT (de): |%s|\n", text);
+
}
int
@@ -68,6 +94,7 @@ main (int argc, char **argv)
Bonobo_ConfigDatabase_addDatabase (db, default_db, "/gnome-ditem/", &ev);
g_assert (!BONOBO_EX (&ev));
+#if 0
dirlist = Bonobo_ConfigDatabase_getDirs (db, "", &ev);
g_assert (!BONOBO_EX (&ev));
@@ -91,6 +118,7 @@ main (int argc, char **argv)
if (keylist)
for (j = 0; j < keylist->_length; j++)
g_print ("TEST KEY: |%s|\n", keylist->_buffer [j]);
+#endif
CORBA_exception_init (&ev);
type = bonobo_pbclient_get_type (db, "/Config/scrollbacklines", &ev);
@@ -99,8 +127,14 @@ main (int argc, char **argv)
CORBA_exception_init (&ev);
value = bonobo_pbclient_get_value (db, "/Config/scrollbacklines", TC_CORBA_long, &ev);
- if (value)
+ if (value) {
printf ("got value as long %d\n", BONOBO_ARG_GET_LONG (value));
+ bonobo_pbclient_set_value (db, "/Config/scrollbacklines", value, &ev);
+ }
+ CORBA_exception_free (&ev);
+
+ CORBA_exception_init (&ev);
+ Bonobo_ConfigDatabase_sync (db, &ev);
CORBA_exception_free (&ev);
CORBA_exception_init (&ev);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]