def new_window(): w = ScanWindow() w.connect("destroy", _destroy_callback) if is_maemo(): import hildon hildon_app = hildon.Program() hildon_app.add_window(w) open_windows.append(w) return w