Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22655 closed enhancement (fixed)

[PATCH] Added new button 'Clear and add'

Reported by: tondahaas@… Owned by: Gnonthgol
Priority: normal Milestone:
Component: Plugin todo Version:
Keywords: Cc:

Description

Based on slack josm channel and taylor.smock recommendation I'm creating this issue to add new tested feature to main branch.

This change adds a shortcut to an existing button 'ADD’ and there is a new button ‘Clear and add’ that clears todo list, adds items from the selection and zooms on the first item of the list.

I made changes in the java file, successfully built a local version using ant that is deployed in my JOSM and tested for months.

svn diff file included

Attachments (3)

new_feature.diff (4.9 KB ) - added by tondahaas@… 2 years ago.
diff file
updated.diff (4.1 KB ) - added by tondahaas@… 2 years ago.
updated diff file
22655.patch (5.5 KB ) - added by taylor.smock 2 years ago.
Use drop-down arrow for Add and Clear action

Download all attachments as: .zip

Change History (14)

by tondahaas@…, 2 years ago

Attachment: new_feature.diff added

diff file

comment:1 by taylor.smock, 2 years ago

Notes from a quick skim of the patch:

  • Please don't hardcode keyboard shortcuts (see TodoDialog from your patch on line 303). Users can change their keyboard shortcut, and showing an incorrect shortcut should not be done.
  • When implementing new actions, please extend JosmAction instead of AbstractAction. Among other things, it will properly add the shortcut to the tooltip.
    • I know that the other actions from the Todo plugin don't extend JosmAction. They should probably be updated, but that isn't your problem. :)
    • It will also register the shortcut and action combination (so you can get rid of MainApplication.registerActionShortcut calls)
    • The constructors that you should call will also do the putValue calls for you.

comment:2 by taylor.smock, 2 years ago

Summary: Added new button 'Clear and add'[WIP PATCH] Added new button 'Clear and add'

by tondahaas@…, 2 years ago

Attachment: updated.diff added

updated diff file

comment:3 by tondahaas@…, 2 years ago

I have attached updated diff file.

comment:4 by taylor.smock, 2 years ago

Looks good to me. I'll pull it down and apply it when I've got some time to play around with it. If I haven't applied the patch by next Monday, ping this ticket (add a comment).

If you need/want credit to a specific github account, you can make a fork of https://github.com/JOSM/todo and then open a PR against that repo.

Otherwise, if you have a preferred screen name for credit, please let me know. Otherwise, the commit message will likely look like

Fix #22655: Add new button for clearing the current list and adding the selected objects (patch by tondahaas)

comment:5 by tondahaas@…, 2 years ago

You can use screen name anthaas. I won't create PR on github.
Thank you.

comment:6 by tondahaas@…, 2 years ago

Hello. This is a friendly reminder about updating status of the ticket. Thank you.

comment:7 by taylor.smock, 2 years ago

Summary: [WIP PATCH] Added new button 'Clear and add'[PATCH] Added new button 'Clear and add'

Thank you for pinging this ticket.

comment:8 by taylor.smock, 2 years ago

OK. I've done a little playing around with it, and I think that adding another button is pushing it, for the default size of the toggle dialog.

What do you think about making it part of a drop down, like the Search button in the Selection toggle dialog?

by taylor.smock, 2 years ago

Attachment: 22655.patch added

Use drop-down arrow for Add and Clear action

comment:9 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

In a477a7fbfd4f469154be3f9ea26bc2fa44561f1f.

I probably won't make a release until I update the translations, so probably around February 27th is when you can expect a release with the change.

Last edited 2 years ago by taylor.smock (previous) (diff)

comment:10 by holgermappt, 2 years ago

Looks like "Mark" is missing in the string on line 412 in Git a477a7f/SVN 144:

tr(" the selected items (on the map) as done in the todo list."),

Based on the context and the previous string that should be (I think):

tr("Mark the selected items (on the map) as done in the todo list."),

comment:11 by taylor.smock, 2 years ago

Thanks. It should be fixed in 7004cefb58a74d3d43f3483bd2eb0042db8ddcd5.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Gnonthgol.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.