? stamp-h1
? doc/reference/libgnome.interfaces
? doc/reference/libgnome.prerequisites
? doc/reference/version.xml
? libgnome/stamp-libgnometypebuiltins.h
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgnome/ChangeLog,v
retrieving revision 1.379
diff -u -p -r1.379 ChangeLog
--- ChangeLog	8 Jun 2004 11:57:51 -0000	1.379
+++ ChangeLog	4 Jul 2004 09:53:34 -0000
@@ -1,3 +1,17 @@
+2004-07-04  Gustavo J. A. M. Carneiro  <gustavo@users.sourceforge.net>
+
+	* libgnome/gnome-program.h: Add prototype for
+	gnome_program_init_paramv.
+
+	* libgnome/gnome-program.c (_gnome_program_init_common): Rename
+	from gnome_program_initv; Add parameters 'nparams', 'params';
+	Allow instantiation of the GnomeProgram using either
+	g_object_new_valist or g_object_newv, depending on the supplied
+	arguments.
+	(gnome_program_initv): Delegates to _gnome_program_init_common().
+	(gnome_program_init_paramv): New function, GParameter variant of
+	gnome_program_init. Delegates to _gnome_program_init_common().
+
 2004-06-08  Pawan Chitrakar  <pawan@nplinux.org>
 
 	* configure.in: Added "ne" Nepali in ALL_LINGUAS
Index: libgnome/gnome-program.c
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-program.c,v
retrieving revision 1.69
diff -u -p -r1.69 gnome-program.c
--- libgnome/gnome-program.c	15 May 2004 19:37:22 -0000	1.69
+++ libgnome/gnome-program.c	4 Jul 2004 09:53:35 -0000
@@ -1688,31 +1688,14 @@ gnome_program_init (const char *app_id, 
     return program;
 }
 
-/**
- * gnome_program_initv:
- * @type: The type of application to be initialized (usually
- * #GNOME_TYPE_PROGRAM).
- * @app_id: Application ID string.
- * @app_version: Application version string.
- * @module_info: The modules to init with the application.
- * @argc: The number of command line arguments contained in @argv.
- * @argv: A string array of command line arguments.
- * @first_property_name: The first item in a %NULL-terminated list of attribute
- * name/value.
- * @args: The remaining elements in the %NULL terminated list (of which
- * @first_property_name is the first element).
- *
- * Provides a non-varargs form of gnome_program_init(). Users will rarely need
- * to call this function directly.
- *
- * Returns: A #GnomeProgram instance representing the current application.
- */
-GnomeProgram*
-gnome_program_initv (GType type,
-		     const char *app_id, const char *app_version,
-		     const GnomeModuleInfo *module_info,
-		     int argc, char **argv,
-		     const char *first_property_name, va_list args)
+
+static inline GnomeProgram*
+_gnome_program_init_common (GType type,
+                            const char *app_id, const char *app_version,
+                            const GnomeModuleInfo *module_info,
+                            int argc, char **argv,
+                            const char *first_property_name, va_list args,
+                            gint nparams, GParameter *params)
 {
     GnomeProgram *program;
     GnomeProgramClass *klass;
@@ -1864,8 +1847,11 @@ gnome_program_initv (GType type,
 	}
     }
 
-    program = (GnomeProgram *)g_object_new_valist (type,
-						   first_property_name, args);
+    if (nparams == -1)
+        program = (GnomeProgram *) g_object_new_valist (type,
+                                                        first_property_name, args);
+    else
+        program = (GnomeProgram *) g_object_newv (type, nparams, params);
 
     if (!program_initialized) {
 	global_program = program;
@@ -1885,4 +1871,63 @@ gnome_program_initv (GType type,
 #endif
 
     return program;
+}
+
+/**
+ * gnome_program_initv:
+ * @type: The type of application to be initialized (usually
+ * #GNOME_TYPE_PROGRAM).
+ * @app_id: Application ID string.
+ * @app_version: Application version string.
+ * @module_info: The modules to init with the application.
+ * @argc: The number of command line arguments contained in @argv.
+ * @argv: A string array of command line arguments.
+ * @first_property_name: The first item in a %NULL-terminated list of attribute
+ * name/value.
+ * @args: The remaining elements in the %NULL terminated list (of which
+ * @first_property_name is the first element).
+ *
+ * Provides a non-varargs form of gnome_program_init(). Users will rarely need
+ * to call this function directly.
+ *
+ * Returns: A #GnomeProgram instance representing the current application.
+ */
+GnomeProgram*
+gnome_program_initv (GType type,
+		     const char *app_id, const char *app_version,
+		     const GnomeModuleInfo *module_info,
+		     int argc, char **argv,
+		     const char *first_property_name, va_list args)
+{
+    return _gnome_program_init_common (type, app_id, app_version, module_info,
+                                       argc, argv, first_property_name, args,
+                                       -1, NULL);
+}
+
+/**
+ * gnome_program_init_paramv:
+ * @type: The type of application to be initialized (usually
+ * #GNOME_TYPE_PROGRAM).
+ * @app_id: Application ID string.
+ * @app_version: Application version string.
+ * @module_info: The modules to init with the application.
+ * @argc: The number of command line arguments contained in @argv.
+ * @argv: A string array of command line arguments.
+ * @nparams: Number of parameters.
+ * @args: GParameter array.
+ *
+ * Provides a GParameter form of gnome_program_init(). Useful only for
+ * language bindings, mostly.
+ *
+ * Returns: A #GnomeProgram instance representing the current application.
+ */
+GnomeProgram*
+gnome_program_init_paramv (GType type,
+                           const char *app_id, const char *app_version,
+                           const GnomeModuleInfo *module_info,
+                           int argc, char **argv,
+                           guint nparams, GParameter *params)
+{
+    return _gnome_program_init_common (type, app_id, app_version, module_info,
+                                       argc, argv, NULL, NULL, nparams, params);
 }
Index: libgnome/gnome-program.h
===================================================================
RCS file: /cvs/gnome/libgnome/libgnome/gnome-program.h,v
retrieving revision 1.28
diff -u -p -r1.28 gnome-program.h
--- libgnome/gnome-program.h	30 May 2002 00:44:58 -0000	1.28
+++ libgnome/gnome-program.h	4 Jul 2004 09:53:35 -0000
@@ -225,6 +225,12 @@ gnome_program_initv (GType type,
 		     const GnomeModuleInfo *module_info,
 		     int argc, char **argv,
 		     const char *first_property_name, va_list args);
+GnomeProgram*
+gnome_program_init_paramv (GType type,
+                           const char *app_id, const char *app_version,
+                           const GnomeModuleInfo *module_info,
+                           int argc, char **argv,
+                           guint nparams, GParameter *params);
 
 G_END_DECLS
 
