def __init__(self, args, lang_str): self.lang_str = lang_str self.running_windows = [] self.embfiles_id = 0 self.systray_active = False if args.export_to_html_dir: if args.filepath: ghost_window = core.CherryTree(self.lang_str, args.filepath, args.node, self, True, True, True) ghost_window.export_to_html("Auto", args.export_to_html_dir, args.export_overwrite) else: print "Export error: input not specified" elif args.export_to_txt_dir: if args.filepath: ghost_window = core.CherryTree(self.lang_str, args.filepath, args.node, self, True, True, True) ghost_window.export_to_txt_multiple("Auto", args.export_to_txt_dir, args.export_overwrite) else: print "Export error: input not specified" else: self.window_open_new(args.filepath, args.node, True, True if args.filepath else False) self.server_check_timer_id = gobject.timeout_add( 1000, self.server_periodic_check) # 1 sec
def window_open_new(self, filepath, node_name, is_startup, is_arg): """Open a new top level Window""" window = core.CherryTree(self.lang_str, filepath, node_name, self, is_startup, is_arg, False) self.running_windows.append(window)