Mercurial > geeqie.yaz
annotate src/dupe.h @ 1658:d7e07c7fa31b
test if an accelerator can be stored
gtk_accel_map_change_entry can't change accelerators
to keys like arrows. Test this and show the keys in the list
only if they can be really changed.
https://sourceforge.net/tracker/?func=detail&aid=2805139&group_id=222125&atid=1054680
author | nadvornik |
---|---|
date | Wed, 24 Jun 2009 20:31:30 +0000 |
parents | 24a12aa0cb54 |
children | 717374fb1bbd |
rev | line source |
---|---|
9 | 1 /* |
196 | 2 * Geeqie |
9 | 3 * (C) 2004 John Ellis |
1284 | 4 * Copyright (C) 2008 - 2009 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 |
1000
4fe8f9656107
For the sake of consistency, use glib basic types everywhere.
zas_
parents:
794
diff
changeset
|
44 glong checksum; |
9 | 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 | |
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1397
diff
changeset
|
82 gboolean show_thumbs; |
9 | 83 |
1523 | 84 guint idle_id; /* event source id */ |
9 | 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 | |
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1397
diff
changeset
|
103 gboolean second_set; /* second set enabled ? */ |
9 | 104 GList *second_list; /* second set dropped files */ |
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1397
diff
changeset
|
105 gboolean second_drop; /* drop is on second set */ |
9 | 106 |
107 GtkWidget *second_vbox; /* box of second widgets */ | |
108 GtkWidget *second_listview; | |
109 GtkWidget *second_status_label; | |
110 | |
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1397
diff
changeset
|
111 gboolean color_frozen; |
1397
a0bd58a6535f
In various Edit context menus, only display editors that match the file types in the selection.
zas_
parents:
1284
diff
changeset
|
112 |
a0bd58a6535f
In various Edit context menus, only display editors that match the file types in the selection.
zas_
parents:
1284
diff
changeset
|
113 /* file list for edit menu */ |
a0bd58a6535f
In various Edit context menus, only display editors that match the file types in the selection.
zas_
parents:
1284
diff
changeset
|
114 GList *editmenu_fd_list; |
a0bd58a6535f
In various Edit context menus, only display editors that match the file types in the selection.
zas_
parents:
1284
diff
changeset
|
115 |
9 | 116 }; |
117 | |
118 | |
119 DupeWindow *dupe_window_new(DupeMatchType match_mask); | |
120 | |
121 void dupe_window_clear(DupeWindow *dw); | |
122 void dupe_window_close(DupeWindow *dw); | |
123 | |
124 void dupe_window_add_collection(DupeWindow *dw, CollectionData *collection); | |
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1397
diff
changeset
|
125 void dupe_window_add_files(DupeWindow *dw, GList *list, gboolean recurse); |
9 | 126 |
127 /* cell max with/height hack utility */ | |
128 void cell_renderer_height_override(GtkCellRenderer *renderer); | |
129 | |
130 | |
131 #endif | |
1055
1646720364cf
Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents:
1000
diff
changeset
|
132 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |