Mercurial > geeqie.yaz
changeset 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 | c7fefb0a4b78 |
children | 3f14da3c3b9a |
files | src/dupe.c src/dupe.h |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
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);
--- a/src/dupe.h Mon Apr 07 08:09:39 2008 +0000 +++ b/src/dupe.h Mon Apr 07 18:52:54 2008 +0000 @@ -28,7 +28,8 @@ DUPE_MATCH_SIM_HIGH = 1 << 6, /* similarity */ DUPE_MATCH_SIM_MED = 1 << 7, DUPE_MATCH_SIM_LOW = 1 << 8, - DUPE_MATCH_SIM_CUSTOM = 1 << 9 + DUPE_MATCH_SIM_CUSTOM = 1 << 9, + DUPE_MATCH_NAME_CI = 1 << 10 /* same as name, but case insensitive */ } DupeMatchType; typedef struct _DupeItem DupeItem;