Do not check file-type at startup
This commit is contained in:
parent
8ee73709d7
commit
8d4e3a57ab
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
||||||
all: sxiv
|
all: sxiv
|
||||||
|
|
||||||
VERSION=git-20110317
|
VERSION=git-20110404
|
||||||
|
|
||||||
CC?=gcc
|
CC?=gcc
|
||||||
PREFIX?=/usr/local
|
PREFIX?=/usr/local
|
||||||
|
|
344
icon.h
344
icon.h
|
@ -3,178 +3,178 @@
|
||||||
|
|
||||||
#include <Imlib2.h>
|
#include <Imlib2.h>
|
||||||
|
|
||||||
static DATA32 icon_broken[] = {
|
static DATA32 icon_invalid[] = {
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffffffff, 0xffffffff,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb,
|
||||||
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcc0000, 0xffcc0000,
|
0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xffbbbbbb, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000,
|
0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444, 0xff444444,
|
||||||
0xffcc0000, 0xffcc0000, 0xffcc0000, 0xffcc0000
|
0xff444444, 0xff444444, 0xff444444, 0xff444444
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* ICON_H */
|
#endif /* ICON_H */
|
||||||
|
|
38
image.c
38
image.c
|
@ -16,8 +16,6 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "icon.h"
|
#include "icon.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
|
@ -28,14 +26,14 @@ int zl_cnt;
|
||||||
float zoom_min;
|
float zoom_min;
|
||||||
float zoom_max;
|
float zoom_max;
|
||||||
|
|
||||||
Imlib_Image *im_broken;
|
Imlib_Image *im_invalid;
|
||||||
|
|
||||||
void img_init(img_t *img, win_t *win) {
|
void img_init(img_t *img, win_t *win) {
|
||||||
zl_cnt = sizeof(zoom_levels) / sizeof(zoom_levels[0]);
|
zl_cnt = sizeof(zoom_levels) / sizeof(zoom_levels[0]);
|
||||||
zoom_min = zoom_levels[0] / 100.0;
|
zoom_min = zoom_levels[0] / 100.0;
|
||||||
zoom_max = zoom_levels[zl_cnt - 1] / 100.0;
|
zoom_max = zoom_levels[zl_cnt - 1] / 100.0;
|
||||||
|
|
||||||
im_broken = imlib_create_image_using_data(32, 32, icon_broken);
|
im_invalid = imlib_create_image_using_data(32, 32, icon_invalid);
|
||||||
|
|
||||||
if (img) {
|
if (img) {
|
||||||
img->im = NULL;
|
img->im = NULL;
|
||||||
|
@ -54,41 +52,23 @@ void img_init(img_t *img, win_t *win) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void img_free(img_t* img) {
|
void img_free(img_t* img) {
|
||||||
imlib_context_set_image(im_broken);
|
imlib_context_set_image(im_invalid);
|
||||||
imlib_free_image();
|
imlib_free_image();
|
||||||
}
|
}
|
||||||
|
|
||||||
int img_check(const char *filename) {
|
|
||||||
Imlib_Image *im;
|
|
||||||
|
|
||||||
if (!filename)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (!access(filename, F_OK) && (im = imlib_load_image(filename))) {
|
|
||||||
imlib_context_set_image(im);
|
|
||||||
imlib_image_set_changes_on_disk();
|
|
||||||
imlib_free_image();
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
warn("could not open file: %s", filename);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int img_load(img_t *img, const char *filename) {
|
int img_load(img_t *img, const char *filename) {
|
||||||
if (!img || !filename)
|
if (!img || !filename)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!access(filename, F_OK) && (img->im = imlib_load_image(filename))) {
|
if ((img->im = imlib_load_image(filename))) {
|
||||||
imlib_context_set_image(img->im);
|
imlib_context_set_image(img->im);
|
||||||
imlib_image_set_changes_on_disk();
|
imlib_image_set_changes_on_disk();
|
||||||
imlib_context_set_anti_alias(img->aa);
|
imlib_context_set_anti_alias(img->aa);
|
||||||
img->scalemode = options->scalemode;
|
img->scalemode = options->scalemode;
|
||||||
} else {
|
} else {
|
||||||
warn("could not open file: %s", filename);
|
warn("not an image: %s", filename);
|
||||||
imlib_context_set_image(im_broken);
|
imlib_context_set_image(im_invalid);
|
||||||
imlib_context_set_anti_alias(0);
|
imlib_context_set_anti_alias(0);
|
||||||
img->scalemode = SCALE_DOWN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img->re = 0;
|
img->re = 0;
|
||||||
|
@ -157,9 +137,9 @@ void img_render(img_t *img, win_t *win) {
|
||||||
if (!img || !win)
|
if (!img || !win)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (img->scalemode != SCALE_ZOOM) {
|
if (!img->im || img->scalemode != SCALE_ZOOM) {
|
||||||
img_fit(img, win);
|
img_fit(img, win);
|
||||||
if (img->scalemode == SCALE_DOWN && img->zoom > 1.0)
|
if ((!img->im || img->scalemode == SCALE_DOWN) && img->zoom > 1.0)
|
||||||
img->zoom = 1.0;
|
img->zoom = 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +190,7 @@ void img_render(img_t *img, win_t *win) {
|
||||||
if (img->im)
|
if (img->im)
|
||||||
imlib_context_set_image(img->im);
|
imlib_context_set_image(img->im);
|
||||||
else
|
else
|
||||||
imlib_context_set_image(im_broken);
|
imlib_context_set_image(im_invalid);
|
||||||
|
|
||||||
if (imlib_image_has_alpha() && !img->alpha)
|
if (imlib_image_has_alpha() && !img->alpha)
|
||||||
win_draw_rect(win, win->pm, dx, dy, dw, dh, True, 0, win->white);
|
win_draw_rect(win, win->pm, dx, dy, dw, dh, True, 0, win->white);
|
||||||
|
|
8
main.c
8
main.c
|
@ -178,7 +178,7 @@ void update_title() {
|
||||||
fileidx + 1, filecnt, (int) (img.zoom * 100.0), size, unit,
|
fileidx + 1, filecnt, (int) (img.zoom * 100.0), size, unit,
|
||||||
filenames[fileidx]);
|
filenames[fileidx]);
|
||||||
} else {
|
} else {
|
||||||
n = snprintf(win_title, TITLE_LEN, "sxiv: [%d/%d] broken: %s",
|
n = snprintf(win_title, TITLE_LEN, "sxiv: [%d/%d] not an image: %s",
|
||||||
fileidx + 1, filecnt, filenames[fileidx]);
|
fileidx + 1, filecnt, filenames[fileidx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,10 +193,7 @@ void update_title() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int check_append(const char *filename) {
|
int check_append(const char *filename) {
|
||||||
if (!filename)
|
if (filename && !access(filename, R_OK)) {
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (img_check(filename)) {
|
|
||||||
if (fileidx == filecnt) {
|
if (fileidx == filecnt) {
|
||||||
filecnt *= 2;
|
filecnt *= 2;
|
||||||
filenames = (const char**) s_realloc(filenames,
|
filenames = (const char**) s_realloc(filenames,
|
||||||
|
@ -205,6 +202,7 @@ int check_append(const char *filename) {
|
||||||
filenames[fileidx++] = filename;
|
filenames[fileidx++] = filename;
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
warn("could not open file: %s", filename);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
thumbs.c
4
thumbs.c
|
@ -23,7 +23,7 @@
|
||||||
#include "thumbs.h"
|
#include "thumbs.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
extern Imlib_Image *im_broken;
|
extern Imlib_Image *im_invalid;
|
||||||
const int thumb_dim = THUMB_SIZE + 10;
|
const int thumb_dim = THUMB_SIZE + 10;
|
||||||
|
|
||||||
void tns_init(tns_t *tns, int cnt) {
|
void tns_init(tns_t *tns, int cnt) {
|
||||||
|
@ -78,7 +78,7 @@ void tns_load(tns_t *tns, win_t *win, int n, const char *filename) {
|
||||||
if ((im = imlib_load_image(filename)))
|
if ((im = imlib_load_image(filename)))
|
||||||
imlib_context_set_image(im);
|
imlib_context_set_image(im);
|
||||||
else
|
else
|
||||||
imlib_context_set_image(im_broken);
|
imlib_context_set_image(im_invalid);
|
||||||
|
|
||||||
w = imlib_image_get_width();
|
w = imlib_image_get_width();
|
||||||
h = imlib_image_get_height();
|
h = imlib_image_get_height();
|
||||||
|
|
Loading…
Reference in New Issue