Beispiel #1
0
bool t_reload_all(arg_t a)
{
    if (mode == MODE_THUMB) {
        tns_free(&tns);
        tns_init(&tns, filecnt, &win);
        return true;
    } else {
        return false;
    }
}
Beispiel #2
0
cmdreturn_t t_reload_all(arg_t a)
{
    if (mode == MODE_THUMB) {
        tns_free(&tns);
        tns_init(&tns, filecnt, &win);
        return CMD_DIRTY;
    } else {
        return CMD_INVALID;
    }
}
Beispiel #3
0
bool it_switch_mode(arg_t a)
{
    if (mode == MODE_IMAGE) {
        if (tns.thumbs == NULL)
            tns_init(&tns, filecnt, &win);
        img_close(&img, false);
        reset_timeout(reset_cursor);
        tns.sel = fileidx;
        tns.dirty = true;
        mode = MODE_THUMB;
    } else {
        load_image(tns.sel);
        mode = MODE_IMAGE;
    }
    return true;
}
Beispiel #4
0
bool it_switch_mode(arg_t a) {
	if (mode == MODE_IMAGE) {
		if (tns.thumbs == NULL)
			tns_init(&tns, filecnt, &win);
		img_close(&img, false);
		reset_timeout(reset_cursor);
		if (img.slideshow) {
			img.slideshow = false;
			win_screensaver_restore(&win);
			reset_timeout(slideshow);
		}
		tns.sel = fileidx;
		tns.dirty = true;
		mode = MODE_THUMB;
	} else {
		load_image(tns.sel);
		mode = MODE_IMAGE;
	}
	return true;
}
Beispiel #5
0
cmdreturn_t it_switch_mode(arg_t a)
{
    if (mode == MODE_IMAGE) {
        if (tns.thumbs == NULL) {
            tns_init(&tns, filecnt, &win);
            tns.alpha = img.alpha;
        }
        img_close(&img, false);
        reset_timeout(reset_cursor);
        if (img.ss.on) {
            img.ss.on = false;
            reset_timeout(slideshow);
        }
        tns.sel = fileidx;
        tns.dirty = true;
        mode = MODE_THUMB;
    } else {
        load_image(tns.sel);
        mode = MODE_IMAGE;
    }
    return CMD_DIRTY;
}