2010/5/16 Eliot Miranda <eliot.miranda@gmail.com>


2010/5/16 Mariano Martinez Peck <marianopeck@gmail.com>


On Sun, May 16, 2010 at 4:42 PM, Lukas Renggli <renggli@gmail.com> wrote:
I asked the same question a few weeks back and the only working
solution I found was to patch the window size in the image file. The
actual implementation is from Max Leske:

� � http://github.com/renggli/builder/blob/master/scripts/resize-window.sh


OMG. WHAT A HACK!!!!��� but works hahahah. I cannot believe such thing could work...but in fact, it does!

It is sad this cannot be done with Smalltalk, just evaluating something in the image.

? Why do you assume it can't be done in Smalltalk?

Just because we didn't get an answer before ;)

shrinkDisplayInImageFile: imageFileName

�� � � �| fs |
�� � � �fs := StandardFileStream fileNamed: imageFileName.
�� � � �fs binary.
�� � � �[fs position: 24.
�� � � � SmalltalkImage current isLittleEndian
�� � � � � � � �ifTrue:
�� � � � � � � � � � � �[fs nextLittleEndianNumber: 4 put: (1024 bitShift: 16) + 768. "Display size"
�� � � � � � � � � � � � fs nextLittleEndianNumber: 4 put: 0. "full-screen flag (off)"]
�� � � � � � � �ifFalse:
�� � � � � � � � � � � �[self error: 'not yet implemented']]
�� � � � � � � �ensure: [fs close]! !


Cool. It works, but ONLY appling it to another image....which in such case I rather shell :(

I tried:


�� | fs |
������� fs := StandardFileStream fileNamed: (SmalltalkImage current imageName).
������� fs binary.
������� [fs position: 24.
�������� SmalltalkImage current isLittleEndian
��������������� ifTrue:
����������������������� [fs nextLittleEndianNumber: 4 put: (1024 bitShift: 16) + 768. "Display size"
������������������������ fs nextLittleEndianNumber: 4 put: 0. "full-screen flag (off)"]
��������������� ifFalse:
����������������������� [self error: 'not yet implemented']]
��������������� ensure: [fs close]


Notice the (SmalltalkImage current imageName).
but didn't work. Is this expected? Is there a way to change the current image?

Thanks!

Mariano

Thanks!

Mariano


Lukas

2010/5/16 Mariano Martinez Peck <marianopeck@gmail.com>:
> I know I already asked this, but I didn't get a working solution. I want to
> change the default size of the host windows that runs on Pharo. Does someone
> know how to do that?
>
> I attach the 2 screenshots: what I have, and what I want.
>
> Thanks
>
> mariano
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project