You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Jürgen Schmidt <jo...@googlemail.com> on 2012/02/29 15:32:30 UTC

[CODE]: changed about box

Hi,

i have changed the about dialog box a little bit and would like to get 
your feedback.

I added a new key in the version.ini/versionrc

Revision=<svn_revison_number>

But after some experimenting I don't use this key right now but left it 
in the version file for further references to the underlying revision.

I changed the value of buildid in the version file to

e.g. versionrc
###
buildid=340dev1 (Revision:1294675)
# instead of
buildid=340dev1(Build:9586)
###

The minor.mk includes
###
RSCVERSION=340
RSCREVISION=340dev1(Build:9586)
BUILD=9586
LAST_MINOR=dev1
SOURCEVERSION=AOO340
###

I haven't yet understand completely where the values are used and 
decided to adapt the replacement in scriptitems.pm for now.

Ariel mentioned already some problems on windows if we simply change the 
4 digit buildid to the svn revision.

In the end I modified my --with-build-version switch and drop the 
revision from here. I like the date and time in the about box. As we 
have seen earlier today with the windows dev snapshot it can be very 
useful to check easy and fast if the correct build were used.

Ok I also changed the background color of this text field because it 
looked strange before (at least on MacOS).

The result on MacOS can you review here 
http://people.apache.org/~jsc/screenshots/about_dialog.png

More rework on the about box will be done for future versions. But for a 
3.4 I think it should be ok now.

Any opinions?

Juergen

Re: [CODE]: changed about box

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 3/8/12 4:39 PM, Ariel Constenla-Haile wrote:
> On Thu, Mar 08, 2012 at 11:37:48AM -0300, Ariel Constenla-Haile wrote:
>> Another issue is the path to the repo: now it is determined by
>>
>> File::Spec->catfile($ENV{'SRC_ROOT'}, File::Spec->updir())
>>
>> Moving one dir. up trunk/main will only work if you checked trunk
>> instead of separated repos.
>> So moving one dir. up can be avoided: both svn and git work in
>> subdirectories inside the repo; I've tested with:
>>
>> export SRC_ROOT=/mnt/build/aoo/trunk/main/instsetoo_native/prj
>>
>> and it works with the attached print-sv-rev-pl, both with git and svn,
>> even invoking just
>>
>> SvnRevision::DetectRevisionId($ENV{'SRC_ROOT'})
>

I don't think so, it doesn't cover changes in extras or ext_libraries. 
Whereas when I run svn info in trunk it will give me the latest changes.

And I think this is the revision we want to have included.


> Forgot to mention that if you allow non-trunk repos, then the reg. exp.
> must change.
> Now /^\s*git-svn-id:.*?trunk@([0-9]+)\s+/ expects something like:
>
> git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk@1296429
>
> while if checking main it would be
>
> git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk/main@1296429
>
> and the reg. exp. won't match. It should be changed to:
> /^\s*git-svn-id:.*?@([0-9]+)\s+/
>
> On the other hand, I don't get why you use git show HEAD and not just
> git svn info

because of having a cleantrunk git repo locally where I clone my working 
copies from.

On the cloned repo git svn info don't work.

Juergen

Re: [CODE]: changed about box

Posted by Ariel Constenla-Haile <ar...@apache.org>.
On Thu, Mar 08, 2012 at 11:37:48AM -0300, Ariel Constenla-Haile wrote:
> Another issue is the path to the repo: now it is determined by 
> 
> File::Spec->catfile($ENV{'SRC_ROOT'}, File::Spec->updir())
> 
> Moving one dir. up trunk/main will only work if you checked trunk
> instead of separated repos.
> So moving one dir. up can be avoided: both svn and git work in
> subdirectories inside the repo; I've tested with:
> 
> export SRC_ROOT=/mnt/build/aoo/trunk/main/instsetoo_native/prj
> 
> and it works with the attached print-sv-rev-pl, both with git and svn,
> even invoking just
> 
> SvnRevision::DetectRevisionId($ENV{'SRC_ROOT'})

Forgot to mention that if you allow non-trunk repos, then the reg. exp. 
must change. 
Now /^\s*git-svn-id:.*?trunk@([0-9]+)\s+/ expects something like:

git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk@1296429

while if checking main it would be

git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk/main@1296429

and the reg. exp. won't match. It should be changed to:
/^\s*git-svn-id:.*?@([0-9]+)\s+/

On the other hand, I don't get why you use git show HEAD and not just
git svn info


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [CODE]: changed about box

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 3/8/12 3:37 PM, Ariel Constenla-Haile wrote:
> Hi Jürgen,
>
> On Wed, Feb 29, 2012 at 03:32:30PM +0100, Jürgen Schmidt wrote:
>> Hi,
>>
>> i have changed the about dialog box a little bit and would like to
>> get your feedback.
>>
>> I added a new key in the version.ini/versionrc
>>
>> Revision=<svn_revison_number>
>> Any opinions?
>
> Getting the revision does not work with a Git repo on Fedora 16 and
> Ubuntu 10.04.3 LTS.
> On these distros, subversion output when there is no subversion repo
> does not match what the code in sub DetectRevisionId expects, it
> outputs:
>
> svn: '.' is not a working copy
>
> It looks like checking for the program output may be error prone (it
> would be better to check the exit code, different subversion versions
> may output different things, even localized text).

I agree that would be better

>
>
> Another issue is the path to the repo: now it is determined by
>
> File::Spec->catfile($ENV{'SRC_ROOT'}, File::Spec->updir())
>
> Moving one dir. up trunk/main will only work if you checked trunk
> instead of separated repos.
> So moving one dir. up can be avoided: both svn and git work in
> subdirectories inside the repo; I've tested with:
>
> export SRC_ROOT=/mnt/build/aoo/trunk/main/instsetoo_native/prj
>
> and it works with the attached print-sv-rev-pl, both with git and svn,
> even invoking just
>
> SvnRevision::DetectRevisionId($ENV{'SRC_ROOT'})
>
>
see my other email, I think that don't work reliable for us

> Another issue: if the revision is not detected for some reason (like the
> error above, or the developer is working with the source distribution
> - it has the repo folders stripped), the about dlg should not show an
> empty " - Rev. ", the string length should be checked before.
>
that make sense

Juergen

>
> Patch is attached, I won't commit it as it needs further changes.
>
>
> Regards


Re: [CODE]: changed about box

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Jürgen,

On Wed, Feb 29, 2012 at 03:32:30PM +0100, Jürgen Schmidt wrote:
> Hi,
> 
> i have changed the about dialog box a little bit and would like to
> get your feedback.
> 
> I added a new key in the version.ini/versionrc
> 
> Revision=<svn_revison_number>
> Any opinions?

Getting the revision does not work with a Git repo on Fedora 16 and
Ubuntu 10.04.3 LTS.
On these distros, subversion output when there is no subversion repo
does not match what the code in sub DetectRevisionId expects, it
outputs:

svn: '.' is not a working copy

It looks like checking for the program output may be error prone (it
would be better to check the exit code, different subversion versions
may output different things, even localized text).


Another issue is the path to the repo: now it is determined by 

File::Spec->catfile($ENV{'SRC_ROOT'}, File::Spec->updir())

Moving one dir. up trunk/main will only work if you checked trunk
instead of separated repos.
So moving one dir. up can be avoided: both svn and git work in
subdirectories inside the repo; I've tested with:

export SRC_ROOT=/mnt/build/aoo/trunk/main/instsetoo_native/prj

and it works with the attached print-sv-rev-pl, both with git and svn,
even invoking just

SvnRevision::DetectRevisionId($ENV{'SRC_ROOT'})


Another issue: if the revision is not detected for some reason (like the
error above, or the developer is working with the source distribution
- it has the repo folders stripped), the about dlg should not show an
empty " - Rev. ", the string length should be checked before.


Patch is attached, I won't commit it as it needs further changes.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [CODE]: changed about box

Posted by "Marcus (OOo)" <ma...@wtnet.de>.
Am 02/29/2012 03:32 PM, schrieb Jürgen Schmidt:
> Hi,
>
> i have changed the about dialog box a little bit and would like to get
> your feedback.
>
> I added a new key in the version.ini/versionrc
>
> Revision=<svn_revison_number>
>
> But after some experimenting I don't use this key right now but left it
> in the version file for further references to the underlying revision.
>
> I changed the value of buildid in the version file to
>
> e.g. versionrc
> ###
> buildid=340dev1 (Revision:1294675)
> # instead of
> buildid=340dev1(Build:9586)
> ###

If the space is a real problem, then simple avoid it. I don't see any 
problems from the usability point of view.

> The minor.mk includes
> ###
> RSCVERSION=340
> RSCREVISION=340dev1(Build:9586)
> BUILD=9586
> LAST_MINOR=dev1
> SOURCEVERSION=AOO340
> ###
>
> I haven't yet understand completely where the values are used and
> decided to adapt the replacement in scriptitems.pm for now.
>
> Ariel mentioned already some problems on windows if we simply change the
> 4 digit buildid to the svn revision.
>
> In the end I modified my --with-build-version switch and drop the
> revision from here. I like the date and time in the about box. As we
> have seen earlier today with the windows dev snapshot it can be very
> useful to check easy and fast if the correct build were used.

+1

> Ok I also changed the background color of this text field because it
> looked strange before (at least on MacOS).
>
> The result on MacOS can you review here
> http://people.apache.org/~jsc/screenshots/about_dialog.png

I agree with Andrea, indeed a nice work that should become reality.

And to make the text parts copy & paste able would be really helpful.

> More rework on the about box will be done for future versions. But for a
> 3.4 I think it should be ok now.

Right.

> Any opinions?

OOo 3.3 doesn't seem to have a hint to the used license. Neither in the 
About dialog nor in the help. So, a hint of the used license would be 
good and IMHO a perfect place there. Example:

"Apache OpenOffice is provided under the [Apache License, Version 2.0  | 
http://www.apache.org/licenses/] (ALv2)."


Ciao

Marcus


Re: [CODE]: changed about box

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On Thu, Mar 1, 2012 at 5:56 PM, Ariel Constenla-Haile <ar...@apache.org>wrote:

> Hi Jürgen,
>
> On Thu, Mar 01, 2012 at 05:32:50PM +0100, Jürgen Schmidt wrote:
> > And no I wasn't able to figure out how to make the build info copyable
> :-(
>
> maybe writing all text in a single ExtMultiLineEdit
>
> svtools/inc/svtools/svmedit2.hxx
> svtools/source/edit/svmedit2.cxx
>
> Simple use example in the templates dialog:
> class SvtExtendedMultiLineEdit_Impl : public ExtMultiLineEdit
>
> svtools/source/contnr/templwin.hxx
> svtools/source/contnr/templwin.cxx
>
> Replacing the FixedText controls and the MultiLineEdit by a single
> ExtMultiLineEdit will make all text selectable.
>

I thought in this direction as well and tried to change the color but
without success. At least on my Mac it looked not really nice with the grey
dialog and the white multiline edit field.

I hope we can find a better solution for the future. Did I menitoned that I
will never beocme a friend of VCL ;-)

Juergen


>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>

Re: [CODE]: changed about box

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Jürgen,

On Thu, Mar 01, 2012 at 05:32:50PM +0100, Jürgen Schmidt wrote:
> And no I wasn't able to figure out how to make the build info copyable :-(

maybe writing all text in a single ExtMultiLineEdit

svtools/inc/svtools/svmedit2.hxx
svtools/source/edit/svmedit2.cxx

Simple use example in the templates dialog:
class SvtExtendedMultiLineEdit_Impl : public ExtMultiLineEdit

svtools/source/contnr/templwin.hxx
svtools/source/contnr/templwin.cxx

Replacing the FixedText controls and the MultiLineEdit by a single
ExtMultiLineEdit will make all text selectable.

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [CODE]: changed about box

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 3/1/12 5:24 PM, Ariel Constenla-Haile wrote:
> Hi Jürgen,
>
> On Wed, Feb 29, 2012 at 04:10:43PM +0100, Jürgen Schmidt wrote:
>> On 2/29/12 3:32 PM, Jürgen Schmidt wrote:
>>> Hi,
>>>
>>> i have changed the about dialog box a little bit and would like to get
>>> your feedback.
>>>
>>> I added a new key in the version.ini/versionrc
>>>
>>> Revision=<svn_revison_number>
>>>
>>> But after some experimenting I don't use this key right now but left it
>>> in the version file for further references to the underlying revision.
>>>
>>> I changed the value of buildid in the version file to
>>>
>>> e.g. versionrc
>>> ###
>>> buildid=340dev1 (Revision:1294675)
>>> # instead of
>>> buildid=340dev1(Build:9586)
>>> ###
>>>
>>
>> I learned from Oliver that the space is not good. The "buildid" from
>> the version file is used to generate the<meta-generator>  entry in
>> the ODF docs.
>>
>> Example:
>> <meta:generator>OpenOffice.org/3.4$Unix
>> OpenOffice.org_project/340dev1$Rev-1294675</meta:generator
>>
>> That means the space have to be removed and probably more work is
>> necessary.
>>
>> Maybe I should switch back to my experiment with the "Revision" key
>> and adapt the code for the about box.
>>
>> I will keep you informed ...
>
> In my tries I've found that the easiest way to change this is in sub
> replace_setup_variables solenv/bin/modules/installer/scriptitems.pm#789
>
> See
>
> my $buildidstring = $localbuild . $localminor . "(Build:". $installer::globals::buildid . ")";
>
> This is where the buildid in versionrc|.ini is generated.
> You can try to get the revision from svn, if not possible, then from
> git, if not possible, default to the above code.

yep, I have played with this code and added the part for the revision 
number to become part of the version file.

>
> (I have some working code, but didn't have time to test it other than in
> git).

just checked in some code a few minutes ago.

As a result of some further investigation I thought it might be a good 
idea to keep the buildid for now and increase it for every public build. 
Means dev snapshots, RC, release.

I added the revision number in the About box independent of the used 
--with-build-version switch because I think it can be a useful info.

And I also reduced the font size for the build info to make the 
productname + version more dominant here.

As I mentioned earlier more changes for the next release.

And no I wasn't able to figure out how to make the build info copyable :-(

Juergen

>
>
> Regards


Re: [CODE]: changed about box

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Jürgen,

On Wed, Feb 29, 2012 at 04:10:43PM +0100, Jürgen Schmidt wrote:
> On 2/29/12 3:32 PM, Jürgen Schmidt wrote:
> >Hi,
> >
> >i have changed the about dialog box a little bit and would like to get
> >your feedback.
> >
> >I added a new key in the version.ini/versionrc
> >
> >Revision=<svn_revison_number>
> >
> >But after some experimenting I don't use this key right now but left it
> >in the version file for further references to the underlying revision.
> >
> >I changed the value of buildid in the version file to
> >
> >e.g. versionrc
> >###
> >buildid=340dev1 (Revision:1294675)
> ># instead of
> >buildid=340dev1(Build:9586)
> >###
> >
> 
> I learned from Oliver that the space is not good. The "buildid" from
> the version file is used to generate the <meta-generator> entry in
> the ODF docs.
> 
> Example:
> <meta:generator>OpenOffice.org/3.4$Unix
> OpenOffice.org_project/340dev1$Rev-1294675</meta:generator
> 
> That means the space have to be removed and probably more work is
> necessary.
> 
> Maybe I should switch back to my experiment with the "Revision" key
> and adapt the code for the about box.
> 
> I will keep you informed ...

In my tries I've found that the easiest way to change this is in sub
replace_setup_variables solenv/bin/modules/installer/scriptitems.pm#789

See 

my $buildidstring = $localbuild . $localminor . "(Build:". $installer::globals::buildid . ")";

This is where the buildid in versionrc|.ini is generated.
You can try to get the revision from svn, if not possible, then from
git, if not possible, default to the above code.

(I have some working code, but didn't have time to test it other than in
git).


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [CODE]: changed about box

Posted by Jürgen Schmidt <jo...@googlemail.com>.
On 2/29/12 3:32 PM, Jürgen Schmidt wrote:
> Hi,
>
> i have changed the about dialog box a little bit and would like to get
> your feedback.
>
> I added a new key in the version.ini/versionrc
>
> Revision=<svn_revison_number>
>
> But after some experimenting I don't use this key right now but left it
> in the version file for further references to the underlying revision.
>
> I changed the value of buildid in the version file to
>
> e.g. versionrc
> ###
> buildid=340dev1 (Revision:1294675)
> # instead of
> buildid=340dev1(Build:9586)
> ###
>

I learned from Oliver that the space is not good. The "buildid" from the 
version file is used to generate the <meta-generator> entry in the ODF docs.

Example:
<meta:generator>OpenOffice.org/3.4$Unix 
OpenOffice.org_project/340dev1$Rev-1294675</meta:generator

That means the space have to be removed and probably more work is 
necessary.

Maybe I should switch back to my experiment with the "Revision" key and 
adapt the code for the about box.

I will keep you informed ...

Juergen


> The minor.mk includes
> ###
> RSCVERSION=340
> RSCREVISION=340dev1(Build:9586)
> BUILD=9586
> LAST_MINOR=dev1
> SOURCEVERSION=AOO340
> ###
>
> I haven't yet understand completely where the values are used and
> decided to adapt the replacement in scriptitems.pm for now.
>
> Ariel mentioned already some problems on windows if we simply change the
> 4 digit buildid to the svn revision.
>
> In the end I modified my --with-build-version switch and drop the
> revision from here. I like the date and time in the about box. As we
> have seen earlier today with the windows dev snapshot it can be very
> useful to check easy and fast if the correct build were used.
>
> Ok I also changed the background color of this text field because it
> looked strange before (at least on MacOS).
>
> The result on MacOS can you review here
> http://people.apache.org/~jsc/screenshots/about_dialog.png
>
> More rework on the about box will be done for future versions. But for a
> 3.4 I think it should be ok now.
>
> Any opinions?
>
> Juergen


Re: [CODE]: changed about box

Posted by Andrea Pescetti <pe...@apache.org>.
Jürgen Schmidt wrote:
> The result on MacOS can you review here
> http://people.apache.org/~jsc/screenshots/about_dialog.png ...
> Any opinions?

Nice work! But if while at it you can make it possible to copy the 
version identifier, this would help in QA. Of course, I have no idea 
whether this is a minor fix or a complex one.

Seems like fixing this would settle
https://issues.apache.org/ooo/show_bug.cgi?id=11465
https://issues.apache.org/ooo/show_bug.cgi?id=84245
https://issues.apache.org/ooo/show_bug.cgi?id=111425
https://issues.apache.org/ooo/show_bug.cgi?id=112590
(the third one apparently has a patch)

Regards,
   Andrea.