| 1543 | |
| 1544 | |
| 1545 | class WinPage(Frame): |
| 1546 | |
| 1547 | def __init__(self, master): |
| 1548 | super().__init__(master) |
| 1549 | |
| 1550 | self.init_validators() |
| 1551 | self.create_page_windows() |
| 1552 | self.load_windows_cfg() |
| 1553 | |
| 1554 | def init_validators(self): |
| 1555 | digits_or_empty_re = re.compile(r'[0-9]*') |
| 1556 | def is_digits_or_empty(s): |
| 1557 | "Return 's is blank or contains only digits'" |
| 1558 | return digits_or_empty_re.fullmatch(s) is not None |
| 1559 | self.digits_only = (self.register(is_digits_or_empty), '%P',) |
| 1560 | |
| 1561 | def create_page_windows(self): |
| 1562 | """Return frame of widgets for Windows tab. |
| 1563 | |
| 1564 | Enable users to provisionally change general window options. |
| 1565 | Function load_windows_cfg initializes tk variable idleConf. |
| 1566 | Radiobuttons startup_shell_on and startup_editor_on set var |
| 1567 | startup_edit. Entry boxes win_width_int and win_height_int set var |
| 1568 | win_width and win_height. Setting var_name invokes the default |
| 1569 | callback that adds option to changes. |
| 1570 | |
| 1571 | Widgets for WinPage(Frame): > vars, bound to self |
| 1572 | frame_window: LabelFrame |
| 1573 | frame_run: Frame |
| 1574 | startup_title: Label |
| 1575 | startup_editor_on: Radiobutton > startup_edit |
| 1576 | startup_shell_on: Radiobutton > startup_edit |
| 1577 | frame_win_size: Frame |
| 1578 | win_size_title: Label |
| 1579 | win_width_title: Label |
| 1580 | win_width_int: Entry > win_width |
| 1581 | win_height_title: Label |
| 1582 | win_height_int: Entry > win_height |
| 1583 | frame_cursor: Frame |
| 1584 | indent_title: Label |
| 1585 | indent_chooser: Spinbox > indent_spaces |
| 1586 | blink_on: Checkbutton > cursor_blink |
| 1587 | frame_autocomplete: Frame |
| 1588 | auto_wait_title: Label |
| 1589 | auto_wait_int: Entry > autocomplete_wait |
| 1590 | frame_paren1: Frame |
| 1591 | paren_style_title: Label |
| 1592 | paren_style_type: OptionMenu > paren_style |
| 1593 | frame_paren2: Frame |
| 1594 | paren_time_title: Label |
| 1595 | paren_flash_time: Entry > flash_delay |
| 1596 | bell_on: Checkbutton > paren_bell |
| 1597 | frame_format: Frame |
| 1598 | format_width_title: Label |
| 1599 | format_width_int: Entry > format_width |
| 1600 | """ |
| 1601 | # Integer values need StringVar because int('') raises. |
| 1602 | self.startup_edit = tracers.add( |
no outgoing calls
no test coverage detected
searching dependent graphs…