diff options
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | qwe.desktop | 8 | ||||
-rw-r--r-- | src/input.c | 1 |
3 files changed, 19 insertions, 5 deletions
@@ -1,10 +1,13 @@ CC?=cc INSTALL?=install -CFLAGS?=-o2 -pipe -Wall -std=c11 $(shell pkg-config --cflags gtk+-3.0) -LDFLAGS?=$(shell pkg-config --libs gtk+-3.0) -PREFIX?=/usr/local -BINDIR?=$(PREFIX)/bin +CFLAGS?=-o2 -pipe +CFLAGS+=-Wall -Wextra -Wno-unused-parameter +CFLAGS+=$(shell pkg-config --cflags gtk+-3.0) +LDFLAGS+=$(shell pkg-config --libs gtk+-3.0) +PREFIX?=/usr +BINDIR=$(PREFIX)/bin +APPDIR=$(PREFIX)/share/applications SRCDIR=src OUTDIR=build @@ -27,10 +30,12 @@ $(OUTDIR)/%.o: $(SRCDIR)/%.c clean: rm -rf $(OUTDIR) qwe -install: qwe +install: qwe qwe.desktop $(INSTALL) -m0755 qwe $(BINDIR) + $(INSTALL) -m0644 qwe.desktop $(APPDIR)/qwe.desktop uninstall: rm -rf $(BINDIR)/qwe + rm -rf $(APPDIR)/qwe.desktop .PHONY: all clean install uninstall diff --git a/qwe.desktop b/qwe.desktop new file mode 100644 index 0000000..b21cc16 --- /dev/null +++ b/qwe.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=qwe +Comment=Image Viewer +Exec=qwe %f +Terminal=false +NoDisplay=true +MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/png;image/tiff;image/x-bmp;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-tga;image/x-xpixmap; diff --git a/src/input.c b/src/input.c index 1d21ef2..b85c058 100644 --- a/src/input.c +++ b/src/input.c @@ -46,6 +46,7 @@ void handle_key_press(GdkEvent *event) switch (event->key.keyval) { case GDK_KEY_q: quit(); + break; case GDK_KEY_w: fit_image(); break; |