'Calculate the module configuration byte words by the selection from
function list on the main dialog.'

def set_config_bytes(self):

    ip_flag = self.settings[1][1]
    selection = {}
    localhost_word = {'Windows': 1, 'Linux': 2, 'Unix': 2, 'OS    X': 4}[self.platform]
    selection[2] = localhost_word
    ch_parts = [8, (32 if ip_flag else 16), 64]
    if os.path.isfile(self.custom):
        ch_parts.insert(0, 4)
    slices = self.slices[ip_flag]
    for (i, part) in enumerate(ch_parts):
        part_cfg = self._funcs[ip_flag][slices[i]:slices[(i + 1)]]
        part_word = 0
        for (i, cfg) in enumerate(part_cfg):
            part_word += (cfg << i)
        selection[part] = part_word
    self.make_cfg = selection
