Opened 13 years ago
Closed 13 years ago
#6974 closed defect (fixed)
Ability to add custom search from search dialog
Reported by: | akks | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | search, custom, toolbar | Cc: |
Description
I suggest a simple patch that modifies search dialog (Ctrl-F).
The checkbox is added to use selected search expression as a temporary 'custom search button' on toolbar.
I am not sure if we need saving this button in preferences.
It is an easy solution for cases like http://josm.openstreetmap.de/ticket/6779 - preferences are too far for average user ( for me too :) ).
If something should be improved in this patch, I can do it (or someone else).
Attachments (2)
Change History (18)
by , 13 years ago
Attachment: | addButton.patch added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Hmm, my comment must have been lost: The button is really temporary - As soon as you open prefs and save it is lost. This is a very unexpected behaviour.
follow-up: 4 comment:3 by , 13 years ago
There is no big problem in saving these buttons, but how to clear them?
Make another window for editing search buttons?
By the way - is it possible to add simple context menu for toolbar buttons like "remove from panel"?
follow-up: 5 comment:4 by , 13 years ago
Replying to akks:
By the way - is it possible to add simple context menu for toolbar buttons like "remove from panel"?
Sounds reasonable - that's how it works in the Opera Browser.
comment:5 by , 13 years ago
Replying to bastiK:
Replying to akks:
By the way - is it possible to add simple context menu for toolbar buttons like "remove from panel"?
Sounds reasonable - that's how it works in the Opera Browser.
I have made a patch to add toolbar context menu and "show preferences" for now and posted it in corresponding ticket:
http://josm.openstreetmap.de/ticket/6953
There is unsolved problem - I do not know, how to show specific tab of preferences, not the first [without big refactoring].
Please have a look at it if you have some time.
If this patch will be applied, we can add custom search buttons permanently (I'll rewrite the SearchAction patch).
by , 13 years ago
Attachment: | customSearchActionPermanent.patch added |
---|
comment:6 by , 13 years ago
In reworked version of the patch custom search buttons are saved in preferences (ToolbarPreferences classes are used).
To remove them from toolbar, user should go to toolbar preferences or use context menu proposed in ticket:6953.
comment:7 by , 13 years ago
Summary: | [PATCH] Ability to add custom search from search dialog → [PATCH][v2] Ability to add custom search from search dialog |
---|
comment:10 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The toolbar button is added at the left. This is unexpected.
comment:11 by , 13 years ago
Also, it kills my toolbar:
- add button
- show tooltip for button
-> all buttons below tooltip are gone
next restart: only the search custom search button is there
comment:12 by , 13 years ago
Summary: | [PATCH][v2] Ability to add custom search from search dialog → Ability to add custom search from search dialog |
---|---|
Type: | enhancement → defect |
follow-up: 15 comment:13 by , 13 years ago
VERY strange! I can not reproduce it... (if "Show tooltip" means hold the mouse on the button).
(I am on Windows XP...)
Maybe, you are experimenting with preferences code?
Does it happen with clean preferences and josm-latest?
The adding code is
Collection<String> t = new LinkedList<String>(Main.pref.getCollection("toolbar")); if (t!=null) { // add custom search button to toolbar preferences if (!t.contains(res)) t.add(res); Main.pref.putCollection("toolbar", t); Main.toolbar.refreshToolbarControl(); }
comment:15 by , 13 years ago
Replying to akks:
VERY strange! I can not reproduce it... (if "Show tooltip" means hold the mouse on the button).
Yes, apparently, it did not repaint properly after removing all the buttons.
Maybe, you are experimenting with preferences code?
You are exactly right. (Except I'm not experimenting, but it's supposed to work. :) )
comment:16 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
No comments => no chance for this patch?