[squeak-dev] Preferences ignoreStyleIfOnlyBold

Frank Shearar frank.shearar at gmail.com
Tue Dec 31 13:20:26 UTC 2013


On 30 December 2013 22:43, Chris Muller <asqueaker at gmail.com> wrote:
> A preference to make "cut and pasting" of code easier?  And this on
> top of the fact that we have a hot-key to remove all formatting
> (Cmd+0).
>
> On top of that, Shout makes it irrelevant doesn't it?  It does not
> appear Shout can even be disabled anymore --
> #syntaxHighlightingAsYouType has no effect and no senders.

You could give this preference teeth once more, I think, by adjusting
PluggableTextMorphPlus >> #okToStyle:

okToStyle
    styler ifNil:[^false].
    (model respondsTo: #aboutToStyle: ) ifFalse:[^true].
    SHTextStylerST80 syntaxHighlightingAsYouType ifFalse: [^ true].
    ^model aboutToStyle: styler

(You could of course use 'Smalltalk classNamed: #SHTextStylerST80' and
so on, which would prevent a "static" dependency on ShoutCore.)

This would let morphs respond instantly to a preference change. Or you
could change MorphicToolBuilder >> #buildPluggableCodePane: so that it
only sent #useDefaultStyler when the preference was set to true.

If you cared that strongly about NOT styling your code.

frank

> On Mon, Dec 30, 2013 at 4:28 PM, karl ramberg <karlramberg at gmail.com> wrote:
>> When saving a method with bold font you will not get asked if you want to
>> save/ preserve the font style.
>>
>> When copy pasting you can get a method selectors in bold somewhere in the
>> code. Most likely you will not want to keep that formatting.
>>
>> Karl
>>
>>
>> On Mon, Dec 30, 2013 at 10:13 PM, Chris Muller <asqueaker at gmail.com> wrote:
>>>
>>> Do we even want to keep this preference?  What is it for?  The
>>> description tells us _what_ it does, not why it does it...
>>>
>>> On Sun, Dec 29, 2013 at 1:56 PM, Frank Shearar <frank.shearar at gmail.com>
>>> wrote:
>>> > I want to turn this into a pragma-based preference. I don't know on
>>> > which class to hang the preference though. On Text?
>>> >
>>> > I'd be happy with adding Text >> #ignoreStyleIfOnlyBold because (a)
>>> > Text is the only sender and (b) Text is all about styling.
>>> >
>>> > (The ulterior motive is that adding Text >> #ignoreStyleIfOnlyBold
>>> > breaks another strand in the Collections -> System dependency.)
>>> >
>>> > frank
>>> >
>>>
>>
>>
>>
>>
>


More information about the Squeak-dev mailing list