Do some None loving.
[python-gnt.git] / gendef.sh
blobb8dcce6e9f55826670be02589b579dd705539ed2
1 #!/bin/sh
2 FILES="
3 gntwidget.h
4 gntbindable.h
5 gntbox.h
6 gntbutton.h
7 gntcheckbox.h
8 gntclipboard.h
9 gntcolors.h
10 gntcombobox.h
11 gntentry.h
12 gntfilesel.h
13 gntkeys.h
14 gntlabel.h
15 gntline.h
16 gntmarshal.h
17 gntmenu.h
18 gntmenuitem.h
19 gntmenuitemcheck.h
20 gntslider.h
21 gntstyle.h
22 gnttextview.h
23 gnttree.h
24 gntutils.h
25 gntwindow.h
26 gntwm.h
27 gntws.h
28 gnt.h"
30 # Generate the def file
31 rm -f gnt.def
32 for file in $FILES
34 echo -n "Generating definitions for ${file} ... "
35 python /usr/share/pygtk/2.0/codegen/h2def.py gnt/$file >> gnt.def
36 echo "Done"
37 done
39 # Remove the definitions about the enums
40 ENUMS="
41 GNT_TYPE_ALIGNMENT
42 GNT_TYPE_COLOR_TYPE
43 GNT_TYPE_MENU_TYPE
44 GNT_TYPE_STYLE
45 GNT_TYPE_KEY_PRESS_MODE
46 GNT_TYPE_ENTRY_FLAG
47 GNT_TYPE_TEXT_FORMAT_FLAGS
48 GNT_TYPE_TEXT_VIEW_FLAG
49 GNT_TYPE_WIDGET_FLAGS
52 for enum in $ENUMS
54 sed -ie s/^.*gtype-id\ \"$enum\".*$//g gnt.def
55 done