Mercurial > geeqie.yaz
annotate src/dupe.h @ 526:92b5a033a279
fixed dragging multiple files from file list
http://sourceforge.net/tracker/index.php?func=detail&aid=1950740&group_id=222125&atid=1054680
author | nadvornik |
---|---|
date | Fri, 25 Apr 2008 20:08:47 +0000 |
parents | 48c8e49b571c |
children | 03614b7883ea |
rev | line source |
---|---|
9 | 1 /* |
196 | 2 * Geeqie |
9 | 3 * (C) 2004 John Ellis |
475 | 4 * Copyright (C) 2008 The Geeqie Team |
9 | 5 * |
6 * Author: John Ellis | |
7 * | |
8 * This software is released under the GNU General Public License (GNU GPL). | |
9 * Please read the included file COPYING for more information. | |
10 * This software comes with no warranty of any kind, use at your own risk! | |
11 */ | |
12 | |
13 | |
14 #ifndef DUPE_H | |
15 #define DUPE_H | |
16 | |
17 #include "similar.h" | |
18 | |
19 /* match methods */ | |
20 typedef enum | |
21 { | |
22 DUPE_MATCH_NONE = 0, | |
23 DUPE_MATCH_NAME = 1 << 0, | |
24 DUPE_MATCH_SIZE = 1 << 1, | |
25 DUPE_MATCH_DATE = 1 << 2, | |
26 DUPE_MATCH_DIM = 1 << 3, /* image dimensions */ | |
27 DUPE_MATCH_SUM = 1 << 4, /* simple checksum */ | |
28 DUPE_MATCH_PATH = 1 << 5, | |
29 DUPE_MATCH_SIM_HIGH = 1 << 6, /* similarity */ | |
30 DUPE_MATCH_SIM_MED = 1 << 7, | |
31 DUPE_MATCH_SIM_LOW = 1 << 8, | |
264
1015282898fe
Add the possibility to match duplicates on the name but ignoring the case.
zas_
parents:
196
diff
changeset
|
32 DUPE_MATCH_SIM_CUSTOM = 1 << 9, |
1015282898fe
Add the possibility to match duplicates on the name but ignoring the case.
zas_
parents:
196
diff
changeset
|
33 DUPE_MATCH_NAME_CI = 1 << 10 /* same as name, but case insensitive */ |
9 | 34 } DupeMatchType; |
35 | |
36 typedef struct _DupeItem DupeItem; | |
37 struct _DupeItem | |
38 { | |
39 CollectionData *collection; /* NULL if from DupeWindow->files */ | |
40 CollectInfo *info; | |
41 | |
138 | 42 FileData *fd; |
9 | 43 |
44 long checksum; | |
45 gchar *md5sum; | |
46 gint width; | |
47 gint height; | |
48 | |
49 ImageSimilarityData *simd; | |
50 | |
51 /* thumb */ | |
52 GdkPixbuf *pixbuf; | |
53 | |
54 GList *group; /* List of match data */ | |
55 gdouble group_rank; | |
56 | |
57 gint second; | |
58 }; | |
59 | |
60 typedef struct _DupeMatch DupeMatch; | |
61 struct _DupeMatch | |
62 { | |
63 DupeItem *di; | |
64 gdouble rank; | |
65 }; | |
66 | |
67 typedef struct _DupeWindow DupeWindow; | |
68 struct _DupeWindow | |
69 { | |
70 GList *list; /* dropped files (DupeItem) */ | |
71 GList *dupes; /* list of dupes (DupeItem, grouping the DupeMatches) */ | |
72 DupeMatchType match_mask; /* mask of things to check for match */ | |
73 | |
74 GtkWidget *window; | |
75 GtkWidget *table; | |
76 GtkWidget *listview; | |
77 GtkWidget *combo; | |
78 GtkWidget *status_label; | |
79 GtkWidget *extra_label; | |
80 GtkWidget *button_thumbs; | |
81 | |
82 gint show_thumbs; | |
83 | |
84 gint idle_id; | |
85 GList *working; | |
86 gint setup_done; | |
87 gint setup_count; | |
88 gint setup_n; /* these are merely for speed optimization */ | |
89 GList *setup_point; /* ditto */ | |
90 DupeMatchType setup_mask; /* ditto */ | |
91 guint64 setup_time; | |
92 guint64 setup_time_count; | |
93 | |
94 DupeItem *click_item; /* for popup menu */ | |
95 | |
96 ThumbLoader *thumb_loader; | |
97 DupeItem *thumb_item; | |
98 | |
99 ImageLoader *img_loader; | |
100 | |
101 /* second set comparison stuff */ | |
102 | |
103 gint second_set; /* second set enabled ? */ | |
104 GList *second_list; /* second set dropped files */ | |
105 gint second_drop; /* drop is on second set */ | |
106 | |
107 GtkWidget *second_vbox; /* box of second widgets */ | |
108 GtkWidget *second_listview; | |
109 GtkWidget *second_status_label; | |
110 | |
111 gint color_frozen; | |
112 }; | |
113 | |
114 | |
115 DupeWindow *dupe_window_new(DupeMatchType match_mask); | |
116 | |
117 void dupe_window_clear(DupeWindow *dw); | |
118 void dupe_window_close(DupeWindow *dw); | |
119 | |
120 void dupe_window_add_collection(DupeWindow *dw, CollectionData *collection); | |
121 void dupe_window_add_files(DupeWindow *dw, GList *list, gint recurse); | |
122 | |
138 | 123 void dupe_maint_removed(FileData *fd); |
124 void dupe_maint_renamed(FileData *fd); | |
9 | 125 |
126 | |
127 /* cell max with/height hack utility */ | |
128 void cell_renderer_height_override(GtkCellRenderer *renderer); | |
129 | |
130 | |
131 #endif |