Mercurial > geeqie
changeset 1446:a6f9ba6fd751
gint -> gboolean.
author | zas_ |
---|---|
date | Sun, 15 Mar 2009 18:06:41 +0000 |
parents | cb0040be832e |
children | a10d70ae85e9 |
files | src/secure_save.c src/similar.c src/slideshow.c src/slideshow.h src/thumb.c src/thumb.h src/thumb_standard.c src/thumb_standard.h src/trash.c src/trash.h src/typedefs.h src/ui_bookmark.c |
diffstat | 12 files changed, 61 insertions(+), 61 deletions(-) [+] |
line wrap: on
line diff
--- a/src/secure_save.c Sun Mar 15 17:40:04 2009 +0000 +++ b/src/secure_save.c Sun Mar 15 18:06:41 2009 +0000 @@ -233,7 +233,7 @@ * while closing file releases file descriptor we need to call fsync(). */ #if defined(HAVE_FFLUSH) || defined(HAVE_FSYNC) if (ssi->secure_save) { - gint fail = 0; + gboolean fail = FALSE; #ifdef HAVE_FFLUSH fail = (fflush(ssi->fp) == EOF);
--- a/src/similar.c Sun Mar 15 17:40:04 2009 +0000 +++ b/src/similar.c Sun Mar 15 18:06:41 2009 +0000 @@ -174,7 +174,7 @@ gint w, h; gint rs; guchar *pix; - gint has_alpha; + gboolean has_alpha; gint p_step; guchar *p;
--- a/src/slideshow.c Sun Mar 15 17:40:04 2009 +0000 +++ b/src/slideshow.c Sun Mar 15 18:06:41 2009 +0000 @@ -152,7 +152,7 @@ } } -gint slideshow_should_continue(SlideShowData *ss) +gboolean slideshow_should_continue(SlideShowData *ss) { FileData *imd_fd; FileData *dir_fd; @@ -186,7 +186,7 @@ return FALSE; } -static gint slideshow_step(SlideShowData *ss, gboolean forward) +static gboolean slideshow_step(SlideShowData *ss, gboolean forward) { gint row; @@ -289,7 +289,7 @@ return TRUE; } -static gint slideshow_loop_cb(gpointer data) +static gboolean slideshow_loop_cb(gpointer data) { SlideShowData *ss = data;
--- a/src/slideshow.h Sun Mar 15 17:40:04 2009 +0000 +++ b/src/slideshow.h Sun Mar 15 18:06:41 2009 +0000 @@ -26,7 +26,7 @@ void slideshow_free(SlideShowData *ss); -gint slideshow_should_continue(SlideShowData *ss); +gboolean slideshow_should_continue(SlideShowData *ss); void slideshow_next(SlideShowData *ss); void slideshow_prev(SlideShowData *ss);
--- a/src/thumb.c Sun Mar 15 17:40:04 2009 +0000 +++ b/src/thumb.c Sun Mar 15 18:06:41 2009 +0000 @@ -246,7 +246,7 @@ if (tl->func_error) tl->func_error(tl, tl->data); } -static gint thumb_loader_done_delay_cb(gpointer data) +static gboolean thumb_loader_done_delay_cb(gpointer data) { ThumbLoader *tl = data; @@ -305,7 +305,7 @@ tl->data = data; } -void thumb_loader_set_cache(ThumbLoader *tl, gint enable_cache, gint local, gint retry_failed) +void thumb_loader_set_cache(ThumbLoader *tl, gboolean enable_cache, gboolean local, gboolean retry_failed) { if (!tl) return; @@ -323,7 +323,7 @@ } -gint thumb_loader_start(ThumbLoader *tl, FileData *fd) +gboolean thumb_loader_start(ThumbLoader *tl, FileData *fd) { gchar *cache_path = NULL;
--- a/src/thumb.h Sun Mar 15 17:40:04 2009 +0000 +++ b/src/thumb.h Sun Mar 15 18:06:41 2009 +0000 @@ -21,9 +21,9 @@ ThumbLoaderFunc func_error, ThumbLoaderFunc func_progress, gpointer data); -void thumb_loader_set_cache(ThumbLoader *tl, gint enable_cache, gint local, gint retry_failed); +void thumb_loader_set_cache(ThumbLoader *tl, gboolean enable_cache, gboolean local, gboolean retry_failed); -gint thumb_loader_start(ThumbLoader *tl, FileData *fd); +gboolean thumb_loader_start(ThumbLoader *tl, FileData *fd); void thumb_loader_free(ThumbLoader *tl); GdkPixbuf *thumb_loader_get_pixbuf(ThumbLoader *tl);
--- a/src/thumb_standard.c Sun Mar 15 17:40:04 2009 +0000 +++ b/src/thumb_standard.c Sun Mar 15 18:06:41 2009 +0000 @@ -123,7 +123,7 @@ tl->progress = 0.0; } -static gchar *thumb_std_cache_path(const gchar *path, const gchar *uri, gint local, +static gchar *thumb_std_cache_path(const gchar *path, const gchar *uri, gboolean local, const gchar *cache_subfolder) { gchar *result = NULL; @@ -158,7 +158,7 @@ return result; } -static gchar *thumb_loader_std_cache_path(ThumbLoaderStd *tl, gint local, GdkPixbuf *pixbuf, gint fail) +static gchar *thumb_loader_std_cache_path(ThumbLoaderStd *tl, gboolean local, GdkPixbuf *pixbuf, gboolean fail) { const gchar *folder; gint w, h; @@ -194,7 +194,7 @@ local, folder); } -static gint thumb_loader_std_fail_check(ThumbLoaderStd *tl) +static gboolean thumb_loader_std_fail_check(ThumbLoaderStd *tl) { gchar *fail_path; gboolean result = FALSE; @@ -239,7 +239,7 @@ return result; } -static gint thumb_loader_std_validate(ThumbLoaderStd *tl, GdkPixbuf *pixbuf) +static gboolean thumb_loader_std_validate(ThumbLoaderStd *tl, GdkPixbuf *pixbuf) { const gchar *valid_uri; const gchar *uri; @@ -273,7 +273,7 @@ { gchar *base_path; gchar *tmp_path; - gint fail; + gboolean fail; if (!tl->cache_enable || tl->cache_hit) return; if (tl->thumb_path) return; @@ -334,7 +334,7 @@ gchar *mark_app; gchar *mark_mtime; gchar *pathl; - gint success; + gboolean success; mark_uri = (tl->cache_local) ? tl->local_uri :tl->thumb_uri; @@ -376,7 +376,7 @@ tl->fd->thumb_pixbuf = pixbuf_fallback(tl->fd, tl->requested_width, tl->requested_height); } -static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf, gint shrunk) +static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf, gboolean shrunk) { GdkPixbuf *pixbuf_thumb = NULL; GdkPixbuf *result; @@ -487,7 +487,7 @@ return result; } -static gint thumb_loader_std_next_source(ThumbLoaderStd *tl, gint remove_broken) +static gboolean thumb_loader_std_next_source(ThumbLoaderStd *tl, gboolean remove_broken) { image_loader_free(tl->il); tl->il = NULL; @@ -588,7 +588,7 @@ if (tl->func_progress) tl->func_progress(tl, tl->data); } -static gint thumb_loader_std_setup(ThumbLoaderStd *tl, FileData *fd) +static gboolean thumb_loader_std_setup(ThumbLoaderStd *tl, FileData *fd) { tl->il = image_loader_new(fd); image_loader_set_priority(tl->il, G_PRIORITY_LOW); @@ -624,10 +624,10 @@ return FALSE; } -static gint thumb_loader_std_setup_path(ThumbLoaderStd *tl, const gchar *path) +static gboolean thumb_loader_std_setup_path(ThumbLoaderStd *tl, const gchar *path) { FileData *fd = file_data_new_simple(path); - gint ret = thumb_loader_std_setup(tl, fd); + gboolean ret = thumb_loader_std_setup(tl, fd); file_data_unref(fd); return ret; } @@ -636,7 +636,7 @@ * Note: Currently local_cache only specifies where to save a _new_ thumb, if * a valid existing thumb is found anywhere the local thumb will not be created. */ -void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gint enable_cache, gint local, gint retry_failed) +void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gboolean enable_cache, gboolean local, gboolean retry_failed) { if (!tl) return; @@ -645,7 +645,7 @@ tl->cache_retry = retry_failed; } -gint thumb_loader_std_start(ThumbLoaderStd *tl, FileData *fd) +gboolean thumb_loader_std_start(ThumbLoaderStd *tl, FileData *fd) { static gchar *thumb_cache = NULL; struct stat st; @@ -738,7 +738,7 @@ gchar *path; gint days; - void (*func_valid)(const gchar *path, gint valid, gpointer data); + void (*func_valid)(const gchar *path, gboolean valid, gpointer data); gpointer data; gint idle_id; @@ -765,7 +765,7 @@ thumb_loader_std_thumb_file_validate_free(tv); } -static void thumb_loader_std_thumb_file_validate_finish(ThumbValidate *tv, gint valid) +static void thumb_loader_std_thumb_file_validate_finish(ThumbValidate *tv, gboolean valid) { if (tv->func_valid) tv->func_valid(tv->path, valid, tv->data); @@ -834,7 +834,7 @@ thumb_loader_std_thumb_file_validate_finish(tv, FALSE); } -static gint thumb_loader_std_thumb_file_validate_idle_cb(gpointer data) +static gboolean thumb_loader_std_thumb_file_validate_idle_cb(gpointer data) { ThumbValidate *tv = data; @@ -845,7 +845,7 @@ } ThumbLoaderStd *thumb_loader_std_thumb_file_validate(const gchar *thumb_path, gint allowed_days, - void (*func_valid)(const gchar *path, gint valid, gpointer data), + void (*func_valid)(const gchar *path, gboolean valid, gpointer data), gpointer data) { ThumbValidate *tv; @@ -877,7 +877,7 @@ return tv->tl; } -static void thumb_std_maint_remove_one(const gchar *source, const gchar *uri, gint local, +static void thumb_std_maint_remove_one(const gchar *source, const gchar *uri, gboolean local, const gchar *subfolder) { gchar *thumb_path; @@ -932,10 +932,10 @@ static void thumb_std_maint_move_step(TMaintMove *tm); -static gint thumb_std_maint_move_idle(gpointer data); +static gboolean thumb_std_maint_move_idle(gpointer data); -static void thumb_std_maint_move_validate_cb(const gchar *path, gint valid, gpointer data) +static void thumb_std_maint_move_validate_cb(const gchar *path, gboolean valid, gpointer data) { TMaintMove *tm = data; GdkPixbuf *pixbuf; @@ -1019,7 +1019,7 @@ thumb_std_maint_move_validate_cb, tm); } -static gint thumb_std_maint_move_idle(gpointer data) +static gboolean thumb_std_maint_move_idle(gpointer data) { TMaintMove *tm; gchar *pathl;
--- a/src/thumb_standard.h Sun Mar 15 17:40:04 2009 +0000 +++ b/src/thumb_standard.h Sun Mar 15 18:06:41 2009 +0000 @@ -28,7 +28,7 @@ struct _ThumbLoaderStd { - gint standard_loader; + gboolean standard_loader; ImageLoader *il; FileData *fd; @@ -41,15 +41,15 @@ gchar *thumb_uri; const gchar *local_uri; - gint thumb_path_local; + gboolean thumb_path_local; gint requested_width; gint requested_height; - gint cache_enable; - gint cache_local; - gint cache_hit; - gint cache_retry; + gboolean cache_enable; + gboolean cache_local; + gboolean cache_hit; + gboolean cache_retry; gdouble progress; @@ -67,8 +67,8 @@ ThumbLoaderStdFunc func_error, ThumbLoaderStdFunc func_progress, gpointer data); -void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gint enable_cache, gint local, gint retry_failed); -gint thumb_loader_std_start(ThumbLoaderStd *tl, FileData *fd); +void thumb_loader_std_set_cache(ThumbLoaderStd *tl, gboolean enable_cache, gboolean local, gboolean retry_failed); +gboolean thumb_loader_std_start(ThumbLoaderStd *tl, FileData *fd); void thumb_loader_std_free(ThumbLoaderStd *tl); GdkPixbuf *thumb_loader_std_get_pixbuf(ThumbLoaderStd *tl); @@ -79,7 +79,7 @@ * for thumbnail's without a file: uri, validates against allowed_age in days */ ThumbLoaderStd *thumb_loader_std_thumb_file_validate(const gchar *thumb_path, gint allowed_age, - void (*func_valid)(const gchar *path, gint valid, gpointer data), + void (*func_valid)(const gchar *path, gboolean valid, gpointer data), gpointer data); void thumb_loader_std_thumb_file_validate_cancel(ThumbLoaderStd *tl);
--- a/src/trash.c Sun Mar 15 17:40:04 2009 +0000 +++ b/src/trash.c Sun Mar 15 18:06:41 2009 +0000 @@ -122,7 +122,7 @@ *gd = NULL; } -gint file_util_safe_unlink(const gchar *path) +gboolean file_util_safe_unlink(const gchar *path) { static GenericDialog *gd = NULL; gchar *result = NULL;
--- a/src/trash.h Sun Mar 15 17:40:04 2009 +0000 +++ b/src/trash.h Sun Mar 15 18:06:41 2009 +0000 @@ -14,7 +14,7 @@ #include "ui_utildlg.h" void file_util_trash_clear(void); -gint file_util_safe_unlink(const gchar *path); +gboolean file_util_safe_unlink(const gchar *path); gchar *file_util_safe_delete_status(void); #endif /* TRASH_H */
--- a/src/typedefs.h Sun Mar 15 17:40:04 2009 +0000 +++ b/src/typedefs.h Sun Mar 15 18:06:41 2009 +0000 @@ -240,13 +240,13 @@ struct _ThumbLoader { - gint standard_loader; + gboolean standard_loader; ImageLoader *il; FileData *fd; /* fd->pixbuf contains final (scaled) image when done */ - gint cache_enable; - gint cache_hit; + gboolean cache_enable; + gboolean cache_hit; gdouble percent_done; gint max_w; @@ -291,7 +291,7 @@ gint window_h; /* contents changed since save flag */ - gint changed; + gboolean changed; GHashTable *existence; }; @@ -331,7 +331,7 @@ gint sync_idle_id; gint drop_idle_id; - gint show_text; + gboolean show_text; /* file list for edit menu */ GList *editmenu_fd_list; @@ -828,10 +828,10 @@ gchar *file_name; /**< final file name */ gchar *tmp_file_name; /**< temporary file name */ gint err; /**< set to non-zero value in case of error */ - gint secure_save; /**< use secure save for this file, internal use only */ - gint preserve_perms; /**< whether to preserve perms, TRUE by default */ - gint preserve_mtime; /**< whether to preserve mtime, FALSE by default */ - gint unlink_on_error; /**< whether to remove temporary file on save failure, TRUE by default */ + gboolean secure_save; /**< use secure save for this file, internal use only */ + gboolean preserve_perms; /**< whether to preserve perms, TRUE by default */ + gboolean preserve_mtime; /**< whether to preserve mtime, FALSE by default */ + gboolean unlink_on_error; /**< whether to remove temporary file on save failure, TRUE by default */ }; struct _CommandLine
--- a/src/ui_bookmark.c Sun Mar 15 17:40:04 2009 +0000 +++ b/src/ui_bookmark.c Sun Mar 15 18:06:41 2009 +0000 @@ -61,9 +61,9 @@ void (*select_func)(const gchar *path, gpointer data); gpointer select_data; - gint no_defaults; - gint editable; - gint only_directories; + gboolean no_defaults; + gboolean editable; + gboolean only_directories; BookButtonData *active_button; }; @@ -389,7 +389,7 @@ } static void bookmark_menu_popup(BookMarkData *bm, GtkWidget *button, - gint button_n, guint32 time, gint local) + gint button_n, guint32 time, gboolean local) { GtkWidget *menu; BookButtonData *b; @@ -420,7 +420,7 @@ } } -static gint bookmark_press_cb(GtkWidget *button, GdkEventButton *event, gpointer data) +static gboolean bookmark_press_cb(GtkWidget *button, GdkEventButton *event, gpointer data) { BookMarkData *bm = data; @@ -431,7 +431,7 @@ return TRUE; } -static gint bookmark_keypress_cb(GtkWidget *button, GdkEventKey *event, gpointer data) +static gboolean bookmark_keypress_cb(GtkWidget *button, GdkEventKey *event, gpointer data) { BookMarkData *bm = data; @@ -784,7 +784,7 @@ bookmark_populate(bm); } -void bookmark_list_set_no_defaults(GtkWidget *list, gint no_defaults) +void bookmark_list_set_no_defaults(GtkWidget *list, gboolean no_defaults) { BookMarkData *bm; @@ -794,7 +794,7 @@ bm->no_defaults = no_defaults; } -void bookmark_list_set_editable(GtkWidget *list, gint editable) +void bookmark_list_set_editable(GtkWidget *list, gboolean editable) { BookMarkData *bm; @@ -804,7 +804,7 @@ bm->editable = editable; } -void bookmark_list_set_only_directories(GtkWidget *list, gint only_directories) +void bookmark_list_set_only_directories(GtkWidget *list, gboolean only_directories) { BookMarkData *bm;