예제 #1
0
파일: __init__.py 프로젝트: bcl/anaconda
        def _prep_check(i, entry):
            number = tui.TextWidget("%2d)" % i)
            value = getdeepattr(self.args, entry.attribute)
            ch = tui.CheckboxWidget(title=_(entry.title),
                                    completed=bool(value))

            return tui.ColumnWidget([(3, [number]), (None, [ch])], 1)
예제 #2
0
파일: __init__.py 프로젝트: bcl/anaconda
        def _prep_text(i, entry):
            number = tui.TextWidget("%2d)" % i)
            title = tui.TextWidget(_(entry.title))
            value = getdeepattr(self.args, entry.attribute)
            value = tui.TextWidget(value)

            return tui.ColumnWidget([(3, [number]), (None, [title, value])], 1)
예제 #3
0
파일: __init__.py 프로젝트: bcl/anaconda
        def _prep_password(i, entry):
            number = tui.TextWidget("%2d)" % i)
            title = tui.TextWidget(_(entry.title))
            value = ""
            if len(getdeepattr(self.args, entry.attribute)) > 0:
                value = _("Password set.")
            value = tui.TextWidget(value)

            return tui.ColumnWidget([(3, [number]), (None, [title, value])], 1)
예제 #4
0
파일: __init__.py 프로젝트: jn7163/anaconda
    def refresh(self, args=None):
        """This methods fills the self._window list by all the objects
        we want shown on this screen. Title and Spokes mostly."""
        TUIObject.refresh(self, args)

        def _prep(i, w):
            number = tui.TextWidget("%2d)" % i)
            return tui.ColumnWidget([(3, [number]), (None, [w])], 1)

        # split spokes to two columns
        left = [_prep(i, w) for i, w in self._keys.iteritems() if i % 2 == 1]
        right = [_prep(i, w) for i, w in self._keys.iteritems() if i % 2 == 0]

        c = tui.ColumnWidget([(39, left), (39, right)], 2)
        self._window.append(c)

        return True
예제 #5
0
파일: __init__.py 프로젝트: jn7163/anaconda
 def _prep(i, w):
     number = tui.TextWidget("%2d)" % i)
     return tui.ColumnWidget([(3, [number]), (None, [w])], 1)