static GtkWidget *submenu_add_sort_item(GtkWidget *menu, GtkWidget *parent,
GCallback func, SortType type,
- gint show_current, SortType show_type)
+ gboolean show_current, SortType show_type)
{
GtkWidget *item;
}
GtkWidget *submenu_add_sort(GtkWidget *menu, GCallback func, gpointer data,
- gint include_none, gint include_path,
- gint show_current, SortType type)
+ gboolean include_none, gboolean include_path,
+ gboolean show_current, SortType type)
{
GtkWidget *submenu;
GtkWidget *parent;
gchar *sort_type_get_text(SortType method);
GtkWidget *submenu_add_sort(GtkWidget *menu, GCallback func, gpointer data,
- gint include_none, gint include_path,
- gint show_current, SortType type);
+ gboolean include_none, gboolean include_path,
+ gboolean show_current, SortType type);
gchar *alter_type_get_text(AlterType type);
GtkWidget *submenu_add_alter(GtkWidget *menu, GCallback func, gpointer data);
static const gchar *group_keys[] = {KEYWORD_KEY, COMMENT_KEY, NULL}; /* tags that will be written to all files in a group */
static gboolean metadata_write_queue_idle_cb(gpointer data);
-static gint metadata_legacy_write(FileData *fd);
+static gboolean metadata_legacy_write(FileData *fd);
static void metadata_legacy_delete(FileData *fd, const gchar *except);
*-------------------------------------------------------------------
*/
-static gint metadata_file_write(gchar *path, GHashTable *modified_xmp)
+static gboolean metadata_file_write(gchar *path, GHashTable *modified_xmp)
{
SecureSaveInfo *ssi;
GList *keywords = g_hash_table_lookup(modified_xmp, KEYWORD_KEY);
return (secure_close(ssi) == 0);
}
-static gint metadata_legacy_write(FileData *fd)
+static gboolean metadata_legacy_write(FileData *fd)
{
- gint success = FALSE;
+ gboolean success = FALSE;
+ gchar *metadata_pathl;
g_assert(fd->change && fd->change->dest);
- gchar *metadata_pathl;
DEBUG_1("Saving comment: %s", fd->change->dest);
return success;
}
-static gint metadata_file_read(gchar *path, GList **keywords, gchar **comment)
+static gboolean metadata_file_read(gchar *path, GList **keywords, gchar **comment)
{
FILE *f;
gchar s_buf[1024];
}
}
-static gint metadata_legacy_read(FileData *fd, GList **keywords, gchar **comment)
+static gboolean metadata_legacy_read(FileData *fd, GList **keywords, gchar **comment)
{
gchar *metadata_path;
gchar *metadata_pathl;
- gint success = FALSE;
+ gboolean success = FALSE;
+
if (!fd) return FALSE;
metadata_path = cache_find_location(CACHE_TYPE_METADATA, fd->path);
group->y += y;
}
-#define PI 3.14159
+#define PI 3.14159265
static void pan_flower_position(FlowerGroup *group, FlowerGroup *parent,
gint *result_x, gint *result_y)
/* when ignore_case and partial are TRUE, path should be converted to lower case */
static GList *pan_item_find_by_path_l(GList *list, GList *search_list,
PanItemType type, const gchar *path,
- gint ignore_case, gint partial)
+ gboolean ignore_case, gboolean partial)
{
GList *work;
pi = work->data;
if ((pi->type == type || type == PAN_ITEM_NONE) && pi->fd)
{
- gint match = FALSE;
+ gboolean match = FALSE;
if (path[0] == G_DIR_SEPARATOR)
{
/* when ignore_case and partial are TRUE, path should be converted to lower case */
GList *pan_item_find_by_path(PanWindow *pw, PanItemType type, const gchar *path,
- gint ignore_case, gint partial)
+ gboolean ignore_case, gboolean partial)
{
GList *list = NULL;
}
GList *pan_item_find_by_fd(PanWindow *pw, PanItemType type, FileData *fd,
- gint ignore_case, gint partial)
+ gboolean ignore_case, gboolean partial)
{
if (!fd) return NULL;
return pan_item_find_by_path(pw, type, fd->path, ignore_case, partial);
gpointer data;
- gint queued;
+ gboolean queued;
};
typedef struct _PanWindow PanWindow;
gint thumb_size;
gint thumb_gap;
gint image_size;
- gint exif_date_enable;
+ gboolean exif_date_enable;
gint info_image_size;
- gint info_includes_exif;
+ gboolean info_includes_exif;
- gint ignore_symlinks;
+ gboolean ignore_symlinks;
GList *list;
GList *list_static;
void pan_cache_sync_date(PanWindow *pw, GList *list);
-GList *pan_cache_sort(GList *list, SortType method, gint ascend);
+GList *pan_cache_sort(GList *list, SortType method, gboolean ascend);
/* pan-item.c */
void pan_item_free(PanItem *pi);
PanItem *pan_item_find_by_key(PanWindow *pw, PanItemType type, const gchar *key);
GList *pan_item_find_by_path(PanWindow *pw, PanItemType type, const gchar *path,
- gint ignore_case, gint partial);
+ gboolean ignore_case, gboolean partial);
GList *pan_item_find_by_fd(PanWindow *pw, PanItemType type, FileData *fd,
- gint ignore_case, gint partial);
+ gboolean ignore_case, gboolean partial);
PanItem *pan_item_find_by_coord(PanWindow *pw, PanItemType type,
gint x, gint y, const gchar *key);
PAN_DATE_LENGTH_YEAR
} PanDateLengthType;
-gint pan_date_compare(time_t a, time_t b, PanDateLengthType length);
+gboolean pan_date_compare(time_t a, time_t b, PanDateLengthType length);
gint pan_date_value(time_t d, PanDateLengthType length);
gchar *pan_date_value_string(time_t d, PanDateLengthType length);
time_t pan_date_to_time(gint year, gint month, gint day);
-gint pan_is_link_loop(const gchar *s);
-gint pan_is_ignored(const gchar *s, gint ignore_symlinks);
-GList *pan_list_tree(FileData *dir_fd, SortType sort, gint ascend,
- gint ignore_symlinks);
+gboolean pan_is_link_loop(const gchar *s);
+gboolean pan_is_ignored(const gchar *s, gboolean ignore_symlinks);
+GList *pan_list_tree(FileData *dir_fd, SortType sort, gboolean ascend,
+ gboolean ignore_symlinks);
/* the different view types */
*-----------------------------------------------------------------------------
*/
-gint pan_date_compare(time_t a, time_t b, PanDateLengthType length)
+gboolean pan_date_compare(time_t a, time_t b, PanDateLengthType length)
{
struct tm ta;
struct tm tb;
*-----------------------------------------------------------------------------
*/
-gint pan_is_link_loop(const gchar *s)
+gboolean pan_is_link_loop(const gchar *s)
{
gchar *sl;
struct stat st;
- gint ret = FALSE;
+ gboolean ret = FALSE;
sl = path_from_utf8(s);
return ret;
}
-gint pan_is_ignored(const gchar *s, gint ignore_symlinks)
+gboolean pan_is_ignored(const gchar *s, gboolean ignore_symlinks)
{
struct stat st;
const gchar *n;
return FALSE;
}
-GList *pan_list_tree(FileData *dir_fd, SortType sort, gint ascend,
- gint ignore_symlinks)
+GList *pan_list_tree(FileData *dir_fd, SortType sort, gboolean ascend,
+ gboolean ignore_symlinks)
{
GList *flist;
GList *dlist;
static void pan_layout_update_idle(PanWindow *pw);
-static void pan_fullscreen_toggle(PanWindow *pw, gint force_off);
+static void pan_fullscreen_toggle(PanWindow *pw, gboolean force_off);
-static void pan_search_toggle_visible(PanWindow *pw, gint enable);
+static void pan_search_toggle_visible(PanWindow *pw, gboolean enable);
static void pan_search_activate(PanWindow *pw);
static void pan_window_close(PanWindow *pw);
*-----------------------------------------------------------------------------
*/
-static gint pan_queue_step(PanWindow *pw);
+static gboolean pan_queue_step(PanWindow *pw);
static void pan_queue_thumb_done_cb(ThumbLoader *tl, gpointer data)
}
#endif
-static gint pan_queue_step(PanWindow *pw)
+static gboolean pan_queue_step(PanWindow *pw)
{
PanItem *pi;
*-----------------------------------------------------------------------------
*/
-static gint pan_window_request_tile_cb(PixbufRenderer *pr, gint x, gint y,
- gint width, gint height, GdkPixbuf *pixbuf, gpointer data)
+static gboolean pan_window_request_tile_cb(PixbufRenderer *pr, gint x, gint y,
+ gint width, gint height, GdkPixbuf *pixbuf, gpointer data)
{
PanWindow *pw = data;
GList *list;
while (work)
{
PanItem *pi;
- gint queue = FALSE;
+ gboolean queue = FALSE;
pi = work->data;
work = work->next;
PanCacheData *pcb = b;
return filelist_sort_compare_filedata(pca->fd, pcb->fd);
}
-GList *pan_cache_sort(GList *list, SortType method, gint ascend)
+GList *pan_cache_sort(GList *list, SortType method, gboolean ascend)
{
return filelist_sort_full(list, method, ascend, (GCompareFunc) pan_cache_sort_file_cb);
}
pan_layout_update_idle(pw);
}
-static gint pan_cache_step(PanWindow *pw)
+static gboolean pan_cache_step(PanWindow *pw)
{
FileData *fd;
PanCacheData *pc;
popup_menu_position_clamp(menu, x, y, 0);
}
-static gint pan_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean pan_window_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
PanWindow *pw = data;
PixbufRenderer *pr;
FileData *fd;
- gint stop_signal = FALSE;
+ gboolean stop_signal = FALSE;
GtkWidget *menu;
gint x = 0;
gint y = 0;
return TRUE;
}
-static gint pan_search_by_partial(PanWindow *pw, const gchar *text)
+static gboolean pan_search_by_partial(PanWindow *pw, const gchar *text)
{
PanItem *pi;
GList *list;
return TRUE;
}
-static gint valid_date_separator(gchar c)
+static gboolean valid_date_separator(gchar c)
{
return (c == '/' || c == '-' || c == ' ' || c == '.' || c == ',');
}
return g_list_reverse(list);
}
-static gint pan_search_by_date(PanWindow *pw, const gchar *text)
+static gboolean pan_search_by_date(PanWindow *pw, const gchar *text)
{
PanItem *pi = NULL;
GList *list = NULL;
static void pan_search_toggle_cb(GtkWidget *button, gpointer data)
{
PanWindow *pw = data;
- gint visible;
+ gboolean visible;
visible = GTK_WIDGET_VISIBLE(pw->search_box);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)) == visible) return;
}
}
-static void pan_search_toggle_visible(PanWindow *pw, gint enable)
+static void pan_search_toggle_visible(PanWindow *pw, gboolean enable)
{
if (pw->fs) return;
pw->imd = pw->imd_normal;
}
-static void pan_fullscreen_toggle(PanWindow *pw, gint force_off)
+static void pan_fullscreen_toggle(PanWindow *pw, gboolean force_off)
{
if (force_off && !pw->fs) return;
g_free(pw);
}
-static gint pan_window_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gboolean pan_window_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
{
PanWindow *pw = data;
static void pan_warning_hide_cb(GtkWidget *button, gpointer data)
{
- gint hide_dlg;
+ gboolean hide_dlg;
hide_dlg = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
pref_list_int_set(PAN_PREF_GROUP, PAN_PREF_HIDE_WARNING, hide_dlg);
}
-static gint pan_warning(FileData *dir_fd)
+static gboolean pan_warning(FileData *dir_fd)
{
GenericDialog *gd;
GtkWidget *box;
GtkWidget *group;
GtkWidget *button;
GtkWidget *ct_button;
- gint hide_dlg;
+ gboolean hide_dlg;
if (dir_fd && strcmp(dir_fd->path, G_DIR_SEPARATOR_S) == 0)
{
GtkWidget *menu;
GtkWidget *submenu;
GtkWidget *item;
- gint active;
+ gboolean active;
active = (pw->click_pi != NULL);
{
gchar *text = NULL;
gint len;
- gint plain_text;
+ gboolean plain_text;
GList *list;
switch (info)
G_CALLBACK(pan_window_get_dnd_data), pw);
}
-/*
- *-----------------------------------------------------------------------------
- * maintenance (for rename, move, remove)
- *-----------------------------------------------------------------------------
- */
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */