Hi Eric,
Well, my purpose is to implement what mac users ask, and what does
recommand the Apple Aqua Human Interface Guidelines: this ismostly a Mac
OS X only need.
For that, I started a wiki page, describing the feature :
http://wiki.services.openoffice.org/wiki/Special:Search?search=proxy+Icon&go=Consulter
Of course, if the User Experience Team wants to join and help the Mac
porting effort, it is welcome :-)
The question should be the other way around. Our UX Team wrotes some
specifications regarding the title shown in the title bar. And OOo is a
corssover product (means it runs on windows, linux, solrais and now on
Mac). But all those platforms show the same title. Its up to our UX team
to decide if we change that for Mac - no problem so far. But then it
should be done inside the framework module and not inside VCL .-)
And then it must be implemented in framework also (might be
conditional with #ifdef MAC ... #endif) but not in VCL !
Sorry, you mean vcl of VCL (API ) ? About the #ifdef QUARTZ, if we
could avoid such #ifdef , I'b be happy :)
Seams we cant not :-(
As I've already said. The title implementation is a generic one used for
all platforms. If MAC wish to have it's own implementation ... we must
think about #ifdef QUARTZ ...
A VCL Window has to provide the possibility to set a title on a window
only .... not to create such title by itself .-)
The point is not to create the title itself, but to retrieve the
information internally.
Because the title is "not the file name" ... it's a title - it's never a
good idea to extract any informations from it. It's an UI feature (might
be localized) only. So please NEVER USE IT TO RETRIEVE ANYTHING FROM IT!
I'll try to explain more:
To implement a proxy icon, we basically need 4 things :
(??? What do you mean with "proxy icon" ? The icon shown inside the Dock?)
- a pointer on the window (trivial)
- be sure the window is a document (not a dialog box, nor help box .. )
- the full name of the corrent file, (even if not displayed)
- has the document been saved already
With all of that, I know what do, and since this is a Mac OS X feature
only ( maybe in Windows in 5 years ;) ) I tried to implement that
directly in vcl, but I was hesitating: implement a new method only used
on Mac OS X is maybe overengineering. Nevertheless, we'll respect the
advices from framework project.
I guess its not possible to implement that feature in VCL.
VCL does not have such context informations available (excepting the
window itself).
For me it looks like it MUST be a feature of the framework module.
There you will find the code where all documents (and it's related
windows) will be opened ... where its content will be changed ... where
you will be informed in case a document change its state from readonly
to modified or back ... etcpp.
There exists two possible solutions:
a) You implement it as an internal feature of OOo available all the time ...
b) or you implement an extension.
All informations you will need are provided by events triggered by the
framework/sfx project.
In the code, we have (vcl/aqua/source/window/salframe.cxx ) void
AquaSalFrame::SetTitle(const XubString& rTitle)
=> means we do not create the title, but we use what comes from sfx2
(afaic see in the back trace). Maybe the real thing is done elsewhere,
but this is secondary here.
Then in the above method, we do (this is Objective C, Mac OS X only) :
[mpWindow setTitle:pTitle];
What we can interpret as : the message setTitle, containing the
parameter pTitle ( an NSString created from the rTitle), is sent to the
Window
And we can read on top of the window : <file name> - <product> <module>
<debug info>
Instead of that, and to make the proxy icon appear, we could use
[mpWindow setTitleWithRepresentedFilename: pTitle];
=> The effect is to create the proxy icon *internally* to Mac OS X
system, said differently, nothing to do.
The problem is the current file name is not correct because it does
contain other informations ( - <product> <module> <debug info> ).
I can be wrong (please explain me), but a File name should IMHO contain
either the path + file name or the file name without the path, but not
what we currently have, and have another name if other information
completes it.
You are right - a file name should contain path+file name. But a window
has a title ... not a file name .-)
Path and File name can be retrieved from the model only ... and such
model isnt known in the context of VCL. Because VCL knows to handle
windows only ... independent if such windows are used to show documents
or not.
IMHO, this issue is framework relevant, and not user experience. That's
why I ask there :)
Last but not least, I fear there is another bug somewhere, because the
content of the file name is not predictable , and wrong in some cases.
Please describe more in detail what is your intention and what will be
the use case.
I tried, but if you meed more info, just ask.
Thanks,
Eric Bachard
Regards
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]