r4303 - in trunk/src/target/OM-2007.2/applications/openmoko-messages2: . src

thomas at sita.openmoko.org thomas at sita.openmoko.org
Thu Apr 3 12:28:45 CEST 2008


Author: thomas
Date: 2008-04-03 12:28:43 +0200 (Thu, 03 Apr 2008)
New Revision: 4303

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/test-notes.c
Log:
2008-04-03  Thomas Wood  <thomas at openedhand.com>

	* src/test-notes.c: (main): Add optional message and author command line
	parameters


Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog	2008-04-03 04:21:21 UTC (rev 4302)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog	2008-04-03 10:28:43 UTC (rev 4303)
@@ -1,3 +1,8 @@
+2008-04-03  Thomas Wood  <thomas at openedhand.com>
+
+	* src/test-notes.c: (main): Add optional message and author command line
+	parameters
+
 2008-04-02  Thomas Wood  <thomas at openedhand.com>
 
 	* src/sms-contacts.c:

Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/test-notes.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/test-notes.c	2008-04-03 04:21:21 UTC (rev 4302)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/test-notes.c	2008-04-03 10:28:43 UTC (rev 4303)
@@ -25,15 +25,23 @@
 {
   JanaNote *note;
   JanaStore *store;
+  gchar *number = "0123456789";
+  gchar *body = "Test Message";
   
   g_type_init ();
+
+  if (argc >= 2)
+    number = argv[1];
+
+  if (argc >= 3)
+    body = argv[2];
   
   store = jana_ecal_store_new (JANA_COMPONENT_NOTE);
   jana_store_open (store);
   
   note = jana_ecal_note_new ();
-  jana_note_set_author (note, "0123456789");
-  jana_note_set_body (note, "Test Message");
+  jana_note_set_author (note, number);
+  jana_note_set_body (note, body);
   
   jana_store_add_component (store, JANA_COMPONENT (note));
   





More information about the commitlog mailing list