Mercurial > geeqie
diff src/view_file.c @ 1453:bc3f5c0432f6
gint -> gboolean where applicable. The end (ouf!).
author | zas_ |
---|---|
date | Mon, 16 Mar 2009 20:39:09 +0000 |
parents | a3d3208b0c50 |
children | 5f49f305a6b6 |
line wrap: on
line diff
--- a/src/view_file.c Mon Mar 16 19:11:39 2009 +0000 +++ b/src/view_file.c Mon Mar 16 20:39:09 2009 +0000 @@ -38,7 +38,7 @@ *----------------------------------------------------------------------------- */ -void vf_sort_set(ViewFile *vf, SortType type, gint ascend) +void vf_sort_set(ViewFile *vf, SortType type, gboolean ascend) { switch (vf->type) { @@ -112,7 +112,7 @@ *------------------------------------------------------------------- */ -static gint vf_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) +static gboolean vf_press_key_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { ViewFile *vf = data; gboolean ret = FALSE; @@ -132,7 +132,7 @@ *------------------------------------------------------------------- */ -static gint vf_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) +static gboolean vf_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { ViewFile *vf = data; gboolean ret = FALSE; @@ -146,7 +146,7 @@ return ret; } -static gint vf_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) +static gboolean vf_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data) { ViewFile *vf = data; gboolean ret = FALSE; @@ -167,6 +167,20 @@ *----------------------------------------------------------------------------- */ +gboolean vf_index_is_selected(ViewFile *vf, gint row) +{ + gboolean ret = FALSE; + + switch (vf->type) + { + case FILEVIEW_LIST: ret = vflist_index_is_selected(vf, row); break; + case FILEVIEW_ICON: ret = vficon_index_is_selected(vf, row); break; + } + + return ret; +} + + guint vf_selection_count(ViewFile *vf, gint64 *bytes) { guint count = 0; @@ -485,7 +499,7 @@ GtkWidget *menu; GtkWidget *item; GtkWidget *submenu; - gint active = 0; + gboolean active = FALSE; switch (vf->type) { @@ -601,7 +615,7 @@ return menu; } -gint vf_refresh(ViewFile *vf) +gboolean vf_refresh(ViewFile *vf) { gboolean ret = FALSE; @@ -614,7 +628,7 @@ return ret; } -gint vf_set_fd(ViewFile *vf, FileData *dir_fd) +gboolean vf_set_fd(ViewFile *vf, FileData *dir_fd) { gboolean ret = FALSE; @@ -739,7 +753,7 @@ vf->data_thumb_status = data; } -void vf_thumb_set(ViewFile *vf, gint enable) +void vf_thumb_set(ViewFile *vf, gboolean enable) { switch (vf->type) { @@ -748,7 +762,7 @@ } } -void vf_marks_set(ViewFile *vf, gint enable) +void vf_marks_set(ViewFile *vf, gboolean enable) { if (vf->marks_enabled == enable) return; @@ -795,7 +809,7 @@ *----------------------------------------------------------------------------- */ -static gint vf_refresh_idle_cb(gpointer data) +static gboolean vf_refresh_idle_cb(gpointer data) { ViewFile *vf = data;