Fix #314: Remote commands for thumbnail maintenance
[geeqie.git] / src / dupe.h
index 60ed1b2..3e97055 100644 (file)
@@ -1,16 +1,24 @@
 /*
- * Geeqie
- * (C) 2004 John Ellis
- * Copyright (C) 2008 The Geeqie Team
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-
 #ifndef DUPE_H
 #define DUPE_H
 
@@ -24,7 +32,7 @@ typedef enum
        DUPE_MATCH_SIZE = 1 << 1,
        DUPE_MATCH_DATE = 1 << 2,
        DUPE_MATCH_DIM  = 1 << 3,       /* image dimensions */
-       DUPE_MATCH_SUM  = 1 << 4,       /* simple checksum */
+       DUPE_MATCH_SUM  = 1 << 4,       /* MD5sum */
        DUPE_MATCH_PATH = 1 << 5,
        DUPE_MATCH_SIM_HIGH = 1 << 6,   /* similarity */
        DUPE_MATCH_SIM_MED  = 1 << 7,
@@ -33,6 +41,13 @@ typedef enum
        DUPE_MATCH_NAME_CI = 1 << 10    /* same as name, but case insensitive */
 } DupeMatchType;
 
+typedef enum
+{
+       DUPE_SELECT_NONE,
+       DUPE_SELECT_GROUP1,
+       DUPE_SELECT_GROUP2
+} DupeSelectType;
+
 typedef struct _DupeItem DupeItem;
 struct _DupeItem
 {
@@ -41,7 +56,6 @@ struct _DupeItem
 
        FileData *fd;
 
-       glong checksum;
        gchar *md5sum;
        gint width;
        gint height;
@@ -78,10 +92,12 @@ struct _DupeWindow
        GtkWidget *status_label;
        GtkWidget *extra_label;
        GtkWidget *button_thumbs;
+       GtkWidget *button_rotation_invariant;
+       GtkWidget *custom_threshold;
 
-       gint show_thumbs;
+       gboolean show_thumbs;
 
-       gint idle_id;
+       guint idle_id; /* event source id */
        GList *working;
        gint setup_done;
        gint setup_count;
@@ -100,25 +116,25 @@ struct _DupeWindow
 
        /* second set comparison stuff */
 
-       gint second_set;                /* second set enabled ? */
+       gboolean second_set;            /* second set enabled ? */
        GList *second_list;             /* second set dropped files */
-       gint second_drop;               /* drop is on second set */
+       gboolean second_drop;           /* drop is on second set */
 
        GtkWidget *second_vbox;         /* box of second widgets */
        GtkWidget *second_listview;
        GtkWidget *second_status_label;
 
-       gint color_frozen;
+       gboolean color_frozen;
 };
 
 
-DupeWindow *dupe_window_new(DupeMatchType match_mask);
+DupeWindow *dupe_window_new(void);
 
 void dupe_window_clear(DupeWindow *dw);
 void dupe_window_close(DupeWindow *dw);
 
 void dupe_window_add_collection(DupeWindow *dw, CollectionData *collection);
-void dupe_window_add_files(DupeWindow *dw, GList *list, gint recurse);
+void dupe_window_add_files(DupeWindow *dw, GList *list, gboolean recurse);
 
 /* cell max with/height hack utility */
 void cell_renderer_height_override(GtkCellRenderer *renderer);