-
Notifications
You must be signed in to change notification settings - Fork 130
ProgramStructure
johanv edited this page Sep 17, 2012
·
3 revisions
Let's try to find out the basics of Hotot. It's a try, I am clueless as always :-)
The main python script is hotot.py. It creates the main window and the menu at the top. It registers to dbus, and defines the actions to be performed when e.g. a button is clicked.
The rest of the window (below the menu) is a specialisation of WebView (a class from webkit), which is defined in view.py. It implements how clicked uri's are handled, and in particular redirects 'hotot:*' uri's to agent.py.
I think the actual loading of the html in the webview, happens here:
templatefile = utils.get_ui_object(config.TEMPLATE)
template = open(templatefile, 'rb').read()
self.load_html_string(template, 'file://' + templatefile)
It opens index.html;