Allow brave users to disable the confirmation dialog when replacing text in the whole session.
While modifying the docs, I noticed a missing various pref in the table and added it. Because of the long names of the other and the new setting, the table grew and needed reformatting. I put this into a separate commit for easier review but we can probably squash them together afterwards.
Closes #3702. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3851
-- Commit Summary --
* Add a various pref to skip 'replace in session' confirmation dialog * Add missing various pref docs * Reformat various prefs table in docs
-- File Changes --
M doc/geany.txt (264) M src/keyfile.c (2) M src/plugindata.h (2) M src/search.c (3) M src/search.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/3851.patch https://github.com/geany/geany/pull/3851.diff
@elextr requested changes on this pull request.
LGBI except the ABI thing.
@@ -60,6 +60,8 @@ typedef struct GeanySearchPrefs
gboolean use_current_file_dir; /* find in files directory to use on showing dialog */ gboolean hide_find_dialog; /* hide the find dialog on next or previous */ gboolean replace_and_find_by_default; /* enter in replace window performs Replace & Find instead of Replace */ + gboolean skip_confirmation_for_replace_in_session; /* do *not* ask for confirmation
Not last == ABI break as well as API
And if its moved to the end its technically not an API break either since it isn't documented for plugin use.
**``search`` group**
-find_selection_type See `Find selection`_. 0 immediately -replace_and_find_by_default Set ``Replace & Find`` button as default so true immediately - it will be activated when the Enter key is - pressed while one of the text fields has - focus. +find_selection_type See `Find selection`_. 0 immediately +replace_and_find_by_default Set ``Replace & Find`` button as default so true immediately + it will be activated when the Enter key is + pressed while one of the text fields has + focus. +skip_confirmation_for_replace_in_session If set, do *not* show the false immediately
If it was lazy me I would have chosen a more cryptic but shorter name to avoid indenting the whole table, but since its done might as well leave it.
@eht16 pushed 1 commit.
c0cd092a49a3162f57691099f115fc2689515774 fixup: move new search pref to the end of struct
@eht16 commented on this pull request.
@@ -60,6 +60,8 @@ typedef struct GeanySearchPrefs
gboolean use_current_file_dir; /* find in files directory to use on showing dialog */ gboolean hide_find_dialog; /* hide the find dialog on next or previous */ gboolean replace_and_find_by_default; /* enter in replace window performs Replace & Find instead of Replace */ + gboolean skip_confirmation_for_replace_in_session; /* do *not* ask for confirmation
Thanks, fixed.
Isn't it part of the API by https://github.com/geany/geany/blob/master/src/plugindata.h#L202?
@eht16 commented on this pull request.
**``search`` group**
-find_selection_type See `Find selection`_. 0 immediately -replace_and_find_by_default Set ``Replace & Find`` button as default so true immediately - it will be activated when the Enter key is - pressed while one of the text fields has - focus. +find_selection_type See `Find selection`_. 0 immediately +replace_and_find_by_default Set ``Replace & Find`` button as default so true immediately + it will be activated when the Enter key is + pressed while one of the text fields has + focus. +skip_confirmation_for_replace_in_session If set, do *not* show the false immediately
Yeah, I don't like cryptic names anymore. I've chosen too many in the past and got annoyed myself even more often by them :).
@elextr commented on this pull request.
@@ -60,6 +60,8 @@ typedef struct GeanySearchPrefs
gboolean use_current_file_dir; /* find in files directory to use on showing dialog */ gboolean hide_find_dialog; /* hide the find dialog on next or previous */ gboolean replace_and_find_by_default; /* enter in replace window performs Replace & Find instead of Replace */ + gboolean skip_confirmation_for_replace_in_session; /* do *not* ask for confirmation
The struct is, but your new field is not doxygened so it won't appear in the API docs, in fact only `use_current_word` appears in the [API docs](https://www.geany.org/manual/reference/structGeanySearchPrefs.html) from the whole structure. If you want it in the API docs you need to use a `/**<` comment on the field but unless you are about to use it in a plugin its probably better to not doxygen it and no change needed in the API version.
@eht16 pushed 1 commit.
bb15a702a9a0ae9eb4e2f805e391f30c6a9f06ad fixup: do not increase plugin API version
@eht16 commented on this pull request.
@@ -60,6 +60,8 @@ typedef struct GeanySearchPrefs
gboolean use_current_file_dir; /* find in files directory to use on showing dialog */ gboolean hide_find_dialog; /* hide the find dialog on next or previous */ gboolean replace_and_find_by_default; /* enter in replace window performs Replace & Find instead of Replace */ + gboolean skip_confirmation_for_replace_in_session; /* do *not* ask for confirmation
Ok, I reverted the API version bump.
I was referring to that the new field is technically part of the plugin API as I can access and use it from a plugin, no matter whether it is doxgened. Anyway, using the documented API as source is also fine.
@elextr approved this pull request.
github-comments@lists.geany.org