Skip to content

Idle: Enhance font change notification system #65116

Open

Description

@terryjreedy
BPO 20917
Nosy @terryjreedy, @roseman
Dependencies
  • bpo-32831: IDLE: Add docstrings and tests for codecontext
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = None
    created_at = <Date 2014-03-13.20:04:57.653>
    labels = ['3.8', 'expert-IDLE', 'type-bug', '3.7']
    title = 'Idle: Enhance font change notification system'
    updated_at = <Date 2018-03-12.23:24:33.298>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2018-03-12.23:24:33.298>
    actor = 'cheryl.sabella'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2014-03-13.20:04:57.653>
    creator = 'terry.reedy'
    dependencies = ['32831']
    files = []
    hgrepos = []
    issue_num = 20917
    keywords = []
    message_count = 4.0
    messages = ['213453', '213456', '250542', '298079']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'markroseman']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'test needed'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue20917'
    versions = ['Python 3.7', 'Python 3.8']

    Activity

    1. terryjreedy commented on Mar 13, 2014

      @terryjreedy
      MemberAuthor

      If one changes the font in the Idle Preferences dialog, all open windows are somehow notified and they immediately respond. Classes defined in extensions do not get notified. So CodeContext sets up a polling loop. Roger Serwy's line number extension (posted to bpo-17535) copied the polling hack. It would be better to enhance the the notification mechanism to either generate an event that could be caught or setup a callback registry.

    2. added
      type-bug
      on Mar 13, 2014
    3. terryjreedy commented on Mar 13, 2014

      @terryjreedy
      MemberAuthor

      Changing CodeContext.py to drop the font polling and use the new mechanism is part of this issue. Such a change would effectively be part of its test.

    4. roseman commented on Sep 12, 2015

      rosemanmannequin
      Mannequin

      The new 'component' infrastructure provides the mechanism for passing these kinds of notifications around. Allowing extensions (in whatever form they'll exist with the new stuff) to take part in this notification mechanism would be a small (and sensible) addition to that.

    5. self-assigned this
      on Jun 19, 2017
    6. terryjreedy commented on Jul 10, 2017

      @terryjreedy
      MemberAuthor

      I believe I saw somewhere that the 'somehow' in the opening post is looping through the windows listed under the Window tab.

      This issue was inspired by bpo-17642, which allows hotkeys (^-, ^+) and wheel to change font size in editor window. If the size change only applies to the current window, then only the CodeContext for that window should be notified. If CodeContext becomes a feature rather than extension, bpo-27099, then code editor windows could know they have a code context and notify it when they get notified. That will not help external extensions.

    7. transferred this issue fromon Apr 10, 2022
    8. removed
      3.8 (EOL)
      3.7 (EOL)
      on Aug 6, 2024
    9. added
      type-feature
      and removed
      type-bug
      on Jul 3, 2026
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    topic-IDLEtype-feature

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions