Mercurial > geeqie.yaz
changeset 1452:67b40740122e
gint -> gboolean where applicable.
author | zas_ |
---|---|
date | Mon, 16 Mar 2009 19:11:39 +0000 |
parents | 0e67a5992d51 |
children | bc3f5c0432f6 |
files | src/uri_utils.c src/uri_utils.h src/utilops.c src/view_dir.c src/view_dir.h src/view_dir_list.c src/view_dir_list.h src/view_dir_tree.c src/view_dir_tree.h |
diffstat | 9 files changed, 68 insertions(+), 66 deletions(-) [+] |
line wrap: on
line diff
--- a/src/uri_utils.c Mon Mar 16 18:19:11 2009 +0000 +++ b/src/uri_utils.c Mon Mar 16 19:11:39 2009 +0000 @@ -49,7 +49,7 @@ static gchar *hex_char = "0123456789ABCDEF"; -static gint escape_test(guchar c) +static gboolean escape_test(guchar c) { if (c < 32 || c > 127) return TRUE; return (escape_char_list[c] != 0); @@ -169,7 +169,7 @@ } } -GList *uri_list_from_text(gchar *data, gint files_only) +GList *uri_list_from_text(gchar *data, gboolean files_only) { GList *list = NULL; gint b, e; @@ -205,7 +205,7 @@ return list; } -GList *uri_filelist_from_text(gchar *data, gint files_only) +GList *uri_filelist_from_text(gchar *data, gboolean files_only) { GList *path_list = uri_list_from_text(data, files_only); GList *filelist = filelist_from_path_list(path_list); @@ -213,7 +213,7 @@ return filelist; } -gchar *uri_text_from_list(GList *list, gint *len, gint plain_text) +gchar *uri_text_from_list(GList *list, gint *len, gboolean plain_text) { gchar *uri_text = NULL; GString *string; @@ -261,7 +261,7 @@ return uri_text; } -gchar *uri_text_from_filelist(GList *list, gint *len, gint plain_text) +gchar *uri_text_from_filelist(GList *list, gint *len, gboolean plain_text) { GList *path_list = filelist_to_path_list(list); gchar *ret = uri_text_from_list(path_list, len, plain_text);
--- a/src/uri_utils.h Mon Mar 16 18:19:11 2009 +0000 +++ b/src/uri_utils.h Mon Mar 16 19:11:39 2009 +0000 @@ -17,10 +17,10 @@ gchar *uri_text_escape(const gchar *text); void uri_text_decode(gchar *text); -GList *uri_list_from_text(gchar *data, gint files_only); -GList *uri_filelist_from_text(gchar *data, gint files_only); -gchar *uri_text_from_list(GList *list, gint *len, gint plain_text); -gchar *uri_text_from_filelist(GList *list, gint *len, gint plain_text); +GList *uri_list_from_text(gchar *data, gboolean files_only); +GList *uri_filelist_from_text(gchar *data, gboolean files_only); +gchar *uri_text_from_list(GList *list, gint *len, gboolean plain_text); +gchar *uri_text_from_filelist(GList *list, gint *len, gboolean plain_text); #endif /* URI_UTILS_H */ /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
--- a/src/utilops.c Mon Mar 16 18:19:11 2009 +0000 +++ b/src/utilops.c Mon Mar 16 19:11:39 2009 +0000 @@ -47,7 +47,7 @@ static void generic_dialog_add_image(GenericDialog *gd, GtkWidget *box, FileData *fd1, const gchar *header1, FileData *fd2, const gchar *header2, - gint show_filename) + gboolean show_filename) { ImageWindow *imd; GtkWidget *hbox = NULL; @@ -154,7 +154,7 @@ GenericDialog *file_util_gen_dlg(const gchar *title, const gchar *role, - GtkWidget *parent, gint auto_close, + GtkWidget *parent, gboolean auto_close, void (*cancel_cb)(GenericDialog *, gpointer), gpointer data) { GenericDialog *gd; @@ -411,7 +411,7 @@ } } -static GtkWidget *file_util_dialog_add_list(GtkWidget *box, GList *list, gint full_paths, gboolean with_sidecars) +static GtkWidget *file_util_dialog_add_list(GtkWidget *box, GList *list, gboolean full_paths, gboolean with_sidecars) { GtkWidget *scrolled; GtkWidget *view; @@ -1131,7 +1131,7 @@ const gchar *front; const gchar *end; const gchar *format; - gint valid; + gboolean valid; gint start_n; gint padding; gint n; @@ -1231,7 +1231,7 @@ } static void file_util_rename_preview_order_cb(GtkTreeModel *treemodel, GtkTreePath *tpath, - GtkTreeIter *iter, gpointer data) + GtkTreeIter *iter, gpointer data) { UtilityData *ud = data; @@ -1242,8 +1242,8 @@ static gboolean file_util_preview_cb(GtkTreeSelection *selection, GtkTreeModel *store, - GtkTreePath *tpath, gboolean path_currently_selected, - gpointer data) + GtkTreePath *tpath, gboolean path_currently_selected, + gpointer data) { UtilityData *ud = data; GtkTreeIter iter; @@ -1385,7 +1385,7 @@ } -static GtkWidget *furm_simple_vlabel(GtkWidget *box, const gchar *text, gint expand) +static GtkWidget *furm_simple_vlabel(GtkWidget *box, const gchar *text, gboolean expand) { GtkWidget *vbox; GtkWidget *label; @@ -1740,6 +1740,7 @@ file_util_dialog_run(ud); } + static void file_util_copy_full(FileData *source_fd, GList *source_list, const gchar *dest_path, GtkWidget *parent, UtilityPhase phase) { UtilityData *ud;
--- a/src/view_dir.c Mon Mar 16 18:19:11 2009 +0000 +++ b/src/view_dir.c Mon Mar 16 19:11:39 2009 +0000 @@ -118,7 +118,7 @@ vd->layout = layout; } -gint vd_set_fd(ViewDir *vd, FileData *dir_fd) +gboolean vd_set_fd(ViewDir *vd, FileData *dir_fd) { gboolean ret = FALSE; @@ -166,7 +166,7 @@ } } -gint vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter) +gboolean vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter) { gboolean ret = FALSE; @@ -204,7 +204,7 @@ return fd; } -static gint vd_rename_cb(TreeEditData *td, const gchar *old, const gchar *new, gpointer data) +static gboolean vd_rename_cb(TreeEditData *td, const gchar *old, const gchar *new, gpointer data) { ViewDir *vd = data; FileData *fd; @@ -556,7 +556,7 @@ GtkWidget *menu; GtkWidget *submenu; GtkWidget *item; - gint active; + gboolean active; gboolean rename_delete_active = FALSE; gboolean new_folder_active = FALSE; gint i; @@ -808,7 +808,7 @@ vd->drop_scroll_id = -1; } -static gint vd_auto_scroll_idle_cb(gpointer data) +static gboolean vd_auto_scroll_idle_cb(gpointer data) { ViewDir *vd = data; @@ -831,7 +831,7 @@ return FALSE; } -static gint vd_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data) +static gboolean vd_auto_scroll_notify_cb(GtkWidget *widget, gint x, gint y, gpointer data) { ViewDir *vd = data; @@ -842,7 +842,7 @@ return TRUE; } -static gint vd_dnd_drop_motion(GtkWidget *widget, GdkDragContext *context, +static gboolean vd_dnd_drop_motion(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, gpointer data) { ViewDir *vd = data; @@ -964,7 +964,7 @@ "cell-background-set", set, NULL); } -gint vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) +gboolean vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { ViewDir *vd = data; GtkTreePath *tpath; @@ -991,7 +991,7 @@ return FALSE; } -gint vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) +gboolean vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { ViewDir *vd = data; gboolean ret = FALSE; @@ -1005,7 +1005,7 @@ return ret; } -gint vd_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) +gboolean vd_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { ViewDir *vd = data; gboolean ret = FALSE;
--- a/src/view_dir.h Mon Mar 16 18:19:11 2009 +0000 +++ b/src/view_dir.h Mon Mar 16 19:11:39 2009 +0000 @@ -30,9 +30,9 @@ void vd_set_layout(ViewDir *vdl, LayoutWindow *layout); -gint vd_set_fd(ViewDir *vdl, FileData *dir_fd); +gboolean vd_set_fd(ViewDir *vdl, FileData *dir_fd); void vd_refresh(ViewDir *vdl); -gint vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter); +gboolean vd_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter); const gchar *vd_row_get_path(ViewDir *vdl, gint row); @@ -50,9 +50,9 @@ void vd_activate_cb(GtkTreeView *tview, GtkTreePath *tpath, GtkTreeViewColumn *column, gpointer data); void vd_color_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data); -gint vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); -gint vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); -gint vd_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); +gboolean vd_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); +gboolean vd_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); +gboolean vd_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); #endif /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
--- a/src/view_dir_list.c Mon Mar 16 18:19:11 2009 +0000 +++ b/src/view_dir_list.c Mon Mar 16 19:11:39 2009 +0000 @@ -37,10 +37,10 @@ *----------------------------------------------------------------------------- */ -gint vdlist_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter) +gboolean vdlist_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter) { GtkTreeModel *store; - gint valid; + gboolean valid; gint row = 0; store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view)); @@ -142,15 +142,15 @@ return NULL; } -static gint vdlist_populate(ViewDir *vd, gboolean clear) +static gboolean vdlist_populate(ViewDir *vd, gboolean clear) { GtkListStore *store; GList *work; GtkTreeIter iter; - gint valid; + gboolean valid; gchar *filepath; GList *old_list; - gint ret; + gboolean ret; FileData *fd; old_list = VDLIST(vd)->list; @@ -187,8 +187,9 @@ gint match; GdkPixbuf *pixbuf; const gchar *date = ""; + gboolean done = FALSE; + fd = work->data; - gboolean done = FALSE; if (access_file(fd->path, R_OK | X_OK) && fd->name) { @@ -297,9 +298,9 @@ return ret; } -gint vdlist_set_fd(ViewDir *vd, FileData *dir_fd) +gboolean vdlist_set_fd(ViewDir *vd, FileData *dir_fd) { - gint ret; + gboolean ret; gchar *old_path = NULL; if (!dir_fd) return FALSE; @@ -355,7 +356,7 @@ vdlist_populate(vd, FALSE); } -gint vdlist_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) +gboolean vdlist_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { ViewDir *vd = data; GtkTreePath *tpath; @@ -388,7 +389,7 @@ return TRUE; } -gint vdlist_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) +gboolean vdlist_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { ViewDir *vd = data; GtkTreePath *tpath;
--- a/src/view_dir_list.h Mon Mar 16 18:19:11 2009 +0000 +++ b/src/view_dir_list.h Mon Mar 16 19:11:39 2009 +0000 @@ -18,17 +18,17 @@ void vdlist_select_row(ViewDir *vd, FileData *fd); -gint vdlist_set_fd(ViewDir *vd, FileData *dir_fd); +gboolean vdlist_set_fd(ViewDir *vd, FileData *dir_fd); void vdlist_refresh(ViewDir *vd); const gchar *vdlist_row_get_path(ViewDir *vd, gint row); -gint vdlist_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter); +gboolean vdlist_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter); void vdlist_rename_by_row(ViewDir *vd, FileData *fd); FileData *vdlist_row_by_path(ViewDir *vd, const gchar *path, gint *row); -gint vdlist_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); -gint vdlist_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); +gboolean vdlist_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); +gboolean vdlist_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); void vdlist_destroy_cb(GtkWidget *widget, gpointer data);
--- a/src/view_dir_tree.c Mon Mar 16 18:19:11 2009 +0000 +++ b/src/view_dir_tree.c Mon Mar 16 19:11:39 2009 +0000 @@ -75,7 +75,7 @@ gint vdtree_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter, GtkTreeIter *parent) { GtkTreeModel *store; - gint valid; + gboolean valid; store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view)); if (parent) @@ -119,7 +119,7 @@ } } -static void vdtree_expand_by_iter(ViewDir *vd, GtkTreeIter *iter, gint expand) +static void vdtree_expand_by_iter(ViewDir *vd, GtkTreeIter *iter, gboolean expand) { GtkTreeModel *store; GtkTreePath *tpath; @@ -138,7 +138,7 @@ gtk_tree_path_free(tpath); } -static void vdtree_expand_by_data(ViewDir *vd, FileData *fd, gint expand) +static void vdtree_expand_by_data(ViewDir *vd, FileData *fd, gboolean expand) { GtkTreeIter iter; @@ -162,7 +162,7 @@ *---------------------------------------------------------------------------- */ -static gint vdtree_dnd_drop_expand_cb(gpointer data) +static gboolean vdtree_dnd_drop_expand_cb(gpointer data) { ViewDir *vd = data; GtkTreeIter iter; @@ -252,7 +252,7 @@ GList *work; GtkTreeModel *store; GtkTreeIter iter; - gint valid; + gboolean valid; store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view)); valid = gtk_tree_model_get_iter_first(store, &iter); @@ -325,7 +325,7 @@ *---------------------------------------------------------------------------- */ -static gint vdtree_find_iter_by_data(ViewDir *vd, GtkTreeIter *parent, NodeData *nd, GtkTreeIter *iter) +static gboolean vdtree_find_iter_by_data(ViewDir *vd, GtkTreeIter *parent, NodeData *nd, GtkTreeIter *iter) { GtkTreeModel *store; @@ -433,7 +433,7 @@ } } -gint vdtree_populate_path_by_iter(ViewDir *vd, GtkTreeIter *iter, gint force, FileData *target_fd) +gboolean vdtree_populate_path_by_iter(ViewDir *vd, GtkTreeIter *iter, gboolean force, FileData *target_fd) { GtkTreeModel *store; GList *list; @@ -575,7 +575,7 @@ return TRUE; } -FileData *vdtree_populate_path(ViewDir *vd, FileData *target_fd, gint expand, gint force) +FileData *vdtree_populate_path(ViewDir *vd, FileData *target_fd, gboolean expand, gboolean force) { GList *list; GList *work; @@ -696,7 +696,7 @@ } } -gint vdtree_set_fd(ViewDir *vd, FileData *dir_fd) +gboolean vdtree_set_fd(ViewDir *vd, FileData *dir_fd) { FileData *fd; GtkTreeIter iter; @@ -753,7 +753,7 @@ *---------------------------------------------------------------------------- */ -gint vdtree_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) +gboolean vdtree_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { ViewDir *vd = data; GtkTreePath *tpath; @@ -800,8 +800,8 @@ return FALSE; } -static gint vdtree_clicked_on_expander(GtkTreeView *treeview, GtkTreePath *tpath, - GtkTreeViewColumn *column, gint x, gint y, gint *left_of_expander) +static gboolean vdtree_clicked_on_expander(GtkTreeView *treeview, GtkTreePath *tpath, + GtkTreeViewColumn *column, gint x, gint y, gint *left_of_expander) { gint depth; gint size; @@ -824,7 +824,7 @@ return FALSE; } -gint vdtree_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) +gboolean vdtree_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { ViewDir *vd = data; GtkTreePath *tpath;
--- a/src/view_dir_tree.h Mon Mar 16 18:19:11 2009 +0000 +++ b/src/view_dir_tree.h Mon Mar 16 19:11:39 2009 +0000 @@ -17,7 +17,7 @@ struct _NodeData { FileData *fd; - gint expanded; + gboolean expanded; time_t last_update; gint version; }; @@ -26,18 +26,18 @@ void vdtree_select_row(ViewDir *vd, FileData *fd); -gint vdtree_set_fd(ViewDir *vd, FileData *dir_fd); +gboolean vdtree_set_fd(ViewDir *vd, FileData *dir_fd); void vdtree_refresh(ViewDir *vd); const gchar *vdtree_row_get_path(ViewDir *vd, gint row); -gint vdtree_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter, GtkTreeIter *parent); -gint vdtree_populate_path_by_iter(ViewDir *vd, GtkTreeIter *iter, gint force, FileData *target_fd); +gboolean vdtree_find_row(ViewDir *vd, FileData *fd, GtkTreeIter *iter, GtkTreeIter *parent); +gboolean vdtree_populate_path_by_iter(ViewDir *vd, GtkTreeIter *iter, gboolean force, FileData *target_fd); -FileData *vdtree_populate_path(ViewDir *vd, FileData *target_fd, gint expand, gint force); +FileData *vdtree_populate_path(ViewDir *vd, FileData *target_fd, gboolean expand, gboolean force); void vdtree_rename_by_data(ViewDir *vd, FileData *fd); -gint vdtree_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); -gint vdtree_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); +gboolean vdtree_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data); +gboolean vdtree_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data); void vdtree_destroy_cb(GtkWidget *widget, gpointer data);