'Set up the elements on the main dialog. Check the environment of
current operating system and current session.
* Load server list from a configuration file under working directory.
* Try to load the hosts data file under working directory if it
exists.
.. note:: IF hosts data file does not exists correctly in current
working directory, a warning message box would popup. And
operations to change the hosts file on current system could be
done only until a new data file has been downloaded.
.. seealso:: Method :meth:`~tui.hostsutil.HostsUtil.__init__` in
:class:`~tui.hostsutil.HostsUtil` class.'

def init_main(self):

    self.ui.SelectMirror.clear()
    self.set_version()
    self.mirrors = CommonUtil.set_network('network.conf')
    self.set_mirrors()
    try:
        RetrieveData.unpack()
        RetrieveData.connect_db()
        self.set_func_list(1)
        self.refresh_func_list()
        self.set_info()
    except IOError:
        self.warning_no_datafile()
    except BadZipfile:
        self.warning_incorrect_datafile()
    self.check_writable()
    self.init_flag += 1
