Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
thunar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pratik Karki
thunar
Commits
c58510b4
Commit
c58510b4
authored
5 years ago
by
Theo Linkspfeifer
Committed by
Alexander Schwinn
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make path entry matching case-insensitive (Bug #12747)
parent
99d6d6c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
thunar/thunar-path-entry.c
+26
-2
26 additions, 2 deletions
thunar/thunar-path-entry.c
with
26 additions
and
2 deletions
thunar/thunar-path-entry.c
+
26
−
2
View file @
c58510b4
...
...
@@ -818,6 +818,30 @@ thunar_path_entry_common_prefix_append (ThunarPathEntry *path_entry,
static
gboolean
thunar_path_entry_has_prefix_casefolded
(
const
gchar
*
string
,
const
gchar
*
prefix
)
{
gchar
*
string_casefolded
;
gchar
*
prefix_casefolded
;
gboolean
has_prefix
;
if
(
string
==
NULL
||
prefix
==
NULL
)
return
FALSE
;
string_casefolded
=
g_utf8_casefold
(
string
,
-
1
);
prefix_casefolded
=
g_utf8_casefold
(
prefix
,
-
1
);
has_prefix
=
g_str_has_prefix
(
string_casefolded
,
prefix_casefolded
);
g_free
(
string_casefolded
);
g_free
(
prefix_casefolded
);
return
has_prefix
;
}
static
void
thunar_path_entry_common_prefix_lookup
(
ThunarPathEntry
*
path_entry
,
gchar
**
prefix_return
,
...
...
@@ -851,7 +875,7 @@ thunar_path_entry_common_prefix_lookup (ThunarPathEntry *path_entry,
gtk_tree_model_get
(
model
,
&
iter
,
THUNAR_COLUMN_FILE_NAME
,
&
name
,
-
1
);
/* check if we have a valid prefix here */
if
(
g_s
tr_has_prefix
(
name
,
text
))
if
(
thunar_path_en
tr
y
_has_prefix
_casefolded
(
name
,
text
))
{
/* check if we're the first to match */
if
(
*
prefix_return
==
NULL
)
...
...
@@ -945,7 +969,7 @@ thunar_path_entry_match_func (GtkEntryCompletion *completion,
/* check if we have a match here */
if
(
name_normalized
!=
NULL
)
matched
=
g_s
tr_has_prefix
(
name_normalized
,
last_slash
);
matched
=
thunar_path_en
tr
y
_has_prefix
_casefolded
(
name_normalized
,
last_slash
);
else
matched
=
FALSE
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment