gtk2/demos/gtk-demo/geninclude.pl.in
Jonathan Blandford c9e39436b9 Changed to have the list become non-italic when the demo window is
Sat Nov 18 18:00:17 2000  Jonathan Blandford  <jrb@redhat.com>

	* demos/gtk-demo/main.c: Changed to have the list become
	non-italic when the demo window is destroyed through an external
	event (like a close button).  Doing so found three bugs in the
	widget.

	* demos/gtk-demo/*.c (do_*): Changed to return the toplevel window.

	* gtk/gtkliststore.c (gtk_list_store_set_cell): emit "change" when
	we actually set the cell.

	* gtk/gtktreestore.c (gtk_tree_store_set_cell): ditto

	* gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
	free a leaked path.  Thanks memprof.
2000-11-18 23:59:30 +00:00

43 lines
675 B
Perl
Executable File

#!/usr/bin/perl -w
print <<EOT;
typedef GtkWidget *(*GDoDemoFunc) (void);
typedef struct _Demo Demo;
struct _Demo
{
gchar *title;
gchar *filename;
GDoDemoFunc func;
};
EOT
$array = "";
$first = 1;
for $file (@ARGV) {
($basename = $file) =~ s/\.c$//;
if ($first) {
$first = 0;
} else {
$array .= ",\n";
}
open INFO_FILE, $file or die "Cannot open '$file'\n";
$title = <INFO_FILE>;
$title =~ s@^\s*/\*\s*@@;
$title =~ s@\s*$@@;
close INFO_FILE;
print "GtkWidget *do_$basename (void);\n";
$array .= qq( { "$title", "$file", do_$basename });
}
print "\nDemo testgtk_demos[] = {";
print $array;
print "\n};\n";