diff options
author | nirav <nirav@teisuu.com> | 2019-04-27 17:26:15 +0000 |
---|---|---|
committer | nirav <nirav@teisuu.com> | 2019-04-27 17:26:15 +0000 |
commit | c158e0596f6f103ee2e5465051d03028f7b9b181 (patch) | |
tree | a80297bb59e6f839927791950542de06ea77d010 | |
parent | 0d565e46953e433fa13149f54593c09f099ef7df (diff) | |
download | im-c158e0596f6f103ee2e5465051d03028f7b9b181.tar.gz im-c158e0596f6f103ee2e5465051d03028f7b9b181.zip |
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 30 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | data/im.css (renamed from data/qwe.css) | 0 | ||||
-rw-r--r-- | data/im.gresources.xml | 6 | ||||
-rw-r--r-- | data/qwe.gresources.xml | 6 | ||||
-rw-r--r-- | doc/im.1.scd (renamed from doc/qwe.1.scd) | 12 | ||||
-rw-r--r-- | doc/qwe.1 | 84 | ||||
-rw-r--r-- | im.desktop (renamed from qwe.desktop) | 4 | ||||
-rw-r--r-- | src/option.c | 4 | ||||
-rw-r--r-- | src/window.c | 4 |
11 files changed, 35 insertions, 122 deletions
@@ -1,3 +1,3 @@ src/resources.c -qwe +im *.o @@ -24,13 +24,13 @@ OBJECTS=$(SRCDIR)/main.o \ $(SRCDIR)/option.o \ $(SRCDIR)/resources.o -all: qwe +all: im -qwe: $(OBJECTS) +im: $(OBJECTS) $(CC) $(_LDFLAGS) -o $@ $(OBJECTS) -$(SRCDIR)/resources.c: $(DATADIR)/qwe.gresources.xml $(DATADIR)/qwe.css - glib-compile-resources $(DATADIR)/qwe.gresources.xml --target=$@ --generate-source +$(SRCDIR)/resources.c: $(DATADIR)/im.gresources.xml $(DATADIR)/im.css + glib-compile-resources $(DATADIR)/im.gresources.xml --target=$@ --generate-source .c.o: $(CC) $(_CFLAGS) $(DFLAGS) -c -o $@ $< @@ -38,23 +38,23 @@ $(SRCDIR)/resources.c: $(DATADIR)/qwe.gresources.xml $(DATADIR)/qwe.css clean: rm -f $(SRCDIR)/resources.c rm -f $(SRCDIR)/*.o - rm -f qwe + rm -f im -install: qwe qwe.desktop +install: im im.desktop mkdir -p $(DESTDIR)$(BINDIR) - cp qwe $(DESTDIR)$(BINDIR)/qwe - chmod 0775 $(DESTDIR)$(BINDIR)/qwe + cp im $(DESTDIR)$(BINDIR)/im + chmod 0775 $(DESTDIR)$(BINDIR)/im mkdir -p $(DESTDIR)$(APPDIR) - cp qwe.desktop $(DESTDIR)$(APPDIR)/qwe.desktop - chmod 0664 $(DESTDIR)$(APPDIR)/qwe.desktop + cp im.desktop $(DESTDIR)$(APPDIR)/im.desktop + chmod 0664 $(DESTDIR)$(APPDIR)/im.desktop mkdir -p $(DESTDIR)$(MANDIR) - cp doc/qwe.1 $(DESTDIR)$(MANDIR)/qwe.1 - chmod 0664 $(DESTDIR)$(MANDIR)/qwe.1 + cp doc/im.1 $(DESTDIR)$(MANDIR)/im.1 + chmod 0664 $(DESTDIR)$(MANDIR)/im.1 uninstall: - rm -f $(DESTDIR)$(BINDIR)/qwe - rm -f $(DESTDIR)$(APPDIR)/qwe.desktop - rm -f $(DESTDIR)$(MANDIR)/qwe.1 + rm -f $(DESTDIR)$(BINDIR)/im + rm -f $(DESTDIR)$(APPDIR)/im.desktop + rm -f $(DESTDIR)$(MANDIR)/im.1 src/file.o: src/file.c src/file.h src/image.h src/image.o: src/image.c src/image.h src/window.h @@ -1,4 +1,4 @@ -qwe: Image Viewer +im: Image Viewer Dependencies @@ -10,6 +10,3 @@ Installation $ make # make install - -Contact -qwe@airmail.cc diff --git a/data/qwe.css b/data/im.css index 375165e..375165e 100644 --- a/data/qwe.css +++ b/data/im.css diff --git a/data/im.gresources.xml b/data/im.gresources.xml new file mode 100644 index 0000000..5821b3f --- /dev/null +++ b/data/im.gresources.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<gresources> + <gresource prefix="/org/gtk/im"> + <file alias="im.css">data/im.css</file> + </gresource> +</gresources> diff --git a/data/qwe.gresources.xml b/data/qwe.gresources.xml deleted file mode 100644 index 336977a..0000000 --- a/data/qwe.gresources.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<gresources> - <gresource prefix="/org/gtk/qwe"> - <file alias="qwe.css">data/qwe.css</file> - </gresource> -</gresources> diff --git a/doc/qwe.1.scd b/doc/im.1.scd index be83cae..ec64aa9 100644 --- a/doc/qwe.1.scd +++ b/doc/im.1.scd @@ -1,23 +1,23 @@ -qwe(1) +im(1) # NAME -qwe - a simple image viewer +im - a simple image viewer # SYNOPSIS -*qwe* _filename_ +*im* _filename_ # DESCRIPTION -qwe is a image viewer written in GTK+. It can open any image file +im is a image viewer written in GTK+. It can open any image file supported by GdkPixbuf library, use *-f* flag to print the list of image formats supported by GdkPixbuf. # MODES -qwe supports two image display modes, *Fit* and *Zoom*. +im supports two image display modes, *Fit* and *Zoom*. The default mode *Fit* will resize the image to fit inside the current window @@ -28,7 +28,7 @@ Zoom mode let's you zoom and pan (scroll) the zoomed-in image. # KEY BINDINGS -qwe has separate key bindings for both *Fit* and *Zoom* mode. +im has separate key bindings for both *Fit* and *Zoom* mode. ## FIT MODE diff --git a/doc/qwe.1 b/doc/qwe.1 deleted file mode 100644 index 9e60cf6..0000000 --- a/doc/qwe.1 +++ /dev/null @@ -1,84 +0,0 @@ -.\" Generated by scdoc 1.2.3 -.\" Fix weird quotation marks: -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" Disable hyphenation: -.nh -.\" Disable justification: -.ad l -.\" Generated content: -.TH "qwe" "1" "2018-09-09" -.P -.SH NAME -.P -qwe - a simple image viewer -.P -.SH SYNOPSIS -.P -\fBqwe\fR \fIfilename\fR -.P -.SH DESCRIPTION -.P -qwe is a image viewer written in GTK+. It can open any image file -supported by GdkPixbuf library, use \fB-f\fR flag to print the list of image -formats supported by GdkPixbuf. -.P -.P -.SH MODES -.P -qwe supports two image display modes, \fBFit\fR and \fBZoom\fR. -.P -.P -The default mode \fBFit\fR will resize the image to fit inside the current window -while maintaining the aspect ratio. -.P -.P -Zoom mode let's you zoom and pan (scroll) the zoomed-in image. -.P -.SH KEY BINDINGS -.P -qwe has separate key bindings for both \fBFit\fR and \fBZoom\fR mode. -.P -.SS FIT MODE -.P -.RS "4" -\fBj\fR, \fBl\fR, \fBn\fR, \fB<Down>\fR, \fB<Right>\fR Next image -.P -\fBk\fR, \fBh\fR, \fBp\fR, \fB<Up>\fR, \fB<Left>\fR Previous image -.P -.RE -.SS ZOOM MODE -.P -.RS "4" -\fBj\fR, \fB<Down>\fR Scroll down -.P -\fBk\fR, \fB<Up>\fR Scroll up -.P -\fBh\fR, \fB<Left>\fR Scroll left -.P -\fBl\fR, \fB<Right>\fR Scroll right -.P -\fBJ\fR, \fBL\fR, \fB<S-Down>\fR, \fB<S-Right>\fR Next image -.P -\fBK\fR, \fBH\fR, \fB<S-Up>\fR, \fB<S-Left>\fR Previous image -.P -.RE -.SS ANY MODE -.P -.RS "4" -\fB+\fR, \fB<C-ScrollWheelUp>\fR Zoom-in by 10% and switch to \fBZoom\fR mode -.P -\fB-\fR, \fB<C-ScrollWheelDown>\fR Zoom-out by 10% and switch to \fBZoom\fR mode -.P -\fB=\fR Reset zoom to 100% and switch to \fBZoom\fR mode -.P -\fBw\fR Switch to \fBFit\fR mode -.P -\fBq\fR Quit -.P -.RE -.SH SEE ALSO -.P -\fBsxiv\fR(1), \fBfeh\fR(1) @@ -1,8 +1,8 @@ [Desktop Entry] Type=Application -Name=qwe +Name=im Comment=Image Viewer -Exec=qwe %f +Exec=im %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/option.c b/src/option.c index e548d78..4385c29 100644 --- a/src/option.c +++ b/src/option.c @@ -6,9 +6,9 @@ #include "option.h" -static const char version[] = "qwe version 0.01"; +static const char version[] = "im version 0.01"; static const char usage[] = - "Usage: qwe [options...] <file>\n" + "Usage: im [options...] <file>\n" "\n" " -i Hide info bar by default.\n" " -f Use fullscreen mode by default.\n" diff --git a/src/window.c b/src/window.c index dbb41f9..4493fb5 100644 --- a/src/window.c +++ b/src/window.c @@ -56,7 +56,7 @@ static gboolean configure_callback( void load_css() { GtkCssProvider *provider = gtk_css_provider_new(); - gtk_css_provider_load_from_resource(provider, "/org/gtk/qwe/qwe.css"); + gtk_css_provider_load_from_resource(provider, "/org/gtk/im/im.css"); gtk_style_context_add_provider_for_screen( gdk_display_get_default_screen(gdk_display_get_default()), GTK_STYLE_PROVIDER(provider), @@ -70,7 +70,7 @@ void create_main_window() window = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL); gtk_widget_set_name(GTK_WIDGET(window), "main-window"); - gtk_window_set_title(GTK_WINDOW(window), "qwe"); + gtk_window_set_title(GTK_WINDOW(window), "im"); gtk_window_set_default_size(GTK_WINDOW(window), 800, 600); gtk_widget_add_events(GTK_WIDGET(window), GDK_SCROLL_MASK); g_signal_connect(G_OBJECT(window), "configure-event", |