[gtk+/wip/css: 11/16] gtk-demo: Add a name property to the demos
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 11/16] gtk-demo: Add a name property to the demos
- Date: Wed, 23 May 2012 16:20:46 +0000 (UTC)
commit fd7282cb6b231a4a879d3426d68dca125b4aabaa
Author: Benjamin Otte <otte redhat com>
Date: Sun May 13 19:51:15 2012 +0200
gtk-demo: Add a name property to the demos
demos/gtk-demo/geninclude.pl.in | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/demos/gtk-demo/geninclude.pl.in b/demos/gtk-demo/geninclude.pl.in
index 48181b2..592aa98 100755
--- a/demos/gtk-demo/geninclude.pl.in
+++ b/demos/gtk-demo/geninclude.pl.in
@@ -7,6 +7,7 @@ typedef struct _Demo Demo;
struct _Demo
{
+ gchar *name;
gchar *title;
gchar *filename;
GDoDemoFunc func;
@@ -29,7 +30,7 @@ for $file (@ARGV) {
print "GtkWidget *do_$basename (GtkWidget *do_widget);\n";
- push @demos, {"title" => $title, "file" => $file,
+ push @demos, {"name" => $basename, "title" => $title, "file" => $file,
"func" => "do_$basename"};
}
@@ -57,7 +58,7 @@ foreach $href (@demos) {
$tmp = (defined @child_arrays)?($#child_arrays + 1):0;
push @child_arrays, "child$tmp";
- push @demos, {"title" => $parent_name, "file" => "NULL",
+ push @demos, {"name" => "NULL", "title" => $parent_name, "file" => "NULL",
"func" => "NULL"};
}
}
@@ -84,7 +85,7 @@ if (defined @parents) {
print ",\n";
}
- print qq ( { "$1", "$demos[$j]{file}", $demos[$j]{func}, NULL });
+ print qq ( { "$demos[$j]{name}", "$1", "$demos[$j]{file}", $demos[$j]{func}, NULL });
# hack ... ugly
$demos[$j]{"title"} = "foo";
@@ -138,9 +139,9 @@ foreach $href (@demos) {
if ($parents[$i] eq $href->{title}) {
if ($href->{file} eq 'NULL') {
- print qq ( { "$href->{title}", NULL, $href->{func}, $child_arrays[$i] });
+ print qq ( { NULL, "$href->{title}", NULL, $href->{func}, $child_arrays[$i] });
} else {
- print qq ( { "$href->{title}", "$href->{file}", $href->{func}, $child_arrays[$i] });
+ print qq ( { "$href->{name}", "$href->{title}", "$href->{file}", $href->{func}, $child_arrays[$i] });
}
$handled = 1;
@@ -153,7 +154,7 @@ foreach $href (@demos) {
next;
}
- print qq ( { "$href->{title}", "$href->{file}", $href->{func}, NULL });
+ print qq ( { "$href->{name}", "$href->{title}", "$href->{file}", $href->{func}, NULL });
}
print ",\n";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]