Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Tue, 04 Feb 2025 23:41:42 UTC
Commit: 3f94f5e88262fea5f0c1b1ef72c27bbeb86a4f0a
https://github.com/geany/geany/commit/3f94f5e88262fea5f0c1b1ef72c27bbeb86a4…
Log Message:
-----------
prefs: Edit the correct keybinding when there is a filter
When the keybinding list is filtered and the keybinding cell is edited,
store the value in the correct row instead of the one corresponding to
the Nth visible one, but in the unfiltered tree.
E.g., if filtering with `redo` it shows only 1 item, and editing it
should change that one (Edit/Redo), not the first of the unfiltered
list (File/New).
Related-to: #4192
Modified Paths:
--------------
src/prefs.c
Modified: src/prefs.c
10 lines changed, 7 insertions(+), 3 deletions(-)
===================================================================
@@ -1405,13 +1405,17 @@ static void kb_cell_edited_cb(GtkCellRendererText *cellrenderertext,
{
if (path != NULL && new_text != NULL)
{
+ GtkTreeModel *filter_model = gtk_tree_view_get_model(kbdata->tree);
GtkTreeIter iter;
+ GtkTreeIter child_iter;
- gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(kbdata->store), &iter, path);
- if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(kbdata->store), &iter))
+ gtk_tree_model_get_iter_from_string(filter_model, &iter, path);
+ if (gtk_tree_model_iter_has_child(filter_model, &iter))
return; /* ignore group items */
- kb_change_iter_shortcut(kbdata, &iter, new_text);
+ gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(filter_model),
+ &child_iter, &iter);
+ kb_change_iter_shortcut(kbdata, &child_iter, new_text);
}
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 03 Feb 2025 17:32:51 UTC
Commit: a595a37e582a117189d3c2aa6c541bd8d3676cb5
https://github.com/geany/geany/commit/a595a37e582a117189d3c2aa6c541bd8d3676…
Log Message:
-----------
tests/ctags: Allow testing filetypes with no suffix patterns
Filetypes need not have a filename suffix pattern (like e.g. `*.c`),
but can have other form of patterns (e.g. `Makefile`, `meson.build`,
etc.), or even no patterns at all.
Such less common patterns make it impossible to match them in
unittests, as filenames used there need to be of the form `test_*`.
Fix this by adding a fake extension to each filetype that is the name
of the filetype followed with `_unittest`, e.g. `CMake_unittest` or
`Meson_unittest`.
Fixes #4074.
Modified Paths:
--------------
tests/ctags/runner.sh
Modified: tests/ctags/runner.sh
5 lines changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -14,7 +14,10 @@ trap 'rm -rf "$TMPDIR"' EXIT
# related configuration files
mkdir -p "$CONFDIR" || exit 99
mkdir -p "$CONFDIR/filedefs/" || exit 99
-cp "${top_srcdir:-../..}"/data/filetype_extensions.conf "$CONFDIR" || exit 99
+# Add *.Filetype_unittest extension so we can match filetypes for which there
+# are no extension patterns, like e.g. Meson.
+sed 's/^\([^=[]\{1,\}\)\(=[^;]\{1,\}\(;[^;]\{1,\}\)*\);*$/\1\2;*.\1_unittest;/' \
+ < "${top_srcdir:-../..}"/data/filetype_extensions.conf > "$CONFDIR/filetype_extensions.conf" || exit 99
cp "${top_srcdir:-../..}"/data/filedefs/filetypes.* "$CONFDIR/filedefs/" || exit 99
shift
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).