Mercurial > geeqie
diff src/dupe.c @ 264:1015282898fe
Add the possibility to match duplicates on the name but ignoring the case.
A new item was added to types of match combo box in the Find duplicates dialog.
author | zas_ |
---|---|
date | Mon, 07 Apr 2008 18:52:54 +0000 |
parents | fa7d69e7d02d |
children | 9995c5fb202a |
line wrap: on
line diff
--- a/src/dupe.c Mon Apr 07 08:09:39 2008 +0000 +++ b/src/dupe.c Mon Apr 07 18:52:54 2008 +0000 @@ -1132,6 +1132,10 @@ { if (strcmp(a->fd->name, b->fd->name) != 0) return FALSE; } + if (mask & DUPE_MATCH_NAME_CI) + { + if (strcasecmp(a->fd->name, b->fd->name) != 0) return FALSE; + } if (mask & DUPE_MATCH_SIZE) { if (a->fd->size != b->fd->size) return FALSE; @@ -1796,7 +1800,7 @@ static void dupe_item_update(DupeWindow *dw, DupeItem *di) { - if ( (dw->match_mask & DUPE_MATCH_NAME) || (dw->match_mask & DUPE_MATCH_PATH) ) + if ( (dw->match_mask & DUPE_MATCH_NAME) || (dw->match_mask & DUPE_MATCH_PATH || (dw->match_mask & DUPE_MATCH_NAME_CI)) ) { /* only effects matches on name or path */ /* @@ -2625,6 +2629,7 @@ "text", DUPE_MENU_COLUMN_NAME, NULL); dupe_menu_add_item(store, _("Name"), DUPE_MATCH_NAME, dw); + dupe_menu_add_item(store, _("Name case-insensitive"), DUPE_MATCH_NAME_CI, dw); dupe_menu_add_item(store, _("Size"), DUPE_MATCH_SIZE, dw); dupe_menu_add_item(store, _("Date"), DUPE_MATCH_DATE, dw); dupe_menu_add_item(store, _("Dimensions"), DUPE_MATCH_DIM, dw);