1 [+ autogen5 template
+]
3 [+INCLUDE (string
-append
"licenses/" (get
"License") ".tpl") \
+]
4 [+INCLUDE (string
-append
"indent.tpl") \
+]
5 # [+INVOKE EMACS-MODELINE MODE="Python; coding: utf-8" +]
6 [+INVOKE START
-INDENT\
+]
9 # Copyright (C) [+(shell "date +%Y")+] [+Author+][+IF (get "Email")+] <[+Email+]>[+ENDIF+]
11 [+INVOKE LICENSE
-DESCRIPTION PFX
="# " PROGRAM
=(get
"Name") OWNER
=(get
"Author") \
+]
13 from gi
.repository
import Gtk
, GdkPixbuf
, Gdk
16 [+IF (=(get
"HaveBuilderUI") "1")+]
17 #Comment the first line and uncomment the second before installing
18 #or making the tarball (alternatively, use project variables)
19 UI_FILE
= "src/[+NameHLower+].ui"
20 #UI_FILE = "/usr/local/share/[+NameHLower+]/ui/[+NameHLower+].ui"
25 [+IF (=(get
"HaveBuilderUI") "1")+]
26 self
.builder
= Gtk
.Builder()
27 self
.builder
.add_from_file(UI_FILE
)
28 self
.builder
.connect_signals(self
)
30 window
= self
.builder
.get_object('window')
33 window
.set_title ("Hello World")
34 window
.connect_after('destroy', self
.on_window_destroy
)
39 def on_window_destroy(self
, window
):
46 if __name__
== "__main__":
48 [+INVOKE END
-INDENT\
+]