python / cpython

The Python programming language
https://www.python.org/
Other
60k stars 29.04k forks source link

MacOS 8.1 support in IDE, W #35660

Closed c6c71741-8484-44b6-add1-0056c4452cb6 closed 22 years ago

c6c71741-8484-44b6-add1-0056c4452cb6 commented 22 years ago
BPO 488749
Nosy @jackjansen
Files
  • Wpatches.diff: Diffs for Wcontrols/Wtext/Wlists.py
  • 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: ```python assignee = None closed_at = created_at = labels = ['OS-mac'] title = 'MacOS 8.1 support in IDE, W' updated_at = user = 'https://bugs.python.org/jasonharper' ``` bugs.python.org fields: ```python activity = actor = 'jackjansen' assignee = 'jvr' closed = True closed_date = None closer = None components = ['macOS'] creation = creator = 'jasonharper' dependencies = [] files = ['3800'] hgrepos = [] issue_num = 488749 keywords = ['patch'] message_count = 5.0 messages = ['38301', '38302', '38303', '38304', '38305'] nosy_count = 3.0 nosy_names = ['jackjansen', 'jvr', 'jasonharper'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue488749' versions = [] ```

    c6c71741-8484-44b6-add1-0056c4452cb6 commented 22 years ago

    These patches allow the IDE and W framework to continue working under MacOS 8.1.

    All calls to (Get|Set)ControlViewSize are allowed to silently fail with a NotImplementedError - they're only relevant with proportional scrollbars, which appeared in 8.5.

    8.1 doesn't support (Get|Set)Control32Bit(Value|Minimum| Maximum), so always use or fall back to the original 16- bit versions when possible. (The 16-bit calls are listed as fully supported under Carbon, so this shouldn't introduce any compatibility problems.) The only time a control is likely to need a full 32-bit parameter is a scrollbar for a very tall document: errors will occur when trying to edit a file taller than 32K pixels (2500+ lines of 9-point text) under 8.1, but this bug doesn't prevent the file from being saved.

    Made 32-bit control parameters work better on the system versions that do support them: large values can be passed to the ControlWidget constructor, in which case NewControl is called with zeros, and the actual value then set via a 32-bit call.

    Changed Wtext's scrollbar routines to explicitly disable scrollbars when their max is \<= their min (which is automatically done in later systems, I don't think there will be any problem with this being done twice).

    Fixed up Appearance support for Wlists, they now fully use Appearance frames & focusing.

    Tried to do the same for Wtext, but ran into some problems - there are lots of places that assume that an EditText's border is exactly one pixel thick and located just inside the widget bounds (for example, the line number field in PyEditor windows). I left my commented- out changes in the code for the benefit of anyone who tries to fix this later, but for now the frame of EditText boxes is still a Qd.FrameRect.

    I have NOT tested these patches with anything except 8.1. Running the Panes or Two Lists widget demo, and tabbing/resizing/deactivating/activating the window, will exercise most of the changes I've made.

    jackjansen commented 22 years ago

    Logged In: YES user_id=45365

    Just, I had a quick look at this patch (only a look, not tried it) and to me it looks fine. Jason did this patch on my request, so that 2.2 will run on MacOS 8.1 (it'll be the last MacPython to run on that system). Could you have a look at these and apply them, or assign them back to me if you don't have the time? You definitely should have a look at the frame stuff, which is over my head.

    0aa1c2b5-8e64-4988-b25b-7db15cdc7c29 commented 22 years ago

    Logged In: YES user_id=92689

    Thanks for this patch: looks good to me. Jack: is it easy for you to check it in? For me it's not. Alternatively: Jason: could you send me the modified files? Thanks.

    jackjansen commented 22 years ago

    Logged In: YES user_id=45365

    I'll check it in and assign it back to you (Just) for testing.

    jackjansen commented 22 years ago

    Logged In: YES user_id=45365

    Checked in, and done minimal testing (IDE still runs:-), I'll leave real testing and possibly integration of the Wtext mods to you.