Re: [josm-dev] no latest built for 5 days

2010-08-13 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 13, 2010 at 18:27, Dirk Stöcker openstreet...@dstoecker.de wrote:
 On Fri, 13 Aug 2010, Ævar Arnfjörð Bjarmason wrote:

 What sort of automated job is it? If it's in cron you can easily make
 cron send you an E-Mail on error.

 It is a cronjob, but normally it is too noisy, so all outputs go to
 /dev/null. It is not so easy to get cronjobs to only produce ouput when
 something fails.

It is actually, just install this: http://search.cpan.org/dist/App-Cronjob/

Then put something like this in your crontab:

@daily cronjob -E -j josm-build -E /path/to/build.sh

cronjob(1) will consume all the output, and either print it all or
nothing, depending on the exit code of the program it's running.

If you're running a POSIX shell script you can add this to the top of
the script:

# Exit on errors
trap 'fail' ERR
fail () {
code=$?
echo Failed with exit code $code
exit 1
}

Then you don't have to check the exit code of everything individually.

I use this for all my cronjobs, see
e.g. http://github.com/avar/openstreetmap-mirror for an example, it's
what I use to get E-Mails when the JOSM GitHub mirror fails, but
*only* when it fails.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Feature Request: Timed Save

2010-06-23 Thread Ævar Arnfjörð Bjarmason
On Wed, Jun 23, 2010 at 10:37, Nick Elliott nickelli...@ntlworld.com wrote:
 Is there any chance the option of timed saves could be added to JOSM?  I
 find the program does occasionally exit without warning and I just lost
 about 25mins of editing..  Doh.

That may be a good idea, but if JOSM is randomly crashing on you we
should try to fix that first.

Do you get anything in the console log when it does this? What are you
doing at the time etc.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Java Applet

2010-05-12 Thread Ævar Arnfjörð Bjarmason
It would be very interesting if were un-buggy enough to run via the
Edit button on openstreetmap.org. I've wanted to make the editor the
user runs via the Edit button optional for some time.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] tile caching for webkit?

2010-05-07 Thread Ævar Arnfjörð Bjarmason
On Fri, May 7, 2010 at 13:01, Claudius claudiu...@gmx.de wrote:
 A user from a country with very limited internet access it asking if
 there are any possibilities to make webkit use a cache for the tiles it
 fetches from a WMS-server? Any ideas?

I don't know, but doesn't webkit use the system proxy settings if
they're available? If you you can set up a squid cache in front if it
with an aggressive cache policy. E.g. cache all images for 1 month no
matter what the cache headers say.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Git mirror of JOSM on GitHub

2010-05-01 Thread Ævar Arnfjörð Bjarmason
On Sat, Apr 24, 2010 at 02:05, Ævar Arnfjörð Bjarmason ava...@gmail.com wrote:
 I got tired of waiting for `svn up' when rebuilding JOSM and wanted to
 commit some local patches. So I made a Git mirror of JOSM that I and
 others can use. It's very handy for getting faster updates, a local
 history and the ability to patch JOSM without SVN write access:

    http://github.com/avar/josm

I've now moved it to http://github.com/openstreetmap/josm

Update your bookmarks in the unlikely case that you had any. avar/josm
will be deleted soon-ish in favor of the new mirror.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] OAuth secure ?

2010-04-29 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 29, 2010 at 12:04, colliar colliar4e...@aol.com wrote:
 I thought at least with semi-automatic use OAuth was transfering with 
 encryption
 ( and should also now with https) , but there is still a warning about no 
 secure
 possibility on the wiki.

 Am I wrong or do we need to change this page.

The wiki is wrong and needs to be brought up to date.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Open offer to convert JOSM to Git

2010-04-29 Thread Ævar Arnfjörð Bjarmason
In case it eluded anyone I'm pretty fond of Git [1][2]. The rails_port
has now switched over (with some help of mine), as well as Merkaartor
(with no help of mine). I've also set up Git mirror of JOSM on
GitHub[3] which I plan to keep up to date.

If the JOSM project is ever interested, I'd be willing to do all the
work of doing a full and proper conversion of the master
repository. This would mean:

  * Rewriting the history so that patches by other authors (through
Trac) that have been applied by commiters get correct
Author/Commiter metadata.

  * Adding tags to the repository to mark all previous r releases
of JOSM to the correct Git commit.

  * Generally helping with any conversion issues.

There was some discussion of switching over the official repo last
year[2], but Dirk Stöcker didn't seem very impressed. That's fine, but
if that ever changes conversion won't be an issue, because I'll do it.

That's all.

1. http://lists.openstreetmap.org/pipermail/josm-dev/2010-April/004310.html
2. 
http://lists.openstreetmap.org/pipermail/josm-dev/2009-November/thread.html#3694
3. http://github.com/avar/josm

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Open offer to convert JOSM to Git

2010-04-29 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 29, 2010 at 19:27, Sebastian Klein basti...@googlemail.com wrote:
 Ævar Arnfjörð Bjarmason wrote:
 In case it eluded anyone I'm pretty fond of Git [1][2]. The rails_port
 has now switched over (with some help of mine), as well as Merkaartor
 (with no help of mine). I've also set up Git mirror of JOSM on
 GitHub[3] which I plan to keep up to date.

 If the JOSM project is ever interested, I'd be willing to do all the
 work of doing a full and proper conversion of the master
 repository. This would mean:

   * Rewriting the history so that patches by other authors (through
     Trac) that have been applied by commiters get correct
     Author/Commiter metadata.

   * Adding tags to the repository to mark all previous r releases
     of JOSM to the correct Git commit.

   * Generally helping with any conversion issues.

 There was some discussion of switching over the official repo last
 year[2], but Dirk Stöcker didn't seem very impressed. That's fine, but
 if that ever changes conversion won't be an issue, because I'll do it.

 That's all.

 1. http://lists.openstreetmap.org/pipermail/josm-dev/2010-April/004310.html
 2. 
 http://lists.openstreetmap.org/pipermail/josm-dev/2009-November/thread.html#3694
 3. http://github.com/avar/josm

 How would we deal with the plugins on openstreetmap.org? It should stay
 open for developers with access to the main subversion repository.

The JOSM Plugin directory in OSM works now, and is not dependant
(aside from myabe a script or two) on the VCS used by JOSM itself. Even if
JOSM moves to Git the plugins don't have to.

There's actually very little that ties down plugins to
svn.openstreetmap.org. It's the default plugin provider, but there are
actually already 4 plugins that are part of the plugin list that
aren't hosted there.

If you put your plugin in any Git repository capable of offering a
.jar download (like GitHub, Gitorious and most do), you should be able
to move plugins to Git one-by-one. Or you could not move, it would be
up to the individual developer.

You'd just have to start a Git repository *somewhere* and add links to
the .jar on the Plugins page on the wiki, actually there seems to be
no reason for why you couldn't do this today.

 And what about automatic update of the subversion externals?

Git itself has svn externals-like support in the form of
submodules. Unlike SVN you can only check out whole repositories, not
paths of a repository (since Git is tree based, there's no such thing
as a subset of the repository).

There are currently 4 externals:

  * apache/bzip2
  * apache/codec

These aren't going to move since Apache maintains them. But they don't
change a lot either. I could either set up our own Git mirror of
these, or just copy/paste the relevant code regularly to the JOSM Git.

  * openstreetmap/gui

Could either be moved to Git + used as a submodule (the main
contributor, stotz, would have to agree). Or the approach with Apache
could be used.

  * map-icons/classic.small

Same as the above.

 In principle would be quite cool to switch to git. However subversion
 works reasonably well for us and there should be real advantages (other
 than being hip) to make up the work and potential problems of the change.

Indeed. Ultimately it's up to you guys. I'm not going to parrot all
the advantages of doing so, that's been covered before. I just wanted
to indicate that I'd like to help if JOSM chooses to go this way.

 Thanks for setting up the github anyway, it made me start learning git
 and i feel a little enlightened now. :)

It was very nice to see h4ck3rm1k3 use it right away, good that it's
interesting for other people as well.

You can use that checkout b.t.w. to do local development and commit
back to SVN. I use this approach with some SVN projects I contribute
to.

What you'd do is:

  1. check out the repository on the mirror branch (default)
  2. Add git-svn metadata: http://trac.parrot.org/parrot/wiki/git-svn-tutorial
  3. branch from the mirror branch: git checkout mirror  git
checkout -b some/silly-branch-name
  3. *hack on the train*
  4. Use git-rebase to apply only your commits (none of the mirror
stuff) to master
  5. git svn dcommit

With Git that would just be:

  1. git clone some/project
  3. *hack*
  4. git push

So git-svn makes things a lot harder, since you're always speaking in
a foreign language and translating between two fundamentally
incompatible systems.

But stuff like this comes in handy when I'm hacking on 8 hour
network-less train rides across Germany.

1. http://josm.openstreetmap.de/wiki/Styles and
http://josm.openstreetmap.de/styles
2. http://josm.openstreetmap.de/wiki/Plugins and
http://josm.openstreetmap.de/plugin

$ lwp-request http://josm.openstreetmap.de/plugin | ack
'^\S.*http://([^/]+)' --output='$1' | sort | uniq -c | sort -nr
 42 svn.openstreetmap.org
  2 web.me.com
  1 topo.geofabrik.de
  1 mappin.hp2.jp

3. http://josm.openstreetmap.de/ticket/4967
4

[josm-dev] Git mirror of JOSM on GitHub

2010-04-23 Thread Ævar Arnfjörð Bjarmason
I got tired of waiting for `svn up' when rebuilding JOSM and wanted to
commit some local patches. So I made a Git mirror of JOSM that I and
others can use. It's very handy for getting faster updates, a local
history and the ability to patch JOSM without SVN write access:

http://github.com/avar/josm

It's made with `git-svn`. It has two branches, the master branch is
unaltered from git-svn and can be used to bootstrap from git-svn[1]:

http://github.com/avar/josm/tree/master

The second one is the mirror branch. This one is checked out by
default and includes all the svn externals plus this hack to get it to
build under Git:

http://github.com/avar/josm
http://github.com/avar/josm/commit/f5f16565e

It would be nice if the core build.xml supported getting the revision
from the git history if applicable, but my ant fu didn't suffice to
make this happen.

Finally this is the script that does the mirroring:

http://github.com/avar/josm-mirror

It runs through cron every 30 minutes and hits the
josm.openstreetmap.org server with `git svn fetch`. I can adjust the
frequency if the server admins think this is too much.

1. Example of git-svn bootstrapping:
http://trac.parrot.org/parrot/wiki/git-svn-tutorial

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Where are the slippy map chooser tiles cached?

2010-04-08 Thread Ævar Arnfjörð Bjarmason
On Thu, Apr 8, 2010 at 22:55, Matthias Julius li...@julius-net.net wrote:
 Under Linux this is usually not a problem because /tmp typically gets
 cleaned out at boot time (at least on Debian it does).

That depends on your usage patterns. I generally don't reboot my Linux
machine more than monthly and servers even more infrequently. You can
run something like tmpreaper though.

 I wonder if JOSM should delete the cached tiles on exit.

There's a cache class that wmsplugin and others use that allows you to
keep files around until they collectively reach a given size / age.
Maybe it could use that.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] how does the transition to tested work ?

2010-03-08 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 8, 2010 at 15:04, Sebastian Klein basti...@googlemail.com wrote:
 #4366 (validator: repair: overlapping ways distroys data)
   Plugin issue, can be fixed after release.

 #4584 (cursor not show in textfields of relations-editor)
   Cannot reproduce. We don't have enough info to fix this.

I think this is the same issue as I've just described in this bug
report: https://josm.openstreetmap.de/ticket/4686

I've made the old one a duplicate of this new report.

 #4631 (Plugin download broken)
   [3090] should have addressed most points of this ticket.

 #4401 (JOSM does not remember what has been uploaded)
   It's more like an enhancement. Too complicated, will be fixed after
 release.

I've used JOSM a lot recently to upload objects in the one object at
a time mode, if it fails with a conflict it will start the whole
thing over again (even if it doesn't need to).

I'm not 100% sure but I think that #4401 has been causing a lot of
duplicate data created by JOSM that I've had to clean up. Uploading
duplicates is definitely a bug.

 #4371 (Changeset comment reverts to previous when switching options)
   The blocker flag wasn't set by a developer. Should be fixed, but isn't
 all that serious.

FWIW I have at least 10 large changesets uploaded to the main API that
have inaccurate changeset summaries because of this and related bugs.

 So, I'd say it was OK to release, but tested version should be updated
 before next development cycle.

 I think tested should be a version without any blocker/critical bug
 reported on and being tested as unstable/latest for a week.

 This is how we try to do it, but some critical bus are not easy to fix,
 so we postpone these issues and move on.

Aren't all these bugs already in the latest tested? A new tested with
the same bugs (+ unrelated fixes) wouldn't be any worse would it?

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] how does the transition to tested work ?

2010-03-08 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 8, 2010 at 16:15, Apollinaris Schoell ascho...@gmail.com wrote:

 On 8 Mar 2010, at 7:04 , Sebastian Klein wrote:


 #4401 (JOSM does not remember what has been uploaded)
   It's more like an enhancement. Too complicated, will be fixed after
 release.


 for me this is really a bug not an enhancement. Josm is used for semi 
 automatic imports a lot and this creates big mess of duplicates on 
 server/network interrupts. I know it wasn't designed for that but Josm is 
 just such a great workhorse.
 on normal editing this can leave a user with  conflicts after a partial 
 upload, maybe we should add a comment that uploads should be done in 1 
 transaction only until this bug is fixed.

 Anyway thanks for the great work and it's better to have a stable again.
 Josm is improving big with every release:)

The problem with recommending that is that the only reason for using
one object at a time uploading is to narrow down conflicts you may be
having, right now due to this bug at the cost of adding lots of
duplicates to the database.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] how does the transition to tested work ?

2010-03-08 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 8, 2010 at 16:30, Dirk Stöcker openstreet...@dstoecker.de wrote:
 On Mon, 8 Mar 2010, Ævar Arnfjörð Bjarmason wrote:

 for me this is really a bug not an enhancement. Josm is used for semi
 automatic imports a lot and this creates big mess of duplicates on
 server/network interrupts. I know it wasn't designed for that but Josm is
 just such a great workhorse.
 on normal editing this can leave a user with  conflicts after a partial
 upload, maybe we should add a comment that uploads should be done in 1
 transaction only until this bug is fixed.

 Anyway thanks for the great work and it's better to have a stable again.
 Josm is improving big with every release:)

 The problem with recommending that is that the only reason for using
 one object at a time uploading is to narrow down conflicts you may be
 having, right now due to this bug at the cost of adding lots of
 duplicates to the database.

 To have better conflict solving you may use Update modified from first
 menu. This will produce all conflicts in one single run and allows them to
 fix in one go.

Yes, but due to the bad interface for conflict resolution in JOSM this
isn't an option sometimes. There isn't support for mass-resolution of
similar conflicts (I've filed bugs for this) so you run into
situations where you can either:

   * Solve 300 conflicts which are of the same nature manually. Which
requires for each one:
 1. Click on an item in the conflict list
 2. Move to tags/whatever in the dialog
 3. Click merge your/remote changes
 4. Apply
 5 Repeat

After I'm done with that I'll have manually clicked UI elements at
least 300*4 times or so.

So instead of doing that when I run into it I just cut my losses and
try to upload at least /some/ of my data. I do this by turning on
single-object upload, trying to select subsets of the dataset and see
if I can upload them without conflicts.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] how does the transition to tested work ?

2010-03-08 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 8, 2010 at 16:59, Dirk Stöcker openstreet...@dstoecker.de wrote:
 On Mon, 8 Mar 2010, Ævar Arnfjörð Bjarmason wrote:

 To have better conflict solving you may use Update modified from first
 menu. This will produce all conflicts in one single run and allows them
 to
 fix in one go.

 Yes, but due to the bad interface for conflict resolution in JOSM this
 isn't an option sometimes. There isn't support for mass-resolution of
 similar conflicts (I've filed bugs for this) so you run into
 situations where you can either:

 Well, I think about a year ago we had NO working conflict resolution at all
 and I also think JOSM is the only editor which has that feature working
 reliable. So be happy you can click 300 dialogs :-)

 Beside that a semi-automatic conflict resolution for very common cases
 should be implemented. Probably we should add a send workflow data to
 server option, so we can get data about the real user needs (for these
 cases where users don't know at all what the would like to have).

 We already have rudimentary support (plugin list and version string) for
 such analysis and it influenced development already.

Sure. I know this is a hard problem to get right and we're all aware
of these issues already. I just wanted to point out why Update
modified isn't always what you want because you sometimes want to
explicitly avoid the conflict resolution and upload as much of what
you can from your local dataset.

In my experience if you get more than 30 conflicts in JOSM it's going
to be less work just to close JOSM and redo all your edits than
dealing with the resolving them (although I do save frequently).

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] how does the transition to tested work ?

2010-03-08 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 8, 2010 at 17:01, Sebastian Klein basti...@googlemail.com wrote:
 Ævar Arnfjörð Bjarmason wrote:
 This is how I've been running into this:

   1. Download data from the OSM server, say 20 ways
   2. While I edit 10 of those 2 have been changed already, so 2/10 conflict
   3. Press upload in single-object mode, will upload 1/10, 2/10...
   4. It conflicts at say the 5th object out of 10 and stops the entire
 upload process
   6. If I try again it'll still start from 1/10 instead of 1/5

 As I said I haven't tracked this down in any detail but it seems that
 in some situations JOSM doesn't track the stuff it has uploaded
 already when it runs into conflicts during uploads.

 I forgot to ask: With recently you mean after 5th February or so? (The
 server behavior has changed at that time due to a reimplementation.)

Recently meaning from January up to March 1st. I ran into his a lot
when processing the ourFootPrints import as blogged about here:
http://www.openstreetmap.org/user/%C3%86var%20Arnfj%C3%B6r%C3%B0%20Bjarmason/diary/9698

 What edits did you perform? Did you add more nodes, deleted nodes or
 just updated tags?

These are pretty much the edits we were doing:


http://wiki.openstreetmap.org/wiki/WikiProject_Iceland/ourFootPrints#Dealing_with_the_ofp_data

The conflicts occured when we stepped on each others toes. This
happened a bit frequently since we were all editing with day-old
Iceland.osm dumps so we'd occasionally step on each others toes.

 Don't fear to clutter the database for testing. If you can help us
 resolving this, it's for the greater good. :)

I'll see if I can reproduce this on api06.dev.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] how does the transition to tested work ?

2010-03-08 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 8, 2010 at 19:21, Ævar Arnfjörð Bjarmason ava...@gmail.com wrote:
 Don't fear to clutter the database for testing. If you can help us
 resolving this, it's for the greater good. :)

 I'll see if I can reproduce this on api06.dev.

I just tried and I can't reproduce this or the issue with the number
of objects to be uploaded drifting from what really needs to be
uploaded.

Now if I upload a per-object upload and it fails partway the objects
that were uploaded up until that point will be counted as uploaded and
won't be re-uploaded.

But like I said I don't know if this issue in particular was what was
causing some of the duplicates I was seeing initially.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Can I style by user in mappaint?

2010-01-15 Thread Ævar Arnfjörð Bjarmason
On Sat, Jan 16, 2010 at 04:25, Ulf Lamping ulf.lamp...@googlemail.com wrote:
 Am 15.01.2010 09:05, schrieb Jiri Klement:
 I think it would be nice to use search patterns in mappaint. The style
 information is cached in OsmPrimitive so it shouldn't have impact on
 overall performance.  And there are probably other usecases when
 key=value matching is not sufficient.

 Actually I was planning to do some prototype to see if performance
 really isn't a problem

 Might be a problem for initial reading of large datasets, but you cannot
 say wether it's acceptable or not until you've really tried it.

 That's the conclusion I've got when doing the first round of mappaint
 performance improvements a lot of time ago :-)

 and then ask here if it is really a good idea
 to switch to search patterns. But when avar brought it up, we can
 start the discussion now. So are there any other usecases when search
 patterns would be usefull in mappaint or any objections agains search
 patterns?

 Avar was the first one I've seen to come up with show me stuff from
 user xy in a special way. I'm unsure if this is really a common use case.

FWIW potlatch does this every day by rendering things differently if
user == the guy who uploaded tiger  tiger:reviewed == 

 Personally, I'd like to keep things simple here - so even none
 developers have at least a chance to write their own rendering rules.

 Otherwise complexity grows and grows and ends up like the mapnik
 rendering rules with embedded SQL statements - the learning curve is now
 really high :-(

Sure, but condition user=foo / isn't that much harder than
condition k= v=/ :)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Can I style by user in mappaint?

2010-01-15 Thread Ævar Arnfjörð Bjarmason
On Sat, Jan 16, 2010 at 05:39, Ulf Lamping ulf.lamp...@googlemail.com wrote:
 Am 16.01.2010 05:38, schrieb Ævar Arnfjörð Bjarmason:

 Avar was the first one I've seen to come up with show me stuff from
 user xy in a special way. I'm unsure if this is really a common use
 case.

 FWIW potlatch does this every day by rendering things differently if
 user == the guy who uploaded tiger  tiger:reviewed == 

 tiger has special tags that are easy to display, JOSM renders:

 condition k=tiger:reviewed v=no/

 already for quite a while in a special way.

 I can't see why a special user condition is needed here.

It's rendering TIGER data that hasn't been touched since import in a
special manner:

if (preferences.data.tiger  this.uid==7168  this.version==1 
this.clean  this.attr[tiger:tlid]) {

Someone may edit the data and not change the tiger:reviewed tag, not
every user reads a manual on TIGER editing before clicking Edit.

 Sure, butcondition user=foo /  isn't that much harder than
 condition k= v=/  :)

 Exercise: Can you tell - not looking at the help - what's the difference
 between the two search expressions:

 type=*

 foot:

Both of those are exact key matches for type  foot with any value.

 ... I'm pretty sure very few people can.


 The JOSM search box help lists 21 conditions, offers case (in)sensitiveness
 and optional regular expressions, still misses a simple logical AND and
 offers a myriad of possible combinations.

Yeah, it needs to be friendlier.

 In contrast, we currently have four different conditions that are easy to
 grasp:

 condition k=key v=value/
 condition k=key b=yes/
 condition k=key b=no/
 condition k=key/

 I do see a clear difference between how hard it is to learn one of the two
 approaches.

The search is exposed to users, there are currently 5 custom
stylesheets for JOSM. I can't the easy of use concern here,
stylesheets are either written by developers or automatically
generated by user-friendly programs.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-13 Thread Ævar Arnfjörð Bjarmason
On Wed, Jan 13, 2010 at 14:53, Matthias Julius li...@julius-net.net wrote:
 Marc Schütz schue...@gmx.net writes:

  Also, I want to change all those don'ts and won'ts to proper
  English.  This doesn't change the meaning of the string, so all
  the translations (hopefully) just need to be unfuzzied.
  I thought, these don'ts and won'ts is proper english. Am I wrong?

 +1

 Furthermore, don't and do not etc. are not freely interchangeable,
 as they have different connotations and for both there are situations
 where they are not appropriate.

 Well, this is true - especially for spoken language.  This has
 probably much to do with the emphasis that is also put on it.  There
 is certainly a difference between I won't do that. and  I WILL NOT
 do that.

 But, in written language these shortcuts are consided casual and they
 are not used in formal texts, AFAIK.  That's why I use this in emails,
 but not in the user interface of a program.

 Do we have any native English speakers here?  It is somewhat silly to
 discuss subtle meanings of the English language between Germans.

Perhaps you can make do with me? :)

Well Marc Schütz is in theory completely wrong that don't and do not
are not freely interchangeable. Don't is a contraction of do not
and means exactly the same thing by definition.

However as you point out the meanings are in practice subtly
different. Contraction-free speech has an air of authority about it
Do not touch that, it is hot as opposed to Don't touch that, it's
hot.

Contraction are accepted almost everywhere in English, although you
might get into trouble if you use them in something like a scholarly
paper, they're not looked down upon like reductions are, such as want
a - wanna.

All of these contractions and reductions will no doubt become
perfectly accepted English within a few decades, just try reading
newspaper articles en English from the early 20th century where
authors avoid writing things that are universally acceptable today,
such as writing automobile without a hyphen (just as we're slowly
converting E-Mail into email nowadays).

But to comment on the general issue here interface messages should in
my opinion by clear, short and unambiguous, JOSM has sometimes lacked
in this respect mostly due to being written by people for whom English
is a second language.

I don't think programs should take themselves overly serious though,
Potlatch doesn't, nor does the OpenStreetMap website itself or
programs like git which are all programs whose UI messages I like.

I don't like using programs whose messages look like they're extracted
from a speech to be given at a fancy dinner party. It's OK to say
Oops in your error messages and not clutter up the UI by saying
please in every second word.

But that's just my opinion :)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] IRC JOSM

2010-01-11 Thread Ævar Arnfjörð Bjarmason
On Mon, Jan 11, 2010 at 13:15, Minh Quang chumkhungbo2...@yahoo.com wrote:
 Yooo, Do you have your own IRC for JOSM ?? I really need your help, please

There's no IRC channel for JOSM, but you can ask in #osm on irc.oftc.net.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Localisation policy for quotes etc.

2010-01-10 Thread Ævar Arnfjörð Bjarmason
On Sun, Jan 10, 2010 at 15:00, Andre Hinrichs andre.hinri...@gmx.de wrote:
 Hi List!

 Since I currently check all translatable texts I found that sometimes
 quotes are single and sometimes double. E.g. isn't is sometimes simply
 isn't and sometimes isn''t.

 Which is the correct way?

It's always a single quite in English, but perhaps they're double
quotes in the JOSM source to work around something?:

aoeu josm (r2766) $ ack tr\(.*isn''t src
src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
219:setErrorMessage(tfLatValue,tr(The string ''{0}''
isn''t a valid double value., tfLatValue.getText()));
251:setErrorMessage(tfLonValue,tr(The string ''{0}''
isn''t a valid double value., tfLonValue.getText()));

src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
160:feedbackInvalid(tr(The string ''{0}'' isn''t a
valid double value., getComponent().getText()));
200:feedbackInvalid(tr(The string ''{0}'' isn''t a
valid double value., getComponent().getText()));

src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
533:throw new IllegalStateException(tr(Current
value ''{0}'' for user ID isn''t valid, tfUid.getText()));

 Forthermore I find sometimes american english (e.g. 'initialize').
 Wasn't the overall policy to use british english?

I thought the source default was en_US since if it was en_GB the
existing en_GB translation would be pointless (and we'd need a en_US
one).

 And finally sometimes I find XHTML style end tags in translated texts
 (e.g. 'br /' instead of 'br'). By now I haven't found any in the
 source. Is it ok to use them or should these be fixed?

The HTML is rendered by some internal Java stuff, both of those tags
work just as well when fed to it so I don't think it needs to be fixed
either way.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] New translations system

2010-01-07 Thread Ævar Arnfjörð Bjarmason
On Thu, Jan 7, 2010 at 13:05, Dirk Stöcker openstreet...@dstoecker.de wrote:
 I switched the translations from the gettext support to an own version
 using Java mechanisms. This now means adding new languages results in a
 small change in josm (adding the plural mode - one line). As a result the
 final josm jar is a bit smaller again (no longer multiple english strings).

 Please all of you test if josm is still working reliable in your native
 language!

It works fine for Icelandic, neat that we can continue translating
without JOSM blowing up.

Out of curiosity though since you were changing the internal storage
away from Gettext why did you go with something custom instead of
using Java ResourceBundles or whatever the system Java projects
usually use is?

I'm not familiar with Java i18n issues so it would be interesting to know.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] OSM Book

2009-12-29 Thread Ævar Arnfjörð Bjarmason
On Tue, Dec 29, 2009 at 15:12, Frederik Ramm frede...@remote.org wrote:
 And another thing. If you had room to present four JOSM plugins to the
 newcomer - which four would you choose? The book currently covers WMS,
 Validator, RemoteControl and Surveyor/LiveGPS. But I'm prepared to
 change that if you think another selection would make more sense.

A brief mention of walkingpapers would be good given the target
audience, not at the expense of the others though.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] UpdateModifiedAction ?

2009-12-27 Thread Ævar Arnfjörð Bjarmason
On Sun, Dec 27, 2009 at 16:14, Karl Guggisberg
karl.guggisb...@guggis.ch wrote:
 r2682 adds an UpdateModifiedAction. The changeset looks fine
   http://josm.openstreetmap.de/changeset/2682/
 The file was indeed added and checked in.

 Stragenly, UpdateModifiedAction.java isn't checked out when I update to
 HEAD, in contrast to the updates in MainMenu.java referring to it.

 Any idea what is wrong here?

It works for me, I get
src/org/openstreetmap/josm/actions/UpdateModifiedAction.java when I
check out HEAD.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] How to make the filter feature foolproof

2009-12-06 Thread Ævar Arnfjörð Bjarmason
On Sun, Dec 6, 2009 at 17:31, Sebastian Klein basti...@googlemail.com wrote:
 The Filter feature [1] is great, but still not ready for general use. I,
 for one, fool myself every now and then and think I have lost data, when
 it was actually just hidden by the filter.

 So how can we improve the situation?

 First of all I think that the vast majority of all filter texts will
 consist of _one_ pattern, only. (E.g. boundary, FIXME, user:me) So
 one could sacrifice the possible modes of combining different filters,
 for an easier interface:

 Just use normal Layers to represent filters. The advantage would be that
 one usually keeps an eye on the layer list and so you don't forget about
 it so easily. Layer visibility would correspond to Filter
 enabled/disabled. 'Hide' and 'Invert' would be icons on the layer entry
 that can be toggled. The other options (if any) would be accessible
 through the right click menu - 'edit'.

 You would insert a filter from the main menu:

 - 'add new Filter'
 - 'add preset Filter'  ...
 - 'add saved Filter'  ...

 Then the dialog could look something like this:

 Pattern: __

 o show only the specified elements
 o hide the specified elements
 --
 ☐ case sensitive
 ☐ regular expression
 ☐ apply to child elements

 When multiple filter layers are present, they would simply combine like
 'AND' because this is what one would expect. To compensate this, one
 could introduce something similar to the filter in Thunderbird.
 (Multiple conditions can be combined.)

 I haven't done any coding, so feel free to object. :)

This mostly sounds good, but more generally it would be nice if we had
a preset system for search queries just like we have one for tags now.
Then users could in the search menu select from some drop-down list of
presets like edited by me (to search for user:$myusername), or
boundaries and so on.

Then you could just re-use these presets for the filter presets since
the presets are just search-powered views on the OSM data. The
interface in the filter dialog could be exactly as you suggest but the
presets would be shared with the search engine.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Switch to Java 6?

2009-11-28 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 28, 2009 at 19:24, Dirk Stöcker openstreet...@dstoecker.de wrote:
 Yes. #ifdef DEBUG and other conditionals are one of the features I most
 miss in Java.

With a bit of build.xml hacking I think there's nothing stopping you
from calling the C preprocessor before you compile the Java code :)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Duplicate placeholder IDs in the latest JOSM tested (2510)

2009-11-24 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 17, 2009 at 11:50, Dirk Stöcker openstreet...@dstoecker.de wrote:
 Code consolidation until end of month, so we can have a new release by
 then.

Is the current latest tested release based on 2510 the aforementioned
end of the month release? It was released with this bug I filed 4
weeks ago: http://josm.openstreetmap.de/ticket/3812

One user already ran into it during normal editing (see comments on
the bug). It's fairly easy to trigger and really hard to fix for
normal users who aren't clueful enough to save the file and manually
edit it with a text editor until it's uploadable.

It would be good if someone could take a look at this bug  fix it and
release a new JOSM tested soon. Otherwise I think we're going to have
a lot of support requests over the next weeks with people running into
this bug, and lost data for those that don't have the patience to deal
with it.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Duplicate placeholder IDs in the latest JOSM tested (2510)

2009-11-24 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 24, 2009 at 22:14, Ævar Arnfjörð Bjarmason ava...@gmail.com wrote:
 On Tue, Nov 17, 2009 at 11:50, Dirk Stöcker openstreet...@dstoecker.de 
 wrote:
 Code consolidation until end of month, so we can have a new release by
 then.

 Is the current latest tested release based on 2510 the aforementioned
 end of the month release? It was released with this bug I filed 4
 weeks ago: http://josm.openstreetmap.de/ticket/3812

Sorry for the confusion. I mixed up 2510 (a random recent commit) and
2255 (7 weeks old) in my browser and thought that the current JOSM
tested had just been released based on 2510. Obviously it's not *that*
big a deal if it has been out in JOSM tested and me and RichardB seem
to be the only ones complaining.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Wie kann das passieren? / How can this happen?

2009-11-21 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 21, 2009 at 8:27 PM, Thomas Ineichen osm.mailingl...@t-i.ch wrote:
 Dank checkround-Script von Gary68 gefunden:
 Thanks to checkround-script by Gary68:

 http://www.openstreetmap.org/browse/way/4794092

 in changeset

 http://www.openstreetmap.org/browse/changeset/3142046

Well first of all this has nothing to do with JOSM, this happens due
to a Potlatch bug.

This bug has been present since Potlatch 1.1 when the tidy function
was added, I pointed this out to IRC at the time, see this log
excerpt:

http://pastie.org/709216

I have no idea why it happens and RichardF evidently didn't have time
to debug it, so it's still broken.

There seem to be a bunch of issues with this code. I tried tidying a
circle, saving then opening a new changeset, selecting the same circle
and hammering the tidy button for a good 10 seconds. Every time you
tidy a circle it moves slightly to the left on the map view.

Here's me moving a circle created with Potlatch to the west using only
the tidy function:

http://api06.dev.openstreetmap.org/browse/changeset/1871

That being said I can't reproduce the issue I talked about in the
pastie link above nor the one cited here, but I'm assuming it's the
same bug.

It would be useful if someone contacted user:Horgner and asked him
what Flash player / on what platform he's running.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Editing of single nodes

2009-11-17 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 17, 2009 at 10:49 AM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 On Tue, 17 Nov 2009, Andre Hinrichs wrote:
 I think that especially with an increasing number of users this might be
 a good thing for both the developers and the users.

 Well, to make a bit more clear what I wrote above. I think the newbies list
 and the language specific talk lists already cover that. Ævar Arnfjörð
 Bjarmason seems to be active answering seldom JOSM questions in newbies
 list. In talk-de lots of people answer. Most of the newbies questions aren't
 software-specific, but most often they are OSM specific. When we divide that
 we get OSM specific with josm point of view and general osm specific
 which is not really helpful.

Agreed, the JOSM community isn't so large that it has overgrown the
general OSM mailing lists, the general lists also have the advantage
that when someone asks an editing question they'll frequently get
answers detailing how to do things in multiple editors. JOSM isn't
/always/ the right tool for the job :)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Please add the walkingpapers description to the scan-info section in the HTML source for JOSM

2009-11-11 Thread Ævar Arnfjörð Bjarmason
On Wed, Nov 11, 2009 at 8:17 PM, Frederik Ramm frede...@remote.org wrote:
 Ævar Arnfjörð Bjarmason wrote:

 That's a non sequitur actually, the git-svn frontend is conduit
 between SVN and has its limited uses but converting between
 centralized and distributed version control is always going to be a
 case of casting a square peg into a round hole.

 I don't have much git clue but some may remember that JOSM was in git,
 briefly, when Gabriel Ebner did his work on dropping segments.

 Conceptually, what would be the difference between putting JOSM on git and
 putting it on the project-wide SVN altogehter? If the main advantage of git
 is that it would become easier for anyone to contribute even if no
 maintainer has the time to review a patch, then the same could be achieved
 by going the same way that almost all other OSM applications go and put it
 on svn.openstreetmap.org - couldn't it?

Sure, it could be moved to the main OSM SVN. But it has been my
understanding that the main JOSM developers like keeping the gates to
their main repository fairly closed, and in that case if they used a
distributed version control system they could have their cake and eat
it too.

Very few people could be given access to the main repository (the ones
official .jar files get compiled from) but everyone would have access
to version control.

If you're unfamiliar with distributed version control I think the best
way to explain it is that things which now happen outside version
control in the project will be brought into the loop.

For instance now people who don't have commit access may be submitting
huge patches to trac without commit messages, and often many
successive patches as it gets reviewed. If the project were using dvcs
(correctly) those patchsets would be developed in someone's local
repository along with commit history until they could be merged into
the mainline.

At one point I had two pending patches to JOSM and wanted to develop a
third one. I had already submitted them to trac but for each change I
had done:

   svn diff [files relevant to the patch]  change-a.patch
   rm [files relevant to the patch]  svn up

If the project had been using git I could have commited each of those
changes to their own local branch while they were pending inclusion.

 Also, if we were to use git, would we depend on a third-party service like
 github, or is git also usable (in a sensible way) without such a site?

Presumably if JOSM were to switch to something else it would want to
use something like the Trac plugin for Git to provide integration to
josm.openstreetmap.de. But using github certainly has a lot of
advantages.

Also with git you're never really dependent on third-party hosting.
Even if a project is using github and github is taken over by
flesh-eating aliens tomorrow getting everyone back on track is just a
matter of turning any checked out copy (because they all have full
history) into a hosted git:// repository and sending a message to the
mailing list telling everyone to commit to that.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Please add the walkingpapers description to the scan-info section in the HTML source for JOSM

2009-11-10 Thread Ævar Arnfjörð Bjarmason
On Tue, Nov 10, 2009 at 3:17 PM, Shaun McDonald o...@shaunmcdonald.me.uk 
wrote:
 GIT ---  http://github.com/migurski/paperwalking

Cool. I've patched my fork here with this functionality:
http://github.com/avar/paperwalking

Sent a pull request to migurski/paperwalking.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] JSOM and SVN plugins

2009-11-07 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 7, 2009 at 12:29 PM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 - The dist-directory contains a getversions script. Use it to verify
   your checkin.

There's no documentation for this script. What does it check and how
do I know that the XML it's dumping is OK or not?

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] QuadBuckets in Dataset

2009-10-31 Thread Ævar Arnfjörð Bjarmason
On Sat, Oct 31, 2009 at 3:28 PM, Jiri Klement jiri.klem...@gmail.com wrote:
 Are there any complains?

I'd just like to note that as a JOSM user I appreciated QuadBuckets
since I could run the Validator on large datasets for the first time
without JOSM taking forever ( having to be killed). No matter what
code ends up being the primary storage class for JOSM I'd appreciate
the Validator having access to something like QuadBuckets.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Duplicate Way plugin obsolete?

2009-10-30 Thread Ævar Arnfjörð Bjarmason
Hasn't the functionality of the duplicate way plugin by Brent Easton
been completely replaced by Copy/Paste in JOSM core? The plugin itself
uses segments and it looks like it hasn't worked since API 0.4.

I ask because I wanted to create a little plugin to create duplicate
ways (as per validator nomenclature) and I was surprised to find that
this existed (along with the grid plugin it's the only one whose
build is completely disabled).

If it has indeed been usurped by core I'd like to delete it  claim
the namespace for my tiny plugin.

In case anyone's wondering I'd like to duplicate ways (i.e. create a
new way using the exact same nodes as an existing way) because
sometimes you're tracing e.g. a political boundary and need to make it
follow a coastline or something similar.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Easy way to use planet file as substitute for osm server

2009-10-27 Thread Ævar Arnfjörð Bjarmason
On Tue, Oct 27, 2009 at 7:03 PM, Stefan Aschenbach
ste...@binaervarianz.de wrote:

 I'm cringing at the thought of trying loading a large extract into
 JOSM and expecting it to be able to work quite happily. I would never
 want to try and work with large areas in JOSM at any time in a
 desktop
 or laptop with 4GB of RAM, never mind on a netbook.

 You are right. loading the whole region into JOSM will probably
 toast my
 poor netbook.
 Maybe I can download the .osm file, split it with mkgmaps splitter
 tool
 into managable chunks
 and load only whats needed.


 I may as well ask the list:

 Is there an easy way to set up a downloaded .osm file
 as a substitute for the osm server for offline use?

 So I can use the 'download map along track' or
 'download region' function out of that file?

 I found tutorials to set up an own osm server, but they mostly meant
 webservers with mapnik rendering.
 (And they did it on linux, I would need a windows solution.)

 So is there a way for josm to search the file or has someone a link
 to a tutorial on how to set up a server just for
 delivering osm data through API calls?

You'd set up the rails port which is the web application the OSM API
is written in:

http://wiki.openstreetmap.org/wiki/The_Rails_Port

Then you import data into its database as discussed on that webpage.
Then you can download stuff via its API after you set it to
localhost:3000/api in JOSM

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Translations don't fit screen?

2009-10-15 Thread Ævar Arnfjörð Bjarmason
On Thu, Oct 15, 2009 at 8:11 AM, Frederik Ramm frede...@remote.org wrote:
   it is sad that German is a language in which it takes so much longer to
 say things than in English. (The French probably have the same problem!)

 In many JOSM dialogs, the text is cut off in the German version (see
 attached upload dialog screenshot). Why does that happen - should the dialog
 not adjust itself due to all the preferredSize magic in the UI
  components?

 Is something broken with my fonts? Or do German translators just have to
 learn to express themselves less profusely?

Your system is fine. There just simply isn't enough space to fit that
string. I've had to alter numerous strings in Icelandic to less
optimal translations so that they can fit into a space designed for
e.g. three letter English words.

This can be solved in JOSM by being more generous about padding. And
designing UI dialogs so that long messages flow into another line
instead of under some other fixed UI element. But that takes some
work.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Translations don't fit screen?

2009-10-15 Thread Ævar Arnfjörð Bjarmason
On Thu, Oct 15, 2009 at 9:51 AM, Frederik Ramm frede...@remote.org wrote:
 Ævar Arnfjörð Bjarmason wrote:

 Your system is fine. There just simply isn't enough space to fit that
 string. I've had to alter numerous strings in Icelandic to less
 optimal translations so that they can fit into a space designed for
 e.g. three letter English words.

 But things like the button having been cut off - doesn't Java do these
 things right if used correctly?

Yes it's not a problem inherent in the language / UI framework but
cramming too much into too little space:)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Please invest some time into documentation - especially confilict resolution

2009-10-04 Thread Ævar Arnfjörð Bjarmason
On Sun, Oct 4, 2009 at 9:18 AM, Dirk Stöcker openstreet...@dstoecker.de wrote:
 On Sun, 4 Oct 2009, Rolf Bode-Meyer wrote:

 There was a post just yesterday where some people agree that they just
 push the buttons at random until the conflict is either resolved or the
 changes completely messed up.

 Users always request better documentation, but when there is a good
 documentation it is not read usually.

 So please would those people who implemented conflict handling give
 detailed explanations in [[Help/Dialog/Conflict]] which currently is
 simply not helpful?

 You really need no programmer to write documentation.

 A good way to reach that goal would be to start writing that documentation
 and ask the developers to fix or continue wrong or missing parts only.
 Most of the docs can be written without knowing how the things work in
 detail:
  - describing appearance and situations
  - making screenshots
  - showing different situations and ways to handle them
 Asking specific questions here like what does that button do can help to
 solve troubles and the explanations can be copied into a doc.

 Till now I was not able to convince one single person to really update
 JOSM online docs (with more than typos), so it seems doing that work is
 not worth the effort.

Perhaps it would help if there was a way in JOSM to link from each
dialog / logical part of the UI to the associated documentation page.
Then you could always click Help (for this dialog) to get at the
documentation.

It's not easy just to *find* the docs so more exposure might help things.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] JOSM Tested

2009-10-03 Thread Ævar Arnfjörð Bjarmason
On Sun, Sep 27, 2009 at 10:04 PM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 Are there any critical things left? I think no, but if you think so, then
 tell the bug report number.

Perhaps this qualifies: http://josm.openstreetmap.de/ticket/3644

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Translators and Context driven translation

2009-09-21 Thread Ævar Arnfjörð Bjarmason
On Mon, Sep 21, 2009 at 10:21 AM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 On Sun, 20 Sep 2009, Ævar Arnfjörð Bjarmason wrote:
 I don't know what native support of context actually means in
 Launchpad. Hopefully it means that if you have _:Ctxt1\nBar and
 _:Ctxt1\nBar and only translate the first string the second string
 will still show up translated. I.e. context will have been something
 optional the translator can add if he or she wants.

 Launchpad has context support and detects this automatically.

When you translate a string which is duplicated in the .po file (but
with different msgctxt) the string you entered will show up as a
suggestion for the rest. If we were post-process the files downloaded
from Launchpad so that we would automatically use these suggestions
context /could/ be added to every occurrence of a duplicate string
without additional burden on translators who aren't interested in
context. Other than an inflation in the number of translatable strings
that is.

Here's an example of Launchpad suggesting a translation with msgctxt:


https://translations.launchpad.net/esmska/trunk/+pots/esmska/is/+translate?batch=10show=allsearch=%26Gateway

I'm not advocating context for every duplicate string in the program
unless it doesn't bother anyone. But if that's the case then it would
be nicer for translators to translate JOSM. Most of whom are probably
non-technical and won't even think to ask if the string that's used in
30 places they're struggling to translate can be modified to fix that
issue.

 For SVN access currently my rules are that some high quality patches must
 have been provided for some time. You do not yet qualify for this.

Oh well. It's your cathedral to manage.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-20 Thread Ævar Arnfjörð Bjarmason
On Sun, Sep 20, 2009 at 4:40 AM, Ľubomír Varga lu...@plaintext.sk wrote:
 AFAIK this is possible right now. Just use PostGis database of world, connect
 GeoServer like renderer / transformer to WMS / WFS / WSC and add WMS layer to
 JOSM. So in JOSM you could view whole world from PostGis (postgres) database.

It is of course possible to use it *now* if all you want to use it as
is a WMS. But the suggestion was to use it as the native data storage
format.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-19 Thread Ævar Arnfjörð Bjarmason
On Sat, Sep 19, 2009 at 6:15 PM, Dave Hansen d...@sr71.net wrote:
 On Sat, 2009-09-19 at 08:36 -0400, Greg Troxel wrote:
 I have wondered about hooking up postgis to josm as a working data
 storage format, so you can use spatial queries and indexes.  That's got
 a lot of downsides, but I wonder about it being an optional setup for
 those working with big datasets.

 It's an interesting idea, but I don't know enough about postgis to give
 you an intelligent answer.

PostGIS can be used as a backend for other GIS programs such as
ArcGIS. So I think any potential troubles in this regard would have
more to do with what sort of requirements JOSM makes of its data model
than PostGIS limitations.

Such an integration could bring some very neat features. Like being
able to view the whole planet in JOSM with PostGIS on the backend with
JOSM only requesting the data that it needed to display at any one
time. With other operations such as search being (optionally) global.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] multiple changesets

2009-09-14 Thread Ævar Arnfjörð Bjarmason
On Mon, Sep 14, 2009 at 11:14 PM, Frederik Ramm frede...@remote.org wrote:
 MOTD says:

 JOSM now supports keeping multiple changesets open simultaneously on
 the server. If you want to change something you notice while making an
 unrelated change you can now tag that change correctly.

 Could whoever wrote that please re-write it so that normal users can
 understand it? Not even I understand what this is supposed to mean.
 Maybe link to a Wiki page that explains why this feature is useful, and
 how it is supposed to be used?

I wrote that. I thought that the JOSM MOTD was way too cryptic for
normal users with comments like Nice mouse pointer icons in delete
mode as well.. I see that my best-faith efforts to write
understandable changelogs have fallen somewhat short of the mark
howewer.

And perhaps not, I don't think you classify as a normal user :)

When you keep a changeset open on the server and keep uploading to it
you're essentially pushing things to a stack you can't pop things off
again.

Multiple changesets means that you can have multiple stacks at a time.

Changesets are from a user perspective just a handy feature to group
related edits together. Having multple changesets open at the same
time means that you can tagg your edits with greater granularity.

For instance I may be making some multi-hour edit where I'm tracing
lakes from landsat imagery. If I come across something else in the
process of doing so, like a way that's not connected to another way I
can open another changeset for that minor fix without contaminating my
giant Trace from landsat edit with non-landsat related edits.

So that's what the feature gives you. Now someone just has to explain
all that in a paragraph or so, or turn my ramblings into a
documentation page.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Table syntax in MOTD

2009-09-13 Thread Ævar Arnfjörð Bjarmason
I made a MOTD which uses HTML table syntax:

http://u.nix.is/~avar/motd.html

I think it uses up space a bit better than the current one. But
unfortunately trac deosn't support HTML tables (they end up being
escaped).

1. http://josm.openstreetmap.de/wiki/StartupPageSource

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Ævar Arnfjörð Bjarmason
On Sat, Sep 12, 2009 at 5:11 PM, Dave Hansen d...@sr71.net wrote:
 If someone knows of any existing Java kd-tree implementations, I'd be
 happy to look into it and see if it could be applied here.  I love
 nothing more than to throw my own code away.  Seriously. ;)

Google turned this up for kd-tree java:
http://stackoverflow.com/questions/253767/kdtree-implementation-in-java

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] [PATCH 1/2] QuadBuckets (using quad tiling) for node storage in JOSM

2009-09-12 Thread Ævar Arnfjörð Bjarmason
On Sat, Sep 12, 2009 at 5:31 PM, Dave Hansen d...@sr71.net wrote:
 On Sat, 2009-09-12 at 17:25 +, Ęvar Arnfjörš Bjarmason wrote:
 On Sat, Sep 12, 2009 at 5:11 PM, Dave Hansen d...@sr71.net wrote:
  If someone knows of any existing Java kd-tree implementations, I'd be
  happy to look into it and see if it could be applied here.  I love
  nothing more than to throw my own code away.  Seriously. ;)

 Google turned this up for kd-tree java:
 http://stackoverflow.com/questions/253767/kdtree-implementation-in-java

 One of those links is a 404, and the other looks like a C++ class that
 has a Java API.  I'm not sure that'd be very easy to integrate into
 JOSM.  Thanks for the links, though!

You can find that 404-ed class on Google Code:
http://google.com/codesearch?q=KDTree.java

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Cloudmade's Editor

2009-07-24 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 24, 2009 at 7:53 PM, Richard Fairhurstrich...@systemed.net wrote:

 Frederik Ramm wrote:
 Let's get something like that for JOSM. Hope they haven't patented
 the thing ;-)

 Pfeh, it's ok for you guys, they chose a licence that's compatible with
 yours. Not something I can say. :(

The Mapzen page specifies GPLv2 not GPLv2 v2 or later. If that's
really what they mean then it's not compatible with JOSM since JOSM is
GPL v2 or later and under the GPL v3 when distributed with the bzip2
code (which is Apache licensed).

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Walking Papers Plugin

2009-07-20 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 17, 2009 at 12:24 PM, Ævar Arnfjörð
Bjarmasonava...@gmail.com wrote:
 I also think you should add it to the main plugin list, perhaps with
 an explanation in the plugin description that it's experimental. I
 read the source and it doesn't try to format my root filesystem or
 anything so the worst it can do is just not work, and that popup
 dialog at JOSM startup gets a bit annoying after a while.

I took the liberty of doing this and added some more minor fixes to it.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Walking Papers Plugin

2009-07-17 Thread Ævar Arnfjörð Bjarmason
On Wed, Jul 15, 2009 at 11:08 PM, Frederik Rammfrede...@remote.org wrote:
 I haven't yet committed the .jar file so I hope the plugin will not show
 up in JOSM automatically - you'll have to build it yourself. If anyone
 wants to make any improvements, you're more than welcome to do so ;-)

I made it a bit user friendly:

http://trac.openstreetmap.org/changeset/16555

I also think you should add it to the main plugin list, perhaps with
an explanation in the plugin description that it's experimental. I
read the source and it doesn't try to format my root filesystem or
anything so the worst it can do is just not work, and that popup
dialog at JOSM startup gets a bit annoying after a while.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] .jar file size is too big

2009-07-17 Thread Ævar Arnfjörð Bjarmason
On Fri, Jul 17, 2009 at 12:07 PM, Frederik Rammfrede...@remote.org wrote:
 I propose to split up the build process so that it builds a special
 version for each language. In addition, we can keep building the
 all-languages version for those in a true multilingual environment (or
 those on a fat pipe who would rather not be bothered). That would be the
 easiest way to tackle the problem. I'm not an ant guru but I think even
 I could do that.

FWIW not all users follow the pattern of always using an application
in one language or downloading it in their native one from the start.
Some users I've talked to didn't know that there was an Icelandic
translation of JOSM but it was easy to switch to it in the preferences
once they did, which wouldn't be that easy if they'd downloaded the
popular lean English version which most will probably gravitate to.

But do the JOSM translations really need to be so big in the first
place? I tried tar-bzipping up MediaWiki's translations and it came to
5.6MB. MediaWiki has 340 languages and around 2500 translatable
messages. If I bzipped up the 20 largest files (which have almost
everything translated) that came to 1.2 MB.

It looks like the Java gettext system is very wasteful in this regard.

 (I also like the Web Start idea but I have burnt my fingers with that on
 Linux using non-Sun Java installations in the past so I'm not sure how
 far I want to trust it; plus I am unsure how good this works when you're
 offline?)

Webstart is just a mechanism to automatically download  start a JAR
file in a modified sandbox. It's just a glorified download plugin for
your browser. So it'll work just like a normal JOSM (except for some
further sandbox restrictions) when offline.

You'll also burn your fingers on Linux when you run it on a non-Sun
Java regardless of whether you use WebStart or not in my experience,
although webstart has some other bugs on non-Sun Java that I've filed
at least one bug for:

http://josm.openstreetmap.de/ticket/2299

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Slow WMS Yahoo (WebKit)

2009-07-11 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 7, 2009 at 5:22 PM, Peter Herisonpheri...@web.de wrote:
 Does anybody noticed slow connection to Yahoo-API-Server? When I use
 Yahoo-WMS-Layer it takes 2-5 minutes for a single picture to load.

I looked at this on my system at it turned out that it was making
around 190 requests to get 60 tiles (making duplicate requests),
here's a bug report I filed with further info:

http://josm.openstreetmap.de/ticket/2912

Furthermore, when I manually visit an URL like (warning: this will
resize your browser):

http://josm.openstreetmap.de/wmsplugin/OpenStreetMap.html?bbox=13.1811813,52.4932330,13.1816406,52.4935127srs=EPSG:4326width=499height=500

I get a viewing area which shows a very tiny part of the full z18 tile
being displayed:

http://a.tile.openstreetmap.org/18/140670/86003.png

If the WMSPlugin is stitching its view from such croppings of z18 it's
probably making some very wasteful requests, as my bug report
indicates.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Slow WMS Yahoo (WebKit)

2009-07-07 Thread Ævar Arnfjörð Bjarmason
On Tue, Jul 7, 2009 at 8:15 PM, Claudiusclaudiu...@gmx.de wrote:
 Am 07.07.2009 19:22, Peter Herison:
 Hi

 Does anybody noticed slow connection to Yahoo-API-Server? When I use
 Yahoo-WMS-Layer it takes 2-5 minutes for a single picture to load.

 Takes around 5-10 seconds per tile here.
 Did you update your WMS Plugin lately?
 Make sure that you're using the new Yahoo Sat WMS entry pointing to
 html:http://josm.openstreetmap.de/wmsplugin/YahooDirect.html?;

Why isn't this file installed locally like the old Yahoo HTML wrapper?

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] mkgmap can't handle multiple bounds elements generated by JOSM

2009-07-05 Thread Ævar Arnfjörð Bjarmason
I was generating a map of Potsdam with mkgmap from an .osm file which
I had produced by making multiple API requests in JOSM as no extract
was available (and XAPI is down).

This resulted in a JOSM .osm file with multiple bounds elements.
mkgmap couldn't handle this and clipped the map to one of them
(presumably the first one) so my generated map showed only a part of
the area I had data for.

Maybe multiple bounds elements are invalid, or maybe mkgmap should
handle them. I can't find it on the wiki so you guys figure it out:)

For reference I'm attaching the changes I made to my .osm file to make
it work, which consisted of removing all the bounds elements.
--- Desktop/Potsdam.osm	2009-07-05 10:58:52.0 +
+++ src/map/potsdam/Potsdam.osm	2009-07-05 11:32:23.0 +
@@ -1,9 +1,5 @@
 ?xml version='1.0' encoding='UTF-8'?
 osm version='0.6' generator='JOSM'
-  bounds minlat='52.425035319943' minlon='12.9350280761719' maxlat='52.4777619318499' maxlon='13.1698608398438' origin='OpenStreetMap server' /
-  bounds minlat='52.2967220498974' minlon='12.8567504882812' maxlat='52.429779551' maxlon='13.018798828125' origin='OpenStreetMap server' /
-  bounds minlat='52.3969724417492' minlon='13.0139923095703' maxlat='52.4371764025608' maxlon='13.1478881835938' origin='OpenStreetMap server' /
-  bounds minlat='52.3240093086926' minlon='12.9666137695312' maxlat='52.4015810050808' maxlon='13.1561279296875' origin='OpenStreetMap server' /
   node id='360021233' timestamp='2009-03-13T22:32:40Z' user='Plan_A' visible='true' version='3' lat='52.4499741' lon='13.1450918'
 tag k='addr:postcode' v='14089' /
 tag k='name' v='Heilpädagogischer Kinder- und Jugendhilfeverbund SANCTA MARIA' /
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Trouble translating JOSM: Same strings used in different places

2009-06-29 Thread Ævar Arnfjörð Bjarmason
On Sat, Feb 21, 2009 at 8:50 PM, Dirk Stöckeropenstreet...@dstoecker.de wrote:
 On Sat, 21 Feb 2009, Ævar Arnfjörð Bjarmason wrote:

 Both are well established standards in English whereas other languages
 might have other well established standards. The two incidentally
 being the same in English carrying over to other languages is a
 systemic problem of the translation system which needs to be solved,
 as it'll only get worse the more languages we have.

 Without changes to the code itself for each language you will never be able
 to support non-english languages with perfect grammar and translations. We
 will have to live with that fact. It is a compromise between different
 requirements. So in case there is really no possibility to translate
 clashing texts in a useful way we will try to find a solution in the
 original strings. All the other 20 included translations have same problems
 and we somehow solved them. I'm always for improving the english original as
 well but I will not optimize JOSM for one specific language.

Launchpad now supports the msgctxt key which allows one to workaround
the issue of the English original strings being used as a unique key:

https://bugs.launchpad.net/rosetta/+bug/6034

Here's a comparison of it and some of the previous hacks in use:

http://leonardof.org/2007/12/01/context-in-gnome-translations/en/

And here's how it can be used in the source code itself:

http://mail.gnome.org/archives/gnome-i18n/2007-November/msg00097.html

I don't know if the Java gettext-commons library supports this however.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] How to contribute code?

2009-06-03 Thread Ævar Arnfjörð Bjarmason
2009/6/3 Dieter Muecke d_mu...@me.com:
 Bear with me if this is already answered on the wiki or anywhere else.
 How do I contribute code? I've
 written some code I think JOSM would benefit from.

By attaching a patch to a new ticket in JOSM's trac:

http://josm.openstreetmap.de/

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Updating Plugin handling (#2530)

2009-05-05 Thread Ævar Arnfjörð Bjarmason
On Tue, May 5, 2009 at 4:24 PM, Dirk Stöcker openstreet...@dstoecker.de wrote:
 Hello,

 is there someone here who has time and feels like fixing following bug:
 http://josm.openstreetmap.de/ticket/2530

 Essentially this is removing the HTML/XML loading and replacing it with
 loading the manifest based file at http://josm.openstreetmap.de/plugin
 (i.e. unifying the handling of local plugins and remote data as both are
 now in same format).

 It has some importance, as currently no JOSM can use the online updating
 mechanism.

I've hacked the regex so it works with the new version of trac. It's
not optimal but at least Downloading/Updating plugins works again.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Deletion conflicts

2009-04-27 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 27, 2009 at 7:44 PM, Frederik Ramm frede...@remote.org wrote:
 But, more importantly, how could we achieve that Steve's session gets
 wind of the fact that Nick has deleted the node?

The API won't tell you but the rails port will, and will indicate the
changeset in which the deletion took place:

http://www.openstreetmap.org/api/0.6/node/1000
http://www.openstreetmap.org/browse/node/1000

Would the information on the /browse/node/ page be sufficient for this
conflict resolution? evilPerhaps it could be screen-scaped while the
API doesn't provide a proper solution for this?/evil

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Commit message not empty

2009-04-22 Thread Ævar Arnfjörð Bjarmason
On Wed, Apr 22, 2009 at 11:28 AM, Frederik Ramm frede...@remote.org wrote:
 JOSM will not allow you to omit the comment, much as SVN doesn't allow
 you to commit without a message. Meaningful comments are vital to the
 usability of the whole changeset thing and while I can't (yet) force
 people to enter something meaningful, at least I want to convey to them
 the message that we really, really, really want them to enter something!

Even if it's only fuck you? Because that's the sort of crap we'll
get in the database because JOSM is forcing commit messages on people.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] [BROKEN PATCH] Adding a Full Screen action to the View menu

2009-03-09 Thread Ævar Arnfjörð Bjarmason
On Thu, Mar 5, 2009 at 7:12 PM, Ævar Arnfjörð Bjarmason
ava...@gmail.com wrote:
 Would a patch that only enabled this feature under X11 be acceptable?
 Or perhaps some win32/OSX hacker can take a look at it.

I've submitted one at http://josm.openstreetmap.de/ticket/2279

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] [BROKEN PATCH] Adding a Full Screen action to the View menu

2009-03-05 Thread Ævar Arnfjörð Bjarmason
On Wed, Mar 4, 2009 at 10:27 PM, Ævar Arnfjörð Bjarmason
ava...@gmail.com wrote:
 I tried adding a full screen action to josm, see the attached patch.

 This works if only the main window is displayed, however when JOSM
 opens another dialog (e.g. the download dialog), the OS's gui elements
 pop over the main window.

 Is there anything special one has to do in awt to make child windows
 respect the full screen configuration?

Actually this is less broken than I thought, it works on Linux but may
not work perfectly depending on the Window Manager, this isn't
anything specific to JOSM though. On my box Firefox and Rhythmbox for
example exhibit the same behavior:

http://flickr.com/photos/avarab/3330748992/
http://flickr.com/photos/avarab/3330749160/

However on Windows and Mac OS X it takes a turn for the worse,
according to t...@#osm which was kind enough to test it F11 on Windows
will cause JOSM to cover the task bar, but the window decorations will
still remain.

Presumably this can be solved with frame.setUndecorated(true), however
the setUndecorated method can only be called on a frame before it's
displayed in the first place, so I don't know how to do this other
than shutting down the main frame and starting it again on F11, which
would of course lose any state in it at the time.

On OSX it's even worse: clicking fullscreen in your josm, the window
stayed the same size, everything around it was replaced with black,
and the menu stayed open and wouldn't close right [...] the app
becomes completely unresponsive [...] only thing i can do is close it
with the window manager close button. All this despite
gd.isFullScreenSupported() returning true on OSX.

Would a patch that only enabled this feature under X11 be acceptable?
Or perhaps some win32/OSX hacker can take a look at it.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] [BROKEN PATCH] Adding a Full Screen action to the View menu

2009-03-04 Thread Ævar Arnfjörð Bjarmason
I tried adding a full screen action to josm, see the attached patch.

This works if only the main window is displayed, however when JOSM
opens another dialog (e.g. the download dialog), the OS's gui elements
pop over the main window.

Is there anything special one has to do in awt to make child windows
respect the full screen configuration?
Index: src/org/openstreetmap/josm/gui/MainMenu.java
===
--- src/org/openstreetmap/josm/gui/MainMenu.java	(revision 1461)
+++ src/org/openstreetmap/josm/gui/MainMenu.java	(working copy)
@@ -14,6 +14,12 @@
 import javax.swing.JMenuItem;
 import javax.swing.KeyStroke;
 
+/* For the fullscreen action */
+import java.awt.Frame;
+import java.awt.GraphicsEnvironment;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsDevice;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.AboutAction;
 import org.openstreetmap.josm.actions.AddNodeAction;
@@ -228,6 +234,27 @@
 JosmAction autoScaleAction = new AutoScaleAction(mode);
 add(viewMenu, autoScaleAction);
 }
+viewMenu.addSeparator();
+// TODO move code to an action like the others?
+final JCheckBoxMenuItem fullscreen = new JCheckBoxMenuItem(tr(Full Screen));
+fullscreen.setSelected(Main.pref.getBoolean(draw.fullscreen, false));
+fullscreen.setAccelerator(Shortcut.registerShortcut(menu:view:fullscreen, tr(Toggle Full Screen view),
+KeyEvent.VK_F11, Shortcut.GROUP_DIRECT).getKeyStroke());
+fullscreen.addActionListener(new ActionListener() {
+public void actionPerformed(ActionEvent ev) {
+Main.pref.put(draw.fullscreen, fullscreen.isSelected());
+
+GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+GraphicsDevice gs = ge.getDefaultScreenDevice();
+
+if (Main.pref.getBoolean(draw.fullscreen)) {
+gs.setFullScreenWindow((Frame)Main.parent);
+} else {
+gs.setFullScreenWindow(null);
+}
+}
+});
+viewMenu.add(fullscreen);
 add(viewMenu, KeyEvent.VK_V, view);
 
 add(toolsMenu, splitWay);
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Why are some .po strings commented out when downloaded from launchpad?

2009-03-02 Thread Ævar Arnfjörð Bjarmason
On Mon, Mar 2, 2009 at 3:02 PM, Dirk Stöcker openstreet...@dstoecker.de wrote:
 On Mon, 2 Mar 2009, Ævar Arnfjörð Bjarmason wrote:

 When I download the current Icelandic (is.po) translation from
 launchpad some msgid/msgstr pairs are commented out, seemingly without
 any reason I can see in the launchpad web interface. For instance:

 # Commented out:

 https://translations.launchpad.net/josm/trunk/+pots/keys/is/+translate?batch=10show=allsearch=Update+Data
 # Not commented out:

 https://translations.launchpad.net/josm/trunk/+pots/keys/is/+translate?batch=10show=allsearch=Save+and+Exit

 Both have a Current Icelandic version and an indicator that they've
 been translated.

 Attached are the last 200 lines of is.po. The commented messages begin
 at line 127.

 Are you sure this is a Launchpad download? This looks more like a
 'msgmerge'd file. And if a msgmerge results in active strings disabled, then
 probably your SVN is not up-to-date in all parts.

No it wasn't one, I was looking at a msgmerge'd file. I didn't realize
that the files were further munged during i18n's ant build process.

I updated the accompanying core directory (my main josm checkout was
elsewhere) which fixed this issue.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] The S shortcut stops working under LC_ALL=is_IS.UTF8

2009-02-24 Thread Ævar Arnfjörð Bjarmason
On Tue, Feb 24, 2009 at 6:04 PM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 On Tue, 24 Feb 2009, Ævar Arnfjörð Bjarmason wrote:

 The resulting .jar can be accessed here:
 http://u.nix.is/josm-custom-is.jar

 You translated both with Val. Does it still happen, when you have two
 different translations?

 It is a bug, but what's the reason.

Do you mean that a few messages are translated as Val

$ grep 'Val' -B2 po/is.po
#: ../core/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java:82
msgid Current Selection
msgstr Val
--
#: 
../plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java:96
msgid Select
msgstr Val
--
#: ../core/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java:280
msgid Selection
msgstr Val

What do you mean when I have two different translations? What should I
try exactly?

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Þýðing á JOSM á íslensku

2009-02-21 Thread Ævar Arnfjörð Bjarmason
Ég byrjaði fyrir einhverju að þýða JOSM ritilinn á íslensku hægt, og
hef tekið smá törn á því aftur. DaníelG hefur einnig verið að hjálpa
við þýðinguna og er tilgangur þessa pósts að fá fleiri til aðstoðar.

Þýðingarsíðan er á launchpad þannig auðveld að þýða ritilinn í gegnum
vefviðmót: https://translations.launchpad.net/josm/trunk/+pots/keys/is

Um 17% af strengjum í forritinu eru núna þýdd, en stærri hluti
viðmótsins en svo, enda eru margir strengir einhver skilaboð sem sjást
sjaldan.

Þar sem aðeins 17% af viðmótinu er núna á íslensku er þýðingin ekki í
aðal JOSM útgáfunni, en þeir miða við 30% til að þýðingar séu pakkaðar
með ritlinum. En ég útbý og hleð upp útgáfu sem inniheldur íslensku
útgáfuna þegar ég er að vinna í þessu:

http://u.nix.is/josm-custom-is.jar

Til að nota íslenskuna er farið í Preferences (F12)-Display
settings-Look and feel-Language-Íslenska. Þá er hægt að skoða
þýðinguna og nota svo leitarfídusinn á launchpad til að leita að og
þýða strengi sem eru óþýddir.

Margar þessar þýðingar eru einfaldar, t.d. nær allt í Forstillingar
þar sem þarf að þýða einfalda hluti eins og Shoes í Shops hlutanum
sem Skóbúð, svo dæmi sé nefnt.

Það eru þó margir hlutir sem ég er óviss á hvernig á að þýða:

* highway=primary/secondary/tertiary/unclassified = ??
* highway=bridleway = ??

Og svo grundvallarhlutir eins og:

* node/way/relation = nóða/vegur/vensl eða hnútur/vegur/vensl (DaníelG
fór að nota það síðara, ég veit ekkert hvort telst réttara)
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Trouble translating JOSM: Same strings used in different places

2009-02-21 Thread Ævar Arnfjörð Bjarmason
I've been translating JOSM into Icelandic which is mostly going fine,
but I'm having some trouble where the same strings e.g. Edit are
used in entirely different contexts in the application. This might be
OK in some languages but not in others.

Reading the gettext-commons tutorial I don't see a way around this,
except perhaps the trc() function. Can it be (ab)used to solve this
problem?:

http://code.google.com/p/gettext-commons/wiki/Tutorial

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Trouble translating JOSM: Same strings used in different places

2009-02-21 Thread Ævar Arnfjörð Bjarmason
On Sat, Feb 21, 2009 at 7:24 PM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 On Sat, 21 Feb 2009, Ævar Arnfjörð Bjarmason wrote:

 I've been translating JOSM into Icelandic which is mostly going fine,
 but I'm having some trouble where the same strings e.g. Edit are
 used in entirely different contexts in the application. This might be
 OK in some languages but not in others.

 What are the places which should be different?

To name one example I'd like to translate the Edit menu (next to
File and View) as Sýsl and the Edit button in the
Properties/Memberships dialog as Breyta.

That's just one example though, but if you look through strings in
launchpad you'll see various places where Located in contains more
than one source file or more than one location. For my purposes most
of these are fine as they are, but sometimes it becomes impossible to
translate the interface without inserting grammatical errors or
nonsensical messages when the same string is used in multiple
locations.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Trouble translating JOSM: Same strings used in different places

2009-02-21 Thread Ævar Arnfjörð Bjarmason
On Sat, Feb 21, 2009 at 8:16 PM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 On Sat, 21 Feb 2009, Ævar Arnfjörð Bjarmason wrote:

  Car-Parking
  Car-Rental
  Bicycle-Parking
  Bicycle-Rental

 I translated tr(Parking) as Bílastæði (literally: Car-parking)
 which of course made Car-parking a sub-item of the Bicycle menu
 which should have Hjólastæði (literally Bicycle-parking).

 We cannot introduce context in the presets file, so we would need to change
 the texts. For the main application we could introduce contexts, but I would
 like to avoid that and rather change texts as well.

 That's why I ask for specific descriptions and not examples. Best would be a
 changed english text as well. But keep in mind that each change means 20
 translators have to change their texts as well, so always remember that no
 translation will fit 100%. If you cannot work around, we will change code if
 possible. Otherwise you will have to deal with the issues :-)

What sort of code change would solve this specific issue (other than
switching away from .po). Is there something in the gettext-commons
API that I'm missing? If you have tr(Edit) in two places it'll be
picked up as the same string by the .po utilities.

 Your Edit/Edit problem is one, where really find no better distinguishable
 words, as both are well established standards.

Both are well established standards in English whereas other languages
might have other well established standards. The two incidentally
being the same in English carrying over to other languages is a
systemic problem of the translation system which needs to be solved,
as it'll only get worse the more languages we have.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Trouble translating JOSM: Same strings used in different places

2009-02-21 Thread Ævar Arnfjörð Bjarmason
On Sat, Feb 21, 2009 at 9:03 PM, Dermot McNally derm...@gmail.com wrote:
 The issue of localisation frameworks is one that I've been considering
 a lot in the last few weeks in my day job. Our application is built in
 perl, and perl provides a more powerful, code-allowed tool called
 maketext which does more or less what gettext does but with some extra
 bells and whistles. There are ways to use the .po file format for a
 maketext lexicon. Some background:

 http://cpansearch.perl.org/src/AUTRIJUS/Locale-Maketext-Lexicon-0.62/docs/webl10n.html

 But the one thing that surprised me is that all common lexicon
 arrangements assume that strings should be keyed not by an abstract
 key (like, say, EDIT_MENU_NAME, 'EDIT_TOOL_BUTTON_NAME) but by the
 string itself in the primary language (Edit, with no option to have
 a second Edit in a different context). This struck me as troublesome
 during my investigations, partly because of the context difficulty
 that we're seeing here, but mostly because for a string like ACME
 Widgets company - your source of cheap widgets, any change, even one
 of punctuation, or, in this example, a revision to your English
 language slogan, forces an update of all localised string assets,
 whether or not it's essential that they be adjusted (which for reasons
 of English punctuation or grammar or single-market motto changes is
 more trouble than is warranted).

 Has this kind of problem not arisen many times before and been solved?

As long as the strings of some natural language are being used as keys
you'll always run into these problems.

Perhaps it could be solved by doing the following, while still staying
with the .po format:

In the source:

tr(EDIT_MENU_NAME)

In en.po:

msgid EDIT_MENU_NAME
msgstr Edit

In is.po:

msgid EDIT_MENU_NAME
msgstr Sýsl

The application would then be configured to never use the original
tr() strings except in some debugging mode, always switching to en.po
when you start it up.

Maybe this has already been implemented by some other application?

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] JOSM Fail

2009-01-16 Thread Ævar Arnfjörð Bjarmason
On Fri, Jan 16, 2009 at 12:49 PM, Frederik Ramm frede...@remote.org wrote:
 Hi,

 Shaun McDonald wrote:
 Um, I don't understand your second sentence there. Do you mean that
 the fix is to set the focus to the textfield rather than the button?
 On Mac OS X it seems that the textfield isn't selected by default,
 however if you click in the text field, and use the keyboard shortcut
 to paste it will work.

 I *think* the problem is that there is a note in the text field saying
 paste your url here, and when you focus the text field, that note gets
 selected which, on some platforms, replaces the paste buffer with paste
 your url here, and in any case breaks pasting because you would have to
 delete it first. If the message paste your url here becomes a label
 above the text box, and the box remains empty, pasting should be a
 no-brainer.

Yes, that's exactly the issue, see http://josm.openstreetmap.de/ticket/2019

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Misc. questions about tools in the tools menu

2009-01-13 Thread Ævar Arnfjörð Bjarmason
Here are a few things that bug me in JOSM (which might well be doable):

* When I select two nodes (e.g. belonging to a way) and merge them
with m JOSM always moves one node to the other with no apparent way
to choose which node gets moved and which one maintains its position.
I've tried selecting one before the other, and selecting the two nodes
 ways the belong to with the same results.

* When I select the end node of a way and select the draw tool I can
continue drawing the way further, however I'd like to start drawing a
new way with the select node being shared between the two. If I press
Alt a dividing line is shown when I draw it but if I click the map the
way isn't extended, and so the only way for me to do this is either to
split the way after the fact or draw another way and end it where I
would have otherwise started it.

* How does Join Node to Way work? I can't find it documented
anywhere nor can I get it to do anything by experimentation.

Maybe this is a problem with my WM? I'm using Compiz under GNOME in Ubuntu 8.10.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Misc. questions about tools in the tools menu

2009-01-13 Thread Ævar Arnfjörð Bjarmason
On Tue, Jan 13, 2009 at 3:13 PM, Frederik Ramm frede...@remote.org wrote:
 Maybe this is a problem with my WM? I'm using Compiz under GNOME in Ubuntu
 8.10.

 Yes it is. Either tell your window manager not to capture the Alt+Click for
 itself (Compiz does window dragging with Alt), or simply press another
 modifier key together with Alt which will confuse Compiz and let JOSM react
 as programmed (Alt+AltGr, or Alt+Ctrl or Alt+Windows keys or so, but when
 using Alt+Ctrl JOSM will also react to Ctrl i.e. not re-use an existing node
 that happens to be under the mouse pointer).

Thanks, Alt+Win+Click works.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Multipolygon stuff finished

2009-01-04 Thread Ævar Arnfjörð Bjarmason
On Sat, Jan 3, 2009 at 1:06 PM, Dirk Stöcker openstreet...@dstoecker.de wrote:
 On Sat, 3 Jan 2009, Ævar Arnfjörð Bjarmason wrote:

 Comments and bug reports as well as more test cases for the multipolygon
 file are wellcome.

 When I open the test file with the feature turned on some of the ways
 in row #3 look like they're selected even if they're not.

 Selected? You mean for 5 and 8 there is no blue border around the inners?
 That is caused by the fact, that I have an inner multipolygon to get the
 blue water and the style type is defined in the multipolygon. Thus the order
 of the relations determines the display type of the lines (i.e. they are
 drawn twice and the white one wins :-).

 This is the case for all the times, when the types conflict. The
 multipolygon display routines try to do best guess about the linestyle to
 use, but this does not work always :-)

 If you mean something different, please send a screenshot.

I don't quite understand what you mean with 5 and 8 but I've filed a
bug on the issue which should clear things up. If you think it's not a
defect please close it as erroneous:
http://josm.openstreetmap.de/ticket/1958
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Translation

2008-12-23 Thread Ævar Arnfjörð Bjarmason
On Tue, Dec 23, 2008 at 6:59 PM, Frederik Ramm frede...@remote.org wrote:
 Is it good practice to do things like

 String message1 = tr(No luck today.) +   + tr(Try again.);
 String message2 = tr(Busy with other things.) +   + tr(Try again.);

 instead of

 String message1 = tr(No luck today. Try again.);
 String message2 = tr(Busy with other things. Try again.);

 assuming that the former would lead to less work for translators?

No it is not a good idea, the former assumes that all languages share
English sentence structure, which they do not.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Translation

2008-12-23 Thread Ævar Arnfjörð Bjarmason
On Tue, Dec 23, 2008 at 4:43 PM, Dirk Stöcker
openstreet...@dstoecker.de wrote:
 I will regularily update the JOSM language pack and add new languages as
 soon as a minimum of about 30% are translated.

 Incomplete included: PL, RU, RO, FR, SV, SL, PL, CS
 Complete: DE
 Nearly complete (was complete before update): IT
 Starting, but no 30% yet: ES, KO, HE, NL, HU, SK, ET

I've started to translate JOSM into Icelandic as of this evening since
it's easy to do so in launchpad and since you're synchronizing the
translations back into JOSM regularly.

Currently I have around 5% translated, having such 30% translations
included in the translation .jar file would be useful to see what I've
translated in context, perhaps such translations could be marked as
incomplete in the GUI?

Alternatively, how do you build translations from launchpad so that I
can try out the Icelandic translation myself?
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Search and | ?

2008-12-21 Thread Ævar Arnfjörð Bjarmason
Russ, if you, or anyone else, is interested in doing some further
hacking on search and related features I've filed the following two
bugs in trac which I would pretty please with sugar on top like to be
implemented:

* http://josm.openstreetmap.de/ticket/1864 - Search doesn't support
regex search on keys and/or values
* http://josm.openstreetmap.de/ticket/1865 - Implement selection stack

Regex search would come in particularly handy. I don't know how hard
it would be to hack the tokenizer to support it however as regexes
could contain characters that are currently considered tokens, such as
: and | and .

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Search and | ?

2008-12-21 Thread Ævar Arnfjörð Bjarmason
On Sun, Dec 21, 2008 at 8:53 PM, Frederik Ramm frede...@remote.org wrote:
 Hi,

 Ævar Arnfjörð Bjarmason wrote:

 * http://josm.openstreetmap.de/ticket/1865 - Implement selection stack

 Are you sure you are running a release newer than 3 months or so? Because
 search and selection history is in JOSM since r967...

Yes I'm aware of the search history (a very useful feature). But a
selection stack would compliment it. Selection and search histories
are two separate things.
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] Search and | ?

2008-12-21 Thread Ævar Arnfjörð Bjarmason
You're both right, the feature already exists. I just didn't notice it. Thanks!

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] new open location menu entry

2008-12-20 Thread Ævar Arnfjörð Bjarmason
On Fri, Dec 19, 2008 at 9:50 PM, Frederik Ramm frede...@remote.org wrote:
 Hi,

I have added an open location entry to the file menu which can be
 used to download any .osm file and directly import it into your working
 data set (or as a new layer).

 The way such downloads currently happen in JOSM is a bit haphazard, with
 the normal bounding box download, the relation completion download, and
 the new open location code all having some copy+pasted elements and
 generally hard to follow flow of control (either that or I'm just
 dense). I'll make an attempt to clean this up a bit.

Was this supposed to replace the Open File entry in the toolbar
(next to save/save as GPX) as it did?

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] OpenStreetBugs plugin

2008-12-17 Thread Ævar Arnfjörð Bjarmason
On Tue, Oct 7, 2008 at 9:00 PM, Henrik Niehaus henrik.nieh...@gmx.de wrote:
 Hi all,

 I have created a plugin, which loads the issues from OpenStreetBugs into
 JOSM. You can find a compiled version and the complete eclipse project
 here: http://hampelratte.org/zeugs/openstreetbugs.tar.gz

 Comments appreciated.

When I create a new issue it brings up a dialog with the text
Describe the problem as precise as possible, that is grammatically
incorrect. I think it should say Describe the problem precisely
which is both proper English and more succinct.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] GPS coordinates

2008-11-30 Thread Ævar Arnfjörð Bjarmason
On Sun, Nov 30, 2008 at 2:06 PM, Markus Lindholm
[EMAIL PROTECTED] wrote:
 Thanks for the feedback. I've incorporated your changes and fixed
 negative longitude and latitude so that in DMS N/S/W/E is displayed
 instead. I've attached a new patch to the ticket
 http://josm.openstreetmap.de/ticket/1730

I should have been more clear about this, my patch was not something
that should have been incorporated into your patch as-is but a work in
progress modification I used to tweak josm when reviewing yours. You
incorporated the ERROR selection between coordinate systems and as a
result JOSM displays ERROR by default in the selection pane when no
coordinate system has been selected in the preferences.

The alternation between coordinate systems needs to be fixed and JOSM
needs to work by default if none is selected.

The coordinates should also be padded, mm and ss in hddd°mm'ss.s (and
its DM equivalent) should always be two digits, e.g.
64°08'23.564°08'23.5 not  64°8'23.5.

And the issue of writing the display string to the preferences file
remains, this is what was written to my preferences:

coordinates=hddd°mm'ss.s
___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] GPS coordinates

2008-11-29 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 29, 2008 at 3:18 PM, Markus Lindholm
[EMAIL PROTECTED] wrote:
 Ok, attached a patch to ticket
 http://josm.openstreetmap.de/ticket/1730

[I'm not a JOSM dev]

I reviewed it briefly and there are a few problems I can see:

* The string you're writing to the preferences file to determine what
coordinate system the user wants is the one displayed in the user
interface, thus if you ever change the UI string (or it gets
translated?) the preference will break. It would be better to write
something like coordinates=DMS than coordinates=Degree Minute
Second

* Your convertDDToDMS() function breaks if either of the degrees is
negative, e.g. -21.5050 will be -21°-30'-30 (approx values), you need
to import java.lang.Math and do something like:

public static String S(double pCordinate) {

int tDegree = (int) pCordinate;
double tTmpMinutes = (pCordinate - tDegree) * 60;
int tMinutes = Math.abs((int) tTmpMinutes);
double tSeconds = Math.abs((tTmpMinutes - tMinutes) * 60);

return tDegree + \u00B0 + tMinutes + \' +
DMSsFormatter.format(tSeconds) + \;

* Your DMS format isn't a DMS format at all even without the negative
values in the middle of the string. There are no negative numbers in
DMS, 64,-21 is 64N,21W

* This only works for the JOSM map display but not other places where
coordinates are displayed, e.g. the selection dialog

* The width of the coordinate display needs to be adjusted depending
on the coordinate system in use or trailing dots will be displayed
(see attached screenshot)

And as a bit of random drive-by bikeshedding I prefer the Garmin
coordinate selection format I've attached in my patch, which is broken
by default unless you select a coordinate system since I was in the
process of trying to add a DM system in addition do D and DMS.
Index: src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java
===
--- src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java	(revision 1096)
+++ src/org/openstreetmap/josm/gui/preferences/ProjectionPreference.java	(working copy)
@@ -13,6 +13,7 @@
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.data.projection.Projection.CoordinateDisplay;
 import org.openstreetmap.josm.tools.GBC;
 
 public class ProjectionPreference implements PreferenceSetting {
@@ -21,15 +22,26 @@
 	 * Combobox with all projections available
 	 */
 	private JComboBox projectionCombo = new JComboBox(Projection.allProjections);
+	private JComboBox coordinatesCombo = new JComboBox(CoordinateDisplay.values());
 
 	public void addGui(PreferenceDialog gui) {
-		for (int i = 0; i  projectionCombo.getItemCount(); ++i) {
-			if (projectionCombo.getItemAt(i).getClass().getName().equals(Main.pref.get(projection))) {
-projectionCombo.setSelectedIndex(i);
-break;
-			}
-		}
+		
+for (int i = 0; i  projectionCombo.getItemCount(); ++i) {
+if (projectionCombo.getItemAt(i).getClass().getName().equals(Main.pref.get(projection))) {
+projectionCombo.setSelectedIndex(i);
+break;
+}
+}
+
+for (int i = 0; i  coordinatesCombo.getItemCount(); ++i) {
+if (coordinatesCombo.getItemAt(i).toString().equals(Main.pref.get(coordinates))) {
+coordinatesCombo.setSelectedIndex(i);
+break;
+}
+}
+
 		projectionCombo.addActionListener(gui.requireRestartAction);
+coordinatesCombo.addActionListener(gui.requireRestartAction);
 		
 		JPanel projPanel = new JPanel();
 		projPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.gray), tr(Map Projection)));
@@ -37,10 +49,14 @@
 		projPanel.add(new JLabel(tr(Projection method)), GBC.std().insets(5,5,0,5));
 		projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
 		projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
+	projPanel.add(new JLabel(tr(Display coordinates as)), GBC.std().insets(5,5,0,5));
+	projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
+	projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
 		gui.map.add(projPanel, GBC.eol().insets(0,0,0,10).fill(GBC.HORIZONTAL));
 }
 
 	public void ok() {
 		Main.pref.put(projection, projectionCombo.getSelectedItem().getClass().getName());
+		Main.pref.put(coordinates, coordinatesCombo.getSelectedItem().toString());
 }
 }
Index: src/org/openstreetmap/josm/gui/MapStatus.java
===
--- src/org/openstreetmap/josm/gui/MapStatus.java	(revision 1096)
+++ src/org/openstreetmap/josm/gui/MapStatus.java	(working copy)
@@ -88,11 +88,12 @@
 		}
 	}
 
+	String mCord;
 DecimalFormat latlon = new DecimalFormat(###0.);
-ImageLabel lonText = new ImageLabel(lon, tr(The geographic 

Re: [josm-dev] BUG: Corrupt rendering of GPS traces under JOSM

2008-09-02 Thread Ævar Arnfjörð Bjarmason
On Mon, Sep 1, 2008 at 8:06 PM, Henry Loenwind [EMAIL PROTECTED] wrote:
 (1) there is a bug tracker

I know, but I wasn't sure that this was a JOSM issue as mentioned in my posting.

 (2) not a bug. The server delivers all GPS points in the downloaded area as
 one tracks---that gives the jumps where points from different real tracks
 are merged. Potlatch does not use the API for this but directly reads from
 the database, so it has the original track information. JOSM has a setting
 (first settings page) to limit the distance between GPS points for line
 drawing. Set this to something line 50 or 70 meters to filter out most of
 these jumps.

This explains the issue I was having and the setting you mention will
probably fix it, thanks.

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev


[josm-dev] Focusing and keyboard shortcut issues under Xnest

2008-08-10 Thread Ævar Arnfjörð Bjarmason
I run josm under Xnest because I'm using stumpwm and exporting
AWT_TOOLKIT as suggested on the wiki doesn't work[1]:

Xnest :1 -ac -geometry 1400x1050
DISPLAY=:1 java -Xmx512M -jar ~/src/josm-latest.jar

I have difficulty using the keyboard shortcuts under this setup,
sometimes the z, a and s keys will work to select the zoom, add
and select tools and sometimes they won't, and after I've just created
a way Alt+a will bring up the tag window but if I do so a second time
nothing happens, until I click an area near the Add button which
seems to make it work again.

Other times when I start JOSM no keyboard shortcut works at all and no
clicking around the application will fix it and neither will
restarting it. Then I'll start it again and again it works seemingly
by random magic.

1. 
http://wiki.openstreetmap.org/index.php/JOSM#JOSM_seems_to_start_okay.2C_but_the_window_is_blank

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev