annotate src/dupe.h @ 465:b8731e13028b

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