Re: gtkdoc-scangobj patch



On Thu, 2001-11-15 at 17:54, Damon Chaplin wrote:
> On Mon, 2001-11-12 at 21:45, Owen Taylor wrote:
> > 
> > Damon Chaplin <damon ximian com> writes:
> > 
> > > On Mon, 2001-10-29 at 13:50, jacob berkman wrote:
> > > > hello,
> > > > 
> > > > this patch allows gtk's docs to build w/o an X connection.  it also
> > > > provides a way for you to use a different type init func than
> > > > gtk_type_init().  in this way, the --nogtkinit argument could just be
> > > > removed.
> > > > 
> > > > if you don't like this, could we at least change gtk_init() to
> > > > gtk_type_init() so it doesn't require X?
> > > 
> > > 
> > > Noone objected to this, did they?
> > 
> > I'd prefer what I suggested. It's incompatible on the command
> > line :-(, but a lot more sensible than hardcoding a GTK+
> > reference.
> 
> Oops. I thought they were the same.
> 
> Jacob, do you want to submit a revised patch that Owen will accept ;)

i must have forgotten to post it; it was sitting in my tree.

jacob 
-- 
"Beat mixing is 10000 times more fun than even video games."
	-- bt
Index: gtkdoc-scangobj.in
===================================================================
RCS file: /cvs/gnome/gtk-doc/gtkdoc-scangobj.in,v
retrieving revision 1.17
diff -u -r1.17 gtkdoc-scangobj.in
--- gtkdoc-scangobj.in	2001/08/15 11:05:15	1.17
+++ gtkdoc-scangobj.in	2001/11/15 23:03:35
@@ -39,15 +39,16 @@
 my $MODULE;
 my $OUTPUT_DIR;
 my $PRINT_VERSION;
+my $TYPE_INIT_FUNC="g_type_init ()";
 
 %optctl = (module => \$MODULE,
 	   types => \$TYPES_FILE,
-	   nogtkinit => \$NO_GTK_INIT,
+	   'type-init-func' => \$TYPE_INIT_FUNC,
 	   'output-dir' => \$OUTPUT_DIR,
 	   version => \$PRINT_VERSION);
-	   
-GetOptions(\%optctl, "module=s", "types:s", "output-dir:s", "nogtkinit", "version");
 
+GetOptions(\%optctl, "module=s", "types:s", "output-dir:s", "type-init-func:s", "version");
+
 if ($PRINT_VERSION) {
     print "@VERSION \n";
     exit 0;
@@ -152,19 +153,8 @@
 int
 main (int argc, char *argv[])
 {
-EOT
-
-  if ($NO_GTK_INIT) {
-    print OUTPUT <<EOT;
-  g_type_init ();
-EOT
-  } else {
-    print OUTPUT <<EOT;
-  gtk_init (&argc, &argv);
-EOT
-  }
+  $TYPE_INIT_FUNC;
 
-print OUTPUT <<EOT;
   get_object_types ();
 
   output_signals ();


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