aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2017-08-22 21:11:46 +0100
committerHarry Jeffery <harry@exec64.co.uk>2017-08-22 21:11:46 +0100
commit4cf843f7285120a96b004150adf4c3543128a807 (patch)
tree6a5ad4d970c708b1c44a97a6db4e9b2f645c4d81 /src
parentdd8c5293705b2baeb5ca8c0a4fa9a594cd8e4cd9 (diff)
downloadimv-4cf843f7285120a96b004150adf4c3543128a807.tar.gz
Fix imv -h opening a window
Diffstat (limited to 'src')
-rw-r--r--src/imv.c11
-rw-r--r--src/imv.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/src/imv.c b/src/imv.c
index 252e951..84e2317 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -356,12 +356,13 @@ void imv_add_path(struct imv *imv, const char *path)
imv_navigator_add(imv->navigator, path, imv->recursive_load);
}
-bool imv_run(struct imv *imv)
+int imv_run(struct imv *imv)
{
- if(!setup_window(imv))
- return false;
+ if(imv->quit)
+ return 0;
- imv->quit = false;
+ if(!setup_window(imv))
+ return 1;
/* cache current image's dimensions */
int iw = 0;
@@ -508,7 +509,7 @@ bool imv_run(struct imv *imv)
puts(imv_navigator_at(imv->navigator, i));
}
- return false;
+ return 0;
}
static bool setup_window(struct imv *imv)
diff --git a/src/imv.h b/src/imv.h
index 0945fe2..7c00bb7 100644
--- a/src/imv.h
+++ b/src/imv.h
@@ -29,7 +29,7 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv);
void imv_add_path(struct imv *imv, const char *path);
-bool imv_run(struct imv *imv);
+int imv_run(struct imv *imv);
#endif