discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ANN: PhotoClip-0.1 - yet another image viewer.


From: Vaisburd, Haim
Subject: RE: ANN: PhotoClip-0.1 - yet another image viewer.
Date: Tue, 26 Aug 2003 14:48:34 -0700

Hi,

PUYDT Julien wrote:

> I'm a beginner

Me too, as far as GNUstep is concerned

> * most of createWindow in AppController.m is a comment, is there some
> problem with that code?

These are the remnants of the early attemts to create a bare-bone
application, not relevant any more

> * in applicationWillFinishLaunching (same file), you don't open all file
> given on command-line, but only the first, I think it is a little bug;

"a feature" :-)
It's intentionally: when you open a file, you really open a whole
directory behind the scenes, then you can go "next" and "previous"
Only one file can be displayed at a time. So if your other files
are in the same directory as the first they will be there,
if not - I do not know how to handle this situation anyway
and so they are rightfully ignored. We can think, maybe with command
line arguments the application behavior should be different.

> * it looks like you do the same later in open (same file): you select
> only the first object in the selection from the panel;

...and I'm supposed to initialize the file ring at the same time.
I was unable to have multiple file selection on my machine, by the way.

> * in fact, you specifically ask the panel _not_ to let the user choose
> directories... wouldn't it be possible to handle that as a FileRing on
> that directory, opening the first image in it?

Yes, this is a bug. Also command-line argument might have accepted a
directory name.

> * I don't understand your PhMakePath method in FileRing.m, could you
> explain?

NSString * PhMakePath(NSString * dir, NSString * path)
{
    if ( [path isAbsolutePath] == NO )
        path = [dir stringByAppendingPathComponent: path];

    return path;
}

Makes an absolute path from 'path'. If 'path' is an absolute path
already, ignores the 'dir' and returns 'path'. If not (i.e., it's
a relative path), concatenates 'dir' and 'path' and returns the result.

Are you concerned about the override of the local 'path' variable?

> * in ImageWindow.m, in setImageFromFile: you don't check if
> initWithContentsOfFile was successful before using the image to change
> the view, etc... how do you know it will succeed?

I do not know how to check that. Please help, anybody.

> * in PictureView.m, initWithFrame sets the original size to 0,0;
> wouldn't it be possible to take the rect's size?

The view should accept the rectangle of it's window, as far as I understand.
It seemed then cleaner to specify the size only once, at the window level.

> * I opened little png, but still had the big window;

Are you able to see the png image though? I'm not..

The window size is constant for the application and does not change
from image to image. It's created as 4/5 of your total desktop size.
When the image is bigger that the window, it's scaled to fit (and centered).
If smaller, it's just centered.

This is by design. Imagine the window is imbedded into a bigger one,
so you cannot or do not want to control the size ;-)

> * rotations didn't quite work as expected...

That's what I want to hear more about! That's serious.
What are your gnustep versions? What backend do you use?


> Sorry if it isn't exactly the type of comments you were expecting,

This is more than I expected :-)

Tima.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]