CacheLoaderDoneFunc done_func;
gpointer done_data;
- gint error;
+ gboolean error;
ImageLoader *il;
gint idle_id;
*-------------------------------------------------------------------
*/
-static gint cache_sim_write_dimensions(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_dimensions(SecureSaveInfo *ssi, CacheData *cd)
{
if (!cd || !cd->dimensions) return FALSE;
return TRUE;
}
-static gint cache_sim_write_date(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_date(SecureSaveInfo *ssi, CacheData *cd)
{
if (!cd || !cd->have_date) return FALSE;
return TRUE;
}
-static gint cache_sim_write_checksum(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_checksum(SecureSaveInfo *ssi, CacheData *cd)
{
if (!cd || !cd->have_checksum) return FALSE;
return TRUE;
}
-static gint cache_sim_write_md5sum(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_md5sum(SecureSaveInfo *ssi, CacheData *cd)
{
gchar *text;
return TRUE;
}
-static gint cache_sim_write_similarity(SecureSaveInfo *ssi, CacheData *cd)
+static gboolean cache_sim_write_similarity(SecureSaveInfo *ssi, CacheData *cd)
{
guint x, y;
guint8 buf[3 * 32];
return TRUE;
}
-gint cache_sim_data_save(CacheData *cd)
+gboolean cache_sim_data_save(CacheData *cd)
{
SecureSaveInfo *ssi;
gchar *pathl;
*-------------------------------------------------------------------
*/
-static gint cache_sim_read_skipline(FILE *f, gint s)
+static gboolean cache_sim_read_skipline(FILE *f, gint s)
{
if (!f) return FALSE;
return FALSE;
}
-static gint cache_sim_read_comment(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_comment(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return cache_sim_read_skipline(f, s - 1);
}
-static gint cache_sim_read_dimensions(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_dimensions(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_date(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_date(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_checksum(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_checksum(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_md5sum(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_md5sum(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
return FALSE;
}
-static gint cache_sim_read_similarity(FILE *f, gchar *buf, gint s, CacheData *cd)
+static gboolean cache_sim_read_similarity(FILE *f, gchar *buf, gint s, CacheData *cd)
{
if (!f || !buf || !cd) return FALSE;
cd->similarity = TRUE;
}
-gint cache_sim_data_filled(ImageSimilarityData *sd)
+gboolean cache_sim_data_filled(ImageSimilarityData *sd)
{
if (!sd) return FALSE;
return sd->filled;
const gchar *cache_rc;
const gchar *cache_local;
const gchar *cache_ext;
- gint prefer_local;
+ gboolean prefer_local;
if (!source) return NULL;
return path;
}
-gint cache_time_valid(const gchar *cache, const gchar *path)
+gboolean cache_time_valid(const gchar *cache, const gchar *path)
{
struct stat cache_st;
struct stat path_st;
gchar *cachel;
gchar *pathl;
- gint ret = FALSE;
+ gboolean ret = FALSE;
if (!cache || !path) return FALSE;
guchar md5sum[16];
ImageSimilarityData *sim;
- gint dimensions;
- gint have_date;
- gint have_checksum;
- gint have_md5sum;
- gint similarity;
+ gboolean dimensions;
+ gboolean have_date;
+ gboolean have_checksum;
+ gboolean have_md5sum;
+ gboolean similarity;
};
-gint cache_time_valid(const gchar *cache, const gchar *path);
+gboolean cache_time_valid(const gchar *cache, const gchar *path);
CacheData *cache_sim_data_new(void);
void cache_sim_data_free(CacheData *cd);
-gint cache_sim_data_save(CacheData *cd);
+gboolean cache_sim_data_save(CacheData *cd);
CacheData *cache_sim_data_load(const gchar *path);
void cache_sim_data_set_dimensions(CacheData *cd, gint w, gint h);
GtkWidget *spinner;
GtkWidget *button_stop;
GtkWidget *button_close;
- gint clear;
- gint metadata;
+ gboolean clear;
+ gboolean metadata;
};
#define PURGE_DIALOG_WIDTH 400
return dot;
}
-static gint isempty(const gchar *path)
+static gboolean isempty(const gchar *path)
{
DIR *dp;
struct dirent *dir;
gtk_widget_set_sensitive(cm->button_close, TRUE);
}
-static gint cache_maintain_home_cb(gpointer data)
+static gboolean cache_maintain_home_cb(gpointer data)
{
CMData *cm = data;
GList *dlist = NULL;
}
/* sorry for complexity (cm->done_list), but need it to remove empty dirs */
-void cache_maintain_home(gint metadata, gint clear, GtkWidget *parent)
+void cache_maintain_home(gboolean metadata, gboolean clear, GtkWidget *parent)
{
CMData *cm;
GList *dlist;
GList *list_dir;
gint days;
- gint clear;
+ gboolean clear;
GtkWidget *button_close;
GtkWidget *button_stop;
gint count_total;
gint count_done;
- gint local;
- gint recurse;
+ gboolean local;
+ gboolean recurse;
gint idle_id;
};
cd->list_dir = g_list_concat(list_d, cd->list_dir);
}
-static gint cache_manager_render_file(CleanData *cd);
+static gboolean cache_manager_render_file(CleanData *cd);
static void cache_manager_render_thumb_done_cb(ThumbLoader *tl, gpointer data)
{
while (cache_manager_render_file(cd));
}
-static gint cache_manager_render_file(CleanData *cd)
+static gboolean cache_manager_render_file(CleanData *cd)
{
if (cd->list)
{
return FALSE;
}
-static void cache_manager_standard_clean_valid_cb(const gchar *path, gint valid, gpointer data)
+static void cache_manager_standard_clean_valid_cb(const gchar *path, gboolean valid, gpointer data)
{
CleanData *cd = data;
}
}
-static void cache_manager_standard_process(GtkWidget *widget, gint clear)
+static void cache_manager_standard_process(GtkWidget *widget, gboolean clear)
{
CleanData *cd;
const gchar *stock_id;
#define CACHE_MAINT_H
-void cache_maintain_home(gint metadata, gint clear, GtkWidget *parent);
+void cache_maintain_home(gboolean metadata, gboolean clear, GtkWidget *parent);
#if 0
gint cache_maintain_home_dir(const gchar *dir, gint recursive, gint clear);
};
-static gint collection_save_confirmed(FileDialog *fd, gint overwrite, CollectionData *cd);
+static gboolean collection_save_confirmed(FileDialog *fd, gboolean overwrite, CollectionData *cd);
static void collection_confirm_ok_cb(GenericDialog *gd, gpointer data)
/* this is a no-op, so the cancel button is added */
}
-static gint collection_save_confirmed(FileDialog *fd, gint overwrite, CollectionData *cd)
+static gboolean collection_save_confirmed(FileDialog *fd, gboolean overwrite, CollectionData *cd)
{
gchar *buf;
static gint collect_manager_process_action(CollectManagerEntry *entry, gchar **path_ptr);
-static gint scan_geometry(gchar *buffer, gint *x, gint *y, gint *w, gint *h)
+static gboolean scan_geometry(gchar *buffer, gint *x, gint *y, gint *w, gint *h)
{
gint nx, ny, nw, nh;
return TRUE;
}
-static gint collection_load_private(CollectionData *cd, const gchar *path, CollectionLoadFlags flags)
+static gboolean collection_load_private(CollectionData *cd, const gchar *path, CollectionLoadFlags flags)
{
gchar s_buf[GQ_COLLECTION_READ_BUFSIZE];
FILE *f;
gchar *pathl;
- gint limit_failures = TRUE;
- gint success = TRUE;
- gint has_official_header = FALSE;
- gint has_geometry_header = FALSE;
- gint has_gqview_header = FALSE;
- gint need_header = TRUE;
+ gboolean limit_failures = TRUE;
+ gboolean success = TRUE;
+ gboolean has_official_header = FALSE;
+ gboolean has_geometry_header = FALSE;
+ gboolean has_gqview_header = FALSE;
+ gboolean need_header = TRUE;
guint total = 0;
guint fail = 0;
gboolean changed = FALSE;
return success;
}
-gint collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags)
+gboolean collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags)
{
if (collection_load_private(cd, path, flags | COLLECTION_LOAD_FLUSH))
{
if (!cd->thumb_loader) collection_load_thumb_step(cd);
}
-gint collection_load_begin(CollectionData *cd, const gchar *path, CollectionLoadFlags flags)
+gboolean collection_load_begin(CollectionData *cd, const gchar *path, CollectionLoadFlags flags)
{
if (!collection_load(cd, path, flags)) return FALSE;
cd->thumb_loader = NULL;
}
-static gint collection_save_private(CollectionData *cd, const gchar *path)
+static gboolean collection_save_private(CollectionData *cd, const gchar *path)
{
SecureSaveInfo *ssi;
GList *work;
return TRUE;
}
-gint collection_save(CollectionData *cd, const gchar *path)
+gboolean collection_save(CollectionData *cd, const gchar *path)
{
if (collection_save_private(cd, path))
{
return FALSE;
}
-gint collection_load_only_geometry(CollectionData *cd, const gchar *path)
+gboolean collection_load_only_geometry(CollectionData *cd, const gchar *path)
{
return collection_load(cd, path, COLLECTION_LOAD_GEOMETRY);
}
collect_manager_action_ref(action);
}
-static gint collect_manager_process_action(CollectManagerEntry *entry, gchar **path_ptr)
+static gboolean collect_manager_process_action(CollectManagerEntry *entry, gchar **path_ptr)
{
gchar *path = *path_ptr;
CollectManagerAction *action;
}
}
-static gint collect_manager_process_entry(CollectManagerEntry *entry)
+static gboolean collect_manager_process_entry(CollectManagerEntry *entry)
{
CollectionData *cd;
- gint success;
+ gboolean success;
if (entry->empty) return FALSE;
return TRUE;
}
-static gint collect_manager_process_entry_list(void)
+static gboolean collect_manager_process_entry_list(void)
{
GList *work;
-static gint collect_manager_process_cb(gpointer data)
+static gboolean collect_manager_process_cb(gpointer data)
{
if (collection_manager_action_list) collect_manager_refresh();
collect_manager_process_actions(COLLECT_MANAGER_ACTIONS_PER_IDLE);
return FALSE;
}
-static gint collect_manager_timer_cb(gpointer data)
+static gboolean collect_manager_timer_cb(gpointer data)
{
DEBUG_1("collection manager timer expired");
void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer data)
{
-
if (type != NOTIFY_TYPE_CHANGE || !fd->change) return;
switch (fd->change->type)
COLLECTION_LOAD_GEOMETRY= 1 << 2,
} CollectionLoadFlags;
-gint collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
+gboolean collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
-gint collection_load_begin(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
+gboolean collection_load_begin(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
void collection_load_stop(CollectionData *cd);
void collection_load_thumb_idle(CollectionData *cd);
-gint collection_save(CollectionData *cd, const gchar *path);
+gboolean collection_save(CollectionData *cd, const gchar *path);
-gint collection_load_only_geometry(CollectionData *cd, const gchar *path);
+gboolean collection_load_only_geometry(CollectionData *cd, const gchar *path);
/* these are used to update collections contained in user's collection
#define INFO_SELECTED(x) (x->flag_mask & SELECTION_SELECTED)
-static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gint force);
+static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gboolean force);
/*
*-------------------------------------------------------------------
*/
-static gint collection_table_find_position(CollectTable *ct, CollectInfo *info, gint *row, gint *col)
+static gboolean collection_table_find_position(CollectTable *ct, CollectInfo *info, gint *row, gint *col)
{
gint n;
return TRUE;
}
-static gint collection_table_find_iter(CollectTable *ct, CollectInfo *info, GtkTreeIter *iter, gint *column)
+static gboolean collection_table_find_iter(CollectTable *ct, CollectInfo *info, GtkTreeIter *iter, gint *column)
{
GtkTreeModel *store;
gint row, col;
g_free(buf);
}
-static void collection_table_update_extras(CollectTable *ct, gint loading, gdouble value)
+static void collection_table_update_extras(CollectTable *ct, gboolean loading, gdouble value)
{
gchar *text;
collection_table_update_status(ct);
}
-static void collection_table_select_util(CollectTable *ct, CollectInfo *info, gint select)
+static void collection_table_select_util(CollectTable *ct, CollectInfo *info, gboolean select)
{
if (select)
{
}
}
-static void collection_table_select_region_util(CollectTable *ct, CollectInfo *start, CollectInfo *end, gint select)
+static void collection_table_select_region_util(CollectTable *ct, CollectInfo *start, CollectInfo *end, gboolean select)
{
gint row1, col1;
gint row2, col2;
ct->tip_window = NULL;
}
-static gint tip_schedule_cb(gpointer data)
+static gboolean tip_schedule_cb(gpointer data)
{
CollectTable *ct = data;
ct->editmenu_fd_list = NULL;
}
-static GtkWidget *collection_table_popup_menu(CollectTable *ct, gint over_icon)
+static GtkWidget *collection_table_popup_menu(CollectTable *ct, gboolean over_icon)
{
GtkWidget *menu;
GtkWidget *item;
}
}
-static void collection_table_move_focus(CollectTable *ct, gint row, gint col, gint relative)
+static void collection_table_move_focus(CollectTable *ct, gint row, gint col, gboolean relative)
{
gint new_row;
gint new_col;
popup_menu_position_clamp(menu, x, y, 0);
}
-static gint collection_table_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean collection_table_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
CollectTable *ct = data;
gint focus_row = 0;
gint focus_col = 0;
CollectInfo *info;
- gint stop_signal;
+ gboolean stop_signal = TRUE;
- stop_signal = TRUE;
switch (event->keyval)
{
case GDK_Left: case GDK_KP_Left:
*-------------------------------------------------------------------
*/
-static CollectInfo *collection_table_insert_find(CollectTable *ct, CollectInfo *source, gint *after, GdkRectangle *cell,
- gint use_coord, gint x, gint y)
+static CollectInfo *collection_table_insert_find(CollectTable *ct, CollectInfo *source, gboolean *after, GdkRectangle *cell,
+ gboolean use_coord, gint x, gint y)
{
CollectInfo *info = NULL;
GtkTreeModel *store;
gtk_tree_path_free(tpath);
info = source;
- *after = (x > cell->x + (cell->width / 2));
+ *after = !!(x > cell->x + (cell->width / 2));
}
return info;
}
if (info)
{
gtk_tree_view_get_background_area(GTK_TREE_VIEW(ct->listview), tpath, column, cell);
- *after = (x > cell->x + (cell->width / 2));
+ *after = !!(x > cell->x + (cell->width / 2));
}
gtk_tree_path_free(tpath);
{
CollectInfo *info;
GdkRectangle cell;
- gint after = FALSE;
+ gboolean after = FALSE;
info = collection_table_insert_find(ct, NULL, &after, &cell, TRUE, x, y);
return info;
}
-static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info, gint enable)
+static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info, gboolean enable)
{
gint row, col;
- gint after = FALSE;
+ gboolean after = FALSE;
GdkRectangle cell;
if (!enable)
*-------------------------------------------------------------------
*/
-static void collection_table_motion_update(CollectTable *ct, gint x, gint y, gint drop_event)
+static void collection_table_motion_update(CollectTable *ct, gint x, gint y, gboolean drop_event)
{
CollectInfo *info;
}
}
-static gint collection_table_auto_scroll_idle_cb(gpointer data)
+static gboolean collection_table_auto_scroll_idle_cb(gpointer data)
{
CollectTable *ct = data;
GdkWindow *window;
return FALSE;
}
-static gint collection_table_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data)
+static gboolean collection_table_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data)
{
CollectTable *ct = data;
return TRUE;
}
-static void collection_table_scroll(CollectTable *ct, gint scroll)
+static void collection_table_scroll(CollectTable *ct, gboolean scroll)
{
if (!scroll)
{
*-------------------------------------------------------------------
*/
-static gint collection_table_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_motion_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
CollectTable *ct = data;
return FALSE;
}
-static gint collection_table_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
CollectTable *ct = data;
GtkTreeIter iter;
return TRUE;
}
-static gint collection_table_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean collection_table_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
CollectTable *ct = data;
GtkTreeIter iter;
tip_schedule(ct);
- if ((gint)bevent->x != 0 || (gint) bevent->y != 0)
+ if ((gint)bevent->x != 0 || (gint)bevent->y != 0)
{
info = collection_table_find_data_by_coord(ct, (gint)bevent->x, (gint)bevent->y, &iter);
}
if (bevent->state & GDK_CONTROL_MASK)
{
- gint select;
+ gboolean select = !INFO_SELECTED(info);
- select = !INFO_SELECTED(info);
if ((bevent->state & GDK_SHIFT_MASK) && ct->prev_selection)
{
collection_table_select_region_util(ct, ct->prev_selection, info, select);
return TRUE;
}
-static gint collection_table_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
+static gboolean collection_table_leave_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
{
CollectTable *ct = data;
return list;
}
-static void collection_table_populate(CollectTable *ct, gint resize)
+static void collection_table_populate(CollectTable *ct, gboolean resize)
{
gint row;
GList *work;
collection_table_update_status(ct);
}
-static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gint force)
+static void collection_table_populate_at_new_size(CollectTable *ct, gint w, gint h, gboolean force)
{
gint new_cols;
gint thumb_width;
collection_table_update_status(ct);
}
-static gint collection_table_sync_idle_cb(gpointer data)
+static gboolean collection_table_sync_idle_cb(gpointer data)
{
CollectTable *ct = data;
*-------------------------------------------------------------------
*/
-static void collection_table_add_dir_recursive(CollectTable *ct, FileData *dir_fd, gint recursive)
+static void collection_table_add_dir_recursive(CollectTable *ct, FileData *dir_fd, gboolean recursive)
{
GList *d;
GList *f;
filelist_free(d);
}
-static void confirm_dir_list_do(CollectTable *ct, GList *list, gint recursive)
+static void confirm_dir_list_do(CollectTable *ct, GList *list, gboolean recursive)
{
GList *work = list;
while (work)
guint time, gpointer data)
{
CollectTable *ct = data;
- gint selected;
+ gboolean selected;
GList *list = NULL;
gchar *uri_text = NULL;
gint total;
{
return collection_table_find_data(ct, ct->focus_row, ct->focus_column, NULL);
}
+
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
ci->pixbuf = pixbuf;
}
-gint collection_info_load_thumb(CollectInfo *ci)
+gboolean collection_info_load_thumb(CollectInfo *ci)
{
if (!ci) return FALSE;
return ci;
}
-gint collection_add_check(CollectionData *cd, FileData *fd, gint sorted, gint must_exist)
+gboolean collection_add_check(CollectionData *cd, FileData *fd, gboolean sorted, gboolean must_exist)
{
struct stat st;
- gint valid;
+ gboolean valid;
if (must_exist)
{
return valid;
}
-gint collection_add(CollectionData *cd, FileData *fd, gint sorted)
+gboolean collection_add(CollectionData *cd, FileData *fd, gboolean sorted)
{
return collection_add_check(cd, fd, sorted, TRUE);
}
-gint collection_insert(CollectionData *cd, FileData *fd, CollectInfo *insert_ci, gint sorted)
+gboolean collection_insert(CollectionData *cd, FileData *fd, CollectInfo *insert_ci, gboolean sorted)
{
struct stat st;
return FALSE;
}
-gint collection_remove(CollectionData *cd, FileData *fd)
+gboolean collection_remove(CollectionData *cd, FileData *fd)
{
CollectInfo *ci;
collection_window_refresh(collection_window_find(cd));
}
-gint collection_rename(CollectionData *cd, FileData *fd)
+gboolean collection_rename(CollectionData *cd, FileData *fd)
{
CollectInfo *ci;
ci = collection_list_find_fd(cd->list, fd);
*-------------------------------------------------------------------
*/
-static gint collection_window_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean collection_window_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
CollectWindow *cw = data;
- gint stop_signal = FALSE;
+ gboolean stop_signal = FALSE;
gint edit_val = -1;
GList *list;
if (cw) collection_window_close_final(cw);
}
-gint collection_window_modified_exists(void)
+gboolean collection_window_modified_exists(void)
{
GList *work;
return FALSE;
}
-static gint collection_window_delete(GtkWidget *widget, GdkEvent *event, gpointer data)
+static gboolean collection_window_delete(GtkWidget *widget, GdkEvent *event, gpointer data)
{
CollectWindow *cw = data;
collection_window_close(cw);
void collection_info_free(CollectInfo *ci);
void collection_info_set_thumb(CollectInfo *ci, GdkPixbuf *pixbuf);
-gint collection_info_load_thumb(CollectInfo *ci);
+gboolean collection_info_load_thumb(CollectInfo *ci);
void collection_list_free(GList *list);
void collection_set_update_info_func(CollectionData *cd,
void (*func)(CollectionData *, CollectInfo *, gpointer), gpointer data);
-gint collection_add(CollectionData *cd, FileData *fd, gint sorted);
-gint collection_add_check(CollectionData *cd, FileData *fd, gint sorted, gint must_exist);
-gint collection_insert(CollectionData *cd, FileData *fd, CollectInfo *insert_ci, gint sorted);
-gint collection_remove(CollectionData *cd, FileData *fd);
+gboolean collection_add(CollectionData *cd, FileData *fd, gboolean sorted);
+gboolean collection_add_check(CollectionData *cd, FileData *fd, gboolean sorted, gboolean must_exist);
+gboolean collection_insert(CollectionData *cd, FileData *fd, CollectInfo *insert_ci, gboolean sorted);
+gboolean collection_remove(CollectionData *cd, FileData *fd);
void collection_remove_by_info_list(CollectionData *cd, GList *list);
-gint collection_rename(CollectionData *cd, FileData *fd);
+gboolean collection_rename(CollectionData *cd, FileData *fd);
void collection_update_geometry(CollectionData *cd);
void collection_window_close_by_collection(CollectionData *cd);
CollectWindow *collection_window_find(CollectionData *cd);
CollectWindow *collection_window_find_by_path(const gchar *path);
-gint collection_window_modified_exists(void);
+gboolean collection_window_modified_exists(void);
#endif
ColorManProfileType profile_out_type;
gchar *profile_out_file;
- gint has_alpha;
+ gboolean has_alpha;
gint refcount;
};
static void color_man_lib_init(void)
{
- static gint init_done = FALSE;
+ static gboolean init_done = FALSE;
if (init_done) return;
init_done = TRUE;
static ColorManCache *color_man_cache_new(ColorManProfileType in_type, const gchar *in_file,
guchar *in_data, guint in_data_len,
ColorManProfileType out_type, const gchar *out_file,
- gint has_alpha)
+ gboolean has_alpha)
{
ColorManCache *cc;
static ColorManCache *color_man_cache_find(ColorManProfileType in_type, const gchar *in_file,
ColorManProfileType out_type, const gchar *out_file,
- gint has_alpha)
+ gboolean has_alpha)
{
GList *work;
while (work)
{
ColorManCache *cc;
- gint match = FALSE;
+ gboolean match = FALSE;
cc = work->data;
work = work->next;
static ColorManCache *color_man_cache_get(ColorManProfileType in_type, const gchar *in_file,
guchar *in_data, guint in_data_len,
ColorManProfileType out_type, const gchar *out_file,
- gint has_alpha)
+ gboolean has_alpha)
{
ColorManCache *cc;
}
-static gint color_man_idle_cb(gpointer data)
+static gboolean color_man_idle_cb(gpointer data)
{
ColorMan *cm = data;
gint width, height;
gint rh;
+
if (!cm->pixbuf) return FALSE;
if (cm->imd &&
ColorManProfileType screen_type, const gchar *screen_file)
{
ColorMan *cm;
- gint has_alpha;
+ gboolean has_alpha;
if (imd) pixbuf = image_get_pixbuf(imd);
static void pixbuf_draw_border(GdkPixbuf *pixbuf, gint w, gint h)
{
- gint alpha;
+ gboolean alpha;
gint rs;
guchar *pix;
guchar *p;
static void pixbuf_draw_rect(GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h, guint8 val)
{
- gint alpha;
+ gboolean alpha;
gint rs;
guchar *pix;
guchar *p;
*/
-static void dupe_window_update_count(DupeWindow *dw, gint count_only)
+static void dupe_window_update_count(DupeWindow *dw, gboolean count_only)
{
gchar *text;
return (n * ((n + 1) / 2));
}
-static void dupe_window_update_progress(DupeWindow *dw, const gchar *status, gdouble value, gint force)
+static void dupe_window_update_progress(DupeWindow *dw, const gchar *status, gdouble value, gboolean force)
{
const gchar *status_text;
return g_list_reverse(list);
}
-static gint dupe_listview_item_is_selected(DupeWindow *dw, DupeItem *di, GtkWidget *listview)
+static gboolean dupe_listview_item_is_selected(DupeWindow *dw, DupeItem *di, GtkWidget *listview)
{
GtkTreeModel *store;
GtkTreeSelection *selection;
GList *slist;
GList *work;
- gint found = FALSE;
+ gboolean found = FALSE;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview));
slist = gtk_tree_selection_get_selected_rows(selection, &store);
dupe_match_unlink_child(b, a);
}
-static void dupe_match_link_clear(DupeItem *parent, gint unlink_children)
+static void dupe_match_link_clear(DupeItem *parent, gboolean unlink_children)
{
GList *work;
* ------------------------------------------------------------------
*/
-static gint dupe_match(DupeItem *a, DupeItem *b, DupeMatchType mask, gdouble *rank, gint fast)
+static gboolean dupe_match(DupeItem *a, DupeItem *b, DupeMatchType mask, gdouble *rank, gint fast)
{
*rank = 0.0;
return NULL;
}
-static gint dupe_check_cb(gpointer data)
+static gboolean dupe_check_cb(gpointer data)
{
DupeWindow *dw = data;
dupe_window_update_count(dw, FALSE);
}
-static gint dupe_item_remove_by_path(DupeWindow *dw, const gchar *path)
+static gboolean dupe_item_remove_by_path(DupeWindow *dw, const gchar *path)
{
DupeItem *di;
}
static void dupe_files_add(DupeWindow *dw, CollectionData *collection, CollectInfo *info,
- FileData *fd, gint recurse)
+ FileData *fd, gboolean recurse)
{
DupeItem *di = NULL;
dupe_check_start(dw);
}
-void dupe_window_add_files(DupeWindow *dw, GList *list, gint recurse)
+void dupe_window_add_files(DupeWindow *dw, GList *list, gboolean recurse)
{
GList *work;
return menu;
}
-static gint dupe_listview_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean dupe_listview_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
DupeWindow *dw = data;
GtkTreeModel *store;
return FALSE;
}
-static gint dupe_listview_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean dupe_listview_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
{
DupeWindow *dw = data;
GtkTreeModel *store;
static GtkWidget *dupe_menu_popup_second(DupeWindow *dw, DupeItem *di)
{
GtkWidget *menu;
- gint notempty;
- gint on_row;
-
- on_row = (di != NULL);
- notempty = (dw->second_list != NULL);
+ gboolean notempty = (dw->second_list != NULL);
+ gboolean on_row = (di != NULL);
menu = popup_menu_short_lived();
menu_item_add_sensitive(menu, _("_View"), on_row,
"cell-background-set", set, NULL);
}
-static void dupe_listview_add_column(DupeWindow *dw, GtkWidget *listview, gint n, const gchar *title, gint image, gint right_justify)
+static void dupe_listview_add_column(DupeWindow *dw, GtkWidget *listview, gint n, const gchar *title, gboolean image, gboolean right_justify)
{
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
}
-static void dupe_listview_set_height(GtkWidget *listview, gint thumb)
+static void dupe_listview_set_height(GtkWidget *listview, gboolean thumb)
{
GtkTreeViewColumn *column;
GtkCellRenderer *cell;
*y = cy;
}
-static gint dupe_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean dupe_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
DupeWindow *dw = data;
- gint stop_signal = FALSE;
- gint on_second;
+ gboolean stop_signal = FALSE;
+ gboolean on_second;
GtkWidget *listview;
GtkTreeModel *store;
GtkTreeSelection *selection;
}
}
-static void dupe_dest_set(GtkWidget *widget, gint enable)
+static void dupe_dest_set(GtkWidget *widget, gboolean enable)
{
if (enable)
{
GtkWidget *extra_label;
GtkWidget *button_thumbs;
- gint show_thumbs;
+ gboolean show_thumbs;
gint idle_id;
GList *working;
/* 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;
/* file list for edit menu */
GList *editmenu_fd_list;
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);
* improve the result, and hopes to reduce false positives.
*/
-static gint alternate_enabled = FALSE;
+static gboolean alternate_enabled = FALSE;
-void image_sim_alternate_set(gint enable)
+void image_sim_alternate_set(gboolean enable)
{
alternate_enabled = enable;
}
-gint image_sim_alternate_enabled(void)
+gboolean image_sim_alternate_enabled(void)
{
return alternate_enabled;
}
gint x_inc, y_inc, xy_inc;
gint xs, ys;
- gint x_small = FALSE; /* if less than 32 w or h, set TRUE */
- gint y_small = FALSE;
+ gboolean x_small = FALSE; /* if less than 32 w or h, set TRUE */
+ gboolean y_small = FALSE;
if (!sd || !pixbuf) return;
guint8 avg_g[1024];
guint8 avg_b[1024];
- gint filled;
+ gboolean filled;
};
gdouble image_sim_compare_fast(ImageSimilarityData *a, ImageSimilarityData *b, gdouble min);
-void image_sim_alternate_set(gint enable);
-gint image_sim_alternate_enabled(void);
+void image_sim_alternate_set(gboolean enable);
+gboolean image_sim_alternate_enabled(void);
void image_sim_alternate_processing(ImageSimilarityData *sd);