# HG changeset patch # User zas_ # Date 1207594374 0 # Node ID 1015282898fedbd5f7e2ce41574d59f47c3e2e09 # Parent c7fefb0a4b7884c98804ed25eb16fb38f5ea479a 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. diff -r c7fefb0a4b78 -r 1015282898fe src/dupe.c --- 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); diff -r c7fefb0a4b78 -r 1015282898fe src/dupe.h --- 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;