zathura-0.3.8/AUTHORS 0000664 0001750 0001750 00000001752 12501036512 014756 0 ustar sebastian sebastian zathura is written by:
Moritz Lipp
Sebastian Ramacher
Other contributors are (in no particular order):
Aepelzen
Pavel Borzenkov
Géraud Le Falher
Glen Winters
Ivan Sichmann Freitas
Felix Herrmann
int3
karottenreibe
Johannes Meng
J. Commelin
Julian Orth
Roland Schatz
Abdó Roig-Maranges
Benoît Knecht
Rob Cornish
Marwan Tanager
Diego Joss
Ignas Anikevicius
Kamil Smardzewski
oblique
Maxime Chéramy
Alexander Shabalin
Lingzhu Xiang
zathura-0.3.8/LICENSE 0000664 0001750 0001750 00000001542 13216464200 014713 0 ustar sebastian sebastian Copyright (c) 2009-2017 pwmt.org
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
zathura-0.3.8/Makefile 0000664 0001750 0001750 00000021311 13216464200 015342 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
include config.mk
include colors.mk
include common.mk
# source files
OSOURCE = $(sort $(wildcard ${PROJECT}/*.c) \
${PROJECT}/resources.c)
SOURCE_FILTER =
ifneq (${WITH_SQLITE},0)
CPPFLAGS += -DWITH_SQLITE
else
SOURCE_FILTER += ${PROJECT}/database-sqlite.c
endif
ifneq ($(WITH_MAGIC),0)
CPPFLAGS += -DWITH_MAGIC
endif
ifneq ($(WITH_SYNCTEX),0)
CPPFLAGS += -DWITH_SYNCTEX
endif
ifneq ($(wildcard ${VALGRIND_SUPPRESSION_FILE}),)
VALGRIND_ARGUMENTS += --suppressions=${VALGRIND_SUPPRESSION_FILE}
endif
ifeq (,$(findstring -DZATHURA_PLUGINDIR,${CPPFLAGS}))
CPPFLAGS += -DZATHURA_PLUGINDIR=\"${PLUGINDIR}\"
endif
ifeq (,$(findstring -DGETTEXT_PACKAGE,${CPPFLAGS}))
CPPFLAGS += -DGETTEXT_PACKAGE=\"${PROJECT}\"
endif
ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS}))
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
endif
SOURCE = $(filter-out $(SOURCE_FILTER),$(OSOURCE))
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o})
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o})
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o})
HEADERINST = $(addprefix ${PROJECT}/,version.h document.h macros.h page.h types.h plugin-api.h links.h)
all: options ${PROJECT} po build-manpages
# pkg-config based version checks
.version-checks/%: config.mk
$(QUIET)test $($(*)_VERSION_CHECK) -eq 0 || \
${PKG_CONFIG} --atleast-version $($(*)_MIN_VERSION) $($(*)_PKG_CONFIG_NAME) || ( \
echo "The minimum required version of $(*) is $($(*)_MIN_VERSION)" && \
false \
)
@mkdir -p .version-checks
$(QUIET)touch $@
options:
@echo ${PROJECT} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LIBS = ${LIBS}"
@echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}"
# generated files
${PROJECT}/version.h: ${PROJECT}/version.h.in config.mk
$(QUIET)sed -e 's/ZVMAJOR/${ZATHURA_VERSION_MAJOR}/' \
-e 's/ZVMINOR/${ZATHURA_VERSION_MINOR}/' \
-e 's/ZVREV/${ZATHURA_VERSION_REV}/' \
-e 's/ZVAPI/${ZATHURA_API_VERSION}/' \
-e 's/ZVABI/${ZATHURA_ABI_VERSION}/' ${PROJECT}/version.h.in > ${PROJECT}/version.h.tmp
$(QUIET)mv ${PROJECT}/version.h.tmp ${PROJECT}/version.h
${PROJECT}/resources.%: data/zathura.gresource.xml config.mk
$(call colorecho,GEN,$@)
@mkdir -p ${DEPENDDIR}/$(dir $@)
$(QUIET)$(GLIB_COMPILE_RESOURCES) --generate --c-name=zathura_resources --internal \
--dependency-file=$(DEPENDDIR)/$@.dep \
--sourcedir=data --target=$@ data/zathura.gresource.xml
# common dependencies
${OBJECTS} ${OBJECTS_DEBUG} ${OBJECTS_GCOV}: config.mk \
.version-checks/GIRARA \
.version-checks/GLIB \
.version-checks/GTK \
${PROJECT}/version.h \
${PROJECT}/resources.h
# rlease build
${BUILDDIR_RELEASE}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $@)
@mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF ${DEPENDDIR}/$@.dep
${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}: ${OBJECTS}
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_RELEASE}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} ${OBJECTS} ${LIBS}
${PROJECT}: ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
release: ${PROJECT}
run: release
$(QUIET)./${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
# debug build
${BUILDDIR_DEBUG}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $@)
@mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$@.dep
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}: ${OBJECTS_DEBUG}
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_DEBUG}/${BINDIR}
$(QUIET)${CC} ${LDFLAGS} \
-o ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT} ${OBJECTS_DEBUG} ${LIBS}
debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
run-debug: debug
$(QUIET)./${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
# gcov build
${BUILDDIR_GCOV}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $@)
@mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$@.dep
${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}: ${OBJECTS_GCOV}
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_GCOV}/${BINDIR}
$(QUIET)${CC} ${LDFLAGS} ${GCOV_CFLAGS} ${GCOV_LDFLAGS} \
-o ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT} ${OBJECTS_GCOV} ${LIBS}
gcov: options ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
$(QUIET)${MAKE} -C tests run-gcov
$(call colorecho,LCOV,"Analyse data")
$(QUIET)${LCOV_EXEC} ${LCOV_FLAGS}
$(call colorecho,LCOV,"Generate report")
$(QUIET)${GENHTML_EXEC} ${GENHTML_FLAGS}
run-gcov: ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
$(QUIET)./${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
# clean
clean:
$(QUIET)rm -rf \
${BUILDDIR} \
${DEPENDDIR} \
${TARFILE} \
${TARDIR} \
${PROJECT}.pc \
${PROJECT}/version.h \
${PROJECT}/version.h.tmp \
${PROJECT}/resources.c \
${PROJECT}/resources.h \
$(PROJECT).info \
gcov \
.version-checks
$(QUIET)$(MAKE) -C tests clean
$(QUIET)$(MAKE) -C po clean
$(QUIET)$(MAKE) -C doc clean
${PROJECT}.pc: ${PROJECT}.pc.in config.mk
$(QUIET)echo project=${PROJECT} > ${PROJECT}.pc
$(QUIET)echo version=${VERSION} >> ${PROJECT}.pc
$(QUIET)echo apiversion=${ZATHURA_API_VERSION} >> ${PROJECT}.pc
$(QUIET)echo abiversion=${ZATHURA_ABI_VERSION} >> ${PROJECT}.pc
$(QUIET)echo includedir=${INCLUDEDIR} >> ${PROJECT}.pc
$(QUIET)echo plugindir=${PLUGINDIR} >> ${PROJECT}.pc
$(QUIET)echo GTK_VERSION=3 >> ${PROJECT}.pc
$(QUIET)cat ${PROJECT}.pc.in >> ${PROJECT}.pc
valgrind: debug
$(QUIET)G_SLICE=always-malloc G_DEBUG=gc-friendly ${VALGRIND} ${VALGRIND_ARGUMENTS} \
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
gdb: debug
$(QUIET)cgdb ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
test: ${OBJECTS}
$(QUIET)$(MAKE) -C tests run
dist: clean build-manpages
$(QUIET)tar -czf $(TARFILE) --exclude=.gitignore \
--transform 's,^,zathura-$(VERSION)/,' \
`git ls-files` \
doc/_build/$(PROJECT).1 doc/_build/$(PROJECT)rc.5
doc:
$(QUIET)$(MAKE) -C doc
po:
$(QUIET)${MAKE} -C po
update-po:
$(QUIET)${MAKE} -C po update-po
build-manpages:
$(QUIET)${MAKE} -C doc man
install-manpages: build-manpages
$(call colorecho,INSTALL,"man pages")
$(QUIET)mkdir -m 755 -p ${DESTDIR}${MANPREFIX}/man1 ${DESTDIR}${MANPREFIX}/man5
ifneq "$(wildcard doc/_build/${PROJECT}.1)" ""
$(QUIET)install -m 644 doc/_build/${PROJECT}.1 ${DESTDIR}${MANPREFIX}/man1
endif
ifneq "$(wildcard doc/_build/${PROJECT}rc.5)" ""
$(QUIET)install -m 644 doc/_build/${PROJECT}rc.5 ${DESTDIR}${MANPREFIX}/man5
endif
install-headers: ${PROJECT}.pc
$(call colorecho,INSTALL,"header files")
$(QUIET)mkdir -m 755 -p ${DESTDIR}${INCLUDEDIR}/${PROJECT}
$(QUIET)install -m 644 ${HEADERINST} ${DESTDIR}${INCLUDEDIR}/${PROJECT}
$(call colorecho,INSTALL,"pkgconfig file")
$(QUIET)mkdir -m 755 -p ${DESTDIR}${LIBDIR}/pkgconfig
$(QUIET)install -m 644 ${PROJECT}.pc ${DESTDIR}${LIBDIR}/pkgconfig
install-dbus:
$(call colorecho,INSTALL,"D-Bus interface definitions")
$(QUIET)mkdir -m 755 -p $(DESTDIR)$(DBUSINTERFACEDIR)
$(QUIET)install -m 644 data/org.pwmt.zathura.xml $(DESTDIR)$(DBUSINTERFACEDIR)
install-appdata:
$(call colorecho,INSTALL,"AppData file")
$(QUIET)mkdir -m 755 -p $(DESTDIR)$(APPDATAPREFIX)
$(QUIET)install -m 644 data/$(PROJECT).appdata.xml $(DESTDIR)$(APPDATAPREFIX)
install: all install-headers install-manpages install-dbus install-appdata
$(call colorecho,INSTALL,"executeable file")
$(QUIET)mkdir -m 755 -p ${DESTDIR}${PREFIX}/bin
$(QUIET)install -m 755 ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} ${DESTDIR}${PREFIX}/bin
$(QUIET)mkdir -m 755 -p ${DESTDIR}${DESKTOPPREFIX}
$(call colorecho,INSTALL,"desktop file")
$(QUIET)install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX}
$(MAKE) -C po install
uninstall-headers:
$(call colorecho,UNINSTALL,"header files")
$(QUIET)rm -rf ${DESTDIR}${INCLUDEDIR}/${PROJECT}
$(call colorecho,UNINSTALL,"pkgconfig file")
$(QUIET)rm -f ${DESTDIR}${LIBDIR}/pkgconfig/${PROJECT}.pc
uninstall: uninstall-headers
$(ECHO) removing executable file
$(call colorecho,UNINSTALL,"executeable")
$(QUIET)rm -f ${DESTDIR}${PREFIX}/bin/${PROJECT}
$(call colorecho,UNINSTALL,"man pages")
$(QUIET)rm -f ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
$(QUIET)rm -f ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5
$(call colorecho,UNINSTALL,"desktop file")
$(QUIET)rm -f ${DESTDIR}${DESKTOPPREFIX}/${PROJECT}.desktop
$(call colorecho,UNINSTALL,"D-Bus interface definitions")
$(QUIET)rm -f $(DESTDIR)$(DBUSINTERFACEDIR)/org.pwmt.zathura.xml
$(call colorecho,UNINSTALL,"AppData file")
$(QUIET)rm -f $(DESTDIR)$(APPDATAPREFIX)/$(PROJECT).appdata.xml
$(MAKE) -C po uninstall
DEPENDS = ${DEPENDDIRS:^=${DEPENDDIR}/}$(addprefix ${DEPENDDIR}/,${OBJECTS:.o=.o.dep})
-include ${DEPENDS}
.PHONY: all options clean doc debug valgrind gdb dist doc install uninstall \
test po install-headers uninstall-headers update-po install-manpages \
build-manpages install-dbus
zathura-0.3.8/README 0000664 0001750 0001750 00000003536 13216464200 014573 0 ustar sebastian sebastian zathura - a document viewer
===========================
zathura is a highly customizable and functional document viewer based on the
girara user interface library and several document libraries.
Requirements
------------
gtk3 (>= 3.6)
glib (>= 2.50)
girara (>= 0.2.8)
sqlite3 (optional, >= 3.5.9)
check (for tests)
intltool
libmagic from file(1) (optional, for mime-type detection)
libsynctex from TeXLive (optional, for SyncTeX support)
Sphinx (optional, for manpages and HTML documentation)
doxygen (optional, for HTML documentation)
breathe (optional, for HTML documentation)
sphinx_rtd_theme (optional, for HTML documentation)
Please note that you need to have a working pkg-config installation and that the
Makefile is only compatible with GNU make. If you don't have a working
pkg-config installation please set the GTK_INC, GTK_LIB, GIRARA_INC, GIRARA_LIB,
SQLITE_INC and SQLITE_LIB variables accordingly.
Also note that Sphinx is needed to build the manpages. If it is not
installed, the man pages won't be built. For the HTML documentation, doxygen,
breathe and sphinx_rtd_theme are needed in addition to Sphinx.
If you don't want to build with support for sqlite databases, you can set
WITH_SQLITE=0 and sqlite support won't be available.
The use of magic to detect mime types is optional and can be disabled by setting
WITH_MAGIC=0.
If you pass these flags as a command line argument to make, you have to ensure
to pass the same flags when executing the install target.
If you want to build zathura's documentation, please install all python
dependencies from the ./doc/requirements.txt file.
Installation
------------
To build and install zathura:
make install
Uninstall
---------
To delete zathura from your system, just type:
make uninstall
Bugs
----
Please report bugs at http://bugs.pwmt.org or contact us on our mailing list at
zathura@lists.pwmt.org.
zathura-0.3.8/colors.mk 0000664 0001750 0001750 00000001510 12631275231 015537 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
ifeq ($(COLOR),1)
# GCC diagnostics colors
DIAGNOSTICS_COLOR_AVAILABLE ?= $(shell ($(CC) -fdiagnostics-color=always -E - /dev/null 2>/dev/null && echo 1) || echo 0)
ifeq ($(DIAGNOSTICS_COLOR_AVAILABLE),1)
CPPFLAGS += -fdiagnostics-color=always
endif
# colorful output
TPUT ?= /usr/bin/tput
TPUT_AVAILABLE ?= $(shell ${TPUT} -V 2>/dev/null)
ifdef TPUT_AVAILABLE
COLOR_NORMAL = `$(TPUT) sgr0`
COLOR_ACTION = `$(TPUT) bold``$(TPUT) setaf 3`
COLOR_COMMENT = `$(TPUT) bold``$(TPUT) setaf 2`
COLOR_BRACKET = `$(TPUT) setaf 4`
define colorecho
@echo $(COLOR_BRACKET)" ["$(COLOR_ACTION)$1$(COLOR_BRACKET)"] "$(COLOR_COMMENT)$2$(COLOR_BRACKET) $(COLOR_NORMAL)
endef
else
define colorecho
@echo " [$1]" $2
endef
endif
else
define colorecho
@echo " [$1]" $2
endef
endif
zathura-0.3.8/common.mk 0000664 0001750 0001750 00000000176 12501036512 015526 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
ifeq "$(VERBOSE)" "0"
ECHO=@echo
QUIET=@
else
ECHO=@\#
QUIET=
endif
zathura-0.3.8/config.mk 0000664 0001750 0001750 00000007707 13216464211 015517 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
# zathura make config
# project
PROJECT = zathura
ZATHURA_VERSION_MAJOR = 0
ZATHURA_VERSION_MINOR = 3
ZATHURA_VERSION_REV = 8
# If the API changes, the API version and the ABI version have to be bumped.
ZATHURA_API_VERSION = 2
# If the ABI breaks for any reason, this has to be bumped.
ZATHURA_ABI_VERSION = 3
VERSION = ${ZATHURA_VERSION_MAJOR}.${ZATHURA_VERSION_MINOR}.${ZATHURA_VERSION_REV}
# version checks
# If you want to disable any of the checks, set *_VERSION_CHECK to 0.
# girara
GIRARA_VERSION_CHECK ?= 1
GIRARA_MIN_VERSION = 0.2.8
GIRARA_PKG_CONFIG_NAME = girara-gtk3
# glib
GLIB_VERSION_CHECK ?= 1
GLIB_MIN_VERSION = 2.50
GLIB_PKG_CONFIG_NAME = glib-2.0
# GTK
GTK_VERSION_CHECK ?= 1
GTK_MIN_VERSION = 3.6
GTK_PKG_CONFIG_NAME = gtk+-3.0
# pkg-config binary
PKG_CONFIG ?= pkg-config
# glib-compile-resources
GLIB_COMPILE_RESOURCES ?= glib-compile-resources
# database
# To disable support for the sqlite backend set WITH_SQLITE to 0.
WITH_SQLITE ?= $(shell (${PKG_CONFIG} --atleast-version=3.5.9 sqlite3 && echo 1) || echo 0)
# synctex
# To disable support for synctex with libsynctex set WITH_SYNCTEX to 0.
WITH_SYNCTEX ?= $(shell (${PKG_CONFIG} synctex && echo 1) || echo 0)
# mimetype detection
# To disable support for mimetype detction with libmagic set WITH_MAGIC to 0.
WITH_MAGIC ?= 1
# paths
PREFIX ?= /usr
MANPREFIX ?= ${PREFIX}/share/man
DESKTOPPREFIX ?= ${PREFIX}/share/applications
APPDATAPREFIX ?= ${PREFIX}/share/metainfo
LIBDIR ?= ${PREFIX}/lib
INCLUDEDIR ?= ${PREFIX}/include
DBUSINTERFACEDIR ?= ${PREFIX}/share/dbus-1/interfaces
VIMFTPLUGINDIR ?= ${PREFIX}/share/vim/addons/ftplugin
DEPENDDIR ?= .depend
BUILDDIR ?= build
BUILDDIR_RELEASE ?= ${BUILDDIR}/release
BUILDDIR_DEBUG ?= ${BUILDDIR}/debug
BUILDDIR_GCOV ?= ${BUILDDIR}/gcov
BINDIR ?= bin
# plugin directory
PLUGINDIR ?= ${LIBDIR}/zathura
# locale directory
LOCALEDIR ?= ${PREFIX}/share/locale
# libs
ifeq (${GTK_INC}-${GTK_LIB},-)
PKG_CONFIG_LIBS += gtk+-3.0
else
INCS += ${GTK_INC}
LIBS += ${GTK_LIB}
endif
ifeq (${GLIB_INC}-${GLIB_LIB},-)
PKG_CONFIG_LIBS += gthread-2.0 gmodule-no-export-2.0 glib-2.0
else
INCS += ${GLIB_INC}
LIBS += ${GLIB_LIB}
endif
ifeq (${GIRARA_INC}-${GIRARA_LIB},-)
PKG_CONFIG_LIBS += girara-gtk3
else
INCS += ${GIRARA_INC}
LIBS += ${GIRARA_LIB}
endif
ifneq (${WITH_SQLITE},0)
ifeq (${SQLITE_INC}-${SQLITE_LIB},-)
PKG_CONFIG_LIBS += sqlite3
else
INCS += ${SQLITE_INC}
LIBS += ${SQLITE_LIB}
endif
endif
ifneq (${WITH_MAGIC},0)
MAGIC_INC ?=
MAGIC_LIB ?= -lmagic
INCS += ${MAGIC_INC}
LIBS += ${MAGIC_LIB}
endif
ifneq ($(WITH_SYNCTEX),0)
ifeq (${SYNCTEX_INC}-${SYNCTEX_LIB},-)
PKG_CONFIG_LIBS += synctex
else
INCS += ${SYNCTEX_INC}
LIBS += ${SYNCTEX_LIB}
endif
endif
ifneq (${PKG_CONFIG_LIBS},)
INCS += $(shell ${PKG_CONFIG} --cflags ${PKG_CONFIG_LIBS})
LIBS += $(shell ${PKG_CONFIG} --libs ${PKG_CONFIG_LIBS})
endif
LIBS += -lpthread -lm
# pre-processor flags
CPPFLAGS += -D_FILE_OFFSET_BITS=64
# compiler flags
CFLAGS += -std=c11 -pedantic -Wall -Wno-format-zero-length -Wextra $(INCS)
# debug
DFLAGS ?= -g
# linker flags
LDFLAGS += -rdynamic
# compiler
CC ?= gcc
# strip
SFLAGS ?= -s
# msgfmt
MSGFMT ?= msgfmt
# gcov & lcov
GCOV_CFLAGS=-fprofile-arcs -ftest-coverage
GCOV_LDFLAGS=-fprofile-arcs
LCOV_OUTPUT=gcov
LCOV_EXEC=lcov
LCOV_FLAGS=--base-directory . --directory ${BUILDDIR_GCOV} --capture --rc \
lcov_branch_coverage=1 --output-file ${BUILDDIR_GCOV}/$(PROJECT).info
GENHTML_EXEC=genhtml
GENHTML_FLAGS=--rc lcov_branch_coverage=1 --output-directory ${LCOV_OUTPUT} ${BUILDDIR_GCOV}/$(PROJECT).info
# valgrind
VALGRIND = valgrind
VALGRIND_ARGUMENTS = --tool=memcheck --leak-check=yes --leak-resolution=high \
--show-reachable=yes --log-file=zathura-valgrind.log
VALGRIND_SUPPRESSION_FILE = zathura.suppression
# set to something != 0 if you want verbose build output
VERBOSE ?= 0
# gettext package name
GETTEXT_PACKAGE ?= ${PROJECT}
# colors
COLOR ?= 1
# dist
TARFILE = ${PROJECT}-${VERSION}.tar.gz
TARDIR = ${PROJECT}-${VERSION}
zathura-0.3.8/data/org.pwmt.zathura.xml 0000664 0001750 0001750 00000003765 12501036512 020601 0 ustar sebastian sebastian
zathura-0.3.8/data/tex_zathurasynctex.vim 0000664 0001750 0001750 00000001470 12501036512 021305 0 ustar sebastian sebastian " See LICENSE file for license and copyright information
" This is a sample plugin that can be used for synctex forward synchronization.
" It currently uses latexsuite to obtain the file name of the document. If you
" are not using latexsuite, it should be enough to adopt the calculation of
" 'output' accordingly.
" avoid re-execution
if exists("b:did_zathura_synctex_plugin") || !exists("*Tex_GetMainFileName")
finish
endif
let b:did_zathura_synctex_plugin = 1
function! Zathura_SyncTexForward()
let source = expand("%:p")
let input = shellescape(line(".").":".col(".").":".source)
let output = Tex_GetMainFileName(":p:r").".pdf"
let execstr = "zathura --synctex-forward=".input." ".shellescape(output)
silent call system(execstr)
endfunction
nmap f :call Zathura_SyncTexForward()
zathura-0.3.8/data/zathura.appdata.xml 0000664 0001750 0001750 00000002771 12631275231 020441 0 ustar sebastian sebastian
zathura.desktop
CC0-1.0
Zlib
zathura is a highly customizable and functional document viewer. It
provides a minimalistic and space saving interface as well as an easy
usage that mainly focuses on keyboard interaction. zathura makes it
possible to completely view and navigate through documents without using a
mouse.
Other features include:
SyncTeX forward and backward synchronization support.
Quickmarks and bookmarks.
Automatic document reloading.
https://pwmt.org/projects/zathura
https://bugs.pwmt.org/project/zathura
https://pwmt.org/projects/zathura/img/zathura-cover.png
https://pwmt.org/projects/zathura/img/zathura-completion.png
https://pwmt.org/projects/zathura/img/zathura-follow.png
https://pwmt.org/projects/zathura/img/zathura-bookmarks.png
zathura@lists.pwmt.org
zathura-0.3.8/data/zathura.css_t 0000664 0001750 0001750 00000000317 12501036512 017326 0 ustar sebastian sebastian /* Index mode colors */
#@session@ .indexmode {
color: @index-fg@;
background-color: @index-bg@;
}
#@session@ .indexmode:selected {
color: @index-active-fg@;
background-color: @index-active-bg@;
}
zathura-0.3.8/data/zathura.gresource.xml 0000664 0001750 0001750 00000000444 13216464200 021014 0 ustar sebastian sebastian
zathura.css_t
org.pwmt.zathura.xml
zathura-0.3.8/doc/Doxyfile 0000664 0001750 0001750 00000001234 12501036512 016154 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
# General information
PROJECT_NAME = zathura
OUTPUT_DIRECTORY = ./_build/doxygen/
OUTPUT_LANGUAGE = English
TAB_SIZE = 2
EXTRACT_ALL = YES
OPTIMIZE_OUTPUT_FOR_C = YES
DOXYFILE_ENCODING = UTF-8
TYPEDEF_HIDES_STRUCT = YES
# Warning and progress messages
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
# Input files
INPUT = ../
EXCLUDE = ./tests ./doc
FILE_PATTERNS = *.h *.c
RECURSIVE = YES
# Output files
GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_RTF = NO
GENERATE_XML = YES
SOURCE_BROWSER = YES
zathura-0.3.8/doc/Makefile 0000664 0001750 0001750 00000003345 12750077577 016141 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
#
include ../config.mk
include ../common.mk
include ../colors.mk
include config.mk
MAN_SOURCES=$(wildcard man/*.rst) $(wildcard man/*.txt) man/conf.py
DOXYGEN_SOURCES=$(wildcard ../zathura/*.h) Doxyfile
HTML_SOURCES=$(wildcard *.rst api/*.rst configuration/*.rst installation/*.rst usage/*.rst) conf.py
SPHINX_OPTS+=-d $(SPHINX_BUILDDIR)/doctrees
all: man html
clean:
$(call colorecho,RM,doc/$(SPHINX_BUILDDIR))
$(QUIET)rm -rf $(SPHINX_BUILDDIR)/
$(SPHINX_BUILDDIR)/html/index.html: $(HTML_SOURCES) $(SPHINX_BUILDDIR)/doxygen/xml/index.xml
$(QUIET)mkdir -p $(SPHINX_BUILDDIR)/html
$(call colorecho,DOC,"Build HTML documentation")
$(QUIET)$(SPHINX_BIN) -b html $(SPHINX_OPTS) . $(SPHINX_BUILDDIR)/html
$(SPHINX_BUILDDIR)/zathura.1: $(MAN_SOURCES)
$(QUIET)mkdir -p $(SPHINX_BUILDDIR)
$(call colorecho,DOC,"Build man pages")
$(QUIET)$(SPHINX_BIN) -b man $(SPHINX_OPTS) man $(SPHINX_BUILDDIR)
$(SPHINX_BUILDDIR)/zathurarc.5: $(SPHINX_BUILDDIR)/zathura.1
@if test -f $@; then :; else \
rm -f $(SPHINX_BUILDDIR)/zathura.1; \
$(MAKE) $(SPHINX_BUILDDIR)/zathura.1; \
fi
$(SPHINX_BUILDDIR)/doxygen/xml/index.xml: $(DOXYGEN_SOURCES)
$(QUIET)mkdir -p $(SPHINX_BUILDDIR)/doxygen/xml
$(call colorecho,DOC,"Run doxygen")
$(QUIET)$(DOXYGEN_BIN) Doxyfile
ifeq ($(shell which $(SPHINX_BIN) >/dev/null 2>&1; echo $$?), 1)
man:
html:
else
man: $(SPHINX_BUILDDIR)/zathura.1 $(SPHINX_BUILDDIR)/zathurarc.5
# TODO: Make a better test for breathe and sphinx_rtd_theme
ifeq ($(shell which $(DOXYGEN_BIN) >/dev/null 2>&1 && $(PYTHON_BIN) -c "import breathe; import sphinx_rtd_theme" >/dev/null 2>&1; echo $$?), 0)
html: $(SPHINX_BUILDDIR)/html/index.html
else
html:
endif
endif
.PHONY: clean html man all
zathura-0.3.8/doc/api/index.rst 0000664 0001750 0001750 00000001216 12501036512 017060 0 ustar sebastian sebastian API and Development
===================
This guide should give a short introduction in the way zathura's plugin
system works and how you can write your own plugin and let zathura use
it.
zathura's plugin system is quite simple. At startup zathura searches
through a specified directory for shared objects and tries to load them
as plugins. Each plugin has to register itself by a name, its version, a
special function as well as its supported mimetypes to zathura. After
the registration of the plugin zathura will automatically use it to open
files with the previous defined mimetypes. That's it.
.. toctree::
:maxdepth: 2
:hidden:
plugin
zathura-0.3.8/doc/api/plugin-development.rst 0000664 0001750 0001750 00000021056 12501036512 021573 0 ustar sebastian sebastian Example - A minimalistic PDF plugin
===================================
In this section we are going to develop a simplified version of the
`zathura-pdf-poppler <../zathura-pdf-poppler>`_ plugin. For the sake of
simplicity we are not discussing the build process of the plugin because
we would recommend you to adapt our Makefiles from existing plugins. In
addition we avoid most of the error handling that should be implemented.
Prerequisites
~~~~~~~~~~~~~
In order to use the following described functions and macros you have to
include the *plugin-api.h* header file:
::
#include
This automatically loads other header files for the
*zathura\_document\_t*, *zathura\_page\_t* as well as all the other
types that are necessary automatically.
Register the plugin
~~~~~~~~~~~~~~~~~~~
As previously described each plugin has to register itself to zathura so
that it can be used properly. Therefore we have introduced a macro
called *ZATHURA\_PLUGIN\_REGISTER* which expects several parameters:
- Plugin name *The name of the plugin*
- Major version *The plugins major version*
- Minor version *The plugins minor version*
- Revision *The plugins revision*
- Open function *The open function*
- Mimetypes *A character array of supported mime types*
In our case we are going to register our plugin "my plugin" with its
version 1.0.1, the register function *register\_functions* and the list
of supported mimetypes.
::
ZATHURA_PLUGIN_REGISTER(
"plugin-tutorial",
0, 1, 0,
register_functions,
ZATHURA_PLUGIN_MIMETYPES({
"application/pdf"
})
)
This macro will automatically generate among others a function called
*plugin\_register* which is used to register the plugin to zathura when
it has been loaded.
Register the plugin functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In our macro we have defined that the function *register\_functions* is
used to install our functions which will implement a certain
functionality in the struct:
::
void
register_functions(zathura_plugin_functions_t* functions)
{
functions->document_open = plugin_document_open;
functions->document_free = plugin_document_free;
functions->page_init = plugin_page_init;
functions->page_clear = plugin_page_clear;
functions->page_render_cairo = plugin_page_render_cairo;
}
We are now going to give a short overview about the used functions in
the above code snippet. For a complete documentation you should checkout
the documentation of `zathura\_document\_functions\_t <../../doxygen>`_.
A document instance consists out of a *zathura\_document\_t* document
object that contains information about the document itself and a defined
number of *zathura\_page\_t* page objects. There are several functions
defined for those two types and they have to be implemented by the
plugin. For our simple plugin which will only be capable of rendering a
page we will need one function that is capable of opening the PDF
document and setting up all necessary objects for further usage and one
function which will clean up all the allocated objects afterwards. In
addition we need two of those functions for page objects as well and one
function that will actually implement the rendering process.
Open and closing a document
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The first thing we have to do when opening a document is to initialize
all necessary objects and values that we are going to need for the
future use of the plugin. Therefore we have to implement our
*pdf\_document\_open* function:
::
zathura_error_t
plugin_document_open(zathura_document_t* document)
{
/* get path and password */
const char* path = zathura_document_get_path(document);
const char* password = zathura_document_get_password(document);
/* create document data */
char* uri = g_filename_to_uri(path, NULL, NULL);
PopplerDocument* poppler_document = poppler_document_new_from_file(uri, password, NULL);
g_free(uri);
if (poppler_document == NULL) {
return ZATHURA_ERROR_UNKNOWN;
}
/* save poppler document for further usage */
zathura_document_set_data(document, poppler_document);
/* get number of pages */
unsigned int number_of_pages = poppler_document_get_n_pages(poppler_document);
zathura_document_set_number_of_pages(document, number_of_pages);
return ZATHURA_ERROR_OK;
}
To open the document we retrieve the *path* and the optional *password*
of the document to create an instance of *PopplerDocument* which
represents a document in the poppler library. If this fails for any
reason (e.g.: the path does not exist, the user provided the incorrect
password) we tell zathura that this function failed for an unknown
reason. If we are lucky we continue and save the created
*poppler\_document* object in the custom data field of the document so
that we can access it later on. After that we determine the number of
pages that the document contains so that zathura can initialize every
single page.
Since we have allocated the *poppler\_document* object we have to make
sure that its resources will be freed when it is no longer needed. This
happens in our *pdf\_document\_free* function:
::
zathura_error_t
plugin_document_free(zathura_document_t* document, PopplerDocument* poppler_document)
{
g_object_unref(poppler_document);
return ZATHURA_ERROR_OK;
}
Page initialization
~~~~~~~~~~~~~~~~~~~
Each page has to be initialized so that zathura knows about its
dimension. In addition this stage is used to store additional data in
the page that will be used for further use with it. Therefore we are
implementing *pdf\_page\_init* which will save the width and the height
of the page in the given structure:
::
zathura_error_t
plugin_page_init(zathura_page_t* page)
{
unsigned int page_index = zathura_page_get_index(page);
zathura_document_t* document = zathura_page_get_document(page);
PopplerDocument* poppler_document = zathura_document_get_data(document);
/* create poppler page */
PopplerPage* poppler_page = poppler_document_get_page(poppler_document, page_index);
zathura_page_set_data(page, poppler_page);
/* get page dimensions */
double width, height;
poppler_page_get_size(poppler_page, &width, &height);
zathura_page_set_width(page, width);
zathura_page_set_height(page, height);
return ZATHURA_ERROR_OK;
}
And we have to make sure that all requested resources are freed in the
end:
::
zathura_error_t
plugin_page_clear(zathura_page_t* page, PopplerPage* poppler_page)
{
g_object_unref(poppler_page);
return ZATHURA_ERROR_OK;
}
Render a page
~~~~~~~~~~~~~
After we have setup the document and the page objects we are ready to
implement the render function which finally will be able to draw our
page on a widget so that it can be viewed with zathura. This function
has two additional parameters to the already known *zathura\_page\_t*
object: One of them is a *cairo\_t* object which will be used to render
the page, the other one is a flag called *printing* which determines if
the rendered page should be rendered for the print process of zathura.
For instance if this flag is set to true you should not render any
rectangles around links in the document because they are totally
worthless on paper:
::
zathura_error_t
pdf_page_render_cairo(zathura_page_t* page, cairo_t* cairo, bool printing)
{
if (printing == false) {
poppler_page_render(poppler_page, cairo);
} else {
poppler_page_render_for_printing(poppler_page, cairo);
}
return ZATHURA_ERROR_OK;
}
In this case the *pdf\_page\_render\_cairo* function is very simplistic
since all the work is done by the *poppler* library. In your case you
might have to do some magic here to draw the page to the cairo object.
Make sure to check out the source code of our plugins.
Installation of the plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~
As we suggested earlier the easiest way to build and install the plugin
is to duplicate the *Makefile* (as long with its *common.mk* and
*config.mk* files of one of our plugins. It already contains all
necessary targets for building, installing and debugging the plugin.
Otherwise you could build the above plugin with the following command:
::
$ gcc -std=c99 -shared -fPIC -pedantic -Wall `pkg-config --cflags --libs poppler-glib zathura` \
-o pdf.so pdf.c
After that you have to copy the *pdf.so* file into the directory where
zathura looks for plugins (this is by default: */usr/lib/zathura*).
zathura-0.3.8/doc/api/plugin.rst 0000664 0001750 0001750 00000002261 12501036512 017250 0 ustar sebastian sebastian Plugin system
=============
zathura's plugin system is quite simple. At startup zathura searches
through a specified directory for shared objects and tries to load them
as plugins. Each plugin has to register itself by a name, its version, a
special function as well as its supported mimetypes to zathura. After
the registration of the plugin zathura will automatically use it to open
files with the previous defined mimetypes. That's it.
Each plugin has to implement a basic set of functionality so that it can
be used in a meaningful way with zathura. For instance it would not make
any sense if the plugin was not able to render any page at all. On the
contrary the export of images out of the document might not be
considered as that important.
We have predefined a certain set of functionality that a plugin can have
and that can be used by zathura if it has been implemented by the
plugin. When a plugin is loaded, zathura calls a certain function that
the plugin **must implemented** in order to work correctly. This
function gets a data structure which has to be filled with function
pointers by the plugin, which are then used by the main application.
.. toctree::
plugin-development
zathura-0.3.8/doc/conf.py 0000664 0001750 0001750 00000002146 12501036512 015750 0 ustar sebastian sebastian #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# See LICENSE file for license and copyright information
import sphinx_rtd_theme
# -- General configuration ------------------------------------------------
extensions = [
'sphinx.ext.todo',
'breathe'
]
source_suffix = '.rst'
master_doc = 'index'
templates_path = ['_templates']
exclude_patterns = ['_build']
pygments_style = 'sphinx'
# -- Project configuration ------------------------------------------------
project = 'zathura'
copyright = '2014, pwmt.org'
version = '0.2.7'
release = '0.2.7'
# -- Options for HTML output ----------------------------------------------
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_static_path = ['_static']
htmlhelp_basename = 'zathuradoc'
# -- Options for breathe ---------------------------------------
breathe_projects = { "zathura": "_build/doxygen/xml" }
breathe_default_project = "zathura"
breathe_build_directory = "_build"
breathe_projects_source = {
"zathura": "../"
}
breathe_domain_by_extension = {
"h" : "c",
"c" : "c"
}
zathura-0.3.8/doc/config.mk 0000664 0001750 0001750 00000000403 12501036512 016241 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
SPHINX_BIN ?= sphinx-build
SPHINX_BUILDDIR = _build
SPHINX_OPTS ?=
DOXYGEN_BIN ?= doxygen
# This needs to be the same python interpreter as used by sphinx-build
PYTHON_BIN ?= python
zathura-0.3.8/doc/configuration/index.rst 0000664 0001750 0001750 00000001305 12501036512 021155 0 ustar sebastian sebastian Configuration
=============
.. toctree::
:maxdepth: 1
set
map
options
The customization of zathura is be managed via a configuration file
called *zathurarc*. By default zathura will evaluate the following
files:
- */etc/zathurarc*
- *$XDG\_CONFIG\_HOME/zathura/zathurarc* (default:
~/.config/zathura/zathurarc)
The *zathurarc* file is a simple plain text file that can be populated
with various commands to change the behaviour and the look of zathura
which we are going to describe in the following subsections. Each line
(besides empty lines and comments (which start with a prepended *#*) is
evaluated on its own, so it is not possible to write multiple commands
in one single line.
zathura-0.3.8/doc/configuration/map.rst 0000664 0001750 0001750 00000020764 12501036512 020635 0 ustar sebastian sebastian map - Mapping a shortcut
========================
It is possible to map or remap new key bindings to shortcut functions
which allows a high level of customization. The *:map* command can also
be used in the *zathurarc* file to make those changes permanent:
::
map [mode]
Mode
----
The *map* command expects several arguments where only the *binding* as
well as the *shortcut-function* argument is required. Since zathura uses
several modes it is possible to map bindings only for a specific mode by
passing the *mode* argument which can take one of the following values:
- normal (default)
- visual
- insert
- fullscreen
- index
The brackets around the value are mandatory.
Single key binding
~~~~~~~~~~~~~~~~~~
The (possible) second argument defines the used key binding that should
be mapped to the shortcut function and is structured like the following.
On the one hand it is possible to just assign single letters, numbers or
signs to it:
::
map a shortcut_function
map b shortcut_function
map c shortcut_function
map 1 shortcut_function
map 2 shortcut_function
map 3 shortcut_function
map ! shortcut_function
map ? shortcut_function
Using modifiers
---------------
It is also possible to use modifiers like the *Control* or *Alt* button
on the keyboard. It is possible to use the following modifiers:
- A - *Alt*
- C - *Control*
- S - *Shift*
Now it is required to define the *binding* with the following structure:
::
map shortcut_function
map shortcut_function
Special keys
------------
zathura allows it also to assign keys like the space bar or the tab
button which also have to be written in between angle brackets. The
following special keys are currently available:
+--------------+--------------------+
| Identifier | Description |
+==============+====================+
| BackSpace | *Back space* |
+--------------+--------------------+
| CapsLock | *Caps lock* |
+--------------+--------------------+
| Esc | *Escape* |
+--------------+--------------------+
| Down | *Arrow down* |
+--------------+--------------------+
| Up | *Arrow up* |
+--------------+--------------------+
| Left | *Arrow left* |
+--------------+--------------------+
| Right | *Arrow right* |
+--------------+--------------------+
| F1 | *F1* |
+--------------+--------------------+
| F2 | *F2* |
+--------------+--------------------+
| F3 | *F3* |
+--------------+--------------------+
| F4 | *F4* |
+--------------+--------------------+
| F5 | *F5* |
+--------------+--------------------+
| F6 | *F6* |
+--------------+--------------------+
| F7 | *F7* |
+--------------+--------------------+
| F8 | *F8* |
+--------------+--------------------+
| F9 | *F9* |
+--------------+--------------------+
| F10 | *F10* |
+--------------+--------------------+
| F11 | *F11* |
+--------------+--------------------+
| F12 | *F12* |
+--------------+--------------------+
| PageDown | *Page Down* |
+--------------+--------------------+
| PageUp | *Page Up* |
+--------------+--------------------+
| Return | *Return* |
+--------------+--------------------+
| Space | *Space* |
+--------------+--------------------+
| Super | *Windows button* |
+--------------+--------------------+
| Tab | *Tab* |
+--------------+--------------------+
Of course it is possible to combine those special keys with a modifier.
The usage of those keys should be explained by the following examples:
::
map shortcut_function
map shortcut_function
Mouse buttons
-------------
It is also possible to map mouse buttons to shortcuts by using the
following special keys:
+--------------+--------------------+
| Identifier | Description |
+==============+====================+
| Button1 | *Mouse button 1* |
+--------------+--------------------+
| Button2 | *Mouse button 2* |
+--------------+--------------------+
| Button3 | *Mouse button 3* |
+--------------+--------------------+
| Button4 | *Mouse button 4* |
+--------------+--------------------+
| Button5 | *Mouse button 5* |
+--------------+--------------------+
They can also be combined with modifiers:
::
map shortcut_function
map shortcut_function
Buffer commands
---------------
If a mapping does not match one of the previous definition but is still
a valid mapping it will be mapped as a buffer command:
::
map abc quit
map test quit
Shortcut functions
------------------
The following shortcut functions can be mapped:
+----------------------+----------------------------------------+
| Function | Description |
+======================+========================================+
| abort | *Switch back to normal mode* |
+----------------------+----------------------------------------+
| adjust\_window | *Adjust page width* |
+----------------------+----------------------------------------+
| change\_mode | *Change current mode* |
+----------------------+----------------------------------------+
| follow | *Follow a link* |
+----------------------+----------------------------------------+
| focus\_inputbar | *Focus inputbar* |
+----------------------+----------------------------------------+
| goto | *Go to a certain page* |
+----------------------+----------------------------------------+
| index\_navigate | *Navigate through the index* |
+----------------------+----------------------------------------+
| navigate | *Navigate to the next/previous page* |
+----------------------+----------------------------------------+
| quit | *Quit zathura* |
+----------------------+----------------------------------------+
| recolor | *Recolor the pages* |
+----------------------+----------------------------------------+
| reload | *Reload the document* |
+----------------------+----------------------------------------+
| rotate | *Rotate the page* |
+----------------------+----------------------------------------+
| scroll | *Scroll* |
+----------------------+----------------------------------------+
| search | *Search next/previous item* |
+----------------------+----------------------------------------+
| set | *Set an option* |
+----------------------+----------------------------------------+
| toggle\_fullscreen | *Toggle fullscreen* |
+----------------------+----------------------------------------+
| toggle\_index | *Show or hide index* |
+----------------------+----------------------------------------+
| toggle\_inputbar | *Show or hide inputbar* |
+----------------------+----------------------------------------+
| toggle\_statusbar | *Show or hide statusbar* |
+----------------------+----------------------------------------+
| zoom | *Zoom in or out* |
+----------------------+----------------------------------------+
Pass arguments
--------------
Some shortcut function require or have optional arguments which
influence the behaviour of them. Those can be passed as the last
argument:
::
map zoom in
map zoom out
Possible arguments are:
- bottom
- default
- down
- full-down
- full-up
- half-down
- half-up
- in
- left
- next
- out
- previous
- right
- specific
- top
- up
- best-fit
- width
- rotate-cw
- rotate-ccw
unmap - Removing a shortcut
~~~~~~~~~~~~~~~~~~~~~~~~~~~
In addition to mapping or remaping custom key bindings it is possible to
remove existing ones by using the *:unmap* command. The command is used
in the following way (the explanation of the parameters is described in
the *map* section of this document
::
unmap [mode]
zathura-0.3.8/doc/configuration/options.rst 0000664 0001750 0001750 00000006366 12750077577 021603 0 ustar sebastian sebastian Configuration options
=====================
General settings
----------------
.. describe:: abort-clear-search
Defines if the search results should be cleared on abort.
:type: Boolean
:default: True
.. describe:: adjust-open
Defines which auto adjustment mode should be used if a document is
loaded. Possible options are "best-fit" and "width".
:type: String
:default: best-fit
.. describe:: advance-ds-per-row
Defines if the number of pages per row should be honored when advancing
a page.
:type: Boolean
:default: true
.. describe:: database
Defines the used database backend. Possible options are 'plain' and
'sqlite'
:type: String
:default: plain
.. describe:: highlight-color
Defines the color that is used for highlighting parts of the document
(e.g.: show search results)
:type: String
:default: #9FBC00
.. describe:: highlight-active-color
Defines the color that is used to show the current selected highlighted
element (e.g: current search result)
:type: String
:default: #00BC00
.. describe:: highlight-transparency
Defines the opacity of a highlighted element
:type: Float
:default: 0.5
.. describe:: page-padding
The page padding defines the gap in pixels between each rendered page.
:type: Integer
:default: 1
.. describe:: page-store-threshold
Pages that are not visible get unloaded after some time. Every page that
has not been visible for page-store-treshold seconds will be unloaded.
:type: Integer
:default: 30
.. describe:: page-store-interval
Defines the amount of seconds between the check to unload invisible
pages.
:type: Integer
:default: 30
.. describe:: pages-per-row
Defines the number of pages that are rendered next to each other in a
row.
:type: Integer
:default: 1
.. describe:: recolor
En/Disables recoloring
:type: Boolean
:default: false
.. describe:: recolor-darkcolor
Defines the color value that is used to represent dark colors in
recoloring mode
:type: String
:default: #FFFFFF
.. describe:: recolor-lightcolor
Defines the color value that is used to represent light colors in
recoloring mode
:type: String
:default: #000000
.. describe:: render-loading
Defines if the "Loading..." text should be displayed if a page is
rendered.
:type: Boolean
:default: true
.. describe:: scroll-step
Defines the step size of scrolling by calling the scroll command once
:type: Float
:default: 40
.. describe:: scroll-wrap
Defines if the last/first page should be wrapped
:type: Boolean
:default: false
.. describe:: zoom-max
Defines the maximum percentage that the zoom level can be
:type: Integer
:default: 1000
.. describe:: zoom-min
Defines the minimum percentage that the zoom level can be
:type: Integer
:default: 10
.. describe:: zoom-step
Defines the amount of percent that is zoomed in or out on each comand.
:type: Integer
:default: 10
Girara settings
---------------
Most of the options affecting the appearance of zathura are derived from
the options that are offered by our user interface library called girara
and can be found in its `documentation `_.
Those values can also be set via the *zathurarc* file.
zathura-0.3.8/doc/configuration/set.rst 0000664 0001750 0001750 00000002045 13216464200 020646 0 ustar sebastian sebastian set - Changing options
======================
In addition to the built-in *:set* command zathura offers more options
to be changed and makes those changes permanent. To overwrite an option
you just have to add a line structured like the following
::
set
The *option* field has to be replaced with the name of the option that
should be changed and the *new value* field has to be replaced with the
new value the option should get. The type of the value can be one of the
following:
- INT - An integer number
- FLOAT - A floating point number
- STRING - A character string
- BOOL - A boolean value ("true" for true, "false" for false)
In addition we advice you to check the options to get a more detailed
view of the options that can be changed and which values they should be
set to.
The following example should give some deeper insight of how the *set*
command can be used
::
set option1 5
set option2 2.0
set option3 hello
set option4 hello\ world
set option5 "hello world"
set option6 "#00BB00"
zathura-0.3.8/doc/faq.rst 0000664 0001750 0001750 00000000403 12501036512 015744 0 ustar sebastian sebastian FAQ
===
Set colors have no effect
-------------------------
If you want to overwrite a color you need to make sure that you either escape
the hash tag or put the new value between paranthesis.
::
set color red
set color \#000000
set color "#000000"
zathura-0.3.8/doc/index.rst 0000664 0001750 0001750 00000000736 12501036512 016315 0 ustar sebastian sebastian .. zathura documentation master file, created by
sphinx-quickstart on Tue Apr 8 18:33:05 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to zathura's documentation!
===================================
.. toctree::
:maxdepth: 2
:numbered:
installation/index
usage/index
configuration/index
api/index
faq
.. toctree::
:hidden:
man/zathura.1
man/zathurarc.5
zathura-0.3.8/doc/installation/index.rst 0000664 0001750 0001750 00000005065 12501036512 021016 0 ustar sebastian sebastian Installation
============
Dependencies
------------
The core of zathura depends on two external libraries,
`girara `_, our simplistic user interface library and
`GTK+ `_, a cross-platform widget toolkit.
Depending on which filetypes should be supported you are going to need
additional libraries to build those file type plugins.
Core dependencies
~~~~~~~~~~~~~~~~~
- `girara `_, our simplistic user interface library
(>= 0.1.8)
- `GTK+ `_, a cross-platform widget toolkit (>=
2.28)
Optional and build dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- `sqlite3 `_, a SQL database engine
- `intltool `_, utility scripts for
internationalization
- `check `_, a unit testing framework
for C
- libmagic from `file `_, a file type
guesser
- `docutils `_, documentation
utilities
Stable version
--------------
Since zathura packages are available in many distributions it is
recommended to install it from there with your prefered package manager.
Otherwise you can grab the latest version of the source code from our
website and build it by hand:
::
$ tar xfv zathura-.tar.gz
$ cd zathura-
$ make
$ make install
Known supported distributions
-----------------------------
- `Arch
Linux `_
- `Debian `_
- `Fedora `_
- `Gentoo `_
- `Ubuntu `_
- `OpenBSD `_
Developer version
-----------------
If you are interested in testing the very latest versions with all its
new features, that we are working on, type in the following commands. At
first you have to install the latest version of girara:
::
$ git clone git://pwmt.org/girara.git
$ cd girara
$ git checkout --track -b develop origin/develop
$ make
$ make install
After the successful installation of the user interface library, grab
the latest version of zathura and install it:
::
$ git clone git://pwmt.org/zathura.git
$ cd zathura
$ git checkout --track -b develop origin/develop
$ make
$ make install
For the installation of a file type plugin check the
`plugins <../plugins>`_ section.
zathura-0.3.8/doc/man/_bindings.txt 0000664 0001750 0001750 00000004356 13216464200 017731 0 ustar sebastian sebastian General
J, PgDn
Go to the next page
K, PgUp
Go to the previous page
h, k, j, l
Scroll to the left, down, up or right direction
Left, Down, Up, Right
Scroll to the left, down, up or right direction
^t, ^d, ^u, ^y
Scroll a half page left, down, up or right
t, ^f, ^b, space, , y
Scroll a full page left, down, up or right
gg, G, nG
Goto to the first, the last or to the nth page
H, L
Goto top or bottom of the current page
^o, ^i
Move backward and forward through the jump list
^j, ^k
Bisect forward and backward between the last two jump points
^c, Escape
Abort
a, s
Adjust window in best-fit or width mode
/, ?
Search for text
n, N
Search for the next or previous result
o, O
Open document
f
Follow links
F
Display link target
\:
Enter command
r
Rotate by 90 degrees
^r
Recolor (grayscale and invert colors)
R
Reload document
Tab
Show index and switch to **Index mode**
d
Toggle dual page view
F5
Switch to presentation mode
F11
Switch to fullscreen mode
^m
Toggle inputbar
^n
Toggle statusbar
+, -, =
Zoom in, out or to the original size
zI, zO, z0
Zoom in, out or to the original size
n=
Zoom to size n
mX
Set a quickmark to a letter or number X
'X
Goto quickmark saved at letter or number X
q
Quit
Fullscreen mode
J, K
Go to the next or previous page
space, ,
Scroll a full page down or up
gg, G, nG
Goto to the first, the last or to the nth page
^c, Escape
Abort
F11
Switch to normal mode
+, -, =
Zoom in, out or to the original size
zI, zO, z0
Zoom in, out or to the original size
n=
Zoom to size n
q
Quit
Presentation mode
space, ,
Scroll a full page down or up
^c, Escape
Abort
F5
Switch to normal mode
q
Quit
Index mode
k, j
Move to upper or lower entry
l
Expand entry
L
Expand all entries
h
Collapse entry
H
Collapse all entries
space, Return
Select and open entry
Mouse bindings
Scroll
Scroll up or down
^Scroll
Zoom in or out
Hold Button2
Pan the document
Button1
Follow link
zathura-0.3.8/doc/man/_bugs.txt 0000664 0001750 0001750 00000000425 12555260617 017100 0 ustar sebastian sebastian If GDK_NATIVE_WINDOWS is enabled you will experience problems with large
documents. In this case zathura might crash or pages cannot be rendered
properly. Disabling GDK_NATIVE_WINDOWS fixes this issue. The same issue may
appear, if overlay-scrollbar is enabled in GTK_MODULES.
zathura-0.3.8/doc/man/_commands.txt 0000664 0001750 0001750 00000000620 12750077577 017746 0 ustar sebastian sebastian bmark
Save a bookmark
bdelete
Delete a bookmark
blist
List bookmarks
close
Close document
exec
Execute an external command
info
Show document information
open
Open a document
offset
Set page offset
print
Print document
write(!)
Save document (and force overwriting)
export
Export attachments
dump
Write values, descriptions, etc. of all current settings to a file.
zathura-0.3.8/doc/man/_configuration.txt 0000664 0001750 0001750 00000000313 12501036512 020765 0 ustar sebastian sebastian The default appearance and behaviour of zathura can be overwritten by modifying
the *zathurarc* file (default path: ~/.config/zathura/zathurarc). For a detailed
description please consult zathurarc(5).
zathura-0.3.8/doc/man/_description.txt 0000664 0001750 0001750 00000000313 12501036512 020441 0 ustar sebastian sebastian **zathura** displays the given files. If a single hyphen-minus (-) is given as
file name, the content will be read from the standard input. If no files are
given, an empty **zathura** instance launches.
zathura-0.3.8/doc/man/_options.txt 0000664 0001750 0001750 00000002663 13216464200 017626 0 ustar sebastian sebastian -e, --reparent=xid
Reparents to window specified by xid
-c, --config-dir=path
Path to the config directory
-d, --data-dir=path
Path to the data directory
-p, --plugins-dir=path
Path to the directory containing plugins
-w, --password=password
The documents password. If multiple documents are opened at once, the
password will be used for the first one and zathura will ask for the
passwords of the remaining files if needed .
-P, --page=number
Opens the document at the given page number. Pages are numbered starting
with 1, and negative numbers indicate page numbers starting from the end
of the document, -1 being the last page.
-l, --log-level=level
Set log level (debug, info, warning, error)
-x, --synctex-editor-command=command
Set the synctex editor command. Overrides the synctex-editor-command setting.
--synctex-forward=input
Jump to the given position. The switch expects the same format as specified
for synctex's view -i. If no instance is running for the specified document,
a new instance will be launched (only if --synctex-pid is not specified).
--synctex-pid=pid
Instead of looking for an instance having the correct file opened, try only
the instance with the given PID. Note that if the given PID does not have the
correct file open or does not exist, no new instance will be spanned.
--fork
Fork into background
--version
Display version string and exit
--help
Display help and exit
zathura-0.3.8/doc/man/_synctex.txt 0000664 0001750 0001750 00000001407 13216464200 017623 0 ustar sebastian sebastian Both synctex forward and backwards synchronization are supported by zathura, To
enable synctex forward synchronization, please look at the *--synctex-forward*
and *--synctex-editor* options. zathura will also emit a signal via the D-Bus
interface. To support synctex backwards synchronization, zathura provides a
D-Bus interface that can be called by the editor. For convince zathura also
knows how to parse the output of the *synctex view* command. It is enough to
pass the arguments to *synctex view*'s *-i* option to zathura via
*--syntex-forward* and zathura will pass the information to the correct
instance.
Some editors support zathura as viewer out of the box:
* LaTeXTools for SublimeText
(https://latextools.readthedocs.io/en/latest/available-viewers/#zathura)
zathura-0.3.8/doc/man/_synopsis.txt 0000664 0001750 0001750 00000000241 12750077577 020033 0 ustar sebastian sebastian zathura [-e XID] [-c PATH] [-d PATH] [-p PATH] [-w PASSWORD] [-P NUMBER]
[--fork] [-l LEVEL] [-s] [-x CMD] [--synctex-forward INPUT] [--synctex-pid PID]
zathura-0.3.8/doc/man/conf.py 0000664 0001750 0001750 00000001753 12631275231 016535 0 ustar sebastian sebastian # -*- coding: utf-8 -*-
#
# See LICENSE file for license and copyright information
import os.path
import glob
import time
dirname = os.path.dirname(__file__)
files = glob.glob(os.path.join(dirname, '*.rst'))
files.extend(glob.glob(os.path.join(dirname, '*.txt')))
maxdate = 0
for path in files:
s = os.stat(path)
maxdate = max(maxdate, s.st_mtime)
# -- General configuration ------------------------------------------------
source_suffix = '.rst'
master_doc = 'zathura.1'
templates_path = ['_templates']
today = time.strftime('%Y-%m-%d', time.gmtime(maxdate))
# -- Project configuration ------------------------------------------------
project = 'zathura'
copyright = '2009-2015, pwmt.org'
version = '0.2.7'
release = '0.2.7'
# -- Options for manual page output ---------------------------------------
man_pages = [
('zathura.1', 'zathura', 'a document viewer', ['pwmt.org'], 1),
('zathurarc.5', 'zathurarc', 'zathura configuration file', ['pwmt.org'], 5)
]
zathura-0.3.8/doc/man/zathura.1.rst 0000664 0001750 0001750 00000000751 12501036512 017573 0 ustar sebastian sebastian Manpage
=======
Synopsis
--------
.. include:: _synopsis.txt
Description
-----------
.. include:: _description.txt
Options
-------
.. include:: _options.txt
Mouse and key bindings
----------------------
.. include:: _bindings.txt
Commands
---------
.. include:: _commands.txt
Configuration
-------------
.. include:: _configuration.txt
Synctex support
---------------
.. include:: _synctex.txt
Known bugs
----------
.. include:: _bugs.txt
See Also
--------
`zathurarc(5)`
zathura-0.3.8/doc/man/zathurarc.5.rst 0000664 0001750 0001750 00000053451 13216464200 020134 0 ustar sebastian sebastian =========
zathurarc
=========
SYNOPSIS
========
/etc/zathurarc, $XDG_CONFIG_HOME/zathura/zathurarc
DESCRIPTION
===========
The *zathurarc* file is a simple plain text file that can be populated with
various commands to change the behaviour and the look of zathura which we are
going to describe in the following subsections. Each line (besides empty lines
and comments (which start with a prepended #) is evaluated on its own, so it
is not possible to write multiple commands in one single line.
COMMANDS
========
set - Changing options
----------------------
In addition to the built-in ``:set`` command zathura offers more options to be
changed and makes those changes permanent. To overwrite an option you just have
to add a line structured like the following
::
set
The ``option`` field has to be replaced with the name of the option that should be
changed and the ``new value`` field has to be replaced with the new value the
option should get. The type of the value can be one of the following:
* INT - An integer number
* FLOAT - A floating point number
* STRING - A character string
* BOOL - A boolean value ("true" for true, "false" for false)
In addition we advice you to check the options to get a more detailed view of
the options that can be changed and which values they should be set to.
The following example should give some deeper insight of how the ``set`` command
can be used
::
set option1 5
set option2 2.0
set option3 hello
set option4 hello\ world
set option5 "hello world"
If you want to use ``color codes`` for some options, make sure to quote them
accordingly or to escape the hash symbol.
::
set default-fg "#CCBBCC"
set default-fg \#CCBBCC
map - Mapping a shortcut
------------------------
It is possible to map or remap new key bindings to shortcut functions which
allows a high level of customization. The ``:map`` command can also be used in
the *zathurarc* file to make those changes permanent:
::
map [mode]
include - Including another config file
---------------------------------------
This commands allows one to include other configuration files. If a relative
path is given, the path will be resolved relative to the configuration file that
is currently processed.
::
include another-config
Mode
^^^^
The ``map`` command expects several arguments where only the ``binding`` as well as
the ``shortcut-function`` argument is required. Since zathura uses several modes
it is possible to map bindings only for a specific mode by passing the ``mode``
argument which can take one of the following values:
* normal (default)
* fullscreen
* presentation
* index
The brackets around the value are mandatory.
Single key binding
^^^^^^^^^^^^^^^^^^
The (possible) second argument defines the used key binding that should be
mapped to the shortcut function and is structured like the following. On the one
hand it is possible to just assign single letters, numbers or signs to it:
::
map a shortcut_function
map b shortcut_function
map c shortcut_function
map 1 shortcut_function
map 2 shortcut_function
map 3 shortcut_function
map ! shortcut_function
map ? shortcut_function
Using modifiers
^^^^^^^^^^^^^^^
It is also possible to use modifiers like the Control or Alt button on the
keyboard. It is possible to use the following modifiers:
* A - Alt
* C - Control
* S - Shift
Now it is required to define the ``binding`` with the following structure:
::
map shortcut_function
map shortcut_function
Special keys
^^^^^^^^^^^^
zathura allows it also to assign keys like the space bar or the tab button which
also have to be written in between angle brackets. The following special keys
are currently available:
::
Identifier Description
BackSpace Back space
CapsLock Caps lock
Esc Escape
Down Arrow down
Up Arrow up
Left Arrow left
Right Arrow right
F1 F1
F2 F2
F3 F3
F4 F4
F5 F5
F6 F6
F7 F7
F8 F8
F9 F9
F10 F10
F11 F11
F12 F12
PageDown Page Down
PageUp Page Up
Return Return
Space Space
Super Windows key
Tab Tab
Print Print key
Of course it is possible to combine those special keys with a modifier. The
usage of those keys should be explained by the following examples:
::
map shortcut_function
map shortcut_function
Mouse buttons
^^^^^^^^^^^^^
It is also possible to map mouse buttons to shortcuts by using the following
special keys:
::
Identifier Description
Button1 Mouse button 1
Button2 Mouse button 2
Button3 Mouse button 3
Button4 Mouse button 4
Button5 Mouse button 5
They can also be combined with modifiers:
::
map shortcut_function
map shortcut_function
Buffer commands
^^^^^^^^^^^^^^^
If a mapping does not match one of the previous definition but is still a valid
mapping it will be mapped as a buffer command:
::
map abc quit
map test quit
Shortcut functions
^^^^^^^^^^^^^^^^^^
The following shortcut functions can be mapped:
* ``abort``
Switch back to normal mode.
* ``adjust_window``
Adjust page width. Possible arguments are ``best-fit`` and ``width``.
* ``change_mode``
Change current mode. Pass the desired mode as argument.
* ``display_link``:
Display link target.
* ``exec``:
Execute an external command.
* ``focus_inputbar``
Focus inputbar.
* ``follow``
Follow a link.
* ``goto``
Go to a certain page.
* ``jumplist``
Move forwards/backwards in the jumplist.
* ``navigate``
Navigate to the next/previous page.
* ``navigate_index``
Navigate through the index.
* ``print``
Show the print dialog.
* ``quit``
Quit zathura.
* ``recolor``
Recolor pages.
* ``reload``
Reload the document.
* ``rotate``
Rotate the page. Pass ``rotate-ccw`` as argument for counterclockwise rotation
and ``rotate-cw`` for clockwise rotation.
* ``scroll``
Scroll.
* ``search``
Search next/previous item. Pass ``forward`` as argument to search for the next
hit and ``backward`` to search for the previous hit.
* ``set``
Set an option.
* ``toggle_fullscreen``
Toggle fullscreen.
* ``toggle_index``
Show or hide index.
* ``toggle_inputbar``
Show or hide inputbar.
* ``toggle_page_mode``
Toggle between one and multiple pages per row.
* ``toggle_statusbar``
Show or hide statusbar.
* ``zoom``
Zoom in or out.
* ``mark_add``
Set a quickmark.
* ``mark_evaluate``
Go to a quickmark.
Pass arguments
^^^^^^^^^^^^^^
Some shortcut function require or have optional arguments which influence the
behaviour of them. Those can be passed as the last argument:
map zoom in
map zoom out
Possible arguments are:
* best-fit
* bottom
* collapse
* collapse-all
* default
* down
* expand
* expand-all
* full-down
* full-up
* half-down
* half-up
* in
* left
* next
* out
* page-bottom
* page-top
* previous
* right
* rotate-ccw
* rotate-cw
* select
* specific
* toggle
* top
* up
* width
unmap - Removing a shortcut
---------------------------
In addition to mapping or remaping custom key bindings it is possible to remove
existing ones by using the ``:unmap`` command. The command is used in the
following way (the explanation of the parameters is described in the ``map``
section of this document
::
unmap [mode]
OPTIONS
=======
girara
------
This section describes settings concerning the behaviour of girara and
zathura. The settings described here can be changed with ``set``.
n-completion-items
^^^^^^^^^^^^^^^^^^
Defines the maximum number of displayed completion entries.
* Value type: Integer
* Default value: 15
completion-bg
^^^^^^^^^^^^^
Defines the background color that is used for command line completion
entries
* Value type: String
* Default value: #232323
completion-fg
^^^^^^^^^^^^^
Defines the foreground color that is used for command line completion
entries
* Value type: String
* Default value: #DDDDDD
completion-group-bg
^^^^^^^^^^^^^^^^^^^
Defines the background color that is used for command line completion
group elements
* Value type: String
* Default value: #000000
completion-group-fg
^^^^^^^^^^^^^^^^^^^
Defines the foreground color that is used for command line completion
group elements
* Value type: String
* Default value: #DEDEDE
completion-highlight-bg
^^^^^^^^^^^^^^^^^^^^^^^
Defines the background color that is used for the current command line
completion element
* Value type: String
* Default value: #9FBC00
completion-highlight-fg
^^^^^^^^^^^^^^^^^^^^^^^
Defines the foreground color that is used for the current command line
completion element
* Value type: String
* Default value: #232323
default-fg
^^^^^^^^^^
Defines the default foreground color
* Value type: String
* Default value: #DDDDDD
default-bg
^^^^^^^^^^
Defines the default background color
* Value type: String
* Default value: #000000
exec-command
^^^^^^^^^^^^
Defines a command the should be prepended to any command run with exec.
* Value type: String
* Default value:
font
^^^^
Defines the font that will be used
* Value type: String
* Default value: monospace normal 9
guioptions
^^^^^^^^^^
Shows or hides GUI elements.
If it contains 'c', the command line is displayed.
If it contains 's', the statusbar is displayed.
If it contains 'h', the horizontal scrollbar is displayed.
If it contains 'v', the vertical scrollbar is displayed.
* Value type: String
* Default value: s
inputbar-bg
^^^^^^^^^^^
Defines the background color for the inputbar
* Value type: String
* Default value: #131313
inputbar-fg
^^^^^^^^^^^
Defines the foreground color for the inputbar
* Value type: String
* Default value: #9FBC00
notification-bg
^^^^^^^^^^^^^^^^^^^^^
Defines the background color for a notification
* Value type: String
* Default value: #FFFFFF
notification-fg
^^^^^^^^^^^^^^^^^^^^^
Defines the foreground color for a notification
* Value type: String
* Default value: #000000
notification-error-bg
^^^^^^^^^^^^^^^^^^^^^
Defines the background color for an error notification
* Value type: String
* Default value: #FFFFFF
notification-error-fg
^^^^^^^^^^^^^^^^^^^^^
Defines the foreground color for an error notification
* Value type: String
* Default value: #FF1212
notification-warning-bg
^^^^^^^^^^^^^^^^^^^^^^^
Defines the background color for a warning notification
* Value type: String
* Default value: #FFFFFF
notification-warning-fg
^^^^^^^^^^^^^^^^^^^^^^^
Defines the foreground color for a warning notification
* Value type: String
* Default value: #FFF712
tabbar-fg
^^^^^^^^^
Defines the foreground color for a tab
* Value type: String
* Default value: #FFFFFF
tabbar-bg
^^^^^^^^^
Defines the background color for a tab
* Value type: String
* Default value: #000000
tabbar-focus-fg
^^^^^^^^^^^^^^^
Defines the foreground color for the focused tab
* Value type: String
* Default value: #9FBC00
tabbar-focus-bg
^^^^^^^^^^^^^^^
Defines the background color for the focused tab
* Value type: String
* Default value: #000000
show-scrollbars
^^^^^^^^^^^^^^^
Defines if both the horizontal and vertical scrollbars should be shown or not.
Deprecated, use 'guioptions' instead.
* Value type: Boolean
* Default value: false
show-h-scrollbar
^^^^^^^^^^^^^^^^
Defines whether to show/hide the horizontal scrollbar. Deprecated, use
'guioptions' instead.
* Value type: Boolean
* Default value: false
show-v-scrollbar
^^^^^^^^^^^^^^^^
Defines whether to show/hide the vertical scrollbar. Deprecated, use
'guioptions' instead.
* Value type: Boolean
* Default value: false
statusbar-bg
^^^^^^^^^^^^
Defines the background color of the statusbar
* Value type: String
* Default value: #000000
statusbar-fg
^^^^^^^^^^^^
Defines the foreground color of the statusbar
* Value type: String
* Default value: #FFFFFF
statusbar-h-padding
^^^^^^^^^^^^^^^^^^^
Defines the horizontal padding of the statusbar and notificationbar
* Value type: Integer
* Default value: 8
statusbar-v-padding
^^^^^^^^^^^^^^^^^^^
Defines the vertical padding of the statusbar and notificationbar
* Value type: Integer
* Default value: 2
window-icon
^^^^^^^^^^^
Defines the path for a icon to be used as window icon.
* Value type: String
* Default value:
window-height
^^^^^^^^^^^^^
Defines the window height on startup
* Value type: Integer
* Default value: 600
window-width
^^^^^^^^^^^^
Defines the window width on startup
* Value type: Integer
* Default value: 800
zathura
-------
This section describes settings concerning the behaviour of zathura.
abort-clear-search
^^^^^^^^^^^^^^^^^^
Defines if the search results should be cleared on abort.
* Value type: Boolean
* Default value: true
adjust-open
^^^^^^^^^^^
Defines which auto adjustment mode should be used if a document is loaded.
Possible options are "best-fit" and "width".
* Value type: String
* Default value: best-fit
advance-pages-per-row
^^^^^^^^^^^^^^^^^^^^^
Defines if the number of pages per row should be honored when advancing a page.
* Value type: Boolean
* Default value: false
continuous-hist-save
^^^^^^^^^^^^^^^^^^^^
Tells zathura whether to save document history at each page change or only when
closing a document.
* Value type: Boolean
* Default value: false
database
^^^^^^^^
Defines the database backend to use for bookmarks and input history. Possible
values are "plain", "sqlite" (if built with sqlite support) and "null". If
"null" is used, bookmarks and input history will not be stored.
* Value type: String
* Default value: plain
dbus-service
^^^^^^^^^^^^
En/Disables the D-Bus service. If the services is disabled, SyncTeX forward
synchronization is not available.
* Value type: Boolean
* Default value: true
filemonitor
^^^^^^^^^^^
Defines the filemonitor backend. Possible values are "glib" and "signal" (if
signal handling is supported).
* Value type: String
* Default value: glib
incremental-search
^^^^^^^^^^^^^^^^^^
En/Disables incremental search (search while typing).
* Value type: Boolean
* Default value: true
highlight-color
^^^^^^^^^^^^^^^
Defines the color that is used for highlighting parts of the document (e.g.:
show search results)
* Value type: String
* Default value: #9FBC00
highlight-active-color
^^^^^^^^^^^^^^^^^^^^^^
Defines the color that is used to show the current selected highlighted element
(e.g: current search result)
* Value type: String
* Default value: #00BC00
highlight-transparency
^^^^^^^^^^^^^^^^^^^^^^
Defines the opacity of a highlighted element
* Value type: Float
* Default value: 0.5
page-padding
^^^^^^^^^^^^
The page padding defines the gap in pixels between each rendered page.
* Value type: Integer
* Default value: 1
page-cache-size
^^^^^^^^^^^^^^^
Defines the maximum number of pages that could be kept in the page cache. When
the cache is full and a new page that isn't cached becomes visible, the least
recently viewed page in the cache will be evicted to make room for the new one.
Large values for this variable are NOT recommended, because this will lead to
consuming a significant portion of the system memory.
* Value type: Integer
* Default value: 15
page-thumbnail-size
^^^^^^^^^^^^^^^^^^^
Defines the maximum size in pixels of the thumbnail that could be kept in the
thumbnail cache per page. The thumbnail is scaled for a quick preview during
zooming before the page is rendered. When the page is rendered, the result is
saved as the thumbnail only if the size is no more than this value. A larger
value increases quality but introduces longer delay in zooming and uses more
system memory.
* Value type: Integer
* Default value: 4194304 (4M)
pages-per-row
^^^^^^^^^^^^^
Defines the number of pages that are rendered next to each other in a row.
* Value type: Integer
* Default value: 1
first-page-column
^^^^^^^^^^^^^^^^^
Defines the column in which the first page will be displayed.
This setting is stored separately for every value of pages-per-row according to
the following pattern <1 page per row>:[<2 pages per row>[: ...]]. The last
value in the list will be used for all other number of pages per row if not set
explicitly.
Per default, the first column is set to 2 for double-page layout.
* Value type: String
* Default value: 1:2
recolor
^^^^^^^
En/Disables recoloring
* Value type: Boolean
* Default value: false
recolor-keephue
^^^^^^^^^^^^^^^
En/Disables keeping original hue when recoloring
* Value type: Boolean
* Default value: false
recolor-darkcolor
^^^^^^^^^^^^^^^^^
Defines the color value that is used to represent dark colors in recoloring mode
* Value type: String
* Default value: #FFFFFF
recolor-lightcolor
^^^^^^^^^^^^^^^^^^
Defines the color value that is used to represent light colors in recoloring mode
* Value type: String
* Default value: #000000
recolor-reverse-video
^^^^^^^^^^^^^^^^^^^^^
Defines if original image colors should be kept while recoloring.
* Value type: Boolean
* Default value: false
render-loading
^^^^^^^^^^^^^^
Defines if the "Loading..." text should be displayed if a page is rendered.
* Value type: Boolean
* Default value: true
render-loading-bg
^^^^^^^^^^^^^^^^^
Defines the background color that is used for the "Loading..." text.
* Value type: String
* Default value: #FFFFFF
render-loading-fg
^^^^^^^^^^^^^^^^^
Defines the foreground color that is used for the "Loading..." text.
* Value type: String
* Default value: #000000
scroll-hstep
^^^^^^^^^^^^
Defines the horizontal step size of scrolling by calling the scroll command once
* Value type: Float
* Default value: -1
scroll-step
^^^^^^^^^^^
Defines the step size of scrolling by calling the scroll command once
* Value type: Float
* Default value: 40
scroll-full-overlap
^^^^^^^^^^^^^^^^^^^
Defines the proportion of the current viewing area that should be
visible after scrolling a full page.
* Value type: Float
* Default value: 0
scroll-wrap
^^^^^^^^^^^
Defines if the last/first page should be wrapped
* Value type: Boolean
* Default value: false
show-directories
^^^^^^^^^^^^^^^^
Defines if the directories should be displayed in completion.
* Value type: Boolean
* Default value: true
show-hidden
^^^^^^^^^^^
Defines if hidden files and directories should be displayed in completion.
* Value type: Boolean
* Default value: false
show-recent
^^^^^^^^^^^
Defines the number of recent files that should be displayed in completion.
If the value is negative, no upper bounds are applied. If the value is 0, no
recent files are shown.
* Value type: Integer
* Default value: 10
scroll-page-aware
^^^^^^^^^^^^^^^^^
Defines if scrolling by half or full pages stops at page boundaries.
* Value type: Boolean
* Default value: false
smooth-scroll
^^^^^^^^^^^^^
Defines if scrolling via touchpad should be smooth.
* Value type: Boolean
* Default value: false
link-zoom
^^^^^^^^^
En/Disables the ability of changing zoom when following links.
* Value type: Boolean
* Default value: true
link-hadjust
^^^^^^^^^^^^
En/Disables aligning to the left internal link targets, for example from the
index.
* Value type: Boolean
* Default value: true
search-hadjust
^^^^^^^^^^^^^^
En/Disables horizontally centered search results.
* Value type: Boolean
* Default value: true
window-title-basename
^^^^^^^^^^^^^^^^^^^^^
Use basename of the file in the window title.
* Value type: Boolean
* Default value: false
window-title-home-tilde
^^^^^^^^^^^^^^^^^^^^^^^
Display a short version of the file path, which replaces $HOME with ~, in the window title.
* Value type: Boolean
* Default value: false
window-title-page
^^^^^^^^^^^^^^^^^
Display the page number in the window title.
* Value type: Boolean
* Default value: false
statusbar-basename
^^^^^^^^^^^^^^^^^^
Use basename of the file in the statusbar.
* Value type: Boolean
* Default value: false
statusbar-home-tilde
^^^^^^^^^^^^^^^^^^^^
Display a short version of the file path, which replaces $HOME with ~, in the statusbar.
* Value type: Boolean
* Default value: false
zoom-center
^^^^^^^^^^^
En/Disables horizontally centered zooming.
* Value type: Boolean
* Default value: false
vertical-center
^^^^^^^^^^^^^^^
Center the screen at the vertical midpoint of the page by default.
* Value type: Boolean
* Default value: false
zoom-max
^^^^^^^^
Defines the maximum percentage that the zoom level can be.
* Value type: Integer
* Default value: 1000
zoom-min
^^^^^^^^
Defines the minimum percentage that the zoom level can be.
* Value type: Integer
* Default value: 10
zoom-step
^^^^^^^^^
Defines the amount of percent that is zoomed in or out on each command.
* Value type: Integer
* Default value: 10
selection-clipboard
^^^^^^^^^^^^^^^^^^^
Defines the X clipboard into which mouse-selected data will be written. When it
is "clipboard", selected data will be written to the CLIPBOARD clipboard, and
can be pasted using the Ctrl+v key combination. When it is "primary", selected
data will be written to the PRIMARY clipboard, and can be pasted using the
middle mouse button, or the Shift-Insert key combination.
* Value type: String
* Default value: primary
selection-notification
^^^^^^^^^^^^^^^^^^^^^^
Defines if a notification should be displayed after selecting text.
* Value type: Boolean
* Default value: true
synctex
^^^^^^^
En/Disables SyncTeX backward synchronization support.
* Value type: Boolean
* Default value: true
synctex-editor-command
^^^^^^^^^^^^^^^^^^^^^^
Defines the command executed for SyncTeX backward synchronization.
* Value type: String
* Default value:
index-fg
^^^^^^^^
Defines the foreground color of the index mode.
* Value type: String
* Default value: #DDDDDD
index-bg
^^^^^^^^
Define the background color of the index mode.
* Value type: String
* Default value: #232323
index-active-fg
^^^^^^^^^^^^^^^
Defines the foreground color of the selected element in index mode.
* Value type: String
* Default value: #232323
index-active-bg
^^^^^^^^^^^^^^^
Define the background color of the selected element in index mode.
* Value type: String
* Default value: #9FBC00
SEE ALSO
========
zathura(1)
zathura-0.3.8/doc/requirements.txt 0000664 0001750 0001750 00000000161 12501036512 017730 0 ustar sebastian sebastian Jinja2==2.7.2
MarkupSafe==0.19
Pygments==1.6
Sphinx==1.2.2
breathe==1.2.0
docutils==0.11
sphinx-rtd-theme==0.1.6
zathura-0.3.8/doc/usage/commands.rst 0000664 0001750 0001750 00000000167 12501036512 020111 0 ustar sebastian sebastian Commands
========
By pressing colon one can execute different commands in zathura:
.. include:: ../man/_commands.txt
zathura-0.3.8/doc/usage/index.rst 0000664 0001750 0001750 00000000106 12750077577 017436 0 ustar sebastian sebastian Usage
======
.. toctree::
:maxdepth: 2
:numbered:
commands
zathura-0.3.8/po/Makefile 0000664 0001750 0001750 00000003360 12750077577 016007 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
include ../config.mk
include ../common.mk
include ../colors.mk
PROJECT = zathura
CATALOGS = $(sort $(wildcard *.po))
LINGUAS ?= $(patsubst %.po, %, $(CATALOGS))
ifeq ($(LINGUAS),)
ALINGUAS =
else
ALINGUAS = $(shell find $(patsubst %, %.po, $(LINGUAS)) 2>/dev/null)
endif
MOS = $(patsubst %, %/LC_MESSAGES/${GETTEXT_PACKAGE}.mo, $(patsubst %.po, %, $(ALINGUAS)))
all: ${MOS}
clean:
$(QUIET)rm -rf POTFILES.in POTFILES.in.tmp $(patsubst %.po, %, $(CATALOGS)) ${PROJECT}.pot
POTFILES.in: $(sort $(wildcard ../zathura/*.c))
$(QUIET) set -e && rm -f $@.tmp && touch $@.tmp && \
for f in $(^F) ; do \
echo zathura/$$f >> $@.tmp ; \
done && \
mv $@.tmp $@
${GETTEXT_PACKAGE}.pot: POTFILES.in
$(ECHO) regenerate $@
$(QUIET)intltool-update --pot --gettext-package=${GETTEXT_PACKAGE}
update-po: ${GETTEXT_PACKAGE}.pot
$(call colorecho,PO,"Updating po files ${CATALOGS}")
$(QUIET)set -e && for f in ${CATALOGS} ; do \
intltool-update --dist --gettext-package=${GETTEXT_PACKAGE} `echo $$f | sed 's/\.po//'` ; \
sed -i 's/Report-Msgid-Bugs-To: \\n/Report-Msgid-Bugs-To: http:\/\/bugs.pwmt.org\\n/' "$$f" ; \
done
%/LC_MESSAGES/${GETTEXT_PACKAGE}.mo: %.po
@mkdir -p $(@D)
$(call colorecho,MSGFMT,$(shell echo $< | sed 's/\.po//'))
$(QUIET)${MSGFMT} ${MSGFMTFLAGS} -c $< -o $@
install: ${MOS}
$(call colorecho,INSTALL,"Install translations")
$(QUIET)set -e && for f in $^ ; do \
mkdir -p -m 755 $(DESTDIR)$(LOCALEDIR)/`dirname $$f`; \
install -m 644 $$f $(DESTDIR)$(LOCALEDIR)/`dirname $$f` ; \
done
uninstall: ${MOS}
$(call colorecho,UNINSTALL,"Uninstall translations")
$(QUIET)set -e && for f in $^ ; do \
rm -f $(LOCALEDIR)/$$f; \
done
.PHONY: all clean install uninstall update-po
zathura-0.3.8/po/ca.po 0000664 0001750 0001750 00000035242 13216464200 015253 0 ustar sebastian sebastian # zathura - language file (Catalan)
# See LICENSE file for license and copyright information
#
# Translators:
# mvdan , 2012
# norbux , 2012-2013
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:11+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Catalan (http://www.transifex.com/projects/p/zathura/language/"
"ca/)\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Entrada invàlida '%s'."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Índex invàlid '%s'."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "No s'ha obert cap document."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Nombre d'arguments invàlids."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "No s'ha pogut crear el marcador: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "No s'ha pogut crear el marcador: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Marcador actualitzat correctament: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Marcador creat correctament: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Esborrat el marcador: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "No s'ha pogut esborrar el marcador: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Marcador no existent: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Cap informació disponible."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Massa arguments."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Cap argument subministrat."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Document desat."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "No s'ha pogut desar el document."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Nombre d'arguments invàlids."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "No s'ha pogut escriure el fitxer adjunt '%s' a '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "S'ha escrit el fitxer adjunt '%s' a '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "S'ha escrit la imatge '%s' a '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "No s'ha pogut escriure la imatge '%s' a '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Imatge desconeguda '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Imatge o fitxer adjunt desconegut '%s'."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "L'argument ha de ser un nombre."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Pàgina %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Fitxers adjunts"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Imatges"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Base de dades de rerefons"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Pas d'ampliació"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Separació entre pàgines"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Nombre de pàgines per fila"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Columna de la primera pàgina"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Pas de desplaçament"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Pas de desplaçament horitzontal"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Superposició de pàgines completes de desplaçament"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Zoom mínim"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Zoom màxim"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Nombre de posicions per recordar al jumplist"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Recolorejant (color fosc)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Recolorejant (color clar)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Color de realçament"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Color de realçament (activat)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Recolorejant les pàgines"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr "Quan recoloregis manté el to original i ajusta només la lluminositat"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Desplaçament recollit"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Desplaçament recollit"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Avançar nombre de pàgines per fila"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Zoom centrat horitzontalment"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Centra el resultat horitzontalment"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Transparència del realçat"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Renderitza 'Carregant ...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Ajustar al fitxer quan s'obri"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Mostra els directoris i fitxers ocults"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Mostra els directoris"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Obrir sempre la primera pàgina"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Realça els resultats de recerca"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Habilita la cerca incremental"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Esborra els resultats de recerca a l'interrompre"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Utilitza el nom base del fitxer en el títol de la finestra"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Habilitar la compatibilitat amb synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Afegir un marcador"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Esborrar un marcador"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Llista tots els marcadors"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Tancar el fitxer actual"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Mostra informació sobre el fitxer"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Executar una comanda"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Mostrar l'ajuda"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Obrir document"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Tancar Zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Imprimir document"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Desar document"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Desar document (i forçar la sobreescritura)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Desa els fitxers adjunts"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Assigna el desplaçament de pàgina"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Marca la posició actual dins el document"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Esborrar les marques especificades"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "No realcis els resultats de la recerca actual"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Realça els resultats de recerca actual"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Mostra informació sobre la versió"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "No s'ha pogut executar xdg-open."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Enllaçar: pàgina %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Enllaç: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Enllaç: Invàlid"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Reassigna a la finestra especificada per xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Ruta al directori de configuració"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Camí al directori de dades"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Camí al directori que conté els plugins"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Bifurca en segon pla"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Contrasenya del document"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Nivell de registre (depuració, informació, advertiments, errors)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Imprimeix informació sobre la versió"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Editor synctex (reenviat a l'ordre synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Carregant..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Copia la imatge"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Desa imatge com a"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Aquest document no conté cap índex"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Sense nom]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/cs.po 0000664 0001750 0001750 00000037770 13216464200 015305 0 ustar sebastian sebastian # zathura - language file (Czech)
# See LICENSE file for license and copyright information
#
# Translators:
# fri, 2016
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2017-01-04 20:39+0100\n"
"Last-Translator: fri\n"
"Language-Team: Czech (http://www.transifex.com/pwmt/zathura/language/cs/)\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr "'%s' nesmí být 0. Nastaveno na 1."
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Neplatný vstup: %s"
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Neplatný rejstřík: %s"
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr "Vybraný text zkopírován do výběru %s: %s"
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Není otevřený žádný dokument."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Špatný počet argumentů."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Nepodařilo se vytvořit záložku: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Nepodařilo se vytvořit záložku: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Záložka úspěšně aktualizována: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Záložka úspěšně vytvořena: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Záložka smazána: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Nepodařilo se smazat záložku: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Záložka neexistuje: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Název"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Autor"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Předmět"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Klíčová slova"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Tvůrce"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Výrobce"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Datum vytvoření"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Datum změny"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Nejsou dostupné žádné informace."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Příliš mnoho argumentů."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Nezadali jste argumenty."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Dokument uložen."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Nepovedlo se uložit dokument."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Špatný počet argumentů."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Nepovedlo se zapsat přílohu '%s' do '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Příloha '%s' zapsána do '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Obrázek '%s' zapsán do '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Nepovedlo se zapsat obrázek '%s' do '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Neznámý obrázek '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Neznámá příloha nebo obrázek '%s'."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Argumentem musí být číslo."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Strana %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Přílohy"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Obrázky"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Databázová vrstva"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Velikost kroku zvětšení"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Mezery mezi stránkami"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Počet stran na řádek"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Sloupec první strany"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Velikost kroku posunu"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Velikost kroku vodorovného posunu"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Překrývání při posunování celých stran"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Nejmenší stupeň zvětšení"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Největší stupeň zvětšení"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Největší počet stran ve vyrovnávací paměti"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr "Největší velikost náhledů v obrazových bodech ve vyrovnávací paměti"
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Počet poloh k uchování v seznamu"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Přebarvuje se do tmava"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Přebarvuje se do světla"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Barva zvýrazňovače"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Barva zvýrazňovače (činná)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "Nahrává se barva pozadí..."
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "Nahrává se barva popředí..."
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr "Barva popředí režimu rejstříku"
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr "Barva pozadí režimu rejstříku"
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr "Barva popředí režimu rejstříku (činný prvek)"
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr "Barva pozadí režimu rejstříku (činný prvek)"
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Přebarvit stránky"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr "Při přebarvování zachovat původní odstín a přizpůsobit pouze světlost"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr "Při přebarvování zachovat původní barvy obrázku"
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Posunovat přes konce"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Posunovat s ohledem na strany"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Pokračovat v počtu stran v jednom řádku"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Vodorovně vystředěné přiblížení"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr "Zarovnat cíl odkazu nalevo"
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr "Při následování odkazů se mění velikost přiblížení"
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Vystředit výsledky vodorovně"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Průhlednost při zvýrazňování"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Vypisovat Nahrává se..."
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Přiblížení po otevření souboru"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Zobrazovat skryté soubory"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Ukázat adresáře"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr "Ukázat nedávné soubory"
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Vždy otevírat na první straně"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Zvýrazňovat výsledky hledání"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Povolit přírůstkové hledání"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Při přerušení smazat výsledky hledání"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Použít základní název souboru v názvu okna"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr "Použít ~ místo $HOME v souborovém názvu v názvu okna"
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Zobrazit číslo strany v názvu okna"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Použít základní název souboru ve stavovém řádku"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr "Použít ~ místo $HOME v souborovém názvu ve stavovém řádku"
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Povolit podporu pro synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr "Příkaz pro editor Synctex"
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "Povolit službu D-Bus"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr "Schránka, do níž budou zapsána data vabraná pomocí myši"
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr "Povolit oznámení po vybrání textu"
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Přidat záložku"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Smazat záložku"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Vypsat všechny záložky"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Zavřít nynější soubor"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Ukázat informace o souboru"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Spustit příkaz"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Ukázat nápovědu"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Otevřít dokument"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Zavřít zathuru"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Vytisknout dokument"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Uložit dokument"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Uložit dokument a vynutit jeho přepsání"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Uložit přílohy"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Nastavit posun strany"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Označit současnou polohu v dokumentu"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Smazat vybrané značky"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Nezvýrazňovat výsledky tohoto hledání"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Zvýrazňovat výsledky tohoto hledání"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Ukázat údaj o verzi"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Nepodařilo se spustit xdg-open."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Odkaz: strana %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Odkaz: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Odkaz: Neplatný"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Propojí s oknem udaným xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Cesta k adresáři se souborem s nastavením"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Cesta k adresáři s daty"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr "Cesta k adresáři s vyrovnávací pamětí"
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Cesta k adresářům s přídavnými moduly"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Forknout se na pozadí"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Heslo k dokumentu"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Číslo strany, na kterou jít"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Úroveň logování (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Zobrazit údaje o verzi"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Editor Synctex (předáno příkazu synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr "Přesunout se na udanou polohu synctex"
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr "Zvýraznit zadanou polohu v daném procesu"
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr "Spustit v ne-výchozím režimu"
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Nahrává se..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Kopírovat obrázek"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Uložit obrázek jako"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Nepodařilo se vytisknout: %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Tento dokument neobsahuje žádný rejstřík"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Nepojmenovaný]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
"Nepodařilo se přečíst soubor z stdin a zapsat jej do dočasného souboru."
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
"Nepodařilo se přečíst soubor z GIO a zkopírovat jej do dočasného souboru."
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr "Zadat heslo:"
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
"Nepodporovaný typ souboru. Nainstalujte, prosím, nezbytný přídavný modul."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Dokument neobsahuje žádné strany"
zathura-0.3.8/po/de.po 0000664 0001750 0001750 00000040476 13216464200 015265 0 ustar sebastian sebastian # zathura - language file (German)
# See LICENSE file for license and copyright information
#
# Translators:
# Moritz Lipp , 2014
# simon04 , 2012-2014
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2017-09-12 10:46+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: German (http://www.transifex.com/projects/p/zathura/language/"
"de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr "'%s' darf nicht 0 sein. Auf 1 gesetzt."
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Ungültige Eingabe '%s' angegeben."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Ungültiger Index '%s' angegeben."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr "Der gewählte Text wurde in die Zwischenablage %s kopiert: %s"
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Kein Dokument geöffnet."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Ungültige Anzahl an Argumenten angegeben."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Konnte Lesezeichen nicht aktualisieren: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Konnte Lesezeichen nicht erstellen: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Lesezeichen erfolgreich aktualisiert: %s."
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Lesezeichen erfolgreich erstellt: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Lesezeichen entfernt: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Konnte Lesezeichen nicht entfernen: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Lesezeichen existiert nicht: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Titel"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Autor"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Betreff"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Schlagwörter"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Ersteller"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Produzent"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Erstellungsdatum"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Modifikationsdatum"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Keine Information verfügbar."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Zu viele Argumente angegeben."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Keine Argumente angegeben."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Dokument gespeichert."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Konnte Dokument nicht speichern."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Ungültige Anzahl an Argumenten."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Anhang '%s' nach '%s' geschrieben."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Anhang '%s' nach '%s' geschrieben."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Unbekanntes Bild '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Unbekannter Anhanng oder Bild '%s'."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Das Argument ist keine Zahl."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Seite %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Speichere Anhänge"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Bilder"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Datenbank Backend"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr "Dateiwächter Backend"
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Vergrößerungsstufe"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Abstand zwischen den Seiten"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Anzahl der Seiten in einer Reihe"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Spalte der ersten Seite"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Schrittgröße beim Scrollen"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Horizontale Schrittgröße beim Scrollen"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Überlappung beim Scrollen von ganzen Seiten"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Minimale Vergrößerungsstufe"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Maximale Vergrößerungsstufe"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Maximale Seitenzahl im Zwischenspeicher"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr "Maximale Größe der Vorschau im Zwischenspeicher (in Pixel)"
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Anzahl der Liste zu behaltenden Positionen"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Neufärben (Dunkle Farbe)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Neufärben (Helle Farbe)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Farbe für eine Markierung"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Farbe für die aktuelle Markierung"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "Hintergrundfarbe von 'Lädt...'"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "Vordergrundfarbe von 'Lädt...'"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr "Vordergrundfarbe des Indexmodus"
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr "Hintergrundfarbe des Indexmodus"
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr "Vordergrundfarbe des Indexmodus (aktives Element)"
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr "Hintergrundfarbe des Indexmodus (aktives Element)"
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Färbe die Seiten ein"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
"Behalte beim Neufärben den ursprünglichen Farbton bei und passe nur die "
"Helligkeit an"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
"Bilder bleiben unverändert, wenn das Einfärben des Dokuments aktiviert ist"
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Scroll-Umbruch"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Seiten beim Scrollen beachten"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Gehe Anzahl der Seiten in einer Reihe weiter"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Horizontal zentrierter Zoom"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr "Zentriere Seiten vertikal"
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr "Linkziel links ausrichten"
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr "Erlaube Zoom-Änderungen beim Folgen von Links"
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Zentriere Ergebnis horizontal"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Transparenz für Markierungen"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Zeige 'Lädt...'-Text beim Zeichnen einer Seite"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Seite einpassen"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Zeige versteckte Dateien und Ordner an"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Zeige Ordner an"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr "Zeige zuletzt geöffnete Dateien an"
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Öffne Dokument immer auf der ersten Seite"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Hebe Suchergebnisse hervor"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Aktiviere inkrementelle Suche"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Lösche Suchergebnisse bei Abbruch"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Verwende den Dateinamen der Datei im Fenstertitel"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr "Verwende ~ statt $HOME im Dateinamen im Fenstertitel"
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Verwende die Seitenzal im Fenstertitel"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Verwende den Dateinamen der Datei in der Statusleiste"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr "Verwende ~ statt $HOME im Dateinamen in der Statusleiste"
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Aktiviere SyncTeX-Unterstützung"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr "Synctex Editor Befehl"
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "D-Bus-Dienst aktivieren"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr "Speichere Verlauf bei jedem Seitenwechsel"
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr "Zwischenablage, in die mit der Maus gewählte Text kopiert wird"
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr "Benachrichtigung nach Text-Selektion"
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Füge Lesezeichen hinzu"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Lösche ein Lesezeichen"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Liste all Lesezeichen auf"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Schließe das aktuelle Dokument"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Zeige Dokumentinformationen an"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Führe einen Befehl aus"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Zeige Hilfe an"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Öffne Dokument"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Beende zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Drucke Dokument"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Speichere Dokument"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Speichere Dokument (und überschreibe bestehende)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Speichere Anhänge"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Setze den Seitenabstand"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Markiere aktuelle Position im Doukument"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Lösche angegebene Markierung"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Hebe aktuelle Suchergebnisse nicht hervor"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Hebe aktuelle Suchergebnisse hervor"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Zeige Versionsinformationen an"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Konnte xdg-open nicht ausführen."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Verknüpfung: Seite %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Verknüpfung: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Verknüpfung: ungültig"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Reparentiert zathura an das Fenster mit der xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Pfad zum Konfigurationsverzeichnis"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Pfad zum Datenverzeichnis"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr "Pfad zum Cacheverzeichnis"
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Pfad zum Pluginverzeichnis"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Forkt den Prozess in den Hintergrund"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Dokument Passwort"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Zur Seite springen"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Log-Stufe (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Zeige Versionsinformationen an"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Synctex Editor (wird an synctex weitergeleitet)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr "Zur gewählten SyncTeX-Position springen"
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr "Gewählte Position im Prozess hervorheben"
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr "In einem Nicht-Standardmodus starten"
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Lädt..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Bild kopieren"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Bild speichern als"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Drucken fehlgeschlagen: %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr "Ungültiger Anpassungsmodus: %d"
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr "Suchausdruck nicht gefunden: %s"
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Dieses Dokument beinhaltet kein Inhaltsverzeichnis."
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Kein Name]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr "Konnte Datei nicht von stdin lesen und in temporäre Datei schreiben."
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr "Konnte Datei nicht mittels GIO in temporäre Datei kopieren."
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr "Passwort:"
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr "Dateityp ist nicht unterstützt. Installiere das benötigete Plugin."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Dieses Dokument beinhaltet keine Seiten"
zathura-0.3.8/po/el.po 0000664 0001750 0001750 00000041330 13216464200 015263 0 ustar sebastian sebastian # zathura - language file (Greek)
# See LICENSE file for license and copyright information
#
# Translators:
# Nisok Kosin , 2012.
# Nisok Kosin , 2012.
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:10+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Greek (http://www.transifex.com/projects/p/zathura/language/"
"el/)\n"
"Language: el\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Η είσοδος '%s' είναι άκυρη."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Ο δείκτης '%s' είναι άκυρος."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Δεν άνοιξε κανένα αρχείο. "
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Μη έγκυρος αριθμός παραμέτρων."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Η δημιουργία του σελιδοδείκτη: %s δεν ήταν δυνατή."
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Η δημιουργία του σελιδοδείκτη: %s δεν ήταν δυνατή."
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Η ενημέρωση του σελιδοδείκτη: %s ήταν επιτυχής. "
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Η δημιουργία του σελιδοδείκτη: %s ήταν επιτυχής."
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Ο σελιδοδείκτης: %s διεγράφει. "
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Η διαγραφή του σελιδοδείκτη: %s απέτυχε. "
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Ο σελιδοδείκτης: %s δεν βρέθηκε. "
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Δεν υπάρχουν διαθέσιμες πληροφορίες."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Εισήχθησαν πολλές παράμετροι. "
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Δεν εισήχθησαν παράμετροι. "
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Το αρχείο αποθηκεύτηκε."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Η αποθήκευση του αρχείου απέτυχε. "
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Μη έγκυρος ο αριθμός των παραμέτρων. "
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Μη επιτυχής η εγγραγή της προσάρτησης '%s' στην '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Επιτυχής η εγγραφή της προσάρτησης '%s' στην '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Ενεγράφει η εικόνα '%s' στην '%s'"
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Δεν ενεγράφει η εικόνα '%s' στην '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Άγνωστη εικόνα '%s'. "
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Άγνωστο προσάρτημα είτε εικόνα '%s'. "
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Η παράμετρος πρέπει να είναι αριθμός."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Σελίδα %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Προσαρτήσεις"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Εικόνες"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Το βασικό εργαλείο της βάσης δεδομένων"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Βήμα μεγέθυνσης"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Διάκενο μεταξύ σελίδων"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Αριθμός σελίδων ανά γραμμή"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Στήλη της πρώτης σελίδας"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Βήμα κύλισης"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Βήμα οριζόντιας κύλησης"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Ελάχιστη μεγέθυνση"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Μέγιστη μεγέθυνση"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Επαναχρωματισμός (σκούρο χρώμα)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Επαναχρωματισμός (ανοικτό χρώμα)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Χρώμα τονισμού"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Χρώμα τονισμού (ενεργό)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Επαναχρωματισμός σελίδων"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
"Κατά τον επαναχρωματισμό της σελιδάς διατήρηση της αρχικής απόχρωσης και "
"αλλαγή μόνο της φωτεινότητας"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Κυκλική κύληση"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Προώθηση σε αριθμό σελίδων ανά γραμμή"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Μεγένθηση οριζοντίως κεντραρισμένη"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Οριζόντιο κεντράρισμα αποτελεσμάτων"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Διαφάνεια για τονισμό"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Εμφάνιση της ένδειξης 'Φορτώνει ...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Προσαρμογή κατά το άνοιγμα του αρχείου"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Εμφάνιση κρυφών αρχείων και φακέλων"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Εμφάνιση καταλόγων"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Άνοιγμα πάντα στην πρώτη σελίδα"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Τονισμός αποτελεσμάτων αναζήτησης"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Εκκαθάριση των απολεσμάτων αναζήτησης κατά την διακοπή"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Χρήση του ονόματος του αρχείο στο τίτλο του παραθύρου"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Ενεργοποίηση υποστήριξης synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Προσθήκη σελιδοδείκτη"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Διαγραφή σελιδοδείκτη"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Εμφάνιση όλων των σελιδοδεικτών"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Κλείσιμο αρχείου"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Προβολή πληροφοριών αρχείου"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Εκτέλεση εντολής"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Εμφάνιση βοήθειας"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Άνοιγμα αρχείου"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Κλείσιμο"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Εκτύπωση αρχείου"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Αποθήκευση αρχείου"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Αποθήκευση αρχείου (και αντικατάσταση)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Αποθήκευση προσαρτήσεων. "
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Ρύθμιση αντιστάθμισης σελίδας"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Επισήμανση τρέχουσας θέσης στο κείμενο"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Διαγραφή επιλεγμένων σημείων"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Χωρίς τονισμό τα τρέχοντα αποτελέσματα της αναζήτησης"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Τονισμός στα τρέχοντα αποτελέσματα της αναζήτησης"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Εμφάνιση πληροφοριών έκδοσης"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Απέτυχε η εκτέλεση του xdg-open. "
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Διαδρομή του αρχείου ρυθμίσεων"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Διαδρομή του φακέλου δεδομένων"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Διαδρομή φακέλου που περιέχει τα πρόσθετα"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Διακλάδωση στο παρασκήνιο"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Κωδικός αρχείου"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Επίπεδο καταγραφής (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Εκτύπωση πληροφοριών έκδοσης"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Synctex editor (Προώθηση στην εντολή synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Φορτώνει ..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Αντιγραφή εικόνας"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Αποθήκευση εικόνας ως..."
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Το αρχείο δεν περιέχει κανένα δείκτη"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Χωρίς όνομα]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/eo.po 0000664 0001750 0001750 00000032750 13216464200 015274 0 ustar sebastian sebastian # zathura - language file (Esperanto)
# See LICENSE file for license and copyright information
#
# Translators:
# , 2012.
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2015-10-15 23:07+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Esperanto (http://www.transifex.com/projects/p/zathura/"
"language/eo/)\n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.5\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Nevalida enigo '%s' uzata."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Nevalida indekso '%s' uzata."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Neniu dokumento malfermita."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Nevalida nombro da argumentoj uzata."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Neeble krei paĝosignon: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Neeble krei paĝosignon: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Paĝosigno sukcese aktualigita: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Paĝosigno sukcese kreita: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Paĝosigno forigita: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Neeble forigi paĝosignon: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Neniu paĝosigno: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Neniu informacio disponebla."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Tro multe da argumentoj."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Neniuj argumentoj uzata."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Dokumento konservita."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Neeble konservi dokumenton."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Nevalida nombro da argumentoj."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Neeble skribi kunsendaĵon '%s' en '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Skribis kunsendaĵon '%s' en '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Skribis kunsendaĵon '%s' en '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Neeble skribi kunsendaĵon '%s' en '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Nekonata bildo '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr ""
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Argumento devas esti nombro."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Paĝo %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Konservu kunsendaĵojn"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Bildoj"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr ""
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Zompaŝo"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Interpaĝa plenigo"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Nombro da paĝoj po vico"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Rulumpaŝo"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Mimimuma zomo"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Maksimuma zomo"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Rekolorigo (malhela koloro)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Rekolorigo (hela koloro)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Koloro por fonlumo"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Koloro por fonlumo (aktiva)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Rekoloru paĝojn"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Ĉirkaŭflua rulumado"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Travidebleco por fonlumo"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Bildigu 'Ŝargado ...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Adaptaĵo ĉe malfermo de dosiero"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Montru kaŝitajn dosierojn kaj -ujojn"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Montru dosierujojn"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Ĉiam malfermu ĉe unua paĝo"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr ""
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Aldonu paĝosignon"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Forigu paĝosignon"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Listigu ĉiujn paĝosignojn"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Fermu nunan dosieron"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Montru dosiera informacio"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Montru helpon"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Malfermu dokumenton"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Fermu zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Presu dokumenton"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Konservu dokumenton"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Konservu dokumenton (deviga anstataŭo)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Konservu kunsendaĵojn"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Agordu paĝdelokado"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr ""
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr ""
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr ""
#: ../zathura/config.c:459
msgid "Show version information"
msgstr ""
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Fiaskis iro de xdg-open"
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Vojo al la agorda dosierujo"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Vojo al la datuma dosierujo"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Vojoj al dosierujoj enhavantaj kromaĵojn"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr ""
#: ../zathura/main.c:152
msgid "Document password"
msgstr ""
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Nivelo de ĵurnalo (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Montru dosiera informacio"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Ŝargado ..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Kopiu bildon"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Savi bildojn kiel"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Ĉi-tiu dokumento enhavas neniam indekson."
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Neniu nomo]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/es.po 0000664 0001750 0001750 00000035001 13216464200 015270 0 ustar sebastian sebastian # zathura - language file (Spanish)
# See LICENSE file for license and copyright information
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:10+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
"zathura/language/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Entrada inválida: '%s'."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Índice invalido: '%s'."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Ningún documento abierto."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Número de argumentos inválido."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Error al crear favorito: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Error al crear favorito: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Favorito actualizado con éxitosamente: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Favorito creado con éxitosamente: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Favorito eliminado: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Error al eliminar el favorito: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "No existe el favorito: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "No hay información disponible."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Demasiados argumentos."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Ningún argumento recibido."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Documento guardado."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Error al guardar el documento."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Número de argumentos inválido."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Escrito fichero adjunto '%s' a '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Escrito fichero adjunto '%s' a '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Imagen desconocida '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Adjunto o imagen desconocidos '%s'."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "El argumento ha de ser un número."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Página %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Guardar ficheros adjuntos"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Imágenes"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Base de datos"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Unidad de zoom"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Separación entre páginas"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Número de páginas por fila"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Columna de la primera página"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Paso de desplazamiento"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Paso de desplazamiento horizontal"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Solapamiento del desplazamiento de página"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Zoom mínimo"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Zoom máximo"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Número de posiciones a recordar en la lista de saltos"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Recoloreado (color oscuro)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Recoloreado (color claro)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Color para destacar"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Color para destacar (activo)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Recolorear páginas"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
"Cuando se recoloree, mantener el tono original y ajustar únicamente la "
"luminosidad"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Navegación/Scroll cíclica/o"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Zoom centrado horizontalmente"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Centrar el resultado horizontalmente"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Transparencia para el destacado"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Renderizado 'Cargando ...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Ajustarse al abrir un fichero"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Mostrar directorios y ficheros ocultos"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Mostrar directorios"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Abrir siempre la primera página"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Destacar los resultados de búsqueda"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Habilitar la búsqueda incremental"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Borrar resultados de búsqueda al abortar"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Usar el nombre del archivo en el título de la ventana"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Habilitar soporte synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Añadir Favorito"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Eliminar Favorito"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Listar favoritos"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Cerrar fichero actual"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Mostrar información del fichero"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Ejecutar un comando"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Mostrar ayuda"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Abrir documento"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Salir de zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Imprimir documento"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Guardar documento"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Guardar documento (y sobreescribir)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Guardar ficheros adjuntos"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Asignar el desplazamiento de página"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Marcar la posición actual en el documento"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Borrar las marcas especificadas"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "No destacar los resultados de la búsqueda actual"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Destacar los resultados de la búsqueda actual"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Mostrar versión"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Error al tratar de ejecutar xdg-open"
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Reasignar a la ventana especificada por xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Ruta al directorio de configuración"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Ruta para el directorio de datos"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Ruta a los directorios que contienen los plugins"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Fork, ejecutándose en background"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Contraseña del documento"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Nivel de log (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Mostrar información del fichero"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Editor de Synctex (reenvíado al commando synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Cargando ..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Copiar imagen"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Salvar imagen como"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Este documento no contiene ningún índice"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Sin nombre]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/es_CL.po 0000664 0001750 0001750 00000033245 13216464200 015656 0 ustar sebastian sebastian # zathura - language file (Spanish (Chile))
# See LICENSE file for license and copyright information
#
# Translators:
# watsh1ken , 2012
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:10+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Spanish (Chile) (http://www.transifex.net/projects/p/zathura/"
"language/es_CL/)\n"
"Language: es_CL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Entrada inválida: '%s'."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Índice invalido: '%s'."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Ningún documento abierto."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Número de argumentos inválido."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "No se pudo crear marcador: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "No se pudo crear marcador: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Marcador actualizado exitosamente: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Marcador creado exitosamente: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Marcador eliminado: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Error al eliminar marcador: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "No existe marcador: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "No hay información disponible."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Demasiados argumentos."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Ningún argumento recibido."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Documento guardado."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Error al guardar el documento."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Número de argumentos inválido."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Fichero adjunto escrito '%s' a '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Fichero adjunto escrito '%s' a '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr ""
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr ""
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "El argumento debe ser un número."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr ""
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Guardar archivos adjuntos"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr ""
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Fin de la base de datos."
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Unidad de zoom"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Separación entre páginas"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Numero de páginas por fila"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Unidad de desplazamiento"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Zoom mínimo"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Zoom máximo"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Recolorando (color oscuro)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Recolorando (color claro)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Color para destacar"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Color para destacar (activo)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Recolorar páginas"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Scroll cíclico"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Transparencia para lo destacado"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Renderizando 'Cargando...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Ajustar al abrirse un archivo"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Mostrar archivos ocultos y directorios"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Mostrar directorios"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Siempre abrir en primera página"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr ""
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Agregar un marcador"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Eliminar un marcador"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Listar todos los marcadores"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Cerrar archivo actual"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Mostrar información del archivo"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Mostrar ayuda"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Abrir documento"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Cerrar zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Imprimir documento"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Guardar documento"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Guardar documento (y forzar sobreescritura)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Guardar archivos adjuntos"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Asignar desplazamiento de la página"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr ""
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr ""
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr ""
#: ../zathura/config.c:459
msgid "Show version information"
msgstr ""
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Error al ejecutar xdg-open."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Reasignar a la ventana especificada por xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Ruta al directorio de configuración"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Ruta al directorio de datos"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Ruta al directorio que contiene plugins"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Ejecución en background"
#: ../zathura/main.c:152
msgid "Document password"
msgstr ""
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Nivel de log (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Mostrar información del archivo"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Cargando..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Copiar imagen"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr ""
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Este document no contiene índice"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Sin nombre]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/et.po 0000664 0001750 0001750 00000030340 13216464200 015272 0 ustar sebastian sebastian # zathura - language file (Estonian)
# See LICENSE file for license and copyright information
#
# Translators:
# Rivo Zängov , 2012
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2015-10-15 23:07+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Estonian (http://www.transifex.net/projects/p/zathura/"
"language/et/)\n"
"Language: et\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.5\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr ""
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr ""
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr ""
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr ""
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr ""
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr ""
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr ""
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr ""
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr ""
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr ""
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr ""
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr ""
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr ""
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr ""
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr ""
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr ""
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr ""
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr ""
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr ""
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr ""
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr ""
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Salvesta manused"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr ""
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr ""
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr ""
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr ""
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr ""
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr ""
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr ""
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr ""
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr ""
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr ""
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Esiletõstmise värv"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Esiletõstmise värv (aktiivne)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr ""
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr ""
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr ""
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr ""
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr ""
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr ""
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Näita kaustasid"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Ava alati esimene leht"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr ""
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Lisa järjehoidja"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Kustuta järjehoidja"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Näita kõiki järjehoidjaid"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Sulge praegune fail"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Näita faili infot"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Näita abiinfot"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Ava dokument"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Sule zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Prindi dokument"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Salvesta dokument"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr ""
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Salvesta manused"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr ""
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr ""
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr ""
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr ""
#: ../zathura/config.c:459
msgid "Show version information"
msgstr ""
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr ""
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr ""
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr ""
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr ""
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr ""
#: ../zathura/main.c:152
msgid "Document password"
msgstr ""
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr ""
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Näita faili infot"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr ""
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Kopeeri pilt"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr ""
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr ""
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Nime pole]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/fr.po 0000664 0001750 0001750 00000037410 13216464200 015276 0 ustar sebastian sebastian # zathura - language file (French)
# See LICENSE file for license and copyright information
#
# Translators:
# bknecht , 2012
# Dorian , 2012,2014
# Quentin Stiévenart , 2012
# rike , 2014
# Stéphane Aulery , 2012
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:10+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: French (http://www.transifex.com/projects/p/zathura/language/"
"fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Entrée invalide : '%s'"
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Index invalide : '%s'"
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Aucun document ouvert."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Nombre d'arguments invalide."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Impossible de créer le marque-page : %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Impossible de créer le marque-page : %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Marque page mis à jour avec succès : %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Marque page créé avec succès : %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Marque page supprimé : %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Échec lors de la suppression du marque-page : %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Aucun marque-page correspondant : %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Titre"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Auteur"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Sujet"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Mots clé"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Créateur"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Producteur"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Date de création"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Date de modification"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Aucune information disponible."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Trop d'arguments."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Aucun argument passé."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Document enregistré."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Échec lors de l'enregistrement du document."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Nombre d'arguments invalide."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Impossible d'écrire la pièce jointe '%s' dans '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Pièce jointe '%s' écrite dans '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Image '%s' écrite dans '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Impossible d'écrire l'image '%s' dans '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Image '%s' inconnue."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Pièce jointe ou image '%s' inconnue."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "L'argument doit être un nombre."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Page %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Pièces jointes"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Images"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Gestionnaire de base de données"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Incrément de zoom"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Espacement entre les pages"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Nombre de page par rangée"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Colonne de la première page"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Incrément de défilement"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Incrément de défilement horizontal"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Recouvrement lors du défilement par page entière"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Zoom minimum"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Zoom maximum"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Nombre maximum de pages à garder en cache"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Nombre de positions à mémoriser dans la liste de sauts"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Recoloration (couleur sombre)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Recoloration (couleur claire)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Couleur de surbrillance"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Couleur de surbrillance (active)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "Couleur d'arrière-plan de 'Chargement...'"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "Couleur de 'Chargement...'"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Recoloriser les pages"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
"Lors de la recoloration garder la teinte d'origine et ajuster seulement la "
"luminosité"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Défiler en boucle"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Défilement tenant compte des limites de page"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Augmenter le nombre de pages par rangée"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Zoom centré horizontalement"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr "Aligner la cible du lien à gauche"
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr "Autoriser la modification du zoom quand on suit un lien"
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Centrer le résultat horizontalement"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Transparence de la surbrillance"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Afficher 'Chargement...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Ajuster à l'ouverture du fichier"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Montrer les fichiers et dossiers cachés"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Montrer les dossiers"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Toujours ouvrir à la première page"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Surligner les résultats de la recherche"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Activer la recherche incrémentale"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Effacer les résultats de recherche en cas d'annulation"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Utiliser le nom de base du fichier dans le titre de la fenêtre"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Afficher le numéro de page dans le titre de la fenêtre"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Utiliser le nom de base du fichier dans la barre d'état"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Activer la prise en charge de synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "Activer le service D-Bus"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr "Le presse-papiers qui recevra les données sélectionnées avec la souris"
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Ajouter un marque-page"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Supprimer un marque-page"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Lister tous les marque-pages"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Fermer le fichier actuel"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Montrer les informations sur le fichier"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Exécuter une commande"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Afficher l'aide"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Ouvrir un document"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Quitter zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Imprimer le document"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Sauver le document"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Sauver le document (et forcer l'écrasement)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Enregistrer les pièces jointes"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Définir le décalage de page"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Marquer l'emplacement actuel dans le document"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Supprimer les marques indiquées"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Ne pas surligner les résultats de la recherche en cours"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Surligner les résultats de la recherche en cours"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Afficher les informations de version"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Échec lors du lancement de xdg-open."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Lien : page %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Lien : %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Lien : Invalide"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Rattacher à la fenêtre spécifiée par xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Chemin vers le dossier de configuration"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Chemin vers le dossier de données"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Chemin vers le dossier de plugins"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Détacher en arrière-plan"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Mot de passe du document"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Numéro de page où aller"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Niveau de journalisation (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Afficher les informations de version"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Éditeur synctex (transféré à la commande synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr "Démarrer dans un mode non-défaut"
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Chargement..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Copier l'image"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Enregistrer l'image sous"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Echec d'impression : %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Ce document ne contient pas d'index"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Sans nom]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
"Impossible de lire le fichier depuis stdin et de le sauvegarder dans un "
"fichier temporaire."
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
"Type de fichier non supporté. Veuillez installer l'extension nécessaire."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Ce document ne contient aucune page"
zathura-0.3.8/po/he.po 0000664 0001750 0001750 00000027507 13216464200 015271 0 ustar sebastian sebastian # zathura - language file (Hebrew)
# See LICENSE file for license and copyright information
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2014-01-31 09:37+0000\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Hebrew (http://www.transifex.com/projects/p/zathura/language/"
"he/)\n"
"Language: he\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr ""
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr ""
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr ""
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr ""
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr ""
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr ""
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr ""
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr ""
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr ""
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr ""
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr ""
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr ""
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr ""
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr ""
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr ""
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr ""
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr ""
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr ""
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr ""
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr ""
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr ""
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr ""
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr ""
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr ""
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr ""
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr ""
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr ""
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr ""
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr ""
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr ""
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr ""
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr ""
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr ""
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr ""
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr ""
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr ""
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr ""
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr ""
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr ""
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr ""
#: ../zathura/config.c:218
msgid "Show directories"
msgstr ""
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr ""
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr ""
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr ""
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr ""
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr ""
#: ../zathura/config.c:443
msgid "Close current file"
msgstr ""
#: ../zathura/config.c:444
msgid "Show file information"
msgstr ""
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr ""
#: ../zathura/config.c:448
msgid "Open document"
msgstr ""
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr ""
#: ../zathura/config.c:450
msgid "Print document"
msgstr ""
#: ../zathura/config.c:451
msgid "Save document"
msgstr ""
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr ""
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr ""
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr ""
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr ""
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr ""
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr ""
#: ../zathura/config.c:459
msgid "Show version information"
msgstr ""
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr ""
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr ""
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr ""
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr ""
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr ""
#: ../zathura/main.c:152
msgid "Document password"
msgstr ""
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr ""
#: ../zathura/main.c:155
msgid "Print version information"
msgstr ""
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr ""
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr ""
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr ""
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr ""
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr ""
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/hr.po 0000664 0001750 0001750 00000027626 13216464200 015310 0 ustar sebastian sebastian # zathura - language file (Croatian)
# See LICENSE file for license and copyright information
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2014-01-31 09:37+0000\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Croatian (http://www.transifex.com/projects/p/zathura/"
"language/hr/)\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr ""
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr ""
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr ""
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr ""
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr ""
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr ""
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr ""
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr ""
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr ""
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr ""
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr ""
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr ""
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr ""
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr ""
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr ""
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr ""
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr ""
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr ""
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr ""
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr ""
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr ""
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr ""
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr ""
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr ""
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr ""
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr ""
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr ""
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr ""
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr ""
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr ""
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr ""
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr ""
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr ""
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr ""
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr ""
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr ""
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr ""
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr ""
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr ""
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr ""
#: ../zathura/config.c:218
msgid "Show directories"
msgstr ""
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr ""
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr ""
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr ""
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr ""
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr ""
#: ../zathura/config.c:443
msgid "Close current file"
msgstr ""
#: ../zathura/config.c:444
msgid "Show file information"
msgstr ""
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr ""
#: ../zathura/config.c:448
msgid "Open document"
msgstr ""
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr ""
#: ../zathura/config.c:450
msgid "Print document"
msgstr ""
#: ../zathura/config.c:451
msgid "Save document"
msgstr ""
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr ""
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr ""
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr ""
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr ""
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr ""
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr ""
#: ../zathura/config.c:459
msgid "Show version information"
msgstr ""
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr ""
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr ""
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr ""
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr ""
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr ""
#: ../zathura/main.c:152
msgid "Document password"
msgstr ""
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr ""
#: ../zathura/main.c:155
msgid "Print version information"
msgstr ""
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr ""
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr ""
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr ""
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr ""
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr ""
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/id_ID.po 0000664 0001750 0001750 00000035515 13216464200 015643 0 ustar sebastian sebastian # zathura - language file (Inonesian (Indonesia))
# See LICENSE file for license and copyright information
#
# Translators:
# andjeng , 2013
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:10+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Indonesian (Indonesia) (http://www.transifex.com/projects/p/"
"zathura/language/id_ID/)\n"
"Language: id_ID\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Masukan '%s' tidak valid"
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Index '%s' tidak valid"
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Tidak ada dokumen yang terbuka."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "jumlah argumen yang diberikan tidak valid"
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Tidak dapat membuat bookmark: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Tidak dapat membuat bookmark: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "bookmark yang sukses terupdate : %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Bookmark yang sukses dibuat: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Bookmark %s telah sukses dihapus"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Gagal menghapus bookmark: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Tidak ada bookmark: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Judul"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Penulis"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Subjek"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Kata kunci"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Pembuat"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Produser"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Tanggal pembuatan"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Tanggal ubahan"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Tidak ada informasi tersedia"
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Argumen terlalu banyak"
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Tidak ada argumen yang diberikan"
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Dokumen telah disimpan"
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Gagal menyimpan dokumen"
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Jumlah argumen tidak valid"
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Tidak dapat menulis lampiran '%s' ke '%s'"
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Tidak dapat menyimpan lampiran '%s' ke '%s'"
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Menulis citra dari '%s' ke '%s'"
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Tidak dapat menulis citra '%s' ke %s'"
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Citra tidak diketahui '%s'"
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Lampiran atau gambar tidak diketahui '%s'"
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Argumen harus berupa angka."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Halaman %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Lampiran"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Citra"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "backend database"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Tingkat pembesaran"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Selisih antar halaman"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Jumlah halaman tiap kolom"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Kolom pada halaman pertama"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Tingkat menggulung"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Tingkat penggulungan horisontal"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Pembesaran minimum"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Pembesaran maksimal"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Jumlah laman yang disimpan pada cache"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Jumlah posisi yang diingat pada jumplist"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Mewarnai ulang (warna gelap)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Mewarnai ulang (warna cerah)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Warna sorotan"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Warna sorotan (aktif)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "'Memuat ...; warna latar"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "'Memuat ...' warna depan"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Mewarnai ulang halaman"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr "Ketika mewarnai ulang, jaga hue dan sesuaikan kecerahan saja"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr ""
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Penggulungan sadar halaman"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Jumlah halaman per baris \"lanjutan\""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Pembesaran horisontal tengah"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr "Ratakan tautan ke kiri"
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr "Biarkan pembesaran berubah saat mengikuti pranala"
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Tengah-horisontalkan hasil"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Transparansi sorotan"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Memuat Render..."
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Menyesuaikan ketika membuka file"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Perlihatkan file dan direktori tersembunyi"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Perlihatkan direktori"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Selalu buka halaman pertama"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Sorot hasil pencarian"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Fungsikan pencarian berkelanjutan"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Hapus hasil pencarian ketika batal mencari"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Gunakan nama dasar file pada judul jendela"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Tampilkan nomor laman pada jendela judul"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Gunakan nama dasar berkas pada statusbar"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Support synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr "Data yang dipilih tetikus akan ditulis ke clipboard"
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Tambahkan pada bookmark"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Hapus bookmark"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Perlihatkan semua bookmark"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Tutup file ini"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Informasi file"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Jalankan perintah"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Bantuan"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Buka dokumen"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Tutup zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Cetak dokumen"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Simpan dokumen"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Simpan dokumen (dan menimpa berkas)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Simpan lampiran"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Set offset halaman"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Tandai lokasi sekarang dalam dokumen"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Hapus tanda terpilih"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Jangan menyorot hasil cari sekarang"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Sorot hasil pencarian sekarang"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Tunjukan informasi versi"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Gagal menjalankan program xdg-open"
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Link: halaman %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Link: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Link: Tidak valid"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Mengembalikan jendela sesuai dengan xid yang ditentukan (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Path ke direktori konfigurasi"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Path ke direktori data"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Path ke direktori plugin"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Jalankan pada latar"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Kata sandi dokumen"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Nomor halaman tujuan"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Tingkat log (debug, info, peringatan, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Cetak informasi versi"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Synctex editor (diteruskan ke perintah synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Memuat....."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Salin gambar"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Simpan gambar sebagai"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Dokumen ini tidak mempunyai indeks"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Tidak berjudul]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
"Tidak dapat membaca berkas dari stdin dan menulisnya ke berkas sementar"
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr "Tipe berkas tidak didukung. Silakan memasang plugin yang dibutuhkan."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Dokumen tidak mempunyai laman apapun"
zathura-0.3.8/po/it.po 0000664 0001750 0001750 00000035141 13216464200 015302 0 ustar sebastian sebastian # zathura - language file (Italian)
# See LICENSE file for license and copyright information
#
# Translators:
# TheLemonMan , 2015
# TheLemonMan , 2012
# Simone Guercio , 2015
# TheLemonMan , 2012
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2015-10-15 23:06+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Italian (http://www.transifex.com/projects/p/zathura/language/"
"it/)\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.5\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr "'%s' non può essere 0. Imposta ad 1."
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Input inserito '%s' non valido."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Indice inserito '%s' non valido."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Nessun documento aperto."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Numero di argomenti errato."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Impossibile creare il segnalibro: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Impossibile creare il segnalibro: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Segnalibro aggiornato con successo: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Segnalibro creato con successo: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Segnalibro rimosso: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Impossibile rimuovere il segnalibro: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Nessun segnalibro corrispondente: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Titolo"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Autore"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Argomento"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Parole chiave"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Creato da"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Prodotto da"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Data di creazione"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Data di modifica"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Nessun' informazione disponibile."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Numero di argomenti eccessivo."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Nessun argomento specificato."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Documento salvato."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Impossibile salvare il documento."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Numero di argomenti non valido."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Impossibile salvare l' allegato '%s' in '%s'"
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Allegato '%s' salvato in '%s'"
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Immagine '%s' salvata come '%s'"
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Impossibile salvare l' immagine '%s' come '%s'"
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Immagine sconosciuta '%s'"
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Immagine o allegato sconosciuti '%s"
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "L' argomento dev' essere un numero."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Pagina %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Allegati"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Immagini"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Backend del database"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr ""
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Spaziatura tra le pagine"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Numero di pagine per riga"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr ""
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Zoom minimo"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Zoom massimo"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Numero massimo di pagine da mantenere nella cache"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Numero di posizioni da mantenere nella jumplist"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr ""
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr ""
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr ""
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr ""
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Ricolora le pagine"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Scrolling continuo"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Centra orizzontalmente i risultati"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr ""
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr ""
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr ""
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Mostra file e cartelle nascosti"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Mostra cartelle"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Apri sempre alla prima pagina"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Evidenzia i risultati della ricerca"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Abilita la ricerca incrementale"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Mostra il numero di pagina nel titolo della finestra"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Abilita il supporto per synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "Abilita il servizio D-Bus"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr "Attiva la notifica dopo aver selezionato del testo"
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Aggiungi un segnalibro"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Elimina un segnalibro"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Mostra i segnalibri"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Chiudi il file corrente"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Mostra le informazioni sul file"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Esegui un comando"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Mostra l' aiuto"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Apri un documento"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Chiudi zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Stampa il documento"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Salva il documento"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Salva il documento (e sovrascrivi)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Salva allegati"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Imposta l' offset della pagina"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Segna la posizione attuale all'interno del documento"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Non evidenziare i risultati della ricerca in corso"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Evidenzia i risultati della ricerca in corso"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Mostra informazioni sulla versione"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Impossibile eseguire xdg-open."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Link: pagina %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Link: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Link: non valido"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Percorso della directory della configurazione"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Percorso della directory dei dati"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr "Percorso della cartella di cache"
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Percorso della directory contenente i plugin"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Crea un processo separato"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Password del documento"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Livello di log (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Mostra le informazioni sul file"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Caricamento..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Copia immagine"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Salva immagine come"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Impossibile stampare: %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Questo documento non contiene l' indice"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Nessun nome]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
"Impossibile leggere il file dall' stdin e scriverlo in un file temporaneo."
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
"Tipo di file non supportato. Per favore, installa il plugin necessario."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Il documento non contiene alcuna pagina"
zathura-0.3.8/po/lt.po 0000664 0001750 0001750 00000035302 13216464200 015304 0 ustar sebastian sebastian # zathura - language file (Lithuanian)
# See LICENSE file for license and copyright information
#
# Translators:
# gns_ank , 2013
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2015-10-15 23:06+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Lithuanian (http://www.transifex.com/projects/p/zathura/"
"language/lt/)\n"
"Language: lt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
"%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Poedit 1.8.5\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Netinkama įvestis: „%s“."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Duotas netinkamas indeksas: „%s“."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Nėra atidarytų dokumentų."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Duotų parametrų skaičius yra neteisingas."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Žymė negalėjo būti atnaujinta: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Žymė negalėjo būti sukurta: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Žymė sėkmingai atnaujinta: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Žymė sėkmingai sukurta: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Žymė ištrinta: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Žymė negalėjo būti panaikinta: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Nėra tokios žymės: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Pavadinimas"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Autorius"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Raktažodžiai"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Gamintojas"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Sukūrimo data"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Pakeitimo data"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Nėra informacijos."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Per daug parametrų."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Parametrai neduoti."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Dokumentas išsaugotas."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Dokumento išsaugoti nepavyko."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Neteisingas parametrų skaičius."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Priedas „%s“ negalėjo būti įrašytas į „%s“."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Priedas „%s“ įrašytas į „%s“."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Atvaizdas „%s“ įrašytas į „%s“."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Atvaizdas „%s“ negalėjo būti įrašytas į „%s“,"
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Nežinomas atvaizdas „%s“."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Nežinomas priedas ar atvaizdas „%s“."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Parametras turi būti skaičius."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "%d puslapis"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Priedai"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Atvaizdai"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Duomenų bazės posistemė"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Priartinimo žingsnis"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Užpildymas tarp puslapių"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Puslapių skaičius eilutėje"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Pirmo puslapio stulpelis"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Slinkties žingsnis"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Horizontalios slinksties žingsnis"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Mažiausias priartinimas"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Didžiausias priartinimas"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Puslapių limitas spartinančioje atmintinėje"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Spalvų keitimas (tamsi spalva)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Spalvų keitimas (šviesi spalva)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Žymos spalva"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Žymos spalva (aktyvi)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "„Kraunama ...“ fono spalva"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "„Kraunama ...“ pagrindinė spalva"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Pakeisti spalvas"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr ""
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Puslapių ribas atpažįstanti slinktis"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Padidinti puslapių skaičių eilutėje"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Žymų skaidrumas"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Atvaizduoti „Kraunama ...“"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Prisitaikyti atidarant bylą"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Rodyti paslėptus failus ir katalogus"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Rodyti katalogų sąrašą"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Visada atverti pirmą puslapį"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Pažymėti paieškos rezultatus"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Įjungti prieauginę paiešką"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Išvalyti paieškos rezultatus nutraukiant"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Rodyti puslapio skaičių lango pavadinime"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Naudoti bylos vardą būsenos juostoje"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Įjungti synctex palaikymą"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Pridėti žymę"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Ištrinti žymę"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Žymių sąrašas"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Uždaryti dabartinę bylą"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Rodyti bylos informaciją"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Rodyti pagalbą"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Atidryti dokumentą"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Uždaryti zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Atspausdinti dokumentą"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Išsaugoti dokumentą"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Išsaugoti dokumentą (ir priverstinai perašyti)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Išsaugoti priedus"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Nustatyti puslapio poslinkį"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Pažymėti dabartinę dokumento vietą"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Ištrinti šias žymes"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Nežymėti dabartinės paieškos rezultatų"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Pažymėti dabartinės paieškos rezultatus"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Rodyti versijos informaciją"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Klaida xdg-open paleidime."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Nuoroda: %d puslapis"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Nuoroda: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Neteisinga nuoroda"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Konfigūracinių failų aplanko adresas"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Duomenų aplanko adresas"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Įskiepių aplanko adresas"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr ""
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Dokumento slaptažodis"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Pereiti į puslapį"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Registravimo lygis (derinimas, informacija, įspėjimai, klaidos)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Spausdinti versijos informaciją"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Synctex redaktorius (naudojama synctex komandoje)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Kraunama..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Kopijuoti atvaizdą"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Irašyti atvaizdą kaip"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Šit dokumentas neturi turinio"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Bevardis]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr "Bylos tipas nepalaikomas. Įdiekite tam skirtus įskiepius."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Dokumente puslapių nėra"
zathura-0.3.8/po/no.po 0000664 0001750 0001750 00000034347 13216464200 015311 0 ustar sebastian sebastian # zathura - language file (Norwegian)
# See LICENSE file for license and copyright information
#
# Translators:
# maccyber , 2014
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2015-10-15 23:06+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Norwegian (http://www.transifex.com/projects/p/zathura/"
"language/no/)\n"
"Language: no\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.5\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Ugyldig inndata '%s' gitt."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Ugyldig index '%s' gitt."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Ingen dokumenter åpnet."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Ugyldig nummer av argumenter gitt."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Kunne ikke oppdatere bokmerke: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Kunne ikke lage bokmerke: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Bokmerke er oppdatert: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Bokmerket er laget: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Fjernet bokmerke: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Kunne ikke fjerne bokmerke: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Bokmerke eksisterer ikke: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Tittel"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Forfatter"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Subjekt"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Nøkkelord"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Laget av"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Produsent"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Laget dato"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Modifisert dato"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Ingen informasjon tilgjengelig."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "For mange argumenter."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Ingen argumenter gitt."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Dokumentet er lagret."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Kunne ikke lagre dokumentet."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Ugyldig nummer av argumenter."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Kunne ikke skrive vedlegg '%s' til '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Skrev vedlegg '%s' til '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Skrev bilde '%s' til '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Kunne ikke skrive bilde '%s' til '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Ukjent bilde '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Ukjent vedlegg eller bilde '%s'."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Argumentet må være et tall."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Side %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Vedlegg"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Bilder"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Database backend"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Zoom nivå"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Avstand mellom sider"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Nummer av sider per rad"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Skrolle nivå"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Zoom minimum"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Zoom maximum"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Maksimum antall sider å holde i mellomlagringen"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Antall posisjoner å huske i hopp-til-listen"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Om-farger (mørk farge)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Om-farge (lys farge)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Farge for utheving"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Farge for utheving (aktiv)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "'Laster ...' bakgrunnsfarge"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "'Laster ...' forgrunnsfarge"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Om-farge sider"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr ""
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Horisontalsentrert zoom"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr "La zoom bli endret når følgende linker"
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Sentrer resultatene horisontalt"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Klarhet for utheving"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Render 'Laster ...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Juster til når du åpner filen"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Vis skjulte filer og mapper"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Vis mapper"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Alltid åpne på første side"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Uthev søkeresultater"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Stryk ut søkeresulteter ved avbrytelse"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Vis nummer av sider i vinduestittelen"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "Aktiv D-Bus servicen"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Legg til bokmerke"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Slett bokmerke"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "List alle bokmerker"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Lukk den gjeldende filen"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Vis filinformasjon"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Kjør en kommando"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Vis hjelp"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Åpne dokument"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Lukk zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Skriv ut dokument"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Lagre dokument"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Lagre dokument (og tving til å skrive over)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Lagre vedlegg"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr ""
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Marker nåværende lokalasjon i dokumentet"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Slett spesifiserte merker"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Ikke uthev gjeldende søkeresultater"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Uthev følgende søkeresultater"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Vis versjonsinformasjon"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Klarte ikke å kjøre xdg-open."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Link: side %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Link: Ugyldig"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Sti til konfigureringsmappe"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Sti til data-mappe"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Sti til mapper som inneholder plugins"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr ""
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Dokument passord"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Sidetall å gå til"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Logg nivå (diagnostisering, info, advarsler, feil)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Skriv ut versjonsinformasjon"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr "Start i ikke-standard modus"
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Laster..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Kopier bilde"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Lagre bilde som"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Utskrift feilet: %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Dette dokumenetet inneholder ikke noen index"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Inget navn]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr "Kunne ikke lese fil fra stdin og skrive til temporærfil."
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr "Usupportert filtype. Vennligst innstaller den nødvendige pluginen."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Dokumentet inneholder ingen sider"
zathura-0.3.8/po/pl.po 0000664 0001750 0001750 00000035474 13216464200 015312 0 ustar sebastian sebastian # zathura - language file (Polish)
# See LICENSE file for license and copyright information#
#
# Translators:
# Łukasz Hryniuk , 2013
# p , 2012,2014
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:09+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Polish (http://www.transifex.com/projects/p/zathura/language/"
"pl/)\n"
"Language: pl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Nieprawidłowy argument: %s"
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Nieprawidłowy indeks: %s"
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Nie otwarto żadnego pliku"
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Nieprawidłowa liczba parametrów polecenia"
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Nie można stworzyć zakładki: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Nie można stworzyć zakładki: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Zaktualizowano zakładkę: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Utworzono zakładkę: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Usunięto zakładkę: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Nie można usunąć zakładki: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Nie znaleziono zakładki: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Tytuł"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Autor"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Temat"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Słowa kluczowe"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Twórca"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Producent"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Data utworzenia"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Data modyfikacji"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Brak informacji o pliku"
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Za dużo parametrów polecenia"
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Nie podano parametrów polecenia"
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Zapisano dokument"
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Błąd zapisu"
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Niewłaściwa liczba parametrów polecenia"
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Nie można dodać załącznika %s do pliku %s"
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Zapisano załącznik %s do pliku %s"
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Obrazek %s zapisano do pliku %s"
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Nie można dodać obrazka %s do pliku %s"
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Nieznany obrazek '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Nieznany załącznik lub obrazek '%s'."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Parametr polecenia musi być liczbą"
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Strona %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Załączniki"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Obrazki"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Baza danych"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Skok powiększenia"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Odstęp pomiędzy stronami"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Liczba stron w wierszu"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Skok przewijania"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Skok przewijania poziomego"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Minimalne powiększenie"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Maksymalne powiększenie"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Maksymalna liczba stron w pamięci podręcznej"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Ciemny kolor negatywu"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Jasny kolor negatywu"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Kolor wyróżnienia"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Kolor wyróżnienia bieżącego elementu"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "Kolor tła komunikatu „Wczytywanie pliku...”"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "Kolor komunikatu „Wczytywanie pliku...”"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Negatyw"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr "Dla negatywu zachowaj oryginalny odcień i zmień tylko jasność"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Zawijanie dokumentu"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Zwiększ liczbę stron w wierszu"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Powiększenie względem środka"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Poziome wyśrodkowanie wyniku"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Przezroczystość wyróżnienia"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Wyświetlaj: „Wczytywanie pliku...”"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Dopasowanie widoku pliku"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Wyświetl ukryte pliki i katalogi"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Wyświetl katalogi"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Zawsze otwieraj na pierwszej stronie"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Podświetl wyniki wyszukiwania"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Włącz wyszukiwanie przyrostowe"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Wyczyść wyniki wyszukiwania po przerwaniu"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Pokaż nazwę pliku w pasku tytułu"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Wyświetl numer strony w pasku tytułu"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Nazwa pliku w pasku stanu"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Włącz synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "Uruchom serwis D-Bus"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Dodaj zakładkę"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Usuń zakładkę"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Wyświetl zakładki"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Zamknij plik"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Wyświetl informacje o pliku"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Wykonaj polecenie"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Wyświetl pomoc"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Otwórz plik"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Zakończ"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Wydrukuj"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Zapisz"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Zapisz (nadpisując istniejący plik)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Zapisz załączniki"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Ustaw przesunięcie numerów stron"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Zaznacz aktualną pozycję w dokumencie"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Skasuj określone zakładki"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Nie podświetlaj aktualnych wyników wyszukiwania "
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Podświetl aktualne wyniki wyszukiwania"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Wyświetl informacje o wersji"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Wystąpił problem z uruchomieniem xdg-open"
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Link: strona %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Link: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Nieprawidłowy link"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Przypisz proces do rodzica o danym xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Położenie katalogu konfiguracyjnego"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Położenie katalogu danych"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Położenie katalogu wtyczek"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Forkuj w tle"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Hasło dokumentu"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Szczegółowość komunikatów (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Wyświetl informacje o wersji"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Edytor synctex (przekierowanie do komendy synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Wczytywanie pliku..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Skopiuj obrazek"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Zapisz obrazek jako"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Nie można wydrukować: %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Dokument nie zawiera indeksu"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[bez nazwy]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr "Niewspierany rodzaj pliku. Zainstaluj wymagane wtyczki"
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Dokument nie zawiera żadnej strony"
zathura-0.3.8/po/pt_BR.po 0000664 0001750 0001750 00000036576 13216464200 015711 0 ustar sebastian sebastian # zathura - language file (Portuguese (Brazil))
# See LICENSE file for license and copyright information
#
# Translators:
# salmora8 , 2012-2014
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:09+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/projects/p/"
"zathura/language/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Dados de entrada inválida '%s' ."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Dados de índice invalido '%s'."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Nenhum documento aberto."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Número de argumentos dados inválidos."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Não foi possível criar favorito: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Não foi possível criar favorito: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Favorito atualizado com sucesso: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Favorito criado com sucesso: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Favorito removido: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Falha ao remover favorito: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Não há favoritos: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Título"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Autor"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Assunto"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Palavras-chave"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Criador"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Produtor"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Data de criação"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Data de modificação"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Nenhuma informação disponível."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Muitos argumentos."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Nenhum argumento dado."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Documento salvo."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Falha ao salvar o documento."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Número de argumento invalido."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Não foi possível gravar anexo '%s' para '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Escreveu anexo '%s' para '%s'."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Escreveu imagem '%s' para '%s'."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Não foi possível gravar imagem '%s' para '%s'."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Imagem desconhecida '%s'."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Anexo desconhecido ou imagem '%s'."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "O argumento deve ser um número."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Página %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Anexos"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Imagens"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Fim da base de dados"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Grau de Zoom"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Preenchimento entre páginas"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Número de paginas por linha"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Coluna da primeira página"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Fase de Rolagem"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Etapa de rolagem horizontal"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Sobreposição de rolagem de página inteira"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Zoom minimo"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Zoom máximo"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Número máximo de páginas para manter no cache"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Numero de posições para lembrar na lista de salto"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Recolorindo (cor escura)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Recolorindo (cor clara)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Cor para destacar"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Cor para destacar (ativo)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "'Carregando ...' cor de fundo"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "'Carregando ...' cor de primeiro plano"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Recolorir páginas"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
"Quando recolorir, manter tonalidade original e ajustar somente a luminosidade"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Rolagem envoltório"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Rolagem de página consciente"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Numero de avanço de paginas por linha"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Zoom centrado horizontalmente"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr "Alinhe destino do link à esquerda"
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr "Zoom será mudado quando seguir os links"
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Resultado centrado horizontalmente"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Transparência para destacar"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Renderizando 'Carregando...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Ajuste para quando abrir o arquivo"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Mostrar arquivos ocultos e diretórios"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Mostrar diretórios"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Sempre abrir na primeira página"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Destaque resultados de busca"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Ativar pesquisa incremental"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Limpar resultados de busca ou abortar"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Usar nome do arquivo na barra de titulo"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Exibir o número da página no título da janela."
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Use o nome do arquivo na barra de status"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Ativar suporte synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "Habilitar serviço D-Bus"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
"A área de transferência em que o dados selecionados com o mouse vão ser "
"escritos"
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Adicionar um favorito"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Deletar um favorito"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Listar todos favoritos"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Fechar arquivo atual"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Mostrar informações do arquivo"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Executar um comando"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Mostrar ajuda"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Abrir documento"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Fechar zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Imprimir documento"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Salvar documento"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Salvar documento (e forçar sobrescrever)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Salvar anexos"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Definir deslocamento da página"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Marcar localização atual no documento"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Apagar as marcas especificadas"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Não destacar resultados de busca atual"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Destacar resultado de busca atual"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Mostrar informações sobre a versão"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Falha ao executar xdg-open."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Link: página %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Link: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Link: Inválido"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Reparar a janela especificada por xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Caminho de diretório para configuração"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Caminho para diretório de dados"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Caminho de diretório que contenham plugins"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Deslocar no fundo"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Senha do documento"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Número da página para ir"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Nível de log (depurar, informação, aviso, erro)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Imprimir informações sobre a versão"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Editor synctex (encaminhado para o comando synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr "Mover para determinada posição synctex"
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr "Destacar determinada posição no determinado processo"
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr "Começar em um modo não padrão"
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Carregando..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Copiar imagem"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Salvar imagem para"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Impressão falhou: %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Este documento não contem qualquer índice"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Sem nome]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
"Não foi possível ler o arquivo a partir de stdin e gravá-lo em um arquivo "
"temporário."
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
"Formato de arquivo não suportado. Por favor, instale o plugin necessário."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "Documento não contém quaisquer páginas"
zathura-0.3.8/po/ru.po 0000664 0001750 0001750 00000044144 13216464200 015317 0 ustar sebastian sebastian # zathura - language file (Russian)
# See LICENSE file for license and copyright information
#
# Translators:
# AlexanderR , 2013
# Alissa , 2013
# Mikhail Krutov <>, 2012
# vp1981 , 2013
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:09+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Russian (http://www.transifex.com/projects/p/zathura/language/"
"ru/)\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Неправильный ввод: %s."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Получен неверный индекс: %s."
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Нет открытых документов."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Указано неверное число аргументов."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Не могу создать закладку %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Не удалось создать закладку %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Закладка %s успешно обновлена"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Закладка %s успешно создана"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Закладка %s удалена"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Не удалось удалить закладку %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Закладки %s не существует"
#: ../zathura/commands.c:162
msgid "Title"
msgstr "Заголовок"
#: ../zathura/commands.c:163
msgid "Author"
msgstr "Автор"
#: ../zathura/commands.c:164
msgid "Subject"
msgstr "Тема"
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr "Ключевые слова"
#: ../zathura/commands.c:166
msgid "Creator"
msgstr "Создатель"
#: ../zathura/commands.c:167
msgid "Producer"
msgstr "Производитель"
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr "Время создания"
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr "Время изменения"
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Нет доступной информации."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Слишком много аргументов."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Отсутствуют аргументы."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Документ сохранён."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Не удалось сохранить документ."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Неверное количество аргументов."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Не удалось сохранить приложенный файл «%s» в «%s»."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Файл «%s» сохранён в «%s»."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "Изображение «%s» сохранено в «%s»."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "Не удалось записать изображение «%s» в «%s»."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Неизвестное изображение «%s»."
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Неизвестное вложение или изображение «%s»."
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Аргумент должен быть числом."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Страница %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Прикреплённые файлы"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Изображения"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Бэкэнд базы данных"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Шаг увеличения"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Разрыв между страницами"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Количество страниц в ряд"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "Столбец первой страницы"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Шаг прокрутки"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Шаг горизонтальной прокрутки"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Перекрытие страниц при прокрутке"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Минимальное увеличение"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Максимальное увеличение"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr "Максимальное количество страниц хранимых в кэше"
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Длина истории переходов"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Перекрашивание (тёмные тона)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Перекрашивание (светлые тона)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Цвет для подсветки"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Цвет для подсветки (активной)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr "Цвет фона загрузочной заставки"
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr "Цвет загрузочной заставки"
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Перекрасить страницы"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr "При перекраске сохранять оттенок и изменять только осветление"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Плавная прокрутка"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr "Постраничная прокрутка"
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Увеличить количество страниц в ряду"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Центрировать увеличение по горизонтали"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr "Выровнять цель ссылки по левому краю"
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr "Разрешить изменять размер при следовании по ссылкам"
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr "Центрировать результат по горизонтали"
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Прозрачность подсветки"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Рендер «Загружается ...»"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Подогнать размеры при открытии документа"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Показывать скрытые файлы и каталоги"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Показывать каталоги"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Всегда открывать на первой странице"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Подсветить результаты поиска"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Включить инкрементальный поиск"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Сбросить результаты при отмене поиска"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Использовать базовое имя файла в заголовке"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr "Показывать номер страницы в заголовке"
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr "Использовать базовое имя файла в строке состояния"
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr "Включить поддержку synctex"
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr "Включить сервис D-Bus"
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr "Буфер для записи данных из области выделенных мышкой"
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Добавить закладку"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Удалить закладку"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Показать все закладки"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Закрыть текущий файл"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Показать информацию о файле"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Выполнить команду"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Помощь"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Открыть документ"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Выход"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Печать"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Сохранить документ"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Сохранить документ (с перезаписью)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Сохранить прикреплённые файлы"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Сохранить смещение страницы"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Пометить текущую позицию в документе"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Удалить указанные пометки"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Не подсвечивать результаты текущего поиска"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Подсветить результаты текущего поиска"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Показать информацию о версии файла"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Не удалось запустить xdg-open"
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr "Ссылка: страница %d"
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr "Ссылка: %s"
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr "Ссылка: неправильная"
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Сменить материнское окно на окно, указанное в xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Путь к каталогу с настройкой"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Путь к каталогу с данными"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Путь к каталогу с плагинами"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Запустить в фоне"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Пароль документа"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr "Перейти к странице номер"
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Уровень журналирования (debug, info, warning, error)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Показать информацию о файле"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Редактор для synctex (передаётся далее программе synctex)"
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr "Перейти к указанному положению synctex"
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr "Подсветка заданного положения в заданном процессе"
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr "Запустить в специальном режиме"
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Загрузка..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Скопировать изображение"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Сохранить изображение как"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr "Не удалось напечатать %s"
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "В документе нет индекса"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Без названия]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
"Не удалось прочитать файл со стандартного входа и записать его во временный "
"файл."
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr "Тип файла не поддерживается. Установите соответствующий плагин."
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr "В документе нет страниц"
zathura-0.3.8/po/ta_IN.po 0000664 0001750 0001750 00000035322 13216464200 015661 0 ustar sebastian sebastian # zathura - language file (Tamil (India))
# See LICENSE file for license and copyright information
#
# Translators:
# mankand007 , 2012
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2014-01-31 09:37+0000\n"
"Last-Translator: mankand007 \n"
"Language-Team: Tamil (India) (http://www.transifex.net/projects/p/zathura/"
"language/ta_IN/)\n"
"Language: ta_IN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "கொடுக்கப்பட்ட உள்ளீடு(input) '%s' தவறு"
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "கொடுக்கப்பட்ட index '%s' தவறு"
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "எந்தக் ஆவணமும் திறக்கப்படவில்லை"
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "கொடுக்கப்பட்ட arguments-களின் எண்ணிக்கை தவறு"
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Bookmark-ஐ உருவாக்க முடியவில்லை: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Bookmark-ஐ உருவாக்க முடியவில்லை: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Bookmark வெற்றிகரமாக நிகழ்நிலை(update) படுத்தப்பட்டது: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Bookmark வெற்றிகரமாக உருவாக்கப்பட்டது: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Bookmark அழிக்கப்பட்டது: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Bookmark-ஐ அழிக்க இயலவில்லை: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "அந்தப் பெயரில் எந்த bookmark-ம் இல்லை: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "எந்தத் தகவலும் இல்லை"
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Argumentகளின் எண்ணிக்கை மிகவும் அதிகம்"
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "எந்த argument-ம் தரப்படவில்லை"
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "கோப்பு சேமிக்கப்பட்டது"
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "ஆவணத்தை சேமிக்க இயலவில்லை"
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "கொடுக்கப்பட்ட argument-களின் எண்ணிக்கை தவறு"
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr ""
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr ""
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Argument ஒரு எண்ணாக இருக்க வேண்டும்"
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr ""
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "இணைப்புகளைச் சேமிக்கவும்"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr ""
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr ""
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Zoom அமைப்பு"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "இரு பக்கங்களுக்கிடையில் உள்ள நிரப்பல்(padding)"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "ஒரு வரிசையில் எத்தனை பக்கங்களைக் காட்ட வேண்டும்"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "திரை உருளல்(scroll) அளவு"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "முடிந்தவரை சிறியதாகக் காட்டு"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "முடிந்தவரை பெரிதாகக் காட்டு"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr ""
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr ""
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr ""
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr ""
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr ""
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr ""
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr ""
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr ""
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr ""
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr ""
#: ../zathura/config.c:218
msgid "Show directories"
msgstr ""
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr ""
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr ""
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "புதிய bookmark உருவாக்கு"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Bookmark-ஐ அழித்துவிடு"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "அனைத்து bookmark-களையும் பட்டியலிடு"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr ""
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "ஆவணம் பற்றிய தகவல்களைக் காட்டு"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "உதவியைக் காட்டு"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "ஒரு ஆவணத்தைத் திற"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "zathura-வை விட்டு வெளியேறு"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "ஆவணத்தை அச்சிடு"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "ஆவணத்தை சேமிக்கவும்"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr ""
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "இணைப்புகளைச் சேமிக்கவும்"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr ""
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr ""
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr ""
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr ""
#: ../zathura/config.c:459
msgid "Show version information"
msgstr ""
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "xdg-open-ஐ இயக்க முடியவில்லை"
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr ""
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr ""
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr ""
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr ""
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr ""
#: ../zathura/main.c:152
msgid "Document password"
msgstr ""
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr ""
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "ஆவணம் பற்றிய தகவல்களைக் காட்டு"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr ""
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "படத்தை ஒரு பிரதியெடு"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr ""
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "இந்த ஆவணத்தில் எந்த index-ம் இல்லை"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "பெயரற்ற ஆவணம்"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/tr.po 0000664 0001750 0001750 00000034355 13216464200 015321 0 ustar sebastian sebastian # zathura - language file (Turkish)
# See LICENSE file for license and copyright information
#
# Translators:
# , 2012.
# , 2012.
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:09+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Turkish (http://www.transifex.net/projects/p/zathura/language/"
"tr/)\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Hatalı girdi '%s'"
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Hatalı dizin '%s'"
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Açık belge yok."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Yanlış sayıda argüman"
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Yer imi yaratılamadı: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Yer imi yaratılamadı: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Yer imi başarıyla güncellendi: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Yer imi yaratıldı: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Yer imi silindi: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Yer imi silinemedi: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Böyle bir yer imi yok: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Bilgi mevcut değil."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Çok fazla sayıda argüman."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Argüman verilmedi."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Belge kaydedildi."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Belge kaydedilemedi."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Yanlış sayıda argüman."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazılamadı."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazıldı."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazıldı."
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazılamadı."
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr "Tanınmayan resim dosyası '%s'"
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Tanınmayan eklenti veya resim dosyası '%s'"
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Argüman bir sayı olmalı."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr "Sayfa %d"
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr "Ekleri kaydet"
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr "Resimler"
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Veritabanı arkayüzü"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Yakınlaşma/uzaklaşma aralığı"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Sayfalar arasındaki boşluk"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Satır başına sayfa sayısı"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr "İlk sayfanın sütunu"
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Kaydırma aralığı"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr "Yatay kaydırma adımı"
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr "Tam ekran kaydırma kaplaması"
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "En fazla uzaklaşma"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "En fazla yakınlaşma"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr "Atlama listesinde hatırlanacak pozisyon sayısı"
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Renk değişimi (koyu renk)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Renk değişimi (açık renk)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "İşaretleme rengi"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "İşaretleme rengi (etkin)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Sayga rengini değiştir"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr "Yeniden renklendirirken renk değerini tut ve sadece parlaklığı ayarla"
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Kaydırmayı sarmala"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr "Satır başına sayfa sayısı"
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr "Yatay olarak ortalanmış büyütme"
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Ön plana çıkarmak için saydamlaştır"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "'Yüklüyor ...' yazısını göster"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Dosya açarken ayarla"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Gizli dosyaları ve dizinleri göster"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Dizinleri göster"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Her zaman ilk sayfayı aç"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr "Arama sonuçlarını vurgula"
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr "Artımlı aramayı etkinleştir"
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr "Kapatınca arama sonuçlarını temizle"
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr "Pencere başlığı olarak dosyanın adını kullan"
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Yer imi ekle"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Yer imi sil"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Yer imlerini listele"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Geçerli dosyayı kapat"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Dosya bilgisi göster"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr "Bir komut çalıştır"
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Yardım bilgisi göster"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Belge aç"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Zathura'yı kapat"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Belge yazdır"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Belgeyi kaydet"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Belgeyi kaydet (ve sormadan üzerine yaz)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Ekleri kaydet"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Sayfa derinliğini ayarla"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr "Bu belgede bu konumu işaretle"
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr "Seçilen işaretlemeleri sil"
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr "Şuanki arama sonuçlarını vurgulama"
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr "Şuanki arama sonuçlarını vurgula"
#: ../zathura/config.c:459
msgid "Show version information"
msgstr "Versiyon bilgisi göster"
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "xdg-open çalıştırılamadı"
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Xid tarafından belirlendiği gibi bir üst seviye pencereye bağlı (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Ayar dizini adresi"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Veri dizini adresi"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Eklentileri içeren dizinin adresi"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Arka planda işlemden çocuk oluştur"
#: ../zathura/main.c:152
msgid "Document password"
msgstr "Belge şifresi"
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Kayıt seviyesi (hata ayıklama, bilgi, uyarı, hata)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Dosya bilgisi göster"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr "Yüklüyor ..."
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Resim kopyala"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr "Resmi farklı kaydet"
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Bu belge fihrist içermiyor"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[İsimsiz]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/po/uk_UA.po 0000664 0001750 0001750 00000035536 13216464200 015702 0 ustar sebastian sebastian # zathura - language file (Ukrainian (Ukrain))
# See LICENSE file for license and copyright information
#
# Translators:
# sevenfourk , 2012
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2017-06-25 21:55+0200\n"
"PO-Revision-Date: 2016-04-18 21:08+0200\n"
"Last-Translator: Sebastian Ramacher \n"
"Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/projects/p/"
"zathura/language/uk_UA/)\n"
"Language: uk_UA\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Poedit 1.8.7.1\n"
#: ../zathura/callbacks.c:233
#, c-format
msgid "'%s' must not be 0. Set to 1."
msgstr ""
#: ../zathura/callbacks.c:315
#, c-format
msgid "Invalid input '%s' given."
msgstr "Вказано невірний аргумент: %s."
#: ../zathura/callbacks.c:351
#, c-format
msgid "Invalid index '%s' given."
msgstr "Вказано невірний індекс: %s"
#: ../zathura/callbacks.c:590
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr ""
#: ../zathura/commands.c:36 ../zathura/commands.c:76 ../zathura/commands.c:103
#: ../zathura/commands.c:152 ../zathura/commands.c:268
#: ../zathura/commands.c:298 ../zathura/commands.c:324
#: ../zathura/commands.c:424 ../zathura/commands.c:551
#: ../zathura/shortcuts.c:413 ../zathura/shortcuts.c:1225
#: ../zathura/shortcuts.c:1260 ../zathura/shortcuts.c:1287
msgid "No document opened."
msgstr "Документ не відкрито."
#: ../zathura/commands.c:42 ../zathura/commands.c:82 ../zathura/commands.c:109
#: ../zathura/commands.c:429
msgid "Invalid number of arguments given."
msgstr "Вказана невірна кількість аргументів."
#: ../zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "Не можу створити закладку: %s"
#: ../zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "Не можу створити закладку: %s"
#: ../zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "Закладку вдало поновлено: %s"
#: ../zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "Закладку створено вдало: %s"
#: ../zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "Закладку видалено: %s"
#: ../zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "Видалення закладки невдалося: %s"
#: ../zathura/commands.c:116
#, c-format
msgid "No such bookmark: %s"
msgstr "Такої закладки немає: %s"
#: ../zathura/commands.c:162
msgid "Title"
msgstr ""
#: ../zathura/commands.c:163
msgid "Author"
msgstr ""
#: ../zathura/commands.c:164
msgid "Subject"
msgstr ""
#: ../zathura/commands.c:165
msgid "Keywords"
msgstr ""
#: ../zathura/commands.c:166
msgid "Creator"
msgstr ""
#: ../zathura/commands.c:167
msgid "Producer"
msgstr ""
#: ../zathura/commands.c:168
msgid "Creation date"
msgstr ""
#: ../zathura/commands.c:169
msgid "Modification date"
msgstr ""
#: ../zathura/commands.c:174 ../zathura/commands.c:196
msgid "No information available."
msgstr "Інформація недоступна."
#: ../zathura/commands.c:234
msgid "Too many arguments."
msgstr "Забагато аргументів."
#: ../zathura/commands.c:245
msgid "No arguments given."
msgstr "Жодного аргументу не вказано."
#: ../zathura/commands.c:304 ../zathura/commands.c:330
msgid "Document saved."
msgstr "Документ збережено."
#: ../zathura/commands.c:306 ../zathura/commands.c:332
msgid "Failed to save document."
msgstr "Документ не вдалося зберегти."
#: ../zathura/commands.c:309 ../zathura/commands.c:335
msgid "Invalid number of arguments."
msgstr "Невірна кількість аргументів."
#: ../zathura/commands.c:448
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Неможливо записати прикріплення '%s' до '%s'."
#: ../zathura/commands.c:450
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "Прикріплення записано %s до %s."
#: ../zathura/commands.c:494
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:496
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr ""
#: ../zathura/commands.c:503
#, c-format
msgid "Unknown image '%s'."
msgstr ""
#: ../zathura/commands.c:507
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr ""
#: ../zathura/commands.c:564
msgid "Argument must be a number."
msgstr "Аргумент повинен бути цифрою."
#: ../zathura/completion.c:283
#, c-format
msgid "Page %d"
msgstr ""
#: ../zathura/completion.c:326
msgid "Attachments"
msgstr ""
#. add images
#: ../zathura/completion.c:357
msgid "Images"
msgstr ""
#. zathura settings
#: ../zathura/config.c:145
msgid "Database backend"
msgstr "Буфер бази"
#: ../zathura/config.c:146
msgid "File monitor backend"
msgstr ""
#: ../zathura/config.c:148
msgid "Zoom step"
msgstr "Збільшення"
#: ../zathura/config.c:150
msgid "Padding between pages"
msgstr "Заповнення між сторінками"
#: ../zathura/config.c:152
msgid "Number of pages per row"
msgstr "Кількість сторінок в одному рядку"
#: ../zathura/config.c:154
msgid "Column of the first page"
msgstr ""
#: ../zathura/config.c:156
msgid "Scroll step"
msgstr "Прокручування"
#: ../zathura/config.c:158
msgid "Horizontal scroll step"
msgstr ""
#: ../zathura/config.c:160
msgid "Full page scroll overlap"
msgstr ""
#: ../zathura/config.c:162
msgid "Zoom minimum"
msgstr "Максимальне зменшення"
#: ../zathura/config.c:164
msgid "Zoom maximum"
msgstr "Максимальне збільшення"
#: ../zathura/config.c:166
msgid "Maximum number of pages to keep in the cache"
msgstr ""
#: ../zathura/config.c:168
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
#: ../zathura/config.c:170
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../zathura/config.c:172
msgid "Recoloring (dark color)"
msgstr "Перефарбування (темний колір)"
#: ../zathura/config.c:173
msgid "Recoloring (light color)"
msgstr "Перефарбування (світлий колір)"
#: ../zathura/config.c:174
msgid "Color for highlighting"
msgstr "Колір для виділення"
#: ../zathura/config.c:176
msgid "Color for highlighting (active)"
msgstr "Колір для виділення (активний)"
#: ../zathura/config.c:178
msgid "'Loading ...' background color"
msgstr ""
#: ../zathura/config.c:180
msgid "'Loading ...' foreground color"
msgstr ""
#: ../zathura/config.c:183
msgid "Index mode foreground color"
msgstr ""
#: ../zathura/config.c:184
msgid "Index mode background color"
msgstr ""
#: ../zathura/config.c:185
msgid "Index mode foreground color (active element)"
msgstr ""
#: ../zathura/config.c:186
msgid "Index mode background color (active element)"
msgstr ""
#: ../zathura/config.c:189
msgid "Recolor pages"
msgstr "Змінити кольори"
#: ../zathura/config.c:191
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../zathura/config.c:193
msgid "When recoloring keep original image colors"
msgstr ""
#: ../zathura/config.c:195
msgid "Wrap scrolling"
msgstr "Плавне прокручування"
#: ../zathura/config.c:197
msgid "Page aware scrolling"
msgstr ""
#: ../zathura/config.c:199
msgid "Advance number of pages per row"
msgstr ""
#: ../zathura/config.c:201
msgid "Horizontally centered zoom"
msgstr ""
#: ../zathura/config.c:203
msgid "Vertically center pages"
msgstr ""
#: ../zathura/config.c:205
msgid "Align link target to the left"
msgstr ""
#: ../zathura/config.c:207
msgid "Let zoom be changed when following links"
msgstr ""
#: ../zathura/config.c:209
msgid "Center result horizontally"
msgstr ""
#: ../zathura/config.c:211
msgid "Transparency for highlighting"
msgstr "Прозорість для виділення"
#: ../zathura/config.c:213
msgid "Render 'Loading ...'"
msgstr "Рендер 'Завантажується ...'"
#: ../zathura/config.c:214
msgid "Adjust to when opening file"
msgstr "Підлаштовутись при відкритті файлу"
#: ../zathura/config.c:216
msgid "Show hidden files and directories"
msgstr "Показати приховані файли та директорії"
#: ../zathura/config.c:218
msgid "Show directories"
msgstr "Показати диреторії"
#: ../zathura/config.c:220
msgid "Show recent files"
msgstr ""
#: ../zathura/config.c:222
msgid "Always open on first page"
msgstr "Завжди відкривати на першій сторінці"
#: ../zathura/config.c:224
msgid "Highlight search results"
msgstr ""
#: ../zathura/config.c:227
msgid "Enable incremental search"
msgstr ""
#: ../zathura/config.c:229
msgid "Clear search results on abort"
msgstr ""
#: ../zathura/config.c:231
msgid "Use basename of the file in the window title"
msgstr ""
#: ../zathura/config.c:233
msgid "Use ~ instead of $HOME in the filename in the window title"
msgstr ""
#: ../zathura/config.c:235
msgid "Display the page number in the window title"
msgstr ""
#: ../zathura/config.c:237
msgid "Use basename of the file in the statusbar"
msgstr ""
#: ../zathura/config.c:239
msgid "Use ~ instead of $HOME in the filename in the statusbar"
msgstr ""
#: ../zathura/config.c:241
msgid "Enable synctex support"
msgstr ""
#: ../zathura/config.c:243
msgid "Synctex editor command"
msgstr ""
#: ../zathura/config.c:245
msgid "Enable D-Bus service"
msgstr ""
#: ../zathura/config.c:247
msgid "Save history at each page change"
msgstr ""
#: ../zathura/config.c:249
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
#: ../zathura/config.c:251
msgid "Enable notification after selecting text"
msgstr ""
#. define default inputbar commands
#: ../zathura/config.c:440
msgid "Add a bookmark"
msgstr "Додати закладку"
#: ../zathura/config.c:441
msgid "Delete a bookmark"
msgstr "Вилучити закладку"
#: ../zathura/config.c:442
msgid "List all bookmarks"
msgstr "Дивитись усі закладки"
#: ../zathura/config.c:443
msgid "Close current file"
msgstr "Закрити документ"
#: ../zathura/config.c:444
msgid "Show file information"
msgstr "Показати інформацію файлу"
#: ../zathura/config.c:445 ../zathura/config.c:446
msgid "Execute a command"
msgstr ""
#. like vim
#: ../zathura/config.c:447
msgid "Show help"
msgstr "Показати довідку"
#: ../zathura/config.c:448
msgid "Open document"
msgstr "Відкрити документ"
#: ../zathura/config.c:449
msgid "Close zathura"
msgstr "Вийти із zathura"
#: ../zathura/config.c:450
msgid "Print document"
msgstr "Друкувати документ"
#: ../zathura/config.c:451
msgid "Save document"
msgstr "Зберегти документ"
#: ../zathura/config.c:452
msgid "Save document (and force overwriting)"
msgstr "Зберегти документ (форсувати перезапис)"
#: ../zathura/config.c:453
msgid "Save attachments"
msgstr "Зберегти прикріплення"
#: ../zathura/config.c:454
msgid "Set page offset"
msgstr "Встановити зміщення сторінки"
#: ../zathura/config.c:455
msgid "Mark current location within the document"
msgstr ""
#: ../zathura/config.c:456
msgid "Delete the specified marks"
msgstr ""
#: ../zathura/config.c:457
msgid "Don't highlight current search results"
msgstr ""
#: ../zathura/config.c:458
msgid "Highlight current search results"
msgstr ""
#: ../zathura/config.c:459
msgid "Show version information"
msgstr ""
#: ../zathura/links.c:203 ../zathura/links.c:282
msgid "Failed to run xdg-open."
msgstr "Запуск xdg-open не вдався."
#: ../zathura/links.c:221
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../zathura/links.c:228
#, c-format
msgid "Link: %s"
msgstr ""
#: ../zathura/links.c:232
msgid "Link: Invalid"
msgstr ""
#: ../zathura/main.c:146
msgid "Reparents to window specified by xid (X11)"
msgstr "Вертатися до вікна, вказаного xid (X11)"
#: ../zathura/main.c:147
msgid "Path to the config directory"
msgstr "Шлях до теки конфігурації"
#: ../zathura/main.c:148
msgid "Path to the data directory"
msgstr "Шлях до теки з даними"
#: ../zathura/main.c:149
msgid "Path to the cache directory"
msgstr ""
#: ../zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Шлях до теки з плаґінами"
#: ../zathura/main.c:151
msgid "Fork into the background"
msgstr "Працювати у фоні"
#: ../zathura/main.c:152
msgid "Document password"
msgstr ""
#: ../zathura/main.c:153
msgid "Page number to go to"
msgstr ""
#: ../zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
msgstr "Рівень логування (налагодження, інфо, застереження, помилка)"
#: ../zathura/main.c:155
msgid "Print version information"
msgstr "Показати інформацію файлу"
#: ../zathura/main.c:157
msgid "Synctex editor (forwarded to the synctex command)"
msgstr ""
#: ../zathura/main.c:158
msgid "Move to given synctex position"
msgstr ""
#: ../zathura/main.c:159
msgid "Highlight given position in the given process"
msgstr ""
#: ../zathura/main.c:161
msgid "Start in a non-default mode"
msgstr ""
#: ../zathura/page-widget.c:561
msgid "Loading..."
msgstr ""
#: ../zathura/page-widget.c:1007
msgid "Copy image"
msgstr "Копіювати картинку"
#: ../zathura/page-widget.c:1008
msgid "Save image as"
msgstr ""
#: ../zathura/print.c:64 ../zathura/print.c:227
#, c-format
msgid "Printing failed: %s"
msgstr ""
#: ../zathura/shortcuts.c:105
#, c-format
msgid "Invalid adjust mode: %d"
msgstr ""
#: ../zathura/shortcuts.c:977
#, c-format
msgid "Pattern not found: %s"
msgstr ""
#: ../zathura/shortcuts.c:1135
msgid "This document does not contain any index"
msgstr "Індекс відсутній в цьому документі"
#: ../zathura/zathura.c:216 ../zathura/zathura.c:1268
msgid "[No name]"
msgstr "[Без назви]"
#: ../zathura/zathura.c:645
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:661
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
#: ../zathura/zathura.c:750
msgid "Enter password:"
msgstr ""
#: ../zathura/zathura.c:785
msgid "Unsupported file type. Please install the necessary plugin."
msgstr ""
#: ../zathura/zathura.c:795
msgid "Document does not contain any pages"
msgstr ""
zathura-0.3.8/tests/Makefile 0000664 0001750 0001750 00000007452 13216464200 016516 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
include ../config.mk
include ../colors.mk
include ../common.mk
include config.mk
PROJECT = tests
SOURCE = tests.c $(wildcard test_*.c)
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o})
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o})
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o})
FILTER = %/main.o
ifneq (${WITH_SQLITE},0)
CPPFLAGS += -DWITH_SQLITE
else
FILTER += %/database-sqlite.o
endif
ifneq ($(WITH_MAGIC),0)
CPPFLAGS += -DWITH_MAGIC
endif
ifneq ($(WITH_SYNCTEX),0)
CPPFLAGS += -DWITH_SYNCTEX
endif
ZATHURA_OBJECTS = \
$(filter-out $(FILTER), $(wildcard ../${BUILDDIR_RELEASE}/zathura/*.o))
ZATHURA_OBJECTS_DEBUG = \
$(filter-out $(FILTER), $(wildcard ../${BUILDDIR_DEBUG}/zathura/*.o))
ZATHURA_OBJECTS_GCOV= \
$(filter-out $(FILTER), $(wildcard ../${BUILDDIR_GCOV}/zathura/*.o))
ifneq ($(wildcard ${VALGRIND_SUPPRESSION_FILE}),)
VALGRIND_ARGUMENTS += --suppressions=${VALGRIND_SUPPRESSION_FILE}
endif
all: release
# release
${OBJECTS}: config.mk ../config.mk ../zathura/version.h
${BUILDDIR_RELEASE}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
@mkdir -p $(dir $(abspath $@))
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}: ${OBJECTS}
$(QUIET)${MAKE} WITH_LIBFIU=1 -C .. ${BUILDDIR_RELEASE}/${BINDIR}/zathura
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_RELEASE}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} \
${OBJECTS} ${ZATHURA_OBJECTS} ${LIBS}
release: ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
run: ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
$(QUIET)${FIU_EXEC} ./${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
# debug
${OBJECTS_DEBUG}: config.mk ../config.mk ../zathura/version.h
${BUILDDIR_DEBUG}/%.o: %.c
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
@mkdir -p $(dir $(abspath $@))
$(call colorecho,CC,$<)
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}: ${OBJECTS_DEBUG}
$(QUIET)${MAKE} WITH_LIBFIU=1 -C .. ${BUILDDIR_DEBUG}/${BINDIR}/zathura
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_DEBUG}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT} \
${OBJECTS} ${ZATHURA_OBJECTS_DEBUG} ${LIBS}
debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
run-debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
$(QUIET)${FIU_EXEC} ./${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
# gcov
${OBJECTS_GCOV}: config.mk ../config.mk ../zathura/version.h
${BUILDDIR_GCOV}/%.o: %.c
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
@mkdir -p $(dir $(abspath $@))
$(call colorecho,CC,$<)
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} ${DFLAGS} ${GCOV_DFLAGS} \
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}: ${OBJECTS_GCOV}
$(QUIET)${MAKE} WITH_LIBFIU=1 -C .. ${BUILDDIR_GCOV}/${BINDIR}/zathura
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_GCOV}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} ${GCOV_CFLAGS} ${GCOV_LDFLAGS} \
-o ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT} \
${OBJECTS} ${ZATHURA_OBJECTS_GCOV} ${LIBS}
gcov: ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
run-gcov: gcov
$(QUIET)${FIU_EXEC} ./${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
../zathura/version.h:
$(MAKE) -C .. zathura/version.h
valgrind: ${PROJECT}-debug
$(QUIET)G_SLICE=always-malloc G_DEBUG=gc-friendly ${FIU_EXEC} ${VALGRIND} ${VALGRIND_ARGUMENTS} ./${PROJECT}-debug
clean:
$(call colorecho,RM, "Clean test files")
$(QUIET)rm -rf ${PROJECT}
$(QUIET)rm -rf ${PROJECT}-debug
$(QUIET)rm -rf ${PROJECT}-gcov
$(QUIET)rm -rf ${BUILDDIR}
$(QUIET)rm -rf ${DEPENDDIR}
.PHONY: all clean debug run
-include $(wildcard ${DEPENDDIR}/*.dep)
zathura-0.3.8/tests/config.mk 0000664 0001750 0001750 00000001136 12501036512 016642 0 ustar sebastian sebastian # See LICENSE file for license and copyright information
CHECK_INC ?= $(shell pkg-config --cflags check)
CHECK_LIB ?= $(shell pkg-config --libs check)
INCS += ${CHECK_INC} ${FIU_INC} -I../zathura
LIBS += ${CHECK_LIB} ${FIU_LIB}
ZATHURA_RELEASE=../${BUILDDIR_RELEASE}/${BINDIR}/zathura
ZATHURA_DEBUG=../${BUILDDIR_DEBUG}/${BINDIR}/zathura
ZATHURA_GCOV=../${BUILDDIR_GCOV}/${BINDIR}/zathura
# valgrind
VALGRIND = valgrind
VALGRIND_ARGUMENTS = --tool=memcheck --leak-check=yes --leak-resolution=high \
--show-reachable=yes --log-file=zathura-valgrind.log
VALGRIND_SUPPRESSION_FILE = zathura.suppression
zathura-0.3.8/tests/test_document.c 0000664 0001750 0001750 00000001435 12750077577 020115 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include "document.h"
START_TEST(test_open) {
fail_unless(zathura_document_open(NULL, NULL, NULL, NULL, NULL) == NULL, "Could create document", NULL);
fail_unless(zathura_document_open(NULL, "fl", NULL, NULL, NULL) == NULL, "Could create document", NULL);
fail_unless(zathura_document_open(NULL, "fl", "ur", NULL, NULL) == NULL, "Could create document", NULL);
fail_unless(zathura_document_open(NULL, "fl", NULL, "pw", NULL) == NULL, "Could create document", NULL);
} END_TEST
Suite* suite_document()
{
TCase* tcase = NULL;
Suite* suite = suite_create("Document");
/* basic */
tcase = tcase_create("basic");
tcase_add_test(tcase, test_open);
suite_add_tcase(suite, tcase);
return suite;
}
zathura-0.3.8/tests/test_session.c 0000664 0001750 0001750 00000001112 12653114226 017733 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include "zathura.h"
START_TEST(test_create) {
zathura_t* zathura = zathura_create();
fail_unless(zathura != NULL, "Could not create session", NULL);
fail_unless(zathura_init(zathura) == true, "Could not initialize session", NULL);
zathura_free(zathura);
} END_TEST
Suite* suite_session()
{
TCase* tcase = NULL;
Suite* suite = suite_create("Session");
/* basic */
tcase = tcase_create("basic");
tcase_add_test(tcase, test_create);
suite_add_tcase(suite, tcase);
return suite;
}
zathura-0.3.8/tests/test_utils.c 0000664 0001750 0001750 00000001173 12653114226 017417 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include "utils.h"
START_TEST(test_file_valid_extension_null) {
fail_unless(file_valid_extension(NULL, NULL) == false, NULL);
fail_unless(file_valid_extension((void*) 0xDEAD, NULL) == false, NULL);
fail_unless(file_valid_extension(NULL, "pdf") == false, NULL);
} END_TEST
Suite* suite_utils()
{
TCase* tcase = NULL;
Suite* suite = suite_create("Utils");
/* file valid extension */
tcase = tcase_create("file_valid_extension");
tcase_add_test(tcase, test_file_valid_extension_null);
suite_add_tcase(suite, tcase);
return suite;
}
zathura-0.3.8/tests/tests.c 0000664 0001750 0001750 00000001625 12653114226 016364 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#define LENGTH(x) (sizeof(x)/sizeof((x)[0]))
extern Suite* suite_session();
extern Suite* suite_utils();
extern Suite* suite_document();
typedef Suite* (*suite_create_fnt_t)(void);
const suite_create_fnt_t suites[] = {
suite_utils,
suite_document,
suite_session,
};
int
main(int argc, char* argv[])
{
Suite* suite = NULL;
SRunner* suite_runner = NULL;
int number_failed = 0;
/* init gtk */
gtk_init(&argc, &argv);
/* run test suites */
for (unsigned int i = 0; i < LENGTH(suites); i++) {
suite = suites[i]();
suite_runner = srunner_create(suite);
srunner_run_all(suite_runner, CK_NORMAL);
number_failed += srunner_ntests_failed(suite_runner);
srunner_free(suite_runner);
}
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
zathura-0.3.8/zathura.desktop 0000664 0001750 0001750 00000002167 13216464200 016763 0 ustar sebastian sebastian [Desktop Entry]
Version=1.0
Type=Application
Name=Zathura
Comment=A minimalistic document viewer
Comment[ca]=Un visualitzador de documents minimalista
Comment[cs]=Jednoduchý prohlížeč dokumentů
Comment[de]=Ein minimalistischer Dokumenten-Betrachter
Comment[el]=Ένας ελαφρύς προβολέας κειμένων
Comment[eo]=Malpeza dokumento spektanto
Comment[es_CL]=Un visor de documentos minimalista
Comment[fr]=Un visionneur de document minimaliste
Comment[he]=מציג מסמכים מינימליסטי
Comment[id_ID]=Pembaca dokumen minimalis
Comment[it]=Un visualizzatore di documenti minimalista
Comment[lt]=Paprasta dokumentų skaitytuvė
Comment[no]=En minimalistisk dokumentleser
Comment[pl]=Minimalistyczna przeglądarka dokumentów
Comment[pt_BR]=Um visualizador de documentos minimalista
Comment[ru]=Минималистичный просмотрщик документов
Comment[tr]=Minimalist bir belge görüntüleyicisi
Comment[uk_UA]=Легкий переглядач документів
Exec=zathura %U
Terminal=false
Categories=Office;Viewer;
Keywords=PDF;PS;PostScript;DjVU;document;presentation;viewer;
zathura-0.3.8/zathura.pc.in 0000664 0001750 0001750 00000000310 12501036512 016302 0 ustar sebastian sebastian
INC_PATH=-I${includedir}
Name: ${project}
Description: document viewer
Version: ${version}
URL: http://pwmt.org/projects/zathura
Cflags: ${INC_PATH}
Requires.private: girara-gtk${GTK_VERSION} cairo
zathura-0.3.8/zathura/adjustment.c 0000664 0001750 0001750 00000014513 13216464200 017710 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "adjustment.h"
#include "utils.h"
#include
double
page_calc_height_width(zathura_document_t* document, double height,
double width, unsigned int* page_height,
unsigned int* page_width, bool rotate)
{
g_return_val_if_fail(document != NULL && page_height != NULL && page_width != NULL, 0.0);
double scale = zathura_document_get_scale(document);
if (rotate == true && zathura_document_get_rotation(document) % 180 != 0) {
*page_width = round(height * scale);
*page_height = round(width * scale);
scale = MAX(*page_width / height, *page_height / width);
} else {
*page_width = round(width * scale);
*page_height = round(height * scale);
scale = MAX(*page_width / width, *page_height / height);
}
return scale;
}
void
page_calc_position(zathura_document_t* document, double x, double y, double* xn,
double* yn)
{
g_return_if_fail(document != NULL && xn != NULL && yn != NULL);
const unsigned int rot = zathura_document_get_rotation(document);
if (rot == 90) {
*xn = 1 - y;
*yn = x;
} else if (rot == 180) {
*xn = 1 - x;
*yn = 1 - y;
} else if (rot == 270) {
*xn = y;
*yn = 1 - x;
} else {
*xn = x;
*yn = y;
}
}
unsigned int
position_to_page_number(zathura_document_t* document, double pos_x,
double pos_y)
{
g_return_val_if_fail(document != NULL, 0);
unsigned int doc_width, doc_height;
zathura_document_get_document_size(document, &doc_height, &doc_width);
unsigned int cell_width, cell_height;
zathura_document_get_cell_size(document, &cell_height, &cell_width);
unsigned int c0 = zathura_document_get_first_page_column(document);
unsigned int npag = zathura_document_get_number_of_pages(document);
unsigned int ncol = zathura_document_get_pages_per_row(document);
unsigned int nrow = 0;
unsigned int pad = zathura_document_get_page_padding(document);
if (c0 == 1) {
/* There is no offset, so this is easy. */
nrow = (npag + ncol - 1) / ncol;
} else {
/* If there is a offset, we handle the first row extra. */
nrow = 1 + (npag - (ncol - c0 - 1) + (ncol - 1)) / ncol;
}
unsigned int col = floor(pos_x * (double)doc_width / (double)(cell_width + pad));
unsigned int row = floor(pos_y * (double)doc_height / (double)(cell_height + pad));
unsigned int page = ncol * (row % nrow) + (col % ncol);
if (page < c0 - 1) {
return 0;
} else {
return MIN(page - (c0 - 1), npag - 1);
}
}
void
page_number_to_position(zathura_document_t* document, unsigned int page_number,
double xalign, double yalign, double* pos_x,
double* pos_y)
{
g_return_if_fail(document != NULL);
unsigned int c0 = zathura_document_get_first_page_column(document);
unsigned int npag = zathura_document_get_number_of_pages(document);
unsigned int ncol = zathura_document_get_pages_per_row(document);
unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */
/* row and column for page_number indexed from 0 */
unsigned int row = (page_number + c0 - 1) / ncol;
unsigned int col = (page_number + c0 - 1) % ncol;
/* sizes of page cell, viewport and document */
unsigned int cell_height = 0, cell_width = 0;
zathura_document_get_cell_size(document, &cell_height, &cell_width);
unsigned int view_height = 0, view_width = 0;
zathura_document_get_viewport_size(document, &view_height, &view_width);
unsigned int doc_height = 0, doc_width = 0;
zathura_document_get_document_size(document, &doc_height, &doc_width);
/* compute the shift to align to the viewport. If the page fits to viewport, just center it. */
double shift_x = 0.5, shift_y = 0.5;
if (cell_width > view_width) {
shift_x = 0.5 + (xalign - 0.5) * ((double)cell_width - (double)view_width) / (double)cell_width;
}
if (cell_height > view_height) {
shift_y = 0.5 + (yalign - 0.5) * ((double)cell_height - (double)view_height) / (double)cell_height;
}
/* compute the position */
*pos_x = ((double)col + shift_x) / (double)ncol;
*pos_y = ((double)row + shift_y) / (double)nrow;
}
bool
page_is_visible(zathura_document_t *document, unsigned int page_number)
{
g_return_val_if_fail(document != NULL, false);
/* position at the center of the viewport */
double pos_x = zathura_document_get_position_x(document);
double pos_y = zathura_document_get_position_y(document);
/* get the center of page page_number */
double page_x, page_y;
page_number_to_position(document, page_number, 0.5, 0.5, &page_x, &page_y);
unsigned int cell_width, cell_height;
zathura_document_get_cell_size(document, &cell_height, &cell_width);
unsigned int doc_width, doc_height;
zathura_document_get_document_size(document, &doc_height, &doc_width);
unsigned int view_width, view_height;
zathura_document_get_viewport_size(document, &view_height, &view_width);
return ( fabs(pos_x - page_x) < 0.5 * (double)(view_width + cell_width) / (double)doc_width &&
fabs(pos_y - page_y) < 0.5 * (double)(view_height + cell_height) / (double)doc_height);
}
void
zathura_adjustment_set_value(GtkAdjustment* adjustment, gdouble value)
{
gtk_adjustment_set_value(adjustment,
MAX(gtk_adjustment_get_lower(adjustment),
MIN(gtk_adjustment_get_upper(adjustment) -
gtk_adjustment_get_page_size(adjustment),
value)));
}
gdouble
zathura_adjustment_get_ratio(GtkAdjustment* adjustment)
{
gdouble lower = gtk_adjustment_get_lower(adjustment);
gdouble upper = gtk_adjustment_get_upper(adjustment);
gdouble page_size = gtk_adjustment_get_page_size(adjustment);
gdouble value = gtk_adjustment_get_value(adjustment);
return (value - lower + page_size / 2.0) / (upper - lower);
}
void
zathura_adjustment_set_value_from_ratio(GtkAdjustment* adjustment,
gdouble ratio)
{
if (ratio == 0.0) {
return;
}
gdouble lower = gtk_adjustment_get_lower(adjustment);
gdouble upper = gtk_adjustment_get_upper(adjustment);
gdouble page_size = gtk_adjustment_get_page_size(adjustment);
gdouble value = (upper - lower) * ratio + lower - page_size / 2.0;
zathura_adjustment_set_value(adjustment, value);
}
zathura-0.3.8/zathura/adjustment.h 0000664 0001750 0001750 00000007452 12653114226 017725 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef ZATHURA_ADJUSTMENT_H
#define ZATHURA_ADJUSTMENT_H
#include
#include
#include "document.h"
/**
* Calculate the page size according to the corrent scaling and rotation if
* desired.
*
* @param document the document
* @param height the original height
* @param width the original width
* @param page_height the scaled and rotated height
* @param page_width the scaled and rotated width
* @param rotate honor page's rotation
* @return real scale after rounding
*/
double page_calc_height_width(zathura_document_t* document, double height, double width,
unsigned int* page_height, unsigned int* page_width, bool rotate);
/**
* Calculate a page relative position after a rotation. The positions x y are
* relative to a page, i.e. 0=top of page, 1=bottom of page. They are NOT
* relative to the entire document.
*
* @param document the document
* @param x the x coordinates on the unrotated page
* @param y the y coordinates on the unrotated page
* @param xn the x coordinates after rotation
* @param yn the y coordinates after rotation
*/
void page_calc_position(zathura_document_t* document, double x, double y,
double *xn, double *yn);
/**
* Converts a relative position within the document to a page number.
*
* @param document The document
* @param pos_x the x position relative to the document
* @param pos_y the y position relative to the document
* @return page sitting in that position
*/
unsigned int position_to_page_number(zathura_document_t* document,
double pos_x, double pos_y);
/**
* Converts a page number to a position in units relative to the document
*
* We can specify where to aliwn the viewport and the page. For instance, xalign
* = 0 means align them on the left margin, xalign = 0.5 means centered, and
* xalign = 1.0 align them on the right margin.
*
* The return value is the position in in units relative to the document (0=top
* 1=bottom) of the point thet will lie at the center of the viewport.
*
* @param document The document
* @param page_number the given page number
* @param xalign where to align the viewport and the page
* @param yalign where to align the viewport and the page
* @param pos_x position that will lie at the center of the viewport.
* @param pos_y position that will lie at the center of the viewport.
*/
void page_number_to_position(zathura_document_t* document, unsigned int page_number,
double xalign, double yalign, double *pos_x, double *pos_y);
/**
* Checks whether a given page falls within the viewport
*
* @param document The document
* @param page_number the page number
* @return true if the page intersects the viewport
*/
bool page_is_visible(zathura_document_t *document, unsigned int page_number);
/**
* Set the adjustment value while enforcing its limits
*
* @param adjustment Adjustment instance
* @param value Adjustment value
*/
void zathura_adjustment_set_value(GtkAdjustment* adjustment, gdouble value);
/**
* Compute the adjustment ratio
*
* That is, the ratio between the length from the lower bound to the middle of
* the slider, and the total length of the scrollbar.
*
* @param adjustment Scrollbar adjustment
* @return Adjustment ratio
*/
gdouble zathura_adjustment_get_ratio(GtkAdjustment* adjustment);
/**
* Set the adjustment value from ratio
*
* The ratio is usually obtained from a previous call to
* zathura_adjustment_get_ratio().
*
* @param adjustment Adjustment instance
* @param ratio Ratio from which the adjustment value will be set
*/
void zathura_adjustment_set_value_from_ratio(GtkAdjustment* adjustment,
gdouble ratio);
#endif /* ZATHURA_ADJUSTMENT_H */
zathura-0.3.8/zathura/bookmarks.c 0000664 0001750 0001750 00000007325 12653114226 017531 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include "bookmarks.h"
#include "database.h"
#include "document.h"
#include "adjustment.h"
#include
#include
#include
static int
bookmark_compare_find(const void* item, const void* data)
{
const zathura_bookmark_t* bookmark = item;
const char* id = data;
return g_strcmp0(bookmark->id, id);
}
zathura_bookmark_t*
zathura_bookmark_add(zathura_t* zathura, const gchar* id, unsigned int page)
{
g_return_val_if_fail(zathura && zathura->document && zathura->bookmarks.bookmarks, NULL);
g_return_val_if_fail(id, NULL);
double position_x = zathura_document_get_position_x(zathura->document);
double position_y = zathura_document_get_position_y(zathura->document);
zathura_bookmark_t* old = zathura_bookmark_get(zathura, id);
if (old != NULL) {
old->page = page;
old->x = position_x;
old->y = position_y;
if (zathura->database != NULL) {
const char* path = zathura_document_get_path(zathura->document);
if (zathura_db_remove_bookmark(zathura->database, path, old->id) == false) {
girara_warning("Failed to remove old bookmark from database.");
}
if (zathura_db_add_bookmark(zathura->database, path, old) == false) {
girara_warning("Failed to add new bookmark to database.");
}
}
return old;
}
zathura_bookmark_t* bookmark = g_try_malloc0(sizeof(zathura_bookmark_t));
if (bookmark == NULL) {
return NULL;
}
bookmark->id = g_strdup(id);
bookmark->page = page;
bookmark->x = position_x;
bookmark->y = position_y;
girara_list_append(zathura->bookmarks.bookmarks, bookmark);
if (zathura->database != NULL) {
const char* path = zathura_document_get_path(zathura->document);
if (zathura_db_add_bookmark(zathura->database, path, bookmark) == false) {
girara_warning("Failed to add bookmark to database.");
}
}
return bookmark;
}
bool
zathura_bookmark_remove(zathura_t* zathura, const gchar* id)
{
g_return_val_if_fail(zathura && zathura->document && zathura->bookmarks.bookmarks, false);
g_return_val_if_fail(id, false);
zathura_bookmark_t* bookmark = zathura_bookmark_get(zathura, id);
if (bookmark == NULL) {
return false;
}
if (zathura->database != NULL) {
const char* path = zathura_document_get_path(zathura->document);
if (zathura_db_remove_bookmark(zathura->database, path, bookmark->id) == false) {
girara_warning("Failed to remove bookmark from database.");
}
}
girara_list_remove(zathura->bookmarks.bookmarks, bookmark);
return true;
}
zathura_bookmark_t*
zathura_bookmark_get(zathura_t* zathura, const gchar* id)
{
g_return_val_if_fail(zathura && zathura->bookmarks.bookmarks, NULL);
g_return_val_if_fail(id, NULL);
return girara_list_find(zathura->bookmarks.bookmarks, bookmark_compare_find, id);
}
void
zathura_bookmark_free(zathura_bookmark_t* bookmark)
{
if (bookmark == NULL) {
return;
}
g_free(bookmark->id);
g_free(bookmark);
}
bool
zathura_bookmarks_load(zathura_t* zathura, const gchar* file)
{
g_return_val_if_fail(zathura, false);
g_return_val_if_fail(file, false);
if (zathura->database == NULL) {
return false;
}
girara_list_t* bookmarks = zathura_db_load_bookmarks(zathura->database, file);
if (bookmarks == NULL) {
return false;
}
girara_list_free(zathura->bookmarks.bookmarks);
zathura->bookmarks.bookmarks = bookmarks;
return true;
}
int
zathura_bookmarks_compare(zathura_bookmark_t* lhs, zathura_bookmark_t* rhs)
{
if (lhs == NULL && rhs == NULL) {
return 0;
}
if (lhs == NULL) {
return -1;
}
if (rhs == NULL) {
return 1;
}
return g_strcmp0(lhs->id, rhs->id);
}
zathura-0.3.8/zathura/bookmarks.h 0000664 0001750 0001750 00000003266 12653114226 017536 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef BOOKMARKS_H
#define BOOKMARKS_H
#include
#include "zathura.h"
struct zathura_bookmark_s
{
gchar* id;
unsigned int page;
double x;
double y;
};
typedef struct zathura_bookmark_s zathura_bookmark_t;
/**
* Create a bookmark and add it to the list of bookmarks.
* @param zathura The zathura instance.
* @param id The bookmark's id.
* @param page The bookmark's page.
* @return the bookmark instance or NULL on failure.
*/
zathura_bookmark_t* zathura_bookmark_add(zathura_t* zathura, const gchar* id, unsigned int page);
/**
* Remove a bookmark from the list of bookmarks.
* @param zathura The zathura instance.
* @param id The bookmark's id.
* @return true on success, false otherwise
*/
bool zathura_bookmark_remove(zathura_t* zathura, const gchar* id);
/**
* Get bookmark from the list of bookmarks.
* @param zathura The zathura instance.
* @param id The bookmark's id.
* @return The bookmark instance if it exists or NULL otherwise.
*/
zathura_bookmark_t* zathura_bookmark_get(zathura_t* zathura, const gchar* id);
/**
* Free a bookmark instance.
* @param bookmark The bookmark instance.
*/
void zathura_bookmark_free(zathura_bookmark_t* bookmark);
/**
* Load bookmarks for a specific file.
* @param zathura The zathura instance.
* @param file The file.
* @return true on success, false otherwise
*/
bool zathura_bookmarks_load(zathura_t* zathura, const gchar* file);
/**
* Compare two bookmarks.
* @param lhs a bookmark
* @param rhs a bookmark
* @returns g_strcmp0(lhs->id, rhs->id)
*/
int zathura_bookmarks_compare(zathura_bookmark_t* lhs, zathura_bookmark_t* rhs);
#endif // BOOKMARKS_H
zathura-0.3.8/zathura/callbacks.c 0000664 0001750 0001750 00000046252 13216464200 017456 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "callbacks.h"
#include "links.h"
#include "zathura.h"
#include "render.h"
#include "document.h"
#include "utils.h"
#include "shortcuts.h"
#include "page-widget.h"
#include "page.h"
#include "adjustment.h"
#include "synctex.h"
#include "dbus-interface.h"
gboolean
cb_destroy(GtkWidget* UNUSED(widget), zathura_t* zathura)
{
if (zathura != NULL && zathura->document != NULL) {
document_close(zathura, false);
}
gtk_main_quit();
return TRUE;
}
void
cb_buffer_changed(girara_session_t* session)
{
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
zathura_t* zathura = session->global.data;
char* buffer = girara_buffer_get(session);
if (buffer != NULL) {
girara_statusbar_item_set_text(session, zathura->ui.statusbar.buffer, buffer);
free(buffer);
} else {
girara_statusbar_item_set_text(session, zathura->ui.statusbar.buffer, "");
}
}
void
update_visible_pages(zathura_t* zathura)
{
const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document);
for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) {
zathura_page_t* page = zathura_document_get_page(zathura->document, page_id);
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
ZathuraPage* zathura_page_widget = ZATHURA_PAGE(page_widget);
if (page_is_visible(zathura->document, page_id) == true) {
/* make page visible */
if (zathura_page_get_visibility(page) == false) {
zathura_page_set_visibility(page, true);
zathura_page_widget_update_view_time(zathura_page_widget);
zathura_renderer_page_cache_add(zathura->sync.render_thread, zathura_page_get_index(page));
}
} else {
/* make page invisible */
if (zathura_page_get_visibility(page) == true) {
zathura_page_set_visibility(page, false);
/* If a page becomes invisible, abort the render request. */
zathura_page_widget_abort_render_request(zathura_page_widget);
}
/* reset current search result */
girara_list_t* results = NULL;
GObject* obj_page_widget = G_OBJECT(page_widget);
g_object_get(obj_page_widget, "search-results", &results, NULL);
if (results != NULL) {
g_object_set(obj_page_widget, "search-current", 0, NULL);
}
}
}
}
void
cb_view_hadjustment_value_changed(GtkAdjustment* adjustment, gpointer data)
{
zathura_t* zathura = data;
if (zathura == NULL || zathura->document == NULL) {
return;
}
/* Do nothing in index mode */
if (girara_mode_get(zathura->ui.session) == zathura->modes.index) {
return;
}
update_visible_pages(zathura);
double position_x = zathura_adjustment_get_ratio(adjustment);
double position_y = zathura_document_get_position_y(zathura->document);
unsigned int page_id = position_to_page_number(zathura->document, position_x, position_y);
zathura_document_set_position_x(zathura->document, position_x);
zathura_document_set_position_y(zathura->document, position_y);
zathura_document_set_current_page_number(zathura->document, page_id);
statusbar_page_number_update(zathura);
}
void
cb_view_vadjustment_value_changed(GtkAdjustment* adjustment, gpointer data)
{
zathura_t* zathura = data;
if (zathura == NULL || zathura->document == NULL) {
return;
}
/* Do nothing in index mode */
if (girara_mode_get(zathura->ui.session) == zathura->modes.index) {
return;
}
update_visible_pages(zathura);
double position_x = zathura_document_get_position_x(zathura->document);
double position_y = zathura_adjustment_get_ratio(adjustment);
unsigned int page_id = position_to_page_number(zathura->document, position_x, position_y);
zathura_document_set_position_x(zathura->document, position_x);
zathura_document_set_position_y(zathura->document, position_y);
zathura_document_set_current_page_number(zathura->document, page_id);
statusbar_page_number_update(zathura);
}
static void
cb_view_adjustment_changed(GtkAdjustment* adjustment, zathura_t* zathura,
bool width)
{
/* Do nothing in index mode */
if (girara_mode_get(zathura->ui.session) == zathura->modes.index) {
return;
}
const zathura_adjust_mode_t adjust_mode =
zathura_document_get_adjust_mode(zathura->document);
/* Don't scroll, we're focusing the inputbar. */
if (adjust_mode == ZATHURA_ADJUST_INPUTBAR) {
return;
}
/* Save the viewport size */
unsigned int size = (unsigned int)floor(gtk_adjustment_get_page_size(adjustment));
if (width == true) {
zathura_document_set_viewport_width(zathura->document, size);
} else {
zathura_document_set_viewport_height(zathura->document, size);
}
/* reset the adjustment, in case bounds have changed */
const double ratio = width == true ?
zathura_document_get_position_x(zathura->document) :
zathura_document_get_position_y(zathura->document);
zathura_adjustment_set_value_from_ratio(adjustment, ratio);
}
void
cb_view_hadjustment_changed(GtkAdjustment* adjustment, gpointer data)
{
zathura_t* zathura = data;
g_return_if_fail(zathura != NULL);
cb_view_adjustment_changed(adjustment, zathura, true);
}
void
cb_view_vadjustment_changed(GtkAdjustment* adjustment, gpointer data)
{
zathura_t* zathura = data;
g_return_if_fail(zathura != NULL);
cb_view_adjustment_changed(adjustment, zathura, false);
}
void
cb_refresh_view(GtkWidget* GIRARA_UNUSED(view), gpointer data)
{
zathura_t* zathura = data;
if (zathura == NULL || zathura->document == NULL) {
return;
}
unsigned int page_id = zathura_document_get_current_page_number(zathura->document);
zathura_page_t* page = zathura_document_get_page(zathura->document, page_id);
if (page == NULL) {
return;
}
GtkAdjustment* vadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
GtkAdjustment* hadj = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
double position_x = zathura_document_get_position_x(zathura->document);
double position_y = zathura_document_get_position_y(zathura->document);
zathura_adjustment_set_value_from_ratio(vadj, position_y);
zathura_adjustment_set_value_from_ratio(hadj, position_x);
statusbar_page_number_update(zathura);
}
void
cb_page_layout_value_changed(girara_session_t* session, const char* name, girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
zathura_t* zathura = session->global.data;
/* pages-per-row must not be 0 */
if (g_strcmp0(name, "pages-per-row") == 0) {
unsigned int pages_per_row = *((unsigned int*) value);
if (pages_per_row == 0) {
pages_per_row = 1;
girara_setting_set(session, name, &pages_per_row);
girara_notify(session, GIRARA_WARNING, _("'%s' must not be 0. Set to 1."), name);
return;
}
}
if (zathura->document == NULL) {
/* no document has been openend yet */
return;
}
unsigned int pages_per_row = 1;
girara_setting_get(session, "pages-per-row", &pages_per_row);
/* get list of first_page_column settings */
char* first_page_column_list = NULL;
girara_setting_get(session, "first-page-column", &first_page_column_list);
/* find value for first_page_column */
unsigned int first_page_column = find_first_page_column(first_page_column_list, pages_per_row);
g_free(first_page_column_list);
unsigned int page_padding = 1;
girara_setting_get(zathura->ui.session, "page-padding", &page_padding);
page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column);
zathura_document_set_page_layout(zathura->document, page_padding, pages_per_row, first_page_column);
}
void
cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
GtkTreeViewColumn* UNUSED(column), void* data)
{
zathura_t* zathura = data;
if (tree_view == NULL || zathura == NULL || zathura->ui.session == NULL) {
return;
}
GtkTreeModel *model;
GtkTreeIter iter;
g_object_get(G_OBJECT(tree_view), "model", &model, NULL);
if(gtk_tree_model_get_iter(model, &iter, path)) {
zathura_index_element_t* index_element;
gtk_tree_model_get(model, &iter, 2, &index_element, -1);
if (index_element == NULL) {
return;
}
sc_toggle_index(zathura->ui.session, NULL, NULL, 0);
zathura_link_evaluate(zathura, index_element->link);
}
g_object_unref(model);
}
typedef enum zathura_link_action_e
{
ZATHURA_LINK_ACTION_FOLLOW,
ZATHURA_LINK_ACTION_DISPLAY
} zathura_link_action_t;
static bool
handle_link(GtkEntry* entry, girara_session_t* session,
zathura_link_action_t action)
{
g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->global.data != NULL, FALSE);
zathura_t* zathura = session->global.data;
bool eval = true;
char* input = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
if (input == NULL || strlen(input) == 0) {
eval = false;
}
int index = 0;
if (eval == true) {
index = atoi(input);
if (index == 0 && g_strcmp0(input, "0") != 0) {
girara_notify(session, GIRARA_WARNING, _("Invalid input '%s' given."), input);
eval = false;
}
index = index - 1;
}
/* set pages to draw links */
bool invalid_index = true;
unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document);
for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) {
zathura_page_t* page = zathura_document_get_page(zathura->document, page_id);
if (page == NULL || zathura_page_get_visibility(page) == false) {
continue;
}
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(G_OBJECT(page_widget), "draw-links", FALSE, NULL);
if (eval == true) {
zathura_link_t* link = zathura_page_widget_link_get(ZATHURA_PAGE(page_widget), index);
if (link != NULL) {
invalid_index = false;
switch (action) {
case ZATHURA_LINK_ACTION_FOLLOW:
zathura_link_evaluate(zathura, link);
break;
case ZATHURA_LINK_ACTION_DISPLAY:
zathura_link_display(zathura, link);
break;
}
}
}
}
if (eval == true && invalid_index == true) {
girara_notify(session, GIRARA_WARNING, _("Invalid index '%s' given."), input);
}
g_free(input);
return (eval == TRUE) ? TRUE : FALSE;
}
gboolean
cb_sc_follow(GtkEntry* entry, void* data)
{
girara_session_t* session = data;
return handle_link(entry, session, ZATHURA_LINK_ACTION_FOLLOW);
}
gboolean
cb_sc_display_link(GtkEntry* entry, void* data)
{
girara_session_t* session = data;
return handle_link(entry, session, ZATHURA_LINK_ACTION_DISPLAY);
}
static gboolean
file_monitor_reload(void* data)
{
sc_reload((girara_session_t*) data, NULL, NULL, 0);
return FALSE;
}
void
cb_file_monitor(ZathuraFileMonitor* monitor, girara_session_t* session)
{
g_return_if_fail(monitor != NULL);
g_return_if_fail(session != NULL);
g_main_context_invoke(NULL, file_monitor_reload, session);
}
static gboolean
password_dialog(gpointer data)
{
zathura_password_dialog_info_t* dialog = data;
if (dialog != NULL) {
girara_dialog(
dialog->zathura->ui.session,
"Incorrect password. Enter password:",
true,
NULL,
cb_password_dialog,
dialog
);
}
return FALSE;
}
gboolean
cb_password_dialog(GtkEntry* entry, void* data)
{
if (entry == NULL || data == NULL) {
goto error_ret;
}
zathura_password_dialog_info_t* dialog = data;
if (dialog->path == NULL) {
free(dialog);
goto error_ret;
}
if (dialog->zathura == NULL) {
goto error_free;
}
char* input = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
/* no or empty password: ask again */
if (input == NULL || strlen(input) == 0) {
if (input != NULL) {
g_free(input);
}
gdk_threads_add_idle(password_dialog, dialog);
return false;
}
/* try to open document again */
if (document_open(dialog->zathura, dialog->path, dialog->uri, input,
ZATHURA_PAGE_NUMBER_UNSPECIFIED) == false) {
gdk_threads_add_idle(password_dialog, dialog);
} else {
g_free(dialog->path);
g_free(dialog->uri);
free(dialog);
}
g_free(input);
return true;
error_free:
g_free(dialog->path);
free(dialog);
error_ret:
return false;
}
gboolean
cb_view_resized(GtkWidget* UNUSED(widget), GtkAllocation* UNUSED(allocation), zathura_t* zathura)
{
if (zathura == NULL || zathura->document == NULL) {
return false;
}
/* adjust the scale according to settings. If nothing needs to be resized,
it does not trigger the resize event.
The right viewport size is already in the document object, due to a
previous call to adjustment_changed. We don't want to use the allocation in
here, because we would have to subtract scrollbars, etc. */
adjust_view(zathura);
return false;
}
void
cb_setting_recolor_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
g_return_if_fail(name != NULL);
zathura_t* zathura = session->global.data;
const bool bool_value = *((bool*) value);
if (zathura->sync.render_thread != NULL && zathura_renderer_recolor_enabled(zathura->sync.render_thread) != bool_value) {
zathura_renderer_enable_recolor(zathura->sync.render_thread, bool_value);
render_all(zathura);
}
}
void
cb_setting_recolor_keep_hue_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
g_return_if_fail(name != NULL);
zathura_t* zathura = session->global.data;
const bool bool_value = *((bool*) value);
if (zathura->sync.render_thread != NULL && zathura_renderer_recolor_hue_enabled(zathura->sync.render_thread) != bool_value) {
zathura_renderer_enable_recolor_hue(zathura->sync.render_thread, bool_value);
render_all(zathura);
}
}
void
cb_setting_recolor_keep_reverse_video_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
g_return_if_fail(name != NULL);
zathura_t* zathura = session->global.data;
const bool bool_value = *((bool*) value);
if (zathura->sync.render_thread != NULL && zathura_renderer_recolor_reverse_video_enabled(zathura->sync.render_thread) != bool_value) {
zathura_renderer_enable_recolor_reverse_video(zathura->sync.render_thread, bool_value);
render_all(zathura);
}
}
bool
cb_unknown_command(girara_session_t* session, const char* input)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
g_return_val_if_fail(input != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
return false;
}
/* check for number */
const size_t size = strlen(input);
for (size_t i = 0; i < size; i++) {
if (g_ascii_isdigit(input[i]) == FALSE) {
return false;
}
}
zathura_jumplist_add(zathura);
page_set(zathura, atoi(input) - 1);
zathura_jumplist_add(zathura);
return true;
}
void
cb_page_widget_text_selected(ZathuraPage* page, const char* text, void* data)
{
g_return_if_fail(page != NULL);
g_return_if_fail(text != NULL);
g_return_if_fail(data != NULL);
zathura_t* zathura = data;
girara_mode_t mode = girara_mode_get(zathura->ui.session);
if (mode != zathura->modes.normal && mode != zathura->modes.fullscreen) {
return;
}
GdkAtom* selection = get_selection(zathura);
/* copy to clipboard */
if (selection != NULL) {
gtk_clipboard_set_text(gtk_clipboard_get(*selection), text, -1);
bool notification = true;
girara_setting_get(zathura->ui.session, "selection-notification", ¬ification);
if (notification == true) {
char* target = NULL;
girara_setting_get(zathura->ui.session, "selection-clipboard", &target);
char* stripped_text = g_strdelimit(g_strdup(text), "\n\t\r\n", ' ');
char* escaped_text = g_markup_printf_escaped(
_("Copied selected text to selection %s: %s"), target, stripped_text);
g_free(target);
g_free(stripped_text);
girara_notify(zathura->ui.session, GIRARA_INFO, "%s", escaped_text);
g_free(escaped_text);
}
}
g_free(selection);
}
void
cb_page_widget_image_selected(ZathuraPage* page, GdkPixbuf* pixbuf, void* data)
{
g_return_if_fail(page != NULL);
g_return_if_fail(pixbuf != NULL);
g_return_if_fail(data != NULL);
zathura_t* zathura = data;
GdkAtom* selection = get_selection(zathura);
if (selection != NULL) {
gtk_clipboard_set_image(gtk_clipboard_get(*selection), pixbuf);
bool notification = true;
girara_setting_get(zathura->ui.session, "selection-notification", ¬ification);
if (notification == true) {
char* target = NULL;
girara_setting_get(zathura->ui.session, "selection-clipboard", &target);
char* escaped_text = g_markup_printf_escaped(
_("Copied selected image to selection %s"), target);
g_free(target);
girara_notify(zathura->ui.session, GIRARA_INFO, "%s", escaped_text);
}
g_free(selection);
}
}
void
cb_page_widget_link(ZathuraPage* page, void* data)
{
g_return_if_fail(page != NULL);
bool enter = (bool) data;
GdkWindow* window = gtk_widget_get_parent_window(GTK_WIDGET(page));
GdkDisplay* display = gtk_widget_get_display(GTK_WIDGET(page));
GdkCursor* cursor = gdk_cursor_new_for_display(display, enter == true ? GDK_HAND1 : GDK_LEFT_PTR);
gdk_window_set_cursor(window, cursor);
g_object_unref(cursor);
}
void
cb_page_widget_scaled_button_release(ZathuraPage* page_widget, GdkEventButton* event,
void* data)
{
zathura_t* zathura = data;
zathura_page_t* page = zathura_page_widget_get_page(page_widget);
/* set page number (but don't scroll there. it was clicked on, so it's visible) */
if (event->button == GDK_BUTTON_PRIMARY) {
zathura_document_set_current_page_number(zathura->document, zathura_page_get_index(page));
refresh_view(zathura);
}
if (event->button != 1 || !(event->state & GDK_CONTROL_MASK)) {
return;
}
bool synctex = false;
girara_setting_get(zathura->ui.session, "synctex", &synctex);
if (synctex == false) {
return;
}
if (zathura->dbus != NULL) {
zathura_dbus_edit(zathura->dbus, zathura_page_get_index(page), event->x, event->y);
}
char* editor = NULL;
girara_setting_get(zathura->ui.session, "synctex-editor-command", &editor);
if (editor == NULL || *editor == '\0') {
g_free(editor);
return;
}
synctex_edit(editor, page, event->x, event->y);
g_free(editor);
}
zathura-0.3.8/zathura/callbacks.h 0000664 0001750 0001750 00000014500 13216464200 017452 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef CALLBACKS_H
#define CALLBACKS_H
#include
#include
#include
#include "internal.h"
#include "document.h"
#include "zathura.h"
/**
* Quits the current zathura session
*
* @param widget The gtk window of zathura
* @param zathura Correspondending zathura session
* @return true if no error occurred and the event has been handled
*/
gboolean cb_destroy(GtkWidget* widget, zathura_t* zathura);
/**
* This function gets called when the buffer of girara changes
*
* @param session The girara session
*/
void cb_buffer_changed(girara_session_t* session);
/**
* This function gets called when the value of the horizontal scrollbars
* changes (e.g.: by scrolling, moving to another page)
*
* @param adjustment The hadjustment of the page view
* @param data NULL
*/
void cb_view_hadjustment_value_changed(GtkAdjustment *adjustment, gpointer data);
/**
* This function gets called when the value of the vertical scrollbars
* changes (e.g.: by scrolling, moving to another page)
*
* @param adjustment The vadjustment of the page view
* @param data NULL
*/
void cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data);
/**
* This function gets called when the bounds or the page_size of the horizontal
* scrollbar change (e.g. when the zoom level is changed).
*
* It adjusts the value of the horizontal scrollbar
*
* @param adjustment The horizontal adjustment of a gtkScrolledWindow
* @param data The zathura instance
*/
void cb_view_hadjustment_changed(GtkAdjustment *adjustment, gpointer data);
/**
* This function gets called when the bounds or the page_size of the vertical
* scrollbar change (e.g. when the zoom level is changed).
*
* It adjusts the value of the vertical scrollbar based on its previous
* adjustment, stored in the tracking adjustment zathura->ui.hadjustment.
*
* @param adjustment The vertical adjustment of a gtkScrolledWindow
* @param data The zathura instance
*/
void cb_view_vadjustment_changed(GtkAdjustment *adjustment, gpointer data);
/**
* This function gets called when the program need to refresh the document view.
*
* It adjusts the value of the scrollbars, triggering a redraw in the new
* position.
*
* @param view The view GtkWidget
* @param data The zathura instance
*/
void cb_refresh_view(GtkWidget* view, gpointer data);
/**
* This function gets called when the value of the "pages-per-row"
* variable changes
*
* @param session The current girara session
* @param name The name of the row
* @param type The settings type
* @param value The value
* @param data Custom data
*/
void cb_page_layout_value_changed(girara_session_t* session, const char* name,
girara_setting_type_t type, void* value, void* data);
/**
* Called when an index element is activated (e.g.: double click)
*
* @param tree_view Tree view
* @param path Path
* @param column Column
* @param zathura Zathura session
*/
void cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
GtkTreeViewColumn* column, void* zathura);
/**
* Called when input has been passed to the sc_follow dialog
*
* @param entry The dialog inputbar
* @param session The girara session
* @return true if no error occurred and the event has been handled
*/
gboolean cb_sc_follow(GtkEntry* entry, void* session);
/**
* Called when input has been passed to the sc_display_link dialog
*
* @param entry The dialog inputbar
* @param session The girara session
* @return true if no error occurred and the event has been handled
*/
gboolean cb_sc_display_link(GtkEntry* entry, void* session);
/**
* Emitted when file has been changed
*
* @param monitor The file monitor
* @param session The girara session
*/
void cb_file_monitor(ZathuraFileMonitor* monitor, girara_session_t* session);
/**
* Callback to read new password for file that should be opened
*
* @param entry The password entry
* @param dialog The dialog information
* @return true if input has been handled
*/
gboolean cb_password_dialog(GtkEntry* entry, void* dialog);
/**
* Emitted when the view has been resized
*
* @param widget View
* @param allocation Allocation
* @param zathura Zathura session
* @return true if signal has been handled successfully
*/
gboolean cb_view_resized(GtkWidget* widget, GtkAllocation* allocation, zathura_t* zathura);
/**
* Emitted when the 'recolor' setting is changed
*
* @param session Girara session
* @param name Name of the setting ("recolor")
* @param type Type of the setting (BOOLEAN)
* @param value New value
* @param data Custom data
*/
void cb_setting_recolor_change(girara_session_t* session, const char* name,
girara_setting_type_t type, void* value, void* data);
/**
* Emitted when the 'recolor-keephue' setting is changed
*
* @param session Girara session
* @param name Name of the setting ("recolor")
* @param type Type of the setting (BOOLEAN)
* @param value New value
* @param data Custom data
*/
void cb_setting_recolor_keep_hue_change(girara_session_t* session, const char* name,
girara_setting_type_t type, void* value, void* data);
/**
* Emitted when the 'recolor-reverse-video' setting is changed
*
* @param session Girara session
* @param name Name of the setting ("recolor")
* @param type Type of the setting (BOOLEAN)
* @param value New value
* @param data Custom data
*/
void cb_setting_recolor_keep_reverse_video_change(girara_session_t* session,
const char* name, girara_setting_type_t type, void* value, void* data);
/**
* Unknown command handler which is used to handle the strict numeric goto
* command
*
* @param session The girara session
* @param input The command input
* @return true if the input has been handled
*/
bool cb_unknown_command(girara_session_t* session, const char* input);
/**
* Emitted when text has been selected in the page widget
*
* @param page page view widget
* @param text selected text
* @param data user data
*/
void cb_page_widget_text_selected(ZathuraPage* page, const char* text,
void* data);
void cb_page_widget_image_selected(ZathuraPage* page, GdkPixbuf* pixbuf,
void* data);
void cb_page_widget_scaled_button_release(ZathuraPage* page,
GdkEventButton* event, void* data);
void
cb_page_widget_link(ZathuraPage* page, void* data);
void
update_visible_pages(zathura_t* zathura);
#endif // CALLBACKS_H
zathura-0.3.8/zathura/checked-integer-arithmetic.c 0000664 0001750 0001750 00000000541 12750077577 022721 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "checked-integer-arithmetic.h"
#include
#include
#ifndef HAVE_BUILTIN
bool
checked_umul(unsigned int lhs, unsigned int rhs, unsigned int* res)
{
const uint64_t r = (uint64_t) lhs * (uint64_t) rhs;
*res = (unsigned int) r;
return r > UINT_MAX;
}
#endif
zathura-0.3.8/zathura/checked-integer-arithmetic.h 0000664 0001750 0001750 00000001627 12750077577 022734 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef ZATHURA_CHECKED_INTEGER_ARITHMETIC_H
#define ZATHURA_CHECKED_INTEGER_ARITHMETIC_H
#include "macros.h"
#include
#if __GNUC__ >= 5
#define HAVE_BUILTIN
#elif defined(__clang__)
#if __has_builtin(__builtin_add_overflow)
#define HAVE_BUILTIN
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_BUILTIN
#define checked_umul(lhs, rhs, res) __builtin_umul_overflow((lhs), (rhs), (res))
#else
/**
* Helper function for multiplication with overflow detection. This function has
* the same semantics as the __builtin_*mul_overflow functions.
*
* @param[in] lhs first operand
* @param[in] rhs second operand
* @param[out] res result
* @return true if an overflow occurred, false otherwise
*/
GIRARA_HIDDEN bool checked_umul(unsigned int lhs, unsigned int rhs, unsigned int* res);
#endif
#ifdef __cplusplus
}
#endif
#endif
zathura-0.3.8/zathura/commands.c 0000664 0001750 0001750 00000043245 13216464200 017337 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include "commands.h"
#include "shortcuts.h"
#include "bookmarks.h"
#include "database.h"
#include "document.h"
#include "zathura.h"
#include "print.h"
#include "document.h"
#include "utils.h"
#include "page-widget.h"
#include "page.h"
#include "plugin.h"
#include "internal.h"
#include "render.h"
#include "adjustment.h"
#include
#include
#include
#include
#include
bool
cmd_bookmark_create(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
const unsigned int argc = girara_list_size(argument_list);
if (argc != 1) {
girara_notify(session, GIRARA_ERROR, _("Invalid number of arguments given."));
return false;
}
const char* bookmark_name = girara_list_nth(argument_list, 0);
zathura_bookmark_t* bookmark = zathura_bookmark_get(zathura, bookmark_name);
bool update = bookmark != NULL ? true : false;
bookmark = zathura_bookmark_add(zathura, bookmark_name, zathura_document_get_current_page_number(zathura->document) + 1);
if (bookmark == NULL) {
if (update == true) {
girara_notify(session, GIRARA_ERROR, _("Could not update bookmark: %s"), bookmark_name);
} else {
girara_notify(session, GIRARA_ERROR, _("Could not create bookmark: %s"), bookmark_name);
}
return false;
} else {
if (update == true) {
girara_notify(session, GIRARA_INFO, _("Bookmark successfully updated: %s"), bookmark_name);
} else {
girara_notify(session, GIRARA_INFO, _("Bookmark successfully created: %s"), bookmark_name);
}
}
return true;
}
bool
cmd_bookmark_delete(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
const unsigned int argc = girara_list_size(argument_list);
if (argc != 1) {
girara_notify(session, GIRARA_ERROR, _("Invalid number of arguments given."));
return false;
}
const char* bookmark = girara_list_nth(argument_list, 0);
if (zathura_bookmark_remove(zathura, bookmark)) {
girara_notify(session, GIRARA_INFO, _("Removed bookmark: %s"), bookmark);
} else {
girara_notify(session, GIRARA_ERROR, _("Failed to remove bookmark: %s"), bookmark);
}
return true;
}
bool
cmd_bookmark_open(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
const unsigned int argc = girara_list_size(argument_list);
if (argc != 1) {
GString* string = g_string_new(NULL);
GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark)
g_string_append_printf(string, "%s : %u\n", bookmark->id, bookmark->page);
GIRARA_LIST_FOREACH_END(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark);
if (strlen(string->str) > 0) {
g_string_erase(string, strlen(string->str) - 1, 1);
girara_notify(session, GIRARA_INFO, "%s", string->str);
} else {
girara_notify(session, GIRARA_INFO, _("No bookmarks available."));
}
g_string_free(string, TRUE);
return false;
}
const char* bookmark_name = girara_list_nth(argument_list, 0);
zathura_bookmark_t* bookmark = zathura_bookmark_get(zathura, bookmark_name);
if (bookmark == NULL) {
girara_notify(session, GIRARA_ERROR, _("No such bookmark: %s"), bookmark_name);
return false;
}
zathura_jumplist_add(zathura);
page_set(zathura, bookmark->page - 1);
if (bookmark->x != DBL_MIN && bookmark->y != DBL_MIN) {
position_set(zathura, bookmark->x, bookmark->y);
}
zathura_jumplist_add(zathura);
return true;
}
bool
cmd_close(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
return true;
}
document_close(zathura, false);
return true;
}
bool
cmd_info(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
struct meta_field {
char* name;
zathura_document_information_type_t field;
};
const struct meta_field meta_fields[] = {
{ _("Title"), ZATHURA_DOCUMENT_INFORMATION_TITLE },
{ _("Author"), ZATHURA_DOCUMENT_INFORMATION_AUTHOR },
{ _("Subject"), ZATHURA_DOCUMENT_INFORMATION_SUBJECT },
{ _("Keywords"), ZATHURA_DOCUMENT_INFORMATION_KEYWORDS },
{ _("Creator"), ZATHURA_DOCUMENT_INFORMATION_CREATOR },
{ _("Producer"), ZATHURA_DOCUMENT_INFORMATION_PRODUCER },
{ _("Creation date"), ZATHURA_DOCUMENT_INFORMATION_CREATION_DATE },
{ _("Modification date"), ZATHURA_DOCUMENT_INFORMATION_MODIFICATION_DATE }
};
girara_list_t* information = zathura_document_get_information(zathura->document, NULL);
if (information == NULL) {
girara_notify(session, GIRARA_INFO, _("No information available."));
return false;
}
GString* string = g_string_new(NULL);
GIRARA_LIST_FOREACH(information, zathura_document_information_entry_t*, iter, entry)
if (entry != NULL) {
for (unsigned int i = 0; i < LENGTH(meta_fields); i++) {
if (meta_fields[i].field == entry->type) {
g_string_append_printf(string, "%s: %s\n", meta_fields[i].name, entry->value);
}
}
}
GIRARA_LIST_FOREACH_END(information, zathura_document_information_entry_t*, iter, entry);
if (strlen(string->str) > 0) {
g_string_erase(string, strlen(string->str) - 1, 1);
girara_notify(session, GIRARA_INFO, "%s", string->str);
} else {
girara_notify(session, GIRARA_INFO, _("No information available."));
}
g_string_free(string, TRUE);
return false;
}
bool
cmd_help(girara_session_t* UNUSED(session), girara_list_t*
UNUSED(argument_list))
{
return true;
}
bool
cmd_hlsearch(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
document_draw_search_results(zathura, true);
render_all(zathura);
return true;
}
bool
cmd_open(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
const int argc = girara_list_size(argument_list);
if (argc > 2) {
girara_notify(session, GIRARA_ERROR, _("Too many arguments."));
return false;
} else if (argc >= 1) {
if (zathura->document != NULL) {
document_close(zathura, false);
}
document_open_idle(zathura, girara_list_nth(argument_list, 0),
(argc == 2) ? girara_list_nth(argument_list, 1) : NULL,
ZATHURA_PAGE_NUMBER_UNSPECIFIED, NULL, NULL);
} else {
girara_notify(session, GIRARA_ERROR, _("No arguments given."));
return false;
}
return true;
}
bool
cmd_quit(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
sc_quit(session, NULL, NULL, 0);
return true;
}
bool
cmd_print(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
print(zathura);
return true;
}
bool
cmd_nohlsearch(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
document_draw_search_results(zathura, false);
render_all(zathura);
return true;
}
bool
cmd_save(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
if (girara_list_size(argument_list) == 1) {
if (document_save(zathura, girara_list_nth(argument_list, 0), false) == true) {
girara_notify(session, GIRARA_INFO, _("Document saved."));
} else {
girara_notify(session, GIRARA_INFO, _("Failed to save document."));
}
} else {
girara_notify(session, GIRARA_ERROR, _("Invalid number of arguments."));
return false;
}
return true;
}
bool
cmd_savef(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
if (girara_list_size(argument_list) == 1) {
if (document_save(zathura, girara_list_nth(argument_list, 0), true) == true) {
girara_notify(session, GIRARA_INFO, _("Document saved."));
} else {
girara_notify(session, GIRARA_INFO, _("Failed to save document."));
}
} else {
girara_notify(session, GIRARA_ERROR, _("Invalid number of arguments."));
return false;
}
return true;
}
bool
cmd_search(girara_session_t* session, const char* input, girara_argument_t* argument)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(input != NULL, false);
g_return_val_if_fail(argument != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL || strlen(input) == 0) {
return false;
}
zathura_error_t error = ZATHURA_ERROR_OK;
/* set search direction */
zathura->global.search_direction = argument->n;
unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document);
unsigned int current_page_number = zathura_document_get_current_page_number(zathura->document);
/* reset search highlighting */
bool nohlsearch = false;
girara_setting_get(session, "nohlsearch", &nohlsearch);
/* search pages */
for (unsigned int page_id = 0; page_id < number_of_pages; ++page_id) {
unsigned int index = (page_id + current_page_number) % number_of_pages;
zathura_page_t* page = zathura_document_get_page(zathura->document, index);
if (page == NULL) {
continue;
}
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
GObject* obj_page_widget = G_OBJECT(page_widget);
g_object_set(obj_page_widget, "draw-links", FALSE, NULL);
zathura_renderer_lock(zathura->sync.render_thread);
girara_list_t* result = zathura_page_search_text(page, input, &error);
zathura_renderer_unlock(zathura->sync.render_thread);
if (result == NULL || girara_list_size(result) == 0) {
girara_list_free(result);
g_object_set(obj_page_widget, "search-results", NULL, NULL);
if (error == ZATHURA_ERROR_NOT_IMPLEMENTED) {
break;
} else {
continue;
}
}
g_object_set(obj_page_widget, "search-results", result, NULL);
if (argument->n == BACKWARD) {
/* start at bottom hit in page */
g_object_set(obj_page_widget, "search-current", girara_list_size(result) - 1, NULL);
} else {
g_object_set(obj_page_widget, "search-current", 0, NULL);
}
}
girara_argument_t* arg = g_try_malloc0(sizeof(girara_argument_t));
if (arg == NULL) {
return false;
}
arg->n = FORWARD;
arg->data = (void*) input;
sc_search(session, arg, NULL, 0);
g_free(arg);
return true;
}
bool
cmd_export(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
if (girara_list_size(argument_list) != 2) {
girara_notify(session, GIRARA_ERROR, _("Invalid number of arguments given."));
return false;
}
const char* file_identifier = girara_list_nth(argument_list, 0);
const char* file_name = girara_list_nth(argument_list, 1);
if (file_name == NULL || file_identifier == NULL) {
return false;
}
char* export_path = girara_fix_path(file_name);
if (export_path == NULL) {
return false;
}
/* attachment */
if (strncmp(file_identifier, "attachment-", strlen("attachment-")) == 0) {
if (zathura_document_attachment_save(zathura->document, file_identifier + strlen("attachment-"), export_path) == false) {
girara_notify(session, GIRARA_ERROR, _("Couldn't write attachment '%s' to '%s'."), file_identifier, file_name);
} else {
girara_notify(session, GIRARA_INFO, _("Wrote attachment '%s' to '%s'."), file_identifier, export_path);
}
/* image */
} else if (strncmp(file_identifier, "image-p", strlen("image-p")) == 0 && strlen(file_identifier) >= 10) {
/* parse page id */
const char* input = file_identifier + strlen("image-p");
int page_id = atoi(input);
if (page_id == 0) {
goto image_error;
}
/* parse image id */
input = strstr(input, "-");
if (input == NULL) {
goto image_error;
}
int image_id = atoi(input + 1);
if (image_id == 0) {
goto image_error;
}
/* get image */
zathura_page_t* page = zathura_document_get_page(zathura->document, page_id - 1);
if (page == NULL) {
goto image_error;
}
girara_list_t* images = zathura_page_images_get(page, NULL);
if (images == NULL) {
goto image_error;
}
zathura_image_t* image = girara_list_nth(images, image_id - 1);
if (image == NULL) {
goto image_error;
}
cairo_surface_t* surface = zathura_page_image_get_cairo(page, image, NULL);
if (surface == NULL) {
goto image_error;
}
if (cairo_surface_write_to_png(surface, export_path) == CAIRO_STATUS_SUCCESS) {
girara_notify(session, GIRARA_INFO, _("Wrote image '%s' to '%s'."), file_identifier, export_path);
} else {
girara_notify(session, GIRARA_ERROR, _("Couldn't write image '%s' to '%s'."), file_identifier, file_name);
}
goto error_ret;
image_error:
girara_notify(session, GIRARA_ERROR, _("Unknown image '%s'."), file_identifier);
goto error_ret;
/* unknown */
} else {
girara_notify(session, GIRARA_ERROR, _("Unknown attachment or image '%s'."), file_identifier);
}
error_ret:
g_free(export_path);
return true;
}
bool
cmd_exec(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document != NULL) {
const char* path = zathura_document_get_path(zathura->document);
GIRARA_LIST_FOREACH(argument_list, char*, iter, value)
char* r = girara_replace_substring(value, "$FILE", path);
if (r != NULL) {
char* s = girara_replace_substring(r, "%", path);
g_free(r);
if (s != NULL) {
girara_list_iterator_set(iter, s);
}
}
GIRARA_LIST_FOREACH_END(argument_list, char*, iter, value);
}
return girara_exec_with_argument_list(session, argument_list);
}
bool
cmd_offset(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_ERROR, _("No document opened."));
return false;
}
/* no argument: take current page as offset */
int page_offset = zathura_document_get_current_page_number(zathura->document);
/* retrieve offset from argument */
if (girara_list_size(argument_list) == 1) {
const char* value = girara_list_nth(argument_list, 0);
if (value != NULL) {
page_offset = atoi(value);
if (page_offset == 0 && strcmp(value, "0") != 0) {
girara_notify(session, GIRARA_WARNING, _("Argument must be a number."));
return false;
}
}
}
zathura_document_set_page_offset(zathura->document, page_offset);
return true;
}
bool
cmd_version(girara_session_t* session, girara_list_t* UNUSED(argument_list))
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
char* string = zathura_get_version_string(zathura, true);
if (string == NULL) {
return false;
}
/* display information */
girara_notify(session, GIRARA_INFO, "%s", string);
g_free(string);
return true;
}
zathura-0.3.8/zathura/commands.h 0000664 0001750 0001750 00000010671 12750077577 017364 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef COMMANDS_H
#define COMMANDS_H
#include
#include
/**
* Create a bookmark
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_bookmark_create(girara_session_t* session, girara_list_t* argument_list);
/**
* Delete a bookmark
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_bookmark_delete(girara_session_t* session, girara_list_t* argument_list);
/**
* Open a bookmark
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_bookmark_open(girara_session_t* session, girara_list_t* argument_list);
/**
* Close zathura
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_close(girara_session_t* session, girara_list_t* argument_list);
/**
* Display document information
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_info(girara_session_t* session, girara_list_t* argument_list);
/**
* Display help
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_help(girara_session_t* session, girara_list_t* argument_list);
/**
* Shows current search results
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_hlsearch(girara_session_t* session, girara_list_t* argument_list);
/**
* Opens a document file
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_open(girara_session_t* session, girara_list_t* argument_list);
/**
* Print the current file
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_print(girara_session_t* session, girara_list_t* argument_list);
/**
* Hides current search results
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_nohlsearch(girara_session_t* session, girara_list_t* argument_list);
/**
* Close zathura
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_quit(girara_session_t* session, girara_list_t* argument_list);
/**
* Save the current file
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_save(girara_session_t* session, girara_list_t* argument_list);
/**
* Save the current file and overwrite existing files
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_savef(girara_session_t* session, girara_list_t* argument_list);
/**
* Search the current file
*
* @param session The used girara session
* @param input The current input
* @param argument Passed argument
* @return true if no error occurred
*/
bool cmd_search(girara_session_t* session, const char* input, girara_argument_t* argument);
/**
* Save attachment to a file
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_export(girara_session_t* session, girara_list_t* argument_list);
/**
* Execute command
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_exec(girara_session_t* session, girara_list_t* argument_list);
/**
* Set page offset
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_offset(girara_session_t* session, girara_list_t* argument_list);
/**
* Shows version information
*
* @param session The used girara session
* @param argument_list List of passed arguments
* @return true if no error occurred
*/
bool cmd_version(girara_session_t* session, girara_list_t* argument_list);
#endif // COMMANDS_H
zathura-0.3.8/zathura/completion.c 0000664 0001750 0001750 00000026532 13216464200 017707 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include
#include "bookmarks.h"
#include "document.h"
#include "completion.h"
#include "utils.h"
#include "page.h"
#include "database.h"
#include
#include
#include
#include
#include
static int
compare_case_insensitive(const char* str1, const char* str2)
{
char* ustr1 = g_utf8_casefold(str1, -1);
char* ustr2 = g_utf8_casefold(str2, -1);
int res = g_utf8_collate(ustr1, ustr2);
g_free(ustr1);
g_free(ustr2);
return res;
}
static girara_list_t*
list_files(zathura_t* zathura, const char* current_path, const char* current_file,
size_t current_file_length, bool is_dir, bool check_file_ext)
{
if (zathura == NULL || zathura->ui.session == NULL || current_path == NULL) {
return NULL;
}
girara_debug("checking files in %s", current_path);
/* read directory */
GDir* dir = g_dir_open(current_path, 0, NULL);
if (dir == NULL) {
return NULL;
}
girara_list_t* res = girara_sorted_list_new2((girara_compare_function_t)compare_case_insensitive,
(girara_free_function_t)g_free);
bool show_hidden = false;
girara_setting_get(zathura->ui.session, "show-hidden", &show_hidden);
bool show_directories = true;
girara_setting_get(zathura->ui.session, "show-directories", &show_directories);
/* read files */
const char* name = NULL;
while ((name = g_dir_read_name(dir)) != NULL) {
char* e_name = g_filename_display_name(name);
if (e_name == NULL) {
goto error_free;
}
size_t e_length = strlen(e_name);
if (show_hidden == false && e_name[0] == '.') {
g_free(e_name);
continue;
}
if ((current_file_length > e_length) || strncmp(current_file, e_name, current_file_length)) {
g_free(e_name);
continue;
}
char* tmp = "/";
if (is_dir == true || g_strcmp0(current_path, "/") == 0) {
tmp = "";
};
char* full_path = g_strdup_printf("%s%s%s", current_path, tmp, e_name);
g_free(e_name);
if (g_file_test(full_path, G_FILE_TEST_IS_DIR) == true) {
if (show_directories == false) {
girara_debug("ignoring %s (directory)", full_path);
g_free(full_path);
continue;
}
girara_debug("adding %s (directory)", full_path);
girara_list_append(res, full_path);
} else if (check_file_ext == false || file_valid_extension(zathura, full_path) == true) {
girara_debug("adding %s (file)", full_path);
girara_list_append(res, full_path);
} else {
girara_debug("ignoring %s (file)", full_path);
g_free(full_path);
}
}
g_dir_close(dir);
if (girara_list_size(res) == 1) {
char* path = girara_list_nth(res, 0);
if (g_file_test(path, G_FILE_TEST_IS_DIR) == true) {
girara_debug("changing to directory %s", path);
char* newpath = g_strdup_printf("%s/", path);
girara_list_clear(res);
girara_list_append(res, newpath);
}
}
return res;
error_free:
g_dir_close(dir);
girara_list_free(res);
return NULL;
}
static girara_completion_t*
list_files_for_cc(zathura_t* zathura, const char* input, bool check_file_ext, int show_recent)
{
girara_completion_t* completion = girara_completion_init();
girara_completion_group_t* group = girara_completion_group_create(zathura->ui.session, "files");
girara_completion_group_t* history_group = NULL;
gchar* path = NULL;
gchar* current_path = NULL;
if (show_recent > 0) {
history_group = girara_completion_group_create(zathura->ui.session, "recent files");
}
if (completion == NULL || group == NULL || (show_recent > 0 && history_group == NULL)) {
goto error_free;
}
path = girara_fix_path(input);
if (path == NULL) {
goto error_free;
}
/* If the path does not begin with a slash we update the path with the current
* working directory */
if (strlen(path) == 0 || path[0] != '/') {
char* cwd = g_get_current_dir();
if (cwd == NULL) {
goto error_free;
}
char* tmp_path = g_strdup_printf("%s/%s", cwd, path);
g_free(cwd);
if (tmp_path == NULL) {
goto error_free;
}
g_free(path);
path = tmp_path;
}
/* Append a slash if the given argument is a directory */
bool is_dir = (path[strlen(path) - 1] == '/') ? true : false;
if ((g_file_test(path, G_FILE_TEST_IS_DIR) == TRUE) && is_dir == false) {
char* tmp_path = g_strdup_printf("%s/", path);
g_free(path);
path = tmp_path;
is_dir = true;
}
/* get current path */
current_path = is_dir ? g_strdup(path) : g_path_get_dirname(path);
/* get current file */
gchar* current_file = is_dir ? "" : basename(path);
const size_t current_file_length = strlen(current_file);
/* read directory */
if (g_file_test(current_path, G_FILE_TEST_IS_DIR) == TRUE) {
girara_list_t* names = list_files(zathura, current_path, current_file, current_file_length, is_dir, check_file_ext);
if (names == NULL) {
goto error_free;
}
GIRARA_LIST_FOREACH(names, const char*, iter, file)
girara_completion_group_add_element(group, file, NULL);
GIRARA_LIST_FOREACH_END(names, const char*, iter, file);
girara_list_free(names);
}
if (show_recent > 0 && zathura->database != NULL) {
girara_list_t* recent_files = zathura_db_get_recent_files(zathura->database, show_recent, path);
if (recent_files == NULL) {
goto error_free;
}
if (girara_list_size(recent_files) != 0) {
GIRARA_LIST_FOREACH(recent_files, const char*, iter, file)
girara_debug("adding %s (recent file)", file);
girara_completion_group_add_element(history_group, file, NULL);
GIRARA_LIST_FOREACH_END(recent_files, const char*, iter, file);
girara_list_free(recent_files);
} else {
girara_completion_group_free(history_group);
history_group = NULL;
}
}
g_free(path);
g_free(current_path);
if (history_group != NULL) {
girara_completion_add_group(completion, history_group);
}
girara_completion_add_group(completion, group);
return completion;
error_free:
if (completion) {
girara_completion_free(completion);
}
if (history_group) {
girara_completion_group_free(history_group);
}
if (group) {
girara_completion_group_free(group);
}
g_free(current_path);
g_free(path);
return NULL;
}
girara_completion_t*
cc_open(girara_session_t* session, const char* input)
{
g_return_val_if_fail(session != NULL, NULL);
g_return_val_if_fail(session->global.data != NULL, NULL);
zathura_t* zathura = session->global.data;
int show_recent = 0;
girara_setting_get(zathura->ui.session, "show-recent", &show_recent);
return list_files_for_cc(zathura, input, true, show_recent);
}
girara_completion_t*
cc_write(girara_session_t* session, const char* input)
{
g_return_val_if_fail(session != NULL, NULL);
g_return_val_if_fail(session->global.data != NULL, NULL);
zathura_t* zathura = session->global.data;
return list_files_for_cc(zathura, input, false, false);
}
girara_completion_t*
cc_bookmarks(girara_session_t* session, const char* input)
{
if (input == NULL) {
return NULL;
}
g_return_val_if_fail(session != NULL, NULL);
g_return_val_if_fail(session->global.data != NULL, NULL);
zathura_t* zathura = session->global.data;
girara_completion_t* completion = girara_completion_init();
girara_completion_group_t* group = girara_completion_group_create(session, NULL);
if (completion == NULL || group == NULL) {
goto error_free;
}
const size_t input_length = strlen(input);
GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark)
if (input_length <= strlen(bookmark->id) && !strncmp(input, bookmark->id, input_length)) {
gchar* paged = g_strdup_printf(_("Page %d"), bookmark->page);
girara_completion_group_add_element(group, bookmark->id, paged);
g_free(paged);
}
GIRARA_LIST_FOREACH_END(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark);
girara_completion_add_group(completion, group);
return completion;
error_free:
if (completion != NULL) {
girara_completion_free(completion);
}
if (group != NULL) {
girara_completion_group_free(group);
}
return NULL;
}
girara_completion_t*
cc_export(girara_session_t* session, const char* input)
{
g_return_val_if_fail(session != NULL, NULL);
g_return_val_if_fail(session->global.data != NULL, NULL);
zathura_t* zathura = session->global.data;
if (input == NULL || zathura->document == NULL) {
goto error_ret;
}
girara_completion_t* completion = NULL;
girara_completion_group_t* attachment_group = NULL;
girara_completion_group_t* image_group = NULL;
completion = girara_completion_init();
if (completion == NULL) {
goto error_free;
}
attachment_group = girara_completion_group_create(session, _("Attachments"));
if (attachment_group == NULL) {
goto error_free;
}
/* add attachments */
const size_t input_length = strlen(input);
girara_list_t* attachments = zathura_document_attachments_get(zathura->document, NULL);
if (attachments != NULL) {
bool added = false;
GIRARA_LIST_FOREACH(attachments, const char*, iter, attachment)
if (input_length <= strlen(attachment) && !strncmp(input, attachment, input_length)) {
char* attachment_string = g_strdup_printf("attachment-%s", attachment);
girara_completion_group_add_element(attachment_group, attachment_string, NULL);
g_free(attachment_string);
added = true;
}
GIRARA_LIST_FOREACH_END(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark);
if (added == true) {
girara_completion_add_group(completion, attachment_group);
} else {
girara_completion_group_free(attachment_group);
attachment_group = NULL;
}
girara_list_free(attachments);
}
/* add images */
image_group = girara_completion_group_create(session, _("Images"));
if (image_group == NULL) {
goto error_free;
}
bool added = false;
unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document);
for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) {
zathura_page_t* page = zathura_document_get_page(zathura->document, page_id);
if (page == NULL) {
continue;
}
girara_list_t* images = zathura_page_images_get(page, NULL);
if (images != NULL) {
unsigned int image_number = 1;
GIRARA_LIST_FOREACH(images, zathura_image_t*, iter, UNUSED(image))
char* image_string = g_strdup_printf("image-p%d-%d", page_id + 1, image_number);
girara_completion_group_add_element(image_group, image_string, NULL);
g_free(image_string);
added = true;
image_number++;
GIRARA_LIST_FOREACH_END(images, zathura_image_t*, iter, image);
girara_list_free(images);
}
}
if (added == true) {
girara_completion_add_group(completion, image_group);
} else {
girara_completion_group_free(image_group);
image_group = NULL;
}
return completion;
error_free:
if (completion != NULL) {
girara_completion_free(completion);
}
if (attachment_group != NULL) {
girara_completion_group_free(attachment_group);
}
if (image_group != NULL) {
girara_completion_group_free(image_group);
}
error_ret:
return NULL;
}
zathura-0.3.8/zathura/completion.h 0000664 0001750 0001750 00000002520 12750077577 017726 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef COMPLETION_H
#define COMPLETION_H
#include
/**
* Completion for the open command - Creates a list of accesible directories or
* files
*
* @param session The used girara session
* @param input The current input
* @return The completion object or NULL if an error occurred
*/
girara_completion_t* cc_open(girara_session_t* session, const char* input);
/**
* Completion for the write command - Creates a list of accesible directories or
* files
*
* @param session The used girara session
* @param input The current input
* @return The completion object or NULL if an error occurred
*/
girara_completion_t* cc_write(girara_session_t* session, const char* input);
/**
* Completion for the bmarks command - Creates a list of bookmarks
*
* @param session The used girara session
* @param input The current input
* @return The completion object or NULL if an error occurred
*/
girara_completion_t* cc_bookmarks(girara_session_t* session, const char* input);
/**
* Completion for the export command - Creates a list of attachments
*
* @param session the girara session
* @param input the current input
* @return completion object, NULL on error
*/
girara_completion_t* cc_export(girara_session_t* session, const char* input);
#endif // COMPLETION_H
zathura-0.3.8/zathura/config.c 0000664 0001750 0001750 00000120252 13216464200 016775 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "config.h"
#include "commands.h"
#include "completion.h"
#include "callbacks.h"
#include "shortcuts.h"
#include "zathura.h"
#include "render.h"
#include "marks.h"
#include "utils.h"
#include
#include
#include
#include
#include
#include
#include
#define GLOBAL_RC "/etc/zathurarc"
#define ZATHURA_RC "zathurarc"
static void
cb_jumplist_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
g_return_if_fail(name != NULL);
zathura_t* zathura = session->global.data;
const int* ivalue = value;
if (*ivalue < 0) {
zathura->jumplist.max_size = 0;
} else {
zathura->jumplist.max_size = *ivalue;
}
if (zathura->jumplist.list != NULL && zathura->jumplist.size != 0) {
zathura_jumplist_trim(zathura);
}
}
static void
cb_color_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
g_return_if_fail(name != NULL);
zathura_t* zathura = session->global.data;
const char* string_value = (const char*) value;
if (g_strcmp0(name, "highlight-color") == 0) {
gdk_rgba_parse(&(zathura->ui.colors.highlight_color), string_value);
} else if (g_strcmp0(name, "highlight-active-color") == 0) {
gdk_rgba_parse(&(zathura->ui.colors.highlight_color_active), string_value);
} else if (g_strcmp0(name, "recolor-darkcolor") == 0) {
if (zathura->sync.render_thread != NULL) {
zathura_renderer_set_recolor_colors_str(zathura->sync.render_thread, NULL, string_value);
}
} else if (g_strcmp0(name, "recolor-lightcolor") == 0) {
if (zathura->sync.render_thread != NULL) {
zathura_renderer_set_recolor_colors_str(zathura->sync.render_thread, string_value, NULL);
}
} else if (g_strcmp0(name, "render-loading-bg") == 0) {
gdk_rgba_parse(&(zathura->ui.colors.render_loading_bg), string_value);
} else if (g_strcmp0(name, "render-loading-fg") == 0) {
gdk_rgba_parse(&(zathura->ui.colors.render_loading_fg), string_value);
}
render_all(zathura);
}
static void
cb_nohlsearch_changed(girara_session_t* session, const char* UNUSED(name),
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
zathura_t* zathura = session->global.data;
bool* bvalue = value;
document_draw_search_results(zathura, !*bvalue);
render_all(zathura);
}
static void
cb_incsearch_changed(girara_session_t* session, const char* UNUSED(name),
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{
g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL);
g_return_if_fail(session->global.data != NULL);
bool inc_search = *(bool*) value;
girara_special_command_add(session, '/', cmd_search, inc_search, FORWARD, NULL);
girara_special_command_add(session, '?', cmd_search, inc_search, BACKWARD, NULL);
}
void
config_load_default(zathura_t* zathura)
{
if (zathura == NULL || zathura->ui.session == NULL) {
return;
}
int int_value = 0;
float float_value = 0;
bool bool_value = false;
char* string_value = NULL;
girara_session_t* gsession = zathura->ui.session;
/* mode settings */
zathura->modes.normal = gsession->modes.normal;
zathura->modes.fullscreen = girara_mode_add(gsession, "fullscreen");
zathura->modes.index = girara_mode_add(gsession, "index");
zathura->modes.insert = girara_mode_add(gsession, "insert");
zathura->modes.presentation = girara_mode_add(gsession, "presentation");
#define NORMAL zathura->modes.normal
#define INSERT zathura->modes.insert
#define INDEX zathura->modes.index
#define FULLSCREEN zathura->modes.fullscreen
#define PRESENTATION zathura->modes.presentation
const girara_mode_t all_modes[] = {
NORMAL,
INSERT,
INDEX,
FULLSCREEN,
PRESENTATION
};
/* Set default mode */
girara_mode_set(gsession, zathura->modes.normal);
/* zathura settings */
girara_setting_add(gsession, "database", "plain", STRING, true, _("Database backend"), NULL, NULL);
girara_setting_add(gsession, "filemonitor", "glib", STRING, true, _("File monitor backend"), NULL, NULL);
int_value = 10;
girara_setting_add(gsession, "zoom-step", &int_value, INT, false, _("Zoom step"), NULL, NULL);
int_value = 1;
girara_setting_add(gsession, "page-padding", &int_value, INT, false, _("Padding between pages"), cb_page_layout_value_changed, NULL);
int_value = 1;
girara_setting_add(gsession, "pages-per-row", &int_value, INT, false, _("Number of pages per row"), cb_page_layout_value_changed, NULL);
int_value = 1;
girara_setting_add(gsession, "first-page-column", "1:2", STRING, false, _("Column of the first page"), cb_page_layout_value_changed, NULL);
float_value = 40;
girara_setting_add(gsession, "scroll-step", &float_value, FLOAT, false, _("Scroll step"), NULL, NULL);
float_value = 40;
girara_setting_add(gsession, "scroll-hstep", &float_value, FLOAT, false, _("Horizontal scroll step"), NULL, NULL);
float_value = 0.0;
girara_setting_add(gsession, "scroll-full-overlap", &float_value, FLOAT, false, _("Full page scroll overlap"), NULL, NULL);
int_value = 10;
girara_setting_add(gsession, "zoom-min", &int_value, INT, false, _("Zoom minimum"), NULL, NULL);
int_value = 1000;
girara_setting_add(gsession, "zoom-max", &int_value, INT, false, _("Zoom maximum"), NULL, NULL);
int_value = ZATHURA_PAGE_CACHE_DEFAULT_SIZE;
girara_setting_add(gsession, "page-cache-size", &int_value, INT, true, _("Maximum number of pages to keep in the cache"), NULL, NULL);
int_value = ZATHURA_PAGE_THUMBNAIL_DEFAULT_SIZE;
girara_setting_add(gsession, "page-thumbnail-size", &int_value, INT, true, _("Maximum size in pixels of thumbnails to keep in the cache"), NULL, NULL);
int_value = 2000;
girara_setting_add(gsession, "jumplist-size", &int_value, INT, false, _("Number of positions to remember in the jumplist"), cb_jumplist_change, NULL);
girara_setting_add(gsession, "recolor-darkcolor", "#FFFFFF", STRING, false, _("Recoloring (dark color)"), cb_color_change, NULL);
girara_setting_add(gsession, "recolor-lightcolor", "#000000", STRING, false, _("Recoloring (light color)"), cb_color_change, NULL);
girara_setting_add(gsession, "highlight-color", NULL, STRING, false, _("Color for highlighting"), cb_color_change, NULL);
girara_setting_set(gsession, "highlight-color", "#9FBC00");
girara_setting_add(gsession, "highlight-active-color", NULL, STRING, false, _("Color for highlighting (active)"), cb_color_change, NULL);
girara_setting_set(gsession, "highlight-active-color", "#00BC00");
girara_setting_add(gsession, "render-loading-bg", NULL, STRING, false, _("'Loading ...' background color"), cb_color_change, NULL);
girara_setting_set(gsession, "render-loading-bg", "#FFFFFF");
girara_setting_add(gsession, "render-loading-fg", NULL, STRING, false, _("'Loading ...' foreground color"), cb_color_change, NULL);
girara_setting_set(gsession, "render-loading-fg", "#000000");
girara_setting_add(gsession, "index-fg", "#DDDDDD", STRING, true, _("Index mode foreground color"), NULL, NULL);
girara_setting_add(gsession, "index-bg", "#232323", STRING, true, _("Index mode background color"), NULL, NULL);
girara_setting_add(gsession, "index-active-fg", "#232323", STRING, true, _("Index mode foreground color (active element)"), NULL, NULL);
girara_setting_add(gsession, "index-active-bg", "#9FBC00", STRING, true, _("Index mode background color (active element)"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "recolor", &bool_value, BOOLEAN, false, _("Recolor pages"), cb_setting_recolor_change, NULL);
bool_value = false;
girara_setting_add(gsession, "recolor-keephue", &bool_value, BOOLEAN, false, _("When recoloring keep original hue and adjust lightness only"), cb_setting_recolor_keep_hue_change, NULL);
bool_value = false;
girara_setting_add(gsession, "recolor-reverse-video", &bool_value, BOOLEAN, false, _("When recoloring keep original image colors"), cb_setting_recolor_keep_reverse_video_change, NULL);
bool_value = false;
girara_setting_add(gsession, "scroll-wrap", &bool_value, BOOLEAN, false, _("Wrap scrolling"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "scroll-page-aware", &bool_value, BOOLEAN, false, _("Page aware scrolling"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "advance-pages-per-row", &bool_value, BOOLEAN, false, _("Advance number of pages per row"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "zoom-center", &bool_value, BOOLEAN, false, _("Horizontally centered zoom"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "vertical-center", &bool_value, BOOLEAN, false, _("Vertically center pages"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "link-hadjust", &bool_value, BOOLEAN, false, _("Align link target to the left"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "link-zoom", &bool_value, BOOLEAN, false, _("Let zoom be changed when following links"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "search-hadjust", &bool_value, BOOLEAN, false, _("Center result horizontally"), NULL, NULL);
float_value = 0.5;
girara_setting_add(gsession, "highlight-transparency", &float_value, FLOAT, false, _("Transparency for highlighting"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "render-loading", &bool_value, BOOLEAN, false, _("Render 'Loading ...'"), NULL, NULL);
girara_setting_add(gsession, "adjust-open", "best-fit", STRING, false, _("Adjust to when opening file"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "show-hidden", &bool_value, BOOLEAN, false, _("Show hidden files and directories"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "show-directories", &bool_value, BOOLEAN, false, _("Show directories"), NULL, NULL);
int_value = 10;
girara_setting_add(gsession, "show-recent", &int_value, INT, false, _("Show recent files"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "open-first-page", &bool_value, BOOLEAN, false, _("Always open on first page"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "nohlsearch", &bool_value, BOOLEAN, false, _("Highlight search results"), cb_nohlsearch_changed, NULL);
#define INCREMENTAL_SEARCH false
bool_value = INCREMENTAL_SEARCH;
girara_setting_add(gsession, "incremental-search", &bool_value, BOOLEAN, false, _("Enable incremental search"), cb_incsearch_changed, NULL);
bool_value = true;
girara_setting_add(gsession, "abort-clear-search", &bool_value, BOOLEAN, false, _("Clear search results on abort"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "window-title-basename", &bool_value, BOOLEAN, false, _("Use basename of the file in the window title"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "window-title-home-tilde", &bool_value, BOOLEAN, false, _("Use ~ instead of $HOME in the filename in the window title"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "window-title-page", &bool_value, BOOLEAN, false, _("Display the page number in the window title"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "statusbar-basename", &bool_value, BOOLEAN, false, _("Use basename of the file in the statusbar"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "statusbar-home-tilde", &bool_value, BOOLEAN, false, _("Use ~ instead of $HOME in the filename in the statusbar"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "synctex", &bool_value, BOOLEAN, false, _("Enable synctex support"), NULL, NULL);
string_value = "";
girara_setting_add(gsession, "synctex-editor-command", string_value, STRING, false, _("Synctex editor command"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "dbus-service", &bool_value, BOOLEAN, false, _("Enable D-Bus service"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "continuous-hist-save", &bool_value, BOOLEAN, false, _("Save history at each page change"), NULL, NULL);
string_value = "primary";
girara_setting_add(gsession, "selection-clipboard", string_value, STRING, false, _("The clipboard into which mouse-selected data will be written"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "selection-notification", &bool_value, BOOLEAN, false, _("Enable notification after selecting text"), NULL, NULL);
#define DEFAULT_SHORTCUTS(mode) \
girara_shortcut_add(gsession, 0, GDK_KEY_a, NULL, sc_adjust_window, (mode), ZATHURA_ADJUST_BESTFIT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_s, NULL, sc_adjust_window, (mode), ZATHURA_ADJUST_WIDTH, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_F, NULL, sc_display_link, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_slash, NULL, sc_focus_inputbar, (mode), 0, &("/")); \
girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_slash, NULL, sc_focus_inputbar, (mode), 0, &("/")); \
girara_shortcut_add(gsession, 0, GDK_KEY_question, NULL, sc_focus_inputbar, (mode), 0, &("?")); \
girara_shortcut_add(gsession, 0, GDK_KEY_colon, NULL, sc_focus_inputbar, (mode), 0, &(":")); \
girara_shortcut_add(gsession, 0, GDK_KEY_o, NULL, sc_focus_inputbar, (mode), 0, &(":open ")); \
girara_shortcut_add(gsession, 0, GDK_KEY_O, NULL, sc_focus_inputbar, (mode), APPEND_FILEPATH, &(":open ")); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_f, NULL, sc_follow, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, 0, 0, "gg", sc_goto, (mode), TOP, NULL); \
girara_shortcut_add(gsession, 0, 0, "G", sc_goto, (mode), BOTTOM, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_m, NULL, sc_mark_add, (mode), 0, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_apostrophe, NULL, sc_mark_evaluate, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_J, NULL, sc_navigate, (mode), NEXT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_K, NULL, sc_navigate, (mode), PREVIOUS, NULL); \
girara_shortcut_add(gsession, GDK_MOD1_MASK, GDK_KEY_Right, NULL, sc_navigate, (mode), NEXT, NULL); \
girara_shortcut_add(gsession, GDK_MOD1_MASK, GDK_KEY_Left, NULL, sc_navigate, (mode), PREVIOUS, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Down, NULL, sc_navigate, (mode), NEXT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Up, NULL, sc_navigate, (mode), PREVIOUS, NULL); \
\
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_p, NULL, sc_print, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_r, NULL, sc_recolor, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_R, NULL, sc_reload, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_r, NULL, sc_rotate, (mode), ROTATE_CW, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_h, NULL, sc_scroll, (mode), LEFT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_j, NULL, sc_scroll, (mode), DOWN, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_k, NULL, sc_scroll, (mode), UP, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_l, NULL, sc_scroll, (mode), RIGHT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_Left, NULL, sc_scroll, (mode), LEFT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_Up, NULL, sc_scroll, (mode), UP, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_Down, NULL, sc_scroll, (mode), DOWN, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_H, NULL, sc_scroll, (mode), PAGE_TOP, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_L, NULL, sc_scroll, (mode), PAGE_BOTTOM, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_Right, NULL, sc_scroll, (mode), RIGHT, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_t, NULL, sc_scroll, (mode), HALF_LEFT, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_d, NULL, sc_scroll, (mode), HALF_DOWN, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_u, NULL, sc_scroll, (mode), HALF_UP, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_y, NULL, sc_scroll, (mode), HALF_RIGHT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_t, NULL, sc_scroll, (mode), FULL_LEFT, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_f, NULL, sc_scroll, (mode), FULL_DOWN, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_b, NULL, sc_scroll, (mode), FULL_UP, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_y, NULL, sc_scroll, (mode), FULL_RIGHT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_space, NULL, sc_scroll, (mode), FULL_DOWN, NULL); \
girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_space, NULL, sc_scroll, (mode), FULL_UP, NULL); \
\
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_o, NULL, sc_jumplist, (mode), BACKWARD, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_i, NULL, sc_jumplist, (mode), FORWARD, NULL); \
\
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_j, NULL, sc_bisect, (mode), FORWARD, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_k, NULL, sc_bisect, (mode), BACKWARD, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_n, NULL, sc_search, (mode), FORWARD, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_N, NULL, sc_search, (mode), BACKWARD, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_Tab, NULL, sc_toggle_index, (mode), 0, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_n, NULL, girara_sc_toggle_statusbar, (mode), 0, NULL); \
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_m, NULL, girara_sc_toggle_inputbar, (mode), 0, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_d, NULL, sc_toggle_page_mode, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_q, NULL, sc_quit, (mode), 0, NULL); \
\
girara_shortcut_add(gsession, 0, GDK_KEY_plus, NULL, sc_zoom, (mode), ZOOM_IN, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_KP_Add, NULL, sc_zoom, (mode), ZOOM_IN, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_minus, NULL, sc_zoom, (mode), ZOOM_OUT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_KP_Subtract,NULL, sc_zoom, (mode), ZOOM_OUT, NULL); \
girara_shortcut_add(gsession, 0, GDK_KEY_equal, NULL, sc_zoom, (mode), ZOOM_SPECIFIC, NULL); \
girara_shortcut_add(gsession, 0, 0, "zi", sc_zoom, (mode), ZOOM_IN, NULL); \
girara_shortcut_add(gsession, 0, 0, "zI", sc_zoom, (mode), ZOOM_IN, NULL); \
girara_shortcut_add(gsession, 0, 0, "zo", sc_zoom, (mode), ZOOM_OUT, NULL); \
girara_shortcut_add(gsession, 0, 0, "zO", sc_zoom, (mode), ZOOM_OUT, NULL); \
girara_shortcut_add(gsession, 0, 0, "z0", sc_zoom, (mode), ZOOM_ORIGINAL, NULL); \
girara_shortcut_add(gsession, 0, 0, "zz", sc_zoom, (mode), ZOOM_SPECIFIC, NULL); \
girara_shortcut_add(gsession, 0, 0, "zZ", sc_zoom, (mode), ZOOM_SPECIFIC, NULL);
#define DEFAULT_MOUSE_EVENTS(mode) \
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_SCROLL_UP, UP, NULL); \
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL); \
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_SCROLL_LEFT, LEFT, NULL); \
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_SCROLL_RIGHT, RIGHT, NULL); \
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_SCROLL_BIDIRECTIONAL, BIDIRECTIONAL, NULL); \
\
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_SCROLL_UP, LEFT, NULL); \
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_SCROLL_DOWN, RIGHT, NULL); \
\
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, (mode), GIRARA_EVENT_SCROLL_UP, UP, NULL); \
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, (mode), GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL); \
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, (mode), GIRARA_EVENT_SCROLL_BIDIRECTIONAL, BIDIRECTIONAL, NULL); \
girara_mouse_event_add(gsession, 0, GIRARA_MOUSE_BUTTON2, sc_mouse_scroll, (mode), GIRARA_EVENT_BUTTON_PRESS, 0, NULL); \
girara_mouse_event_add(gsession, GDK_BUTTON2_MASK, GIRARA_MOUSE_BUTTON2, sc_mouse_scroll, (mode), GIRARA_EVENT_BUTTON_RELEASE, 0, NULL); \
girara_mouse_event_add(gsession, GDK_BUTTON2_MASK, 0, sc_mouse_scroll, (mode), GIRARA_EVENT_MOTION_NOTIFY, 0, NULL); \
/* Define mode-less shortcuts
* girara adds them only for normal mode, so passing 0 as mode is currently
* not enough. We need to add/override for every mode. */
for (size_t idx = 0; idx != LENGTH(all_modes); ++idx) {
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, NULL, sc_abort, all_modes[idx], 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Escape, NULL, sc_abort, all_modes[idx], 0, NULL);
}
/* Normal mode */
girara_shortcut_add(gsession, 0, GDK_KEY_F5, NULL, sc_toggle_presentation, NORMAL, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_F11, NULL, sc_toggle_fullscreen, NORMAL, 0, NULL);
DEFAULT_SHORTCUTS(NORMAL)
/* Normal mode - Mouse events */
DEFAULT_MOUSE_EVENTS(NORMAL)
/* Fullscreen mode */
girara_shortcut_add(gsession, 0, GDK_KEY_F11, NULL, sc_toggle_fullscreen, FULLSCREEN, 0, NULL);
DEFAULT_SHORTCUTS(FULLSCREEN)
/* Fullscreen mode - Mouse events */
DEFAULT_MOUSE_EVENTS(FULLSCREEN)
/* Index mode */
girara_shortcut_add(gsession, 0, GDK_KEY_Tab, NULL, sc_toggle_index, INDEX, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_k, NULL, sc_navigate_index, INDEX, UP, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_j, NULL, sc_navigate_index, INDEX, DOWN, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_h, NULL, sc_navigate_index, INDEX, COLLAPSE, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_l, NULL, sc_navigate_index, INDEX, EXPAND, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_L, NULL, sc_navigate_index, INDEX, EXPAND_ALL, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_H, NULL, sc_navigate_index, INDEX, COLLAPSE_ALL, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Up, NULL, sc_navigate_index, INDEX, UP, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Down, NULL, sc_navigate_index, INDEX, DOWN, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Left, NULL, sc_navigate_index, INDEX, COLLAPSE, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Right, NULL, sc_navigate_index, INDEX, EXPAND, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_space, NULL, sc_navigate_index, INDEX, SELECT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Return, NULL, sc_navigate_index, INDEX, SELECT, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_j, NULL, sc_navigate_index, INDEX, SELECT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_q, NULL, sc_quit, INDEX, 0, NULL);
girara_shortcut_add(gsession, 0, 0, "gg", sc_navigate_index, INDEX, TOP, NULL);
girara_shortcut_add(gsession, 0, 0, "G", sc_navigate_index, INDEX, BOTTOM, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Escape, NULL, sc_toggle_index, INDEX, 0, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_bracketleft, NULL, sc_toggle_index, INDEX, 0, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, NULL, sc_toggle_index, INDEX, 0, NULL);
/* Presentation mode */
girara_shortcut_add(gsession, 0, GDK_KEY_J, NULL, sc_navigate, PRESENTATION, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Down, NULL, sc_navigate, PRESENTATION, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Right, NULL, sc_navigate, PRESENTATION, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Down, NULL, sc_navigate, PRESENTATION, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_space, NULL, sc_navigate, PRESENTATION, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_K, NULL, sc_navigate, PRESENTATION, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Left, NULL, sc_navigate, PRESENTATION, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Up, NULL, sc_navigate, PRESENTATION, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Up, NULL, sc_navigate, PRESENTATION, PREVIOUS, NULL);
girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_space, NULL, sc_navigate, PRESENTATION, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_BackSpace, NULL, sc_navigate, PRESENTATION, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_F5, NULL, sc_toggle_presentation, PRESENTATION, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_q, NULL, sc_quit, PRESENTATION, 0, NULL);
/* Presentation mode - Mouse events */
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, PRESENTATION, GIRARA_EVENT_SCROLL_UP, UP, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, PRESENTATION, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, PRESENTATION, GIRARA_EVENT_SCROLL_LEFT, LEFT, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, PRESENTATION, GIRARA_EVENT_SCROLL_RIGHT, RIGHT, NULL);
girara_mouse_event_add(gsession, 0, GIRARA_MOUSE_BUTTON1, sc_navigate, PRESENTATION, GIRARA_EVENT_BUTTON_PRESS, NEXT, NULL);
girara_mouse_event_add(gsession, 0, GIRARA_MOUSE_BUTTON3, sc_navigate, PRESENTATION, GIRARA_EVENT_BUTTON_PRESS, PREVIOUS, NULL);
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, PRESENTATION, GIRARA_EVENT_SCROLL_UP, LEFT, NULL);
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, PRESENTATION, GIRARA_EVENT_SCROLL_DOWN, RIGHT, NULL);
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, PRESENTATION, GIRARA_EVENT_SCROLL_UP, UP, NULL);
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, PRESENTATION, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL);
/* inputbar shortcuts */
girara_inputbar_shortcut_add(gsession, 0, GDK_KEY_Escape, sc_abort, 0, NULL);
girara_inputbar_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, sc_abort, 0, NULL);
/* define default inputbar commands */
girara_inputbar_command_add(gsession, "bmark", NULL, cmd_bookmark_create, NULL, _("Add a bookmark"));
girara_inputbar_command_add(gsession, "bdelete", NULL, cmd_bookmark_delete, cc_bookmarks, _("Delete a bookmark"));
girara_inputbar_command_add(gsession, "blist", NULL, cmd_bookmark_open, cc_bookmarks, _("List all bookmarks"));
girara_inputbar_command_add(gsession, "close", NULL, cmd_close, NULL, _("Close current file"));
girara_inputbar_command_add(gsession, "info", NULL, cmd_info, NULL, _("Show file information"));
girara_inputbar_command_add(gsession, "exec", NULL, cmd_exec, NULL, _("Execute a command"));
girara_inputbar_command_add(gsession, "!", NULL, cmd_exec, NULL, _("Execute a command")); /* like vim */
girara_inputbar_command_add(gsession, "help", NULL, cmd_help, NULL, _("Show help"));
girara_inputbar_command_add(gsession, "open", "o", cmd_open, cc_open, _("Open document"));
girara_inputbar_command_add(gsession, "quit", "q", cmd_quit, NULL, _("Close zathura"));
girara_inputbar_command_add(gsession, "print", NULL, cmd_print, NULL, _("Print document"));
girara_inputbar_command_add(gsession, "write", NULL, cmd_save, cc_write, _("Save document"));
girara_inputbar_command_add(gsession, "write!", NULL, cmd_savef, cc_write, _("Save document (and force overwriting)"));
girara_inputbar_command_add(gsession, "export", NULL, cmd_export, cc_export, _("Save attachments"));
girara_inputbar_command_add(gsession, "offset", NULL, cmd_offset, NULL, _("Set page offset"));
girara_inputbar_command_add(gsession, "mark", NULL, cmd_marks_add, NULL, _("Mark current location within the document"));
girara_inputbar_command_add(gsession, "delmarks", "delm", cmd_marks_delete, NULL, _("Delete the specified marks"));
girara_inputbar_command_add(gsession, "nohlsearch", "nohl", cmd_nohlsearch, NULL, _("Don't highlight current search results"));
girara_inputbar_command_add(gsession, "hlsearch", NULL, cmd_hlsearch, NULL, _("Highlight current search results"));
girara_inputbar_command_add(gsession, "version", NULL, cmd_version, NULL, _("Show version information"));
girara_special_command_add(gsession, '/', cmd_search, INCREMENTAL_SEARCH, FORWARD, NULL);
girara_special_command_add(gsession, '?', cmd_search, INCREMENTAL_SEARCH, BACKWARD, NULL);
/* add shortcut mappings */
girara_shortcut_mapping_add(gsession, "abort", sc_abort);
girara_shortcut_mapping_add(gsession, "adjust_window", sc_adjust_window);
girara_shortcut_mapping_add(gsession, "bisect", sc_bisect);
girara_shortcut_mapping_add(gsession, "change_mode", sc_change_mode);
girara_shortcut_mapping_add(gsession, "display_link", sc_display_link);
girara_shortcut_mapping_add(gsession, "exec", sc_exec);
girara_shortcut_mapping_add(gsession, "focus_inputbar", sc_focus_inputbar);
girara_shortcut_mapping_add(gsession, "follow", sc_follow);
girara_shortcut_mapping_add(gsession, "goto", sc_goto);
girara_shortcut_mapping_add(gsession, "jumplist", sc_jumplist);
girara_shortcut_mapping_add(gsession, "mark_add", sc_mark_add);
girara_shortcut_mapping_add(gsession, "mark_evaluate", sc_mark_evaluate);
girara_shortcut_mapping_add(gsession, "navigate", sc_navigate);
girara_shortcut_mapping_add(gsession, "navigate_index", sc_navigate_index);
girara_shortcut_mapping_add(gsession, "print", sc_print);
girara_shortcut_mapping_add(gsession, "quit", sc_quit);
girara_shortcut_mapping_add(gsession, "recolor", sc_recolor);
girara_shortcut_mapping_add(gsession, "reload", sc_reload);
girara_shortcut_mapping_add(gsession, "rotate", sc_rotate);
girara_shortcut_mapping_add(gsession, "scroll", sc_scroll);
girara_shortcut_mapping_add(gsession, "search", sc_search);
girara_shortcut_mapping_add(gsession, "toggle_fullscreen", sc_toggle_fullscreen);
girara_shortcut_mapping_add(gsession, "toggle_index", sc_toggle_index);
girara_shortcut_mapping_add(gsession, "toggle_page_mode", sc_toggle_page_mode);
girara_shortcut_mapping_add(gsession, "toggle_presentation", sc_toggle_presentation);
girara_shortcut_mapping_add(gsession, "zoom", sc_zoom);
/* add argument mappings */
girara_argument_mapping_add(gsession, "backward", BACKWARD);
girara_argument_mapping_add(gsession, "bottom", BOTTOM);
girara_argument_mapping_add(gsession, "default", DEFAULT);
girara_argument_mapping_add(gsession, "collapse", COLLAPSE);
girara_argument_mapping_add(gsession, "collapse-all", COLLAPSE_ALL);
girara_argument_mapping_add(gsession, "down", DOWN);
girara_argument_mapping_add(gsession, "expand", EXPAND);
girara_argument_mapping_add(gsession, "expand-all", EXPAND_ALL);
girara_argument_mapping_add(gsession, "select", SELECT);
girara_argument_mapping_add(gsession, "toggle", TOGGLE);
girara_argument_mapping_add(gsession, "forward", FORWARD);
girara_argument_mapping_add(gsession, "full-down", FULL_DOWN);
girara_argument_mapping_add(gsession, "full-up", FULL_UP);
girara_argument_mapping_add(gsession, "half-down", HALF_DOWN);
girara_argument_mapping_add(gsession, "half-up", HALF_UP);
girara_argument_mapping_add(gsession, "full-right", FULL_RIGHT);
girara_argument_mapping_add(gsession, "full-left", FULL_LEFT);
girara_argument_mapping_add(gsession, "half-right", HALF_RIGHT);
girara_argument_mapping_add(gsession, "half-left", HALF_LEFT);
girara_argument_mapping_add(gsession, "in", ZOOM_IN);
girara_argument_mapping_add(gsession, "left", LEFT);
girara_argument_mapping_add(gsession, "next", NEXT);
girara_argument_mapping_add(gsession, "out", ZOOM_OUT);
girara_argument_mapping_add(gsession, "page-top", PAGE_TOP);
girara_argument_mapping_add(gsession, "page-bottom", PAGE_BOTTOM);
girara_argument_mapping_add(gsession, "previous", PREVIOUS);
girara_argument_mapping_add(gsession, "right", RIGHT);
girara_argument_mapping_add(gsession, "specific", ZOOM_SPECIFIC);
girara_argument_mapping_add(gsession, "top", TOP);
girara_argument_mapping_add(gsession, "up", UP);
girara_argument_mapping_add(gsession, "best-fit", ZATHURA_ADJUST_BESTFIT);
girara_argument_mapping_add(gsession, "width", ZATHURA_ADJUST_WIDTH);
girara_argument_mapping_add(gsession, "rotate-cw", ROTATE_CW);
girara_argument_mapping_add(gsession, "rotate-ccw", ROTATE_CCW);
}
void
config_load_files(zathura_t* zathura)
{
/* load global configuration files */
char* config_path = girara_get_xdg_path(XDG_CONFIG_DIRS);
girara_list_t* config_dirs = girara_split_path_array(config_path);
ssize_t size = girara_list_size(config_dirs) - 1;
for (; size >= 0; --size) {
const char* dir = girara_list_nth(config_dirs, size);
char* file = g_build_filename(dir, ZATHURA_RC, NULL);
girara_config_parse(zathura->ui.session, file);
g_free(file);
}
girara_list_free(config_dirs);
g_free(config_path);
girara_config_parse(zathura->ui.session, GLOBAL_RC);
/* load local configuration files */
char* configuration_file = g_build_filename(zathura->config.config_dir, ZATHURA_RC, NULL);
girara_config_parse(zathura->ui.session, configuration_file);
g_free(configuration_file);
}
zathura-0.3.8/zathura/config.h 0000664 0001750 0001750 00000000663 12653114226 017011 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef CONFIG_H
#define CONFIG_H
#include "zathura.h"
/**
* This function loads the default values of the configuration
*
* @param zathura The zathura session
*/
void config_load_default(zathura_t* zathura);
/**
* Loads and evaluates a configuration file
*
* @param zathura The zathura session
*/
void config_load_files(zathura_t* zathura);
#endif // CONFIG_H
zathura-0.3.8/zathura/content-type.c 0000664 0001750 0001750 00000011520 12750077577 020201 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#define _DEFAULT_SOURCE
#define _XOPEN_SOURCE 700
#include "content-type.h"
#include "macros.h"
#include
#ifdef WITH_MAGIC
#include
#else
#include
#include
#endif
#include
#include
#include
struct zathura_content_type_context_s
{
#ifdef WITH_MAGIC
magic_t magic;
#endif
};
zathura_content_type_context_t*
zathura_content_type_new(void)
{
zathura_content_type_context_t* context =
g_try_malloc0(sizeof(zathura_content_type_context_t));
if (context == NULL) {
return NULL;
}
#ifdef WITH_MAGIC
/* creat magic cookie */
const int flags =
MAGIC_MIME_TYPE |
MAGIC_SYMLINK |
MAGIC_NO_CHECK_APPTYPE |
MAGIC_NO_CHECK_CDF |
MAGIC_NO_CHECK_ELF |
MAGIC_NO_CHECK_ENCODING;
magic_t magic = magic_open(flags);
if (magic == NULL) {
girara_debug("failed creating the magic cookie");
return context;
}
/* ... and load mime database */
if (magic_load(magic, NULL) < 0) {
girara_debug("failed loading the magic database: %s", magic_error(magic));
magic_close(magic);
return context;
}
context->magic = magic;
#endif
return context;
}
void
zathura_content_type_free(zathura_content_type_context_t* context)
{
if (context == NULL) {
return;
}
#ifdef WITH_MAGIC
if (context->magic != NULL) {
magic_close(context->magic);
}
#endif
g_free(context);
}
/** Read a most GT_MAX_READ bytes before falling back to file. */
static const size_t GT_MAX_READ = 1 << 16;
#ifdef WITH_MAGIC
static char*
guess_type_magic(zathura_content_type_context_t* context, const char* path)
{
if (context == NULL || context->magic == NULL) {
return NULL;
}
const char* mime_type = NULL;
/* get the mime type */
mime_type = magic_file(context->magic, path);
if (mime_type == NULL) {
girara_debug("failed guessing filetype: %s", magic_error(context->magic));
return NULL;
}
girara_debug("magic detected filetype: %s", mime_type);
/* dup so we own the memory */
return g_strdup(mime_type);;
}
static char*
guess_type_file(const char* UNUSED(path))
{
return NULL;
}
#else
static const char*
guess_type_magic(zathura_content_type_context_t* UNUSED(context),
const char* UNUSED(path))
{
return NULL;
}
static char*
guess_type_file(const char* path)
{
GString* command = g_string_new("file -b --mime-type ");
char* tmp = g_shell_quote(path);
g_string_append(command, tmp);
g_free(tmp);
GError* error = NULL;
char* out = NULL;
int ret = 0;
g_spawn_command_line_sync(command->str, &out, NULL, &ret, &error);
g_string_free(command, TRUE);
if (error != NULL) {
girara_warning("failed to execute command: %s", error->message);
g_error_free(error);
g_free(out);
return NULL;
}
if (WEXITSTATUS(ret) != 0) {
girara_warning("file failed with error code: %d", WEXITSTATUS(ret));
g_free(out);
return NULL;
}
g_strdelimit(out, "\n\r", '\0');
return out;
}
#endif
static char*
guess_type_glib(const char* path)
{
gboolean uncertain = FALSE;
char* content_type = g_content_type_guess(path, NULL, 0, &uncertain);
if (content_type == NULL) {
girara_debug("g_content_type failed\n");
} else {
if (uncertain == FALSE) {
girara_debug("g_content_type detected filetype: %s", content_type);
return content_type;
}
girara_debug("g_content_type is uncertain, guess: %s", content_type);
}
FILE* f = fopen(path, "rb");
if (f == NULL) {
return NULL;
}
const int fd = fileno(f);
guchar* content = NULL;
size_t length = 0u;
ssize_t bytes_read = -1;
while (uncertain == TRUE && length < GT_MAX_READ && bytes_read != 0) {
g_free((void*)content_type);
content_type = NULL;
guchar* temp_content = g_try_realloc(content, length + BUFSIZ);
if (temp_content == NULL) {
break;
}
content = temp_content;
bytes_read = read(fd, content + length, BUFSIZ);
if (bytes_read == -1) {
break;
}
length += bytes_read;
content_type = g_content_type_guess(NULL, content, length, &uncertain);
girara_debug("new guess: %s uncertain: %d, read: %zu", content_type, uncertain, length);
}
fclose(f);
g_free(content);
if (uncertain == FALSE) {
return content_type;
}
g_free((void*)content_type);
return NULL;
}
char*
zathura_content_type_guess(zathura_content_type_context_t* context,
const char* path)
{
/* try libmagic first */
char* content_type = guess_type_magic(context, path);
if (content_type != NULL) {
return content_type;
}
/* else fallback to g_content_type_guess method */
content_type = guess_type_glib(path);
if (content_type != NULL) {
return content_type;
}
/* and if libmagic is not available, try file as last resort */
return guess_type_file(path);
}
zathura-0.3.8/zathura/content-type.h 0000664 0001750 0001750 00000001416 12750077577 020211 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef ZATHURA_CONTENT_TYPE_H
#define ZATHURA_CONTENT_TYPE_H
#include "types.h"
/**
* Create new context for MIME type detection.
*
* @return new context
*/
zathura_content_type_context_t* zathura_content_type_new(void);
/**
* Free MIME type detection context.
*
* @param context The context.
*/
void zathura_content_type_free(zathura_content_type_context_t* context);
/**
* "Guess" the content type of a file. Various methods are tried depending on
* the available libraries.
*
* @param path file name
* @return content type of path, needs to freeed with g_free.
*/
char* zathura_content_type_guess(zathura_content_type_context_t* context,
const char* path);
#endif
zathura-0.3.8/zathura/database-plain.c 0000664 0001750 0001750 00000061204 13216464200 020376 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#define _POSIX_SOURCE
#define _XOPEN_SOURCE 500
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "database-plain.h"
#include "utils.h"
#define BOOKMARKS "bookmarks"
#define HISTORY "history"
#define INPUT_HISTORY "input-history"
#define KEY_PAGE "page"
#define KEY_OFFSET "offset"
#define KEY_SCALE "scale"
#define KEY_ROTATE "rotate"
#define KEY_PAGES_PER_ROW "pages-per-row"
#define KEY_FIRST_PAGE_COLUMN "first-page-column"
#define KEY_POSITION_X "position-x"
#define KEY_POSITION_Y "position-y"
#define KEY_JUMPLIST "jumplist"
#define KEY_TIME "time"
#ifdef __GNU__
#include
#define file_lock_set(fd, cmd) flock(fd, cmd)
#else
#define file_lock_set(fd, cmd) \
{ \
struct flock lock = { .l_type = cmd, .l_start = 0, .l_whence = SEEK_SET, .l_len = 0}; \
fcntl(fd, F_SETLK, lock); \
}
#endif
static void zathura_database_interface_init(ZathuraDatabaseInterface* iface);
static void io_interface_init(GiraraInputHistoryIOInterface* iface);
G_DEFINE_TYPE_WITH_CODE(ZathuraPlainDatabase, zathura_plaindatabase, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE(ZATHURA_TYPE_DATABASE, zathura_database_interface_init)
G_IMPLEMENT_INTERFACE(GIRARA_TYPE_INPUT_HISTORY_IO, io_interface_init))
static void plain_dispose(GObject* object);
static void plain_finalize(GObject* object);
static bool plain_add_bookmark(zathura_database_t* db, const char* file, zathura_bookmark_t* bookmark);
static bool plain_remove_bookmark(zathura_database_t* db, const char* file, const char* id);
static girara_list_t* plain_load_bookmarks(zathura_database_t* db, const char* file);
static girara_list_t* plain_load_jumplist(zathura_database_t* db, const char* file);
static bool plain_save_jumplist(zathura_database_t* db, const char* file, girara_list_t* jumplist);
static bool plain_set_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t* file_info);
static bool plain_get_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t* file_info);
static void plain_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec);
static void plain_io_append(GiraraInputHistoryIO* db, const char*);
static girara_list_t* plain_io_read(GiraraInputHistoryIO* db);
static girara_list_t* plain_get_recent_files(zathura_database_t* db, int max, const char* basepath);
/* forward declaration */
static bool zathura_db_check_file(const char* path);
static GKeyFile* zathura_db_read_key_file_from_file(const char* path);
static void zathura_db_write_key_file_to_file(const char* file, GKeyFile* key_file);
static void cb_zathura_db_watch_file(GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event, zathura_database_t* database);
typedef struct zathura_plaindatabase_private_s {
char* bookmark_path;
GKeyFile* bookmarks;
GFileMonitor* bookmark_monitor;
char* history_path;
GKeyFile* history;
GFileMonitor* history_monitor;
char* input_history_path;
} zathura_plaindatabase_private_t;
#define ZATHURA_PLAINDATABASE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_PLAINDATABASE, zathura_plaindatabase_private_t))
enum {
PROP_0,
PROP_PATH
};
static char*
prepare_filename(const char* file)
{
if (file == NULL) {
return NULL;
}
if (strchr(file, '[') == NULL && strchr(file, ']') == NULL) {
return g_strdup(file);
}
return g_base64_encode((const guchar*) file, strlen(file));
}
static void
zathura_database_interface_init(ZathuraDatabaseInterface* iface)
{
/* initialize interface */
iface->add_bookmark = plain_add_bookmark;
iface->remove_bookmark = plain_remove_bookmark;
iface->load_bookmarks = plain_load_bookmarks;
iface->load_jumplist = plain_load_jumplist;
iface->save_jumplist = plain_save_jumplist;
iface->set_fileinfo = plain_set_fileinfo;
iface->get_fileinfo = plain_get_fileinfo;
iface->get_recent_files = plain_get_recent_files;
}
static void
io_interface_init(GiraraInputHistoryIOInterface* iface)
{
/* initialize interface */
iface->append = plain_io_append;
iface->read = plain_io_read;
}
static void
zathura_plaindatabase_class_init(ZathuraPlainDatabaseClass* class)
{
/* add private members */
g_type_class_add_private(class, sizeof(zathura_plaindatabase_private_t));
/* override methods */
GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->dispose = plain_dispose;
object_class->finalize = plain_finalize;
object_class->set_property = plain_set_property;
g_object_class_install_property(object_class, PROP_PATH,
g_param_spec_string("path", "path", "path to directory where the bookmarks and history are locates",
NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
}
static void
zathura_plaindatabase_init(ZathuraPlainDatabase* db)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
priv->bookmark_path = NULL;
priv->bookmark_monitor = NULL;
priv->bookmarks = NULL;
priv->history_path = NULL;
priv->history_monitor = NULL;
priv->history = NULL;
priv->input_history_path = NULL;
}
zathura_database_t*
zathura_plaindatabase_new(const char* path)
{
g_return_val_if_fail(path != NULL && strlen(path) != 0, NULL);
zathura_database_t* db = g_object_new(ZATHURA_TYPE_PLAINDATABASE, "path", path, NULL);
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->bookmark_path == NULL) {
g_object_unref(db);
return NULL;
}
return db;
}
static void
plain_db_init(ZathuraPlainDatabase* db, const char* dir)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
/* bookmarks */
priv->bookmark_path = g_build_filename(dir, BOOKMARKS, NULL);
if (zathura_db_check_file(priv->bookmark_path) == false) {
goto error_free;
}
GFile* bookmark_file = g_file_new_for_path(priv->bookmark_path);
if (bookmark_file != NULL) {
priv->bookmark_monitor = g_file_monitor(bookmark_file, G_FILE_MONITOR_NONE, NULL, NULL);
} else {
goto error_free;
}
g_object_unref(bookmark_file);
g_signal_connect(
G_OBJECT(priv->bookmark_monitor),
"changed",
G_CALLBACK(cb_zathura_db_watch_file),
db
);
priv->bookmarks = zathura_db_read_key_file_from_file(priv->bookmark_path);
if (priv->bookmarks == NULL) {
goto error_free;
}
/* history */
priv->history_path = g_build_filename(dir, HISTORY, NULL);
if (zathura_db_check_file(priv->history_path) == false) {
goto error_free;
}
GFile* history_file = g_file_new_for_path(priv->history_path);
if (history_file != NULL) {
priv->history_monitor = g_file_monitor(history_file, G_FILE_MONITOR_NONE, NULL, NULL);
} else {
goto error_free;
}
g_object_unref(history_file);
g_signal_connect(
G_OBJECT(priv->history_monitor),
"changed",
G_CALLBACK(cb_zathura_db_watch_file),
db
);
priv->history = zathura_db_read_key_file_from_file(priv->history_path);
if (priv->history == NULL) {
goto error_free;
}
/* input history */
priv->input_history_path = g_build_filename(dir, INPUT_HISTORY, NULL);
if (zathura_db_check_file(priv->input_history_path) == false) {
goto error_free;
}
return;
error_free:
/* bookmarks */
g_free(priv->bookmark_path);
priv->bookmark_path = NULL;
g_clear_object(&priv->bookmark_monitor);
if (priv->bookmarks != NULL) {
g_key_file_free(priv->bookmarks);
priv->bookmarks = NULL;
}
/* history */
g_free(priv->history_path);
priv->history_path = NULL;
g_clear_object(&priv->history_monitor);
if (priv->history != NULL) {
g_key_file_free(priv->history);
priv->history = NULL;
}
/* input history */
g_free(priv->input_history_path);
priv->input_history_path = NULL;
}
static void
plain_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
ZathuraPlainDatabase* db = ZATHURA_PLAINDATABASE(object);
switch (prop_id) {
case PROP_PATH:
plain_db_init(db, g_value_get_string(value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
}
static void
plain_dispose(GObject* object)
{
ZathuraPlainDatabase* db = ZATHURA_PLAINDATABASE(object);
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
g_clear_object(&priv->bookmark_monitor);
g_clear_object(&priv->history_monitor);
G_OBJECT_CLASS(zathura_plaindatabase_parent_class)->dispose(object);
}
static void
plain_finalize(GObject* object)
{
ZathuraPlainDatabase* db = ZATHURA_PLAINDATABASE(object);
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
/* bookmarks */
g_free(priv->bookmark_path);
if (priv->bookmarks != NULL) {
g_key_file_free(priv->bookmarks);
}
/* history */
g_free(priv->history_path);
if (priv->history != NULL) {
g_key_file_free(priv->history);
}
/* input history */
g_free(priv->input_history_path);
G_OBJECT_CLASS(zathura_plaindatabase_parent_class)->finalize(object);
}
static bool
plain_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->bookmarks == NULL || priv->bookmark_path == NULL ||
bookmark->id == NULL) {
return false;
}
char* name = prepare_filename(file);
char* val_list[] = {
g_strdup_printf("%d", bookmark->page),
g_try_malloc0(G_ASCII_DTOSTR_BUF_SIZE),
g_try_malloc0(G_ASCII_DTOSTR_BUF_SIZE)
};
if (name == NULL || val_list[1] == NULL || val_list[2] == NULL) {
g_free(name);
for (unsigned int i = 0; i < LENGTH(val_list); ++i) {
g_free(val_list[i]);
}
return false;
}
g_ascii_dtostr(val_list[1], G_ASCII_DTOSTR_BUF_SIZE, bookmark->x);
g_ascii_dtostr(val_list[2], G_ASCII_DTOSTR_BUF_SIZE, bookmark->y);
g_key_file_set_string_list(priv->bookmarks, name, bookmark->id, (const char**)val_list, LENGTH(val_list));
for (unsigned int i = 0; i < LENGTH(val_list); ++i) {
g_free(val_list[i]);
}
g_free(name);
zathura_db_write_key_file_to_file(priv->bookmark_path, priv->bookmarks);
return true;
}
static bool
plain_remove_bookmark(zathura_database_t* db, const char* file, const char* id)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->bookmarks == NULL || priv->bookmark_path == NULL) {
return false;
}
char* name = prepare_filename(file);
if (g_key_file_has_group(priv->bookmarks, name) == TRUE) {
if (g_key_file_remove_key(priv->bookmarks, name, id, NULL) == TRUE) {
zathura_db_write_key_file_to_file(priv->bookmark_path, priv->bookmarks);
g_free(name);
return true;
}
}
g_free(name);
return false;
}
static girara_list_t*
plain_load_bookmarks(zathura_database_t* db, const char* file)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->bookmarks == NULL) {
return NULL;
}
char* name = prepare_filename(file);
if (g_key_file_has_group(priv->bookmarks, name) == FALSE) {
g_free(name);
return NULL;
}
girara_list_t* result = girara_sorted_list_new2((girara_compare_function_t)
zathura_bookmarks_compare, (girara_free_function_t)
zathura_bookmark_free);
gsize num_keys;
char** keys = g_key_file_get_keys(priv->bookmarks, name, &num_keys, NULL);
if (keys == NULL) {
girara_list_free(result);
g_free(name);
return NULL;
}
gsize num_vals = 0;
for (gsize i = 0; i < num_keys; i++) {
zathura_bookmark_t* bookmark = g_try_malloc0(sizeof(zathura_bookmark_t));
if (bookmark == NULL) {
continue;
}
bookmark->id = g_strdup(keys[i]);
char** val_list = g_key_file_get_string_list(priv->bookmarks, name, keys[i],
&num_vals, NULL);
if (num_vals != 1 && num_vals != 3) {
girara_error("Unexpected number of values.");
g_free(bookmark);
g_strfreev(val_list);
continue;
}
bookmark->page = atoi(val_list[0]);
if (num_vals == 3) {
bookmark->x = g_ascii_strtod(val_list[1], NULL);
bookmark->y = g_ascii_strtod(val_list[2], NULL);
} else if (num_vals == 1) {
bookmark->x = DBL_MIN;
bookmark->y = DBL_MIN;
}
girara_list_append(result, bookmark);
g_strfreev(val_list);
}
g_free(name);
g_strfreev(keys);
return result;
}
static girara_list_t*
get_jumplist_from_str(const char* str)
{
g_return_val_if_fail(str != NULL, NULL);
if (*str == '\0') {
return girara_list_new2(g_free);
}
girara_list_t* result = girara_list_new2(g_free);
char* copy = g_strdup(str);
char* saveptr = NULL;
char* token = strtok_r(copy, " ", &saveptr);
while (token != NULL) {
zathura_jump_t* jump = g_try_malloc0(sizeof(zathura_jump_t));
if (jump == NULL) {
continue;
}
jump->page = strtoul(token, NULL, 0);
token = strtok_r(NULL, " ", &saveptr);
if (token == NULL) {
girara_warning("Could not parse jumplist information.");
g_free(jump);
break;
}
jump->x = g_ascii_strtod(token, NULL);
token = strtok_r(NULL, " ", &saveptr);
if (token == NULL) {
girara_warning("Could not parse jumplist information.");
g_free(jump);
break;
}
jump->y = g_ascii_strtod(token, NULL);
girara_list_append(result, jump);
token = strtok_r(NULL, " ", &saveptr);
}
g_free(copy);
return result;
}
static girara_list_t*
plain_load_jumplist(zathura_database_t* db, const char* file)
{
g_return_val_if_fail(db != NULL && file != NULL, NULL);
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
char* str_value = g_key_file_get_string(priv->history, file, KEY_JUMPLIST, NULL);
if (str_value == NULL) {
return girara_list_new2(g_free);
}
girara_list_t* list = get_jumplist_from_str(str_value);
g_free(str_value);
return list;
}
static bool
plain_save_jumplist(zathura_database_t* db, const char* file, girara_list_t* jumplist)
{
g_return_val_if_fail(db != NULL && file != NULL && jumplist != NULL, false);
GString* str_val = g_string_new(NULL);
GIRARA_LIST_FOREACH(jumplist, zathura_jump_t*, iter, jump)
char buffer[G_ASCII_DTOSTR_BUF_SIZE] = { '\0' };
g_string_append_printf(str_val, "%d ", jump->page);
g_string_append(str_val, g_ascii_dtostr(buffer, G_ASCII_DTOSTR_BUF_SIZE, jump->x));
g_string_append_c(str_val, ' ');
g_string_append(str_val, g_ascii_dtostr(buffer, G_ASCII_DTOSTR_BUF_SIZE, jump->y));
g_string_append_c(str_val, ' ');
GIRARA_LIST_FOREACH_END(jumplist, zathura_jump_t*, iter, jump);
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
g_key_file_set_string(priv->history, file, KEY_JUMPLIST, str_val->str);
zathura_db_write_key_file_to_file(priv->history_path, priv->history);
g_string_free(str_val, TRUE);
return true;
}
static bool
plain_set_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t*
file_info)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->history == NULL || file_info == NULL || file == NULL) {
return false;
}
char* name = prepare_filename(file);
g_key_file_set_integer(priv->history, name, KEY_PAGE, file_info->current_page);
g_key_file_set_integer(priv->history, name, KEY_OFFSET, file_info->page_offset);
g_key_file_set_double (priv->history, name, KEY_SCALE, file_info->scale);
g_key_file_set_integer(priv->history, name, KEY_ROTATE, file_info->rotation);
g_key_file_set_integer(priv->history, name, KEY_PAGES_PER_ROW, file_info->pages_per_row);
g_key_file_set_string(priv->history, name, KEY_FIRST_PAGE_COLUMN, file_info->first_page_column_list);
g_key_file_set_double (priv->history, name, KEY_POSITION_X, file_info->position_x);
g_key_file_set_double (priv->history, name, KEY_POSITION_Y, file_info->position_y);
g_key_file_set_integer(priv->history, name, KEY_TIME, time(NULL));
g_free(name);
zathura_db_write_key_file_to_file(priv->history_path, priv->history);
return true;
}
static bool
plain_get_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t*
file_info)
{
if (db == NULL || file == NULL || file_info == NULL) {
return false;
}
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->history == NULL) {
return false;
}
char* name = prepare_filename(file);
if (g_key_file_has_group(priv->history, name) == FALSE) {
g_free(name);
return false;
}
file_info->current_page = g_key_file_get_integer(priv->history, name, KEY_PAGE, NULL);
file_info->page_offset = g_key_file_get_integer(priv->history, name, KEY_OFFSET, NULL);
file_info->scale = g_key_file_get_double (priv->history, name, KEY_SCALE, NULL);
file_info->rotation = g_key_file_get_integer(priv->history, name, KEY_ROTATE, NULL);
/* the following flags got introduced at a later point */
if (g_key_file_has_key(priv->history, name, KEY_PAGES_PER_ROW, NULL) == TRUE) {
file_info->pages_per_row = g_key_file_get_integer(priv->history, name, KEY_PAGES_PER_ROW, NULL);
}
if (g_key_file_has_key(priv->history, name, KEY_FIRST_PAGE_COLUMN, NULL) == TRUE) {
file_info->first_page_column_list = g_key_file_get_string(priv->history, name, KEY_FIRST_PAGE_COLUMN, NULL);
}
if (g_key_file_has_key(priv->history, name, KEY_POSITION_X, NULL) == TRUE) {
file_info->position_x = g_key_file_get_double(priv->history, name, KEY_POSITION_X, NULL);
}
if (g_key_file_has_key(priv->history, name, KEY_POSITION_Y, NULL) == TRUE) {
file_info->position_y = g_key_file_get_double(priv->history, name, KEY_POSITION_Y, NULL);
}
g_free(name);
return true;
}
static bool
zathura_db_check_file(const char* path)
{
if (path == NULL) {
return false;
}
if (g_file_test(path, G_FILE_TEST_EXISTS) == false) {
FILE* file = fopen(path, "w");
if (file != NULL) {
fclose(file);
} else {
return false;
}
} else if (g_file_test(path, G_FILE_TEST_IS_REGULAR) == false) {
return false;
}
return true;
}
static GKeyFile*
zathura_db_read_key_file_from_file(const char* path)
{
if (path == NULL) {
return NULL;
}
/* open file */
FILE* file = fopen(path, "rw");
if (file == NULL) {
return NULL;
}
GKeyFile* key_file = g_key_file_new();
if (key_file == NULL) {
fclose(file);
return NULL;
}
/* read config file */
file_lock_set(fileno(file), F_WRLCK);
char* content = girara_file_read2(file);
file_lock_set(fileno(file), F_UNLCK);
fclose(file);
if (content == NULL) {
g_key_file_free(key_file);
return NULL;
}
/* parse config file */
size_t contentlen = strlen(content);
if (contentlen == 0) {
static const char dummy_content[] = "# nothing";
static const size_t dummy_len = sizeof(dummy_content) - 1;
free(content);
content = malloc(sizeof(char) * (dummy_len + 1));
if (content == NULL)
{
g_key_file_free(key_file);
return NULL;
}
g_strlcat(content, dummy_content, dummy_len + 1);
contentlen = dummy_len;
}
GError* error = NULL;
if (g_key_file_load_from_data(key_file, content, contentlen,
G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &error) ==
FALSE) {
if (error->code != 1) { /* ignore empty file */
free(content);
g_key_file_free(key_file);
g_error_free(error);
return NULL;
}
g_error_free(error);
}
free(content);
return key_file;
}
static void
zathura_db_write_key_file_to_file(const char* file, GKeyFile* key_file)
{
if (file == NULL || key_file == NULL) {
return;
}
gchar* content = g_key_file_to_data(key_file, NULL, NULL);
if (content == NULL) {
return;
}
/* open file */
int fd = open(file, O_RDWR | O_TRUNC);
if (fd == -1) {
g_free(content);
return;
}
file_lock_set(fd, F_WRLCK);
if (write(fd, content, strlen(content)) == 0) {
girara_error("Failed to write to %s", file);
}
file_lock_set(fd, F_UNLCK);
close(fd);
g_free(content);
}
static void
cb_zathura_db_watch_file(GFileMonitor* UNUSED(monitor), GFile* file, GFile* UNUSED(other_file),
GFileMonitorEvent event, zathura_database_t* database)
{
if (event != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT || database == NULL) {
return;
}
char* path = g_file_get_path(file);
if (path == NULL) {
return;
}
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(database);
if (priv->bookmark_path && strcmp(priv->bookmark_path, path) == 0) {
if (priv->bookmarks != NULL) {
g_key_file_free(priv->bookmarks);
}
priv->bookmarks = zathura_db_read_key_file_from_file(priv->bookmark_path);
} else if (priv->history_path && strcmp(priv->history_path, path) == 0) {
if (priv->history != NULL) {
g_key_file_free(priv->history);
}
priv->history = zathura_db_read_key_file_from_file(priv->history_path);
}
g_free(path);
}
static girara_list_t*
plain_io_read(GiraraInputHistoryIO* db)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
/* open file */
FILE* file = fopen(priv->input_history_path, "r");
if (file == NULL) {
return NULL;
}
/* read input history file */
file_lock_set(fileno(file), F_RDLCK);
char* content = girara_file_read2(file);
file_lock_set(fileno(file), F_UNLCK);
fclose(file);
girara_list_t* res = girara_list_new2(g_free);
char** tmp = g_strsplit(content, "\n", 0);
for (size_t i = 0; tmp[i] != NULL; ++i) {
if (strlen(tmp[i]) == 0 || strchr(":/?", tmp[i][0]) == NULL) {
continue;
}
girara_list_append(res, g_strdup(tmp[i]));
}
g_strfreev(tmp);
free(content);
return res;
}
static void
plain_io_append(GiraraInputHistoryIO* db, const char* input)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
/* open file */
FILE* file = fopen(priv->input_history_path, "r+");
if (file == NULL) {
return;
}
/* read input history file */
file_lock_set(fileno(file), F_WRLCK);
char* content = girara_file_read2(file);
rewind(file);
if (ftruncate(fileno(file), 0) != 0) {
free(content);
file_lock_set(fileno(file), F_UNLCK);
fclose(file);
return;
}
char** tmp = g_strsplit(content, "\n", 0);
free(content);
/* write input history file */
for (size_t i = 0; tmp[i] != NULL; ++i) {
if (strlen(tmp[i]) == 0 || strchr(":/?", tmp[i][0]) == NULL || strcmp(tmp[i], input) == 0) {
continue;
}
fprintf(file, "%s\n", tmp[i]);
}
g_strfreev(tmp);
fprintf(file, "%s\n", input);
file_lock_set(fileno(file), F_UNLCK);
fclose(file);
}
static int
compare_time(const void* l, const void* r, void* data)
{
const gchar* lhs = *(const gchar**) l;
const gchar* rhs = *(const gchar**) r;
GKeyFile* keyfile = data;
time_t lhs_time = 0;
time_t rhs_time = 0;
if (g_key_file_has_key(keyfile, lhs, KEY_TIME, NULL) == TRUE) {
lhs_time = g_key_file_get_uint64(keyfile, lhs, KEY_TIME, NULL);
}
if (g_key_file_has_key(keyfile, rhs, KEY_TIME, NULL) == TRUE) {
rhs_time = g_key_file_get_uint64(keyfile, rhs, KEY_TIME, NULL);
}
if (lhs_time < rhs_time) {
return 1;
} else if (lhs_time > rhs_time) {
return -1;
}
return 0;
}
static girara_list_t*
plain_get_recent_files(zathura_database_t* db, int max, const char* basepath)
{
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
girara_list_t* result = girara_list_new2(g_free);
if (result == NULL) {
return NULL;
}
gsize groups_size = 0;
gchar** groups = g_key_file_get_groups(priv->history, &groups_size);
if (groups_size > 0) {
g_qsort_with_data(groups, groups_size, sizeof(gchar*), compare_time, priv->history);
}
const size_t basepath_len = basepath != NULL ? strlen(basepath) : 0;
for (gsize s = 0; s != groups_size && max != 0; ++s) {
if (basepath != NULL && strncmp(groups[s], basepath, basepath_len) != 0) {
continue;
}
girara_list_append(result, g_strdup(groups[s]));
--max;
}
g_strfreev(groups);
return result;
}
zathura-0.3.8/zathura/database-plain.h 0000664 0001750 0001750 00000002636 13216464200 020407 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef ZATHURA_DATABASE_PLAIN_H
#define ZATHURA_DATABASE_PLAIN_H
#include "database.h"
#define ZATHURA_TYPE_PLAINDATABASE \
(zathura_plaindatabase_get_type ())
#define ZATHURA_PLAINDATABASE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), ZATHURA_TYPE_PLAINDATABASE, ZathuraPlainDatabase))
#define ZATHURA_IS_PLAINDATABASE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZATHURA_TYPE_PLAINDATABASE))
#define ZATHURA_PLAINDATABASE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), ZATHURA_TYPE_PLAINDATABASE, ZathuraPlainDatabaseClass))
#define ZATHURA_IS_PLAINDATABASE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), ZATHURA_TYPE_PLAINDATABASE))
#define ZATHURA_PLAINDATABASE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), ZATHURA_TYPE_PLAINDATABASE, ZathuraPlainDatabaseClass))
typedef struct _ZathuraPlainDatabase ZathuraPlainDatabase;
typedef struct _ZathuraPlainDatabaseClass ZathuraPlainDatabaseClass;
struct _ZathuraPlainDatabase
{
GObject parent_instance;
};
struct _ZathuraPlainDatabaseClass
{
GObjectClass parent_class;
};
GType zathura_plaindatabase_get_type(void) G_GNUC_CONST;
/**
* Initialize database system.
*
* @param dir Path to the directory where the database file should be located.
* @return A valid zathura_database_t instance or NULL on failure
*/
zathura_database_t* zathura_plaindatabase_new(const char* dir);
#endif
zathura-0.3.8/zathura/database-sqlite.c 0000664 0001750 0001750 00000060533 13216464200 020600 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include
#include "database-sqlite.h"
#include "utils.h"
static void zathura_database_interface_init(ZathuraDatabaseInterface* iface);
static void io_interface_init(GiraraInputHistoryIOInterface* iface);
G_DEFINE_TYPE_WITH_CODE(ZathuraSQLDatabase, zathura_sqldatabase, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE(ZATHURA_TYPE_DATABASE, zathura_database_interface_init)
G_IMPLEMENT_INTERFACE(GIRARA_TYPE_INPUT_HISTORY_IO, io_interface_init))
static bool check_column(sqlite3* session, const char* table, const char* col, bool* result);
static bool check_column_type(sqlite3* session, const char* table, const char* col, const char* type, bool* result);
static void sqlite_finalize(GObject* object);
static bool sqlite_add_bookmark(zathura_database_t* db, const char* file, zathura_bookmark_t* bookmark);
static bool sqlite_remove_bookmark(zathura_database_t* db, const char* file, const char* id);
static girara_list_t* sqlite_load_bookmarks(zathura_database_t* db, const char* file);
static girara_list_t* sqlite_load_jumplist(zathura_database_t* db, const char* file);
static bool sqlite_save_jumplist(zathura_database_t* db, const char* file, girara_list_t* jumplist);
static bool sqlite_set_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t* file_info);
static bool sqlite_get_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t* file_info);
static void sqlite_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec);
static void sqlite_io_append(GiraraInputHistoryIO* db, const char*);
static girara_list_t* sqlite_io_read(GiraraInputHistoryIO* db);
static girara_list_t* sqlite_get_recent_files(zathura_database_t* db, int max, const char* basepath);
typedef struct zathura_sqldatabase_private_s {
sqlite3* session;
} zathura_sqldatabase_private_t;
#define ZATHURA_SQLDATABASE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_SQLDATABASE, zathura_sqldatabase_private_t))
enum {
PROP_0,
PROP_PATH
};
static void
zathura_database_interface_init(ZathuraDatabaseInterface* iface)
{
/* initialize interface */
iface->add_bookmark = sqlite_add_bookmark;
iface->remove_bookmark = sqlite_remove_bookmark;
iface->load_bookmarks = sqlite_load_bookmarks;
iface->load_jumplist = sqlite_load_jumplist;
iface->save_jumplist = sqlite_save_jumplist;
iface->set_fileinfo = sqlite_set_fileinfo;
iface->get_fileinfo = sqlite_get_fileinfo;
iface->get_recent_files = sqlite_get_recent_files;
}
static void
io_interface_init(GiraraInputHistoryIOInterface* iface)
{
/* initialize interface */
iface->append = sqlite_io_append;
iface->read = sqlite_io_read;
}
static void
zathura_sqldatabase_class_init(ZathuraSQLDatabaseClass* class)
{
/* add private members */
g_type_class_add_private(class, sizeof(zathura_sqldatabase_private_t));
/* override methods */
GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->finalize = sqlite_finalize;
object_class->set_property = sqlite_set_property;
g_object_class_install_property(object_class, PROP_PATH,
g_param_spec_string("path", "path", "path to the database", NULL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
}
static void
zathura_sqldatabase_init(ZathuraSQLDatabase* db)
{
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
priv->session = NULL;
}
zathura_database_t*
zathura_sqldatabase_new(const char* path)
{
g_return_val_if_fail(path != NULL && strlen(path) != 0, NULL);
zathura_database_t* db = g_object_new(ZATHURA_TYPE_SQLDATABASE, "path", path, NULL);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
if (priv->session == NULL) {
g_object_unref(G_OBJECT(db));
return NULL;
}
return db;
}
static void
sqlite_finalize(GObject* object)
{
ZathuraSQLDatabase* db = ZATHURA_SQLDATABASE(object);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
if (priv->session) {
sqlite3_close(priv->session);
}
G_OBJECT_CLASS(zathura_sqldatabase_parent_class)->finalize(object);
}
static void
sqlite_db_init(ZathuraSQLDatabase* db, const char* path)
{
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
/* create bookmarks table */
static const char SQL_BOOKMARK_INIT[] =
"CREATE TABLE IF NOT EXISTS bookmarks ("
"file TEXT,"
"id TEXT,"
"page INTEGER,"
"hadj_ratio FLOAT,"
"vadj_ratio FLOAT,"
"PRIMARY KEY(file, id));";
/* ceate jumplist table */
static const char SQL_JUMPLIST_INIT[] =
"CREATE TABLE IF NOT EXISTS jumplist ("
"id INTEGER PRIMARY KEY AUTOINCREMENT,"
"file TEXT,"
"page INTEGER,"
"hadj_ratio FLOAT,"
"vadj_ratio FLOAT"
");";
/* create fileinfo table */
static const char SQL_FILEINFO_INIT[] =
"CREATE TABLE IF NOT EXISTS fileinfo ("
"file TEXT PRIMARY KEY,"
"page INTEGER,"
"offset INTEGER,"
"scale FLOAT,"
"rotation INTEGER,"
"pages_per_row INTEGER,"
"first_page_column TEXT,"
"position_x FLOAT,"
"position_y FLOAT,"
"time TIMESTAMP"
");";
/* create history table */
static const char SQL_HISTORY_INIT[] =
"CREATE TABLE IF NOT EXISTS history ("
"time TIMESTAMP,"
"line TEXT,"
"PRIMARY KEY(line));";
static const char* ALL_INIT[] = {
SQL_BOOKMARK_INIT,
SQL_JUMPLIST_INIT,
SQL_FILEINFO_INIT,
SQL_HISTORY_INIT
};
/* update fileinfo table (part 1) */
static const char SQL_FILEINFO_ALTER[] =
"ALTER TABLE fileinfo ADD COLUMN pages_per_row INTEGER;"
"ALTER TABLE fileinfo ADD COLUMN position_x FLOAT;"
"ALTER TABLE fileinfo ADD COLUMN position_y FLOAT;";
/* update fileinfo table (part 2) */
static const char SQL_FILEINFO_ALTER2[] =
"ALTER TABLE fileinfo ADD COLUMN first_page_column TEXT;";
/* update fileinfo table (part 3) */
static const char SQL_FILEINFO_ALTER3[] =
"ALTER TABLE fileinfo ADD COLUMN time TIMESTAMP;";
/* update bookmark table */
static const char SQL_BOOKMARK_ALTER[] =
"ALTER TABLE bookmarks ADD COLUMN hadj_ratio FLOAT;"
"ALTER TABLE bookmarks ADD COLUMN vadj_ratio FLOAT;";
sqlite3* session = NULL;
if (sqlite3_open(path, &session) != SQLITE_OK) {
girara_error("Could not open database: %s\n", path);
return;
}
/* create tables if they don't exist */
for (size_t s = 0; s < LENGTH(ALL_INIT); ++s) {
if (sqlite3_exec(session, ALL_INIT[s], NULL, 0, NULL) != SQLITE_OK) {
girara_error("Failed to initialize database: %s\n", path);
sqlite3_close(session);
return;
}
}
/* check existing tables for missing columns */
bool res1, res2, ret1, ret2;
ret1 = check_column(session, "fileinfo", "pages_per_row", &res1);
if (ret1 == true && res1 == false) {
girara_debug("old database table layout detected; updating ...");
if (sqlite3_exec(session, SQL_FILEINFO_ALTER, NULL, 0, NULL) != SQLITE_OK) {
girara_warning("failed to update database table layout");
}
}
ret1 = check_column(session, "fileinfo", "first_page_column", &res1);
if (ret1 == true && res1 == false) {
girara_debug("old database table layout detected; updating ...");
if (sqlite3_exec(session, SQL_FILEINFO_ALTER2, NULL, 0, NULL) != SQLITE_OK) {
girara_warning("failed to update database table layout");
}
}
ret1 = check_column(session, "fileinfo", "time", &res1);
if (ret1 == true && res1 == false) {
girara_debug("old database table layout detected; updating ...");
if (sqlite3_exec(session, SQL_FILEINFO_ALTER3, NULL, 0, NULL) != SQLITE_OK) {
girara_warning("failed to update database table layout");
}
}
ret1 = check_column(session, "bookmarks", "hadj_ratio", &res1);
ret2 = check_column(session, "bookmarks", "vadj_ratio", &res2);
if (ret1 == true && ret2 == true && res1 == false && res2 == false) {
girara_debug("old database table layout detected; updating ...");
if (sqlite3_exec(session, SQL_BOOKMARK_ALTER, NULL, 0, NULL) != SQLITE_OK) {
girara_warning("failed to update database table layout");
}
}
/* check existing tables for correct column types */
ret1 = check_column_type(session, "fileinfo", "first_page_column", "TEXT", &res1);
if (ret1 == true && res1 == false) {
girara_debug("old database table layout detected; updating ...");
/* prepare transaction */
static const char tx_begin[] =
"BEGIN TRANSACTION;"
"ALTER TABLE fileinfo RENAME TO tmp;";
static const char tx_end[] =
"INSERT INTO fileinfo SELECT * FROM tmp;"
"DROP TABLE tmp;"
"COMMIT;";
/* assemble transaction */
char transaction[sizeof(tx_begin) + sizeof(SQL_FILEINFO_INIT) + sizeof(tx_end) - 2] = { '\0' };
g_strlcat(transaction, tx_begin, sizeof(transaction));
g_strlcat(transaction, SQL_FILEINFO_INIT, sizeof(transaction));
g_strlcat(transaction, tx_end, sizeof(transaction));
if (sqlite3_exec(session, transaction, NULL, 0, NULL) != SQLITE_OK) {
girara_warning("failed to update database table layout");
}
}
priv->session = session;
}
static void
sqlite_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
ZathuraSQLDatabase* db = ZATHURA_SQLDATABASE(object);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
switch (prop_id) {
case PROP_PATH:
g_return_if_fail(priv->session == NULL);
sqlite_db_init(db, g_value_get_string(value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
}
static sqlite3_stmt*
prepare_statement(sqlite3* session, const char* statement)
{
if (session == NULL || statement == NULL) {
return NULL;
}
const char* pz_tail = NULL;
sqlite3_stmt* pp_stmt = NULL;
if (sqlite3_prepare_v2(session, statement, -1, &pp_stmt, &pz_tail) != SQLITE_OK) {
girara_error("Failed to prepare query: %s", statement);
sqlite3_finalize(pp_stmt);
return NULL;
} else if (pz_tail && *pz_tail != '\0') {
girara_error("Unused portion of statement: %s", pz_tail);
sqlite3_finalize(pp_stmt);
return NULL;
}
return pp_stmt;
}
static bool
check_column(sqlite3* session, const char* table, const char* col, bool* res)
{
/* we can't actually bind the argument with sqlite3_bind_text because
* sqlite3_prepare_v2 fails with "PRAGMA table_info(?);" */
char* query = sqlite3_mprintf("PRAGMA table_info(%Q);", table);
if (query == NULL) {
return false;
}
sqlite3_stmt* stmt = prepare_statement(session, query);
if (stmt == NULL) {
return false;
}
*res = false;
while (sqlite3_step(stmt) == SQLITE_ROW) {
if (strcmp((const char*) sqlite3_column_text(stmt, 1), col) == 0) {
*res = true;
break;
}
}
if (*res == false) {
girara_debug("column %s in table %s is NOT found", col, table);
}
sqlite3_finalize(stmt);
sqlite3_free(query);
return true;
}
static bool
check_column_type(sqlite3* session, const char* table, const char* col, const char* type, bool* res)
{
/* we can't actually bind the argument with sqlite3_bind_text because
* sqlite3_prepare_v2 fails with "PRAGMA table_info(?);" */
char* query = sqlite3_mprintf("PRAGMA table_info(%Q);", table);
if (query == NULL) {
return false;
}
sqlite3_stmt* stmt = prepare_statement(session, query);
if (stmt == NULL) {
return false;
}
*res = false;
while (sqlite3_step(stmt) == SQLITE_ROW) {
if (strcmp((const char*) sqlite3_column_text(stmt, 1), col) == 0) {
if (strcmp((const char*) sqlite3_column_text(stmt, 2), type) == 0) {
*res = true;
break;
}
}
}
if (*res == false) {
girara_debug("column %s in table %s has wrong type", col, table);
}
sqlite3_finalize(stmt);
sqlite3_free(query);
return true;
}
static bool
sqlite_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark)
{
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_BOOKMARK_ADD[] =
"REPLACE INTO bookmarks (file, id, page, hadj_ratio, vadj_ratio) VALUES (?, ?, ?, ?, ?);";
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_BOOKMARK_ADD);
if (stmt == NULL) {
return false;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK ||
sqlite3_bind_text(stmt, 2, bookmark->id, -1, NULL) != SQLITE_OK ||
sqlite3_bind_int(stmt, 3, bookmark->page) != SQLITE_OK ||
sqlite3_bind_double(stmt, 4, bookmark->x) != SQLITE_OK ||
sqlite3_bind_double(stmt, 5, bookmark->y) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return false;
}
int res = sqlite3_step(stmt);
sqlite3_finalize(stmt);
return (res == SQLITE_DONE) ? true : false;
}
static bool
sqlite_remove_bookmark(zathura_database_t* db, const char* file, const char*
id)
{
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_BOOKMARK_ADD[] =
"DELETE FROM bookmarks WHERE file = ? AND id = ?;";
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_BOOKMARK_ADD);
if (stmt == NULL) {
return false;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK ||
sqlite3_bind_text(stmt, 2, id, -1, NULL) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return false;
}
int res = sqlite3_step(stmt);
sqlite3_finalize(stmt);
return (res == SQLITE_DONE) ? true : false;
}
static girara_list_t*
sqlite_load_bookmarks(zathura_database_t* db, const char* file)
{
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_BOOKMARK_SELECT[] =
"SELECT id, page, hadj_ratio, vadj_ratio FROM bookmarks WHERE file = ?;";
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_BOOKMARK_SELECT);
if (stmt == NULL) {
return NULL;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return NULL;
}
girara_list_t* result = girara_sorted_list_new2((girara_compare_function_t) zathura_bookmarks_compare,
(girara_free_function_t) zathura_bookmark_free);
if (result == NULL) {
sqlite3_finalize(stmt);
return NULL;
}
while (sqlite3_step(stmt) == SQLITE_ROW) {
zathura_bookmark_t* bookmark = g_try_malloc0(sizeof(zathura_bookmark_t));
if (bookmark == NULL) {
continue;
}
bookmark->id = g_strdup((const char*) sqlite3_column_text(stmt, 0));
bookmark->page = sqlite3_column_int(stmt, 1);
bookmark->x = sqlite3_column_double(stmt, 2);
bookmark->y = sqlite3_column_double(stmt, 3);
bookmark->x = bookmark->x <= 0.0 ? DBL_MIN : bookmark->x;
bookmark->y = bookmark->y <= 0.0 ? DBL_MIN : bookmark->y;
girara_list_append(result, bookmark);
}
sqlite3_finalize(stmt);
return result;
}
static bool
sqlite_save_jumplist(zathura_database_t* db, const char* file, girara_list_t* jumplist)
{
g_return_val_if_fail(db != NULL && file != NULL && jumplist != NULL, false);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_INSERT_JUMP[] = "INSERT INTO jumplist (file, page, hadj_ratio, vadj_ratio) VALUES (?, ?, ?, ?);";
static const char SQL_REMOVE_JUMPLIST[] = "DELETE FROM jumplist WHERE file = ?;";
sqlite3_stmt* stmt = NULL;
int res = 0;
if (sqlite3_exec(priv->session, "BEGIN;", NULL, 0, NULL) != SQLITE_OK) {
return false;
}
stmt = prepare_statement(priv->session, SQL_REMOVE_JUMPLIST);
if (stmt == NULL) {
sqlite3_exec(priv->session, "ROLLBACK;", NULL, 0, NULL);
return false;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK) {
sqlite3_finalize(stmt);
sqlite3_exec(priv->session, "ROLLBACK;", NULL, 0, NULL);
girara_error("Failed to bind arguments.");
return false;
}
res = sqlite3_step(stmt);
sqlite3_finalize(stmt);
if (res != SQLITE_DONE) {
sqlite3_exec(priv->session, "ROLLBACK;", NULL, 0, NULL);
return false;
}
if (girara_list_size(jumplist) == 0) {
sqlite3_exec(priv->session, "COMMIT;", NULL, 0, NULL);
return true;
}
girara_list_iterator_t* cur = girara_list_iterator(jumplist);
bool status = true;
while (true) {
zathura_jump_t* jump = girara_list_iterator_data(cur);
stmt = prepare_statement(priv->session, SQL_INSERT_JUMP);
if (stmt == NULL) {
status = false;
break;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK ||
sqlite3_bind_int(stmt, 2, jump->page) != SQLITE_OK ||
sqlite3_bind_double(stmt, 3, jump->x) != SQLITE_OK ||
sqlite3_bind_double(stmt, 4, jump->y) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
status = false;
break;
}
res = sqlite3_step(stmt);
sqlite3_finalize(stmt);
if (res != SQLITE_DONE) {
status = false;
break;
}
if (girara_list_iterator_has_next(cur) == true) {
girara_list_iterator_next(cur);
} else {
break;
}
}
girara_list_iterator_free(cur);
if (status == false) {
sqlite3_exec(priv->session, "ROLLBACK;", NULL, 0, NULL);
return false;
} else {
sqlite3_exec(priv->session, "COMMIT;", NULL, 0, NULL);
return true;
}
}
static girara_list_t*
sqlite_load_jumplist(zathura_database_t* db, const char* file)
{
g_return_val_if_fail(db != NULL && file != NULL, NULL);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_GET_JUMPLIST[] = "SELECT page, hadj_ratio, vadj_ratio FROM jumplist WHERE file = ? ORDER BY id ASC;";
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_GET_JUMPLIST);
if (stmt == NULL) {
return NULL;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return NULL;
}
girara_list_t* jumplist = girara_list_new2(g_free);
if (jumplist == NULL) {
sqlite3_finalize(stmt);
return NULL;
}
int res = 0;
while ((res = sqlite3_step(stmt)) == SQLITE_ROW) {
zathura_jump_t* jump = g_try_malloc0(sizeof(zathura_jump_t));
if (jump == NULL) {
continue;
}
jump->page = sqlite3_column_int(stmt, 0);
jump->x = sqlite3_column_double(stmt, 1);
jump->y = sqlite3_column_double(stmt, 2);
girara_list_append(jumplist, jump);
}
sqlite3_finalize(stmt);
if (res != SQLITE_DONE) {
girara_list_free(jumplist);
return NULL;
}
return jumplist;
}
static bool
sqlite_set_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info)
{
if (db == NULL || file == NULL || file_info == NULL) {
return false;
}
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_FILEINFO_SET[] =
"REPLACE INTO fileinfo (file, page, offset, scale, rotation, pages_per_row, first_page_column, position_x, position_y, time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, DATETIME('now'));";
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_FILEINFO_SET);
if (stmt == NULL) {
return false;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK ||
sqlite3_bind_int(stmt, 2, file_info->current_page) != SQLITE_OK ||
sqlite3_bind_int(stmt, 3, file_info->page_offset) != SQLITE_OK ||
sqlite3_bind_double(stmt, 4, file_info->scale) != SQLITE_OK ||
sqlite3_bind_int(stmt, 5, file_info->rotation) != SQLITE_OK ||
sqlite3_bind_int(stmt, 6, file_info->pages_per_row) != SQLITE_OK ||
sqlite3_bind_text(stmt, 7, file_info->first_page_column_list, -1, NULL)
!= SQLITE_OK ||
sqlite3_bind_double(stmt, 8, file_info->position_x) != SQLITE_OK ||
sqlite3_bind_double(stmt, 9, file_info->position_y) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return false;
}
int res = sqlite3_step(stmt);
sqlite3_finalize(stmt);
return (res == SQLITE_DONE) ? true : false;
}
static bool
sqlite_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info)
{
if (db == NULL || file == NULL || file_info == NULL) {
return false;
}
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_FILEINFO_GET[] =
"SELECT page, offset, scale, rotation, pages_per_row, first_page_column, position_x, position_y FROM fileinfo WHERE file = ?;";
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_FILEINFO_GET);
if (stmt == NULL) {
return false;
}
if (sqlite3_bind_text(stmt, 1, file, -1, NULL) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return false;
}
if (sqlite3_step(stmt) != SQLITE_ROW) {
sqlite3_finalize(stmt);
girara_debug("No info for file %s available.", file);
return false;
}
file_info->current_page = sqlite3_column_int(stmt, 0);
file_info->page_offset = sqlite3_column_int(stmt, 1);
file_info->scale = sqlite3_column_double(stmt, 2);
file_info->rotation = sqlite3_column_int(stmt, 3);
file_info->pages_per_row = sqlite3_column_int(stmt, 4);
file_info->first_page_column_list = g_strdup((const char*) sqlite3_column_text(stmt, 5));
file_info->position_x = sqlite3_column_double(stmt, 6);
file_info->position_y = sqlite3_column_double(stmt, 7);
sqlite3_finalize(stmt);
return true;
}
static void
sqlite_io_append(GiraraInputHistoryIO* db, const char* input)
{
static const char SQL_HISTORY_SET[] =
"REPLACE INTO history (line, time) VALUES (?, DATETIME('now'));";
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_HISTORY_SET);
if (stmt == NULL) {
return;
}
if (sqlite3_bind_text(stmt, 1, input, -1, NULL) != SQLITE_OK) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return;
}
sqlite3_step(stmt);
sqlite3_finalize(stmt);
}
static girara_list_t*
sqlite_io_read(GiraraInputHistoryIO* db)
{
static const char SQL_HISTORY_GET[] =
"SELECT line FROM history ORDER BY time";
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_HISTORY_GET);
if (stmt == NULL) {
return NULL;
}
girara_list_t* list = girara_list_new2((girara_free_function_t) g_free);
if (list == NULL) {
sqlite3_finalize(stmt);
return NULL;
}
while (sqlite3_step(stmt) == SQLITE_ROW) {
girara_list_append(list, g_strdup((const char*) sqlite3_column_text(stmt, 0)));
}
sqlite3_finalize(stmt);
return list;
}
static girara_list_t*
sqlite_get_recent_files(zathura_database_t* db, int max, const char* basepath)
{
static const char SQL_HISTORY_GET[] =
"SELECT file FROM fileinfo ORDER BY time DESC LIMIT ?";
static const char SQL_HISTORY_GET_WITH_BASEPATH[] =
"SELECT file FROM fileinfo WHERE file LIKE ? || '%' ORDER BY time DESC LIMIT ?";
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
sqlite3_stmt* stmt = prepare_statement(priv->session, basepath == NULL ? SQL_HISTORY_GET : SQL_HISTORY_GET_WITH_BASEPATH);
if (stmt == NULL) {
return NULL;
}
if (max < 0) {
max = INT_MAX;
}
bool failed = false;
if (basepath != NULL) {
failed = sqlite3_bind_int(stmt, 2, max) != SQLITE_OK || sqlite3_bind_text(stmt, 1, basepath, -1, NULL) != SQLITE_OK;
} else {
failed = sqlite3_bind_int(stmt, 1, max) != SQLITE_OK;
}
if (failed == true) {
sqlite3_finalize(stmt);
girara_error("Failed to bind arguments.");
return false;
}
girara_list_t* list = girara_list_new2((girara_free_function_t) g_free);
if (list == NULL) {
sqlite3_finalize(stmt);
return NULL;
}
while (sqlite3_step(stmt) == SQLITE_ROW) {
girara_list_append(list, g_strdup((const char*) sqlite3_column_text(stmt, 0)));
}
sqlite3_finalize(stmt);
return list;
}
zathura-0.3.8/zathura/database-sqlite.h 0000664 0001750 0001750 00000002521 13216464200 020576 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef ZATHURA_DATABASE_SQLITE_H
#define ZATHURA_DATABASE_SQLITE_H
#include "database.h"
#define ZATHURA_TYPE_SQLDATABASE \
(zathura_sqldatabase_get_type ())
#define ZATHURA_SQLDATABASE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), ZATHURA_TYPE_SQLDATABASE, ZathuraSQLDatabase))
#define ZATHURA_IS_SQLDATABASE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZATHURA_TYPE_SQLDATABASE))
#define ZATHURA_SQLDATABASE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), ZATHURA_TYPE_SQLDATABASE, ZathuraSQLDatabaseClass))
#define ZATHURA_IS_SQLDATABASE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), ZATHURA_TYPE_SQLDATABASE))
#define ZATHURA_SQLDATABASE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), ZATHURA_TYPE_SQLDATABASE, ZathuraSQLDatabaseClass))
typedef struct _ZathuraSQLDatabase ZathuraSQLDatabase;
typedef struct _ZathuraSQLDatabaseClass ZathuraSQLDatabaseClass;
struct _ZathuraSQLDatabase
{
GObject parent_instance;
};
struct _ZathuraSQLDatabaseClass
{
GObjectClass parent_class;
};
GType zathura_sqldatabase_get_type(void) G_GNUC_CONST;
/**
* Initialize database system.
*
* @param path Path to the sqlite database.
* @return A valid zathura_database_t instance or NULL on failure
*/
zathura_database_t* zathura_sqldatabase_new(const char* path);
#endif
zathura-0.3.8/zathura/database.c 0000664 0001750 0001750 00000004565 13216464200 017304 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "database.h"
G_DEFINE_INTERFACE(ZathuraDatabase, zathura_database, G_TYPE_OBJECT)
static void
zathura_database_default_init(ZathuraDatabaseInterface* GIRARA_UNUSED(iface))
{
}
bool
zathura_db_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && bookmark != NULL, false);
return ZATHURA_DATABASE_GET_INTERFACE(db)->add_bookmark(db, file, bookmark);
}
bool
zathura_db_remove_bookmark(zathura_database_t* db, const char* file, const char*
id)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && id != NULL, false);
return ZATHURA_DATABASE_GET_INTERFACE(db)->remove_bookmark(db, file, id);
}
girara_list_t*
zathura_db_load_bookmarks(zathura_database_t* db, const char* file)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL, NULL);
return ZATHURA_DATABASE_GET_INTERFACE(db)->load_bookmarks(db, file);
}
girara_list_t*
zathura_db_load_jumplist(zathura_database_t* db, const char* file)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL, NULL);
return ZATHURA_DATABASE_GET_INTERFACE(db)->load_jumplist(db, file);
}
bool
zathura_db_save_jumplist(zathura_database_t* db, const char* file, girara_list_t* jumplist)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && jumplist != NULL, NULL);
return ZATHURA_DATABASE_GET_INTERFACE(db)->save_jumplist(db, file, jumplist);
}
bool
zathura_db_set_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && file_info != NULL, false);
return ZATHURA_DATABASE_GET_INTERFACE(db)->set_fileinfo(db, file, file_info);
}
bool
zathura_db_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && file_info != NULL, false);
return ZATHURA_DATABASE_GET_INTERFACE(db)->get_fileinfo(db, file, file_info);
}
girara_list_t*
zathura_db_get_recent_files(zathura_database_t* db, int max, const char* basepath)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db), NULL);
return ZATHURA_DATABASE_GET_INTERFACE(db)->get_recent_files(db, max, basepath);
}
zathura-0.3.8/zathura/database.h 0000664 0001750 0001750 00000010742 13216464200 017303 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef DATABASE_H
#define DATABASE_H
#include
#include
#include
#include "bookmarks.h"
typedef struct zathura_fileinfo_s {
unsigned int current_page;
unsigned int page_offset;
double scale;
unsigned int rotation;
unsigned int pages_per_row;
char* first_page_column_list;
double position_x;
double position_y;
} zathura_fileinfo_t;
#define ZATHURA_TYPE_DATABASE \
(zathura_database_get_type ())
#define ZATHURA_DATABASE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), ZATHURA_TYPE_DATABASE, ZathuraDatabase))
#define ZATHURA_IS_DATABASE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZATHURA_TYPE_DATABASE))
#define ZATHURA_DATABASE_GET_INTERFACE(obj) \
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), ZATHURA_TYPE_DATABASE, ZathuraDatabaseInterface))
typedef struct _ZathuraDatabase ZathuraDatabase;
typedef struct _ZathuraDatabaseInterface ZathuraDatabaseInterface;
struct _ZathuraDatabaseInterface
{
GTypeInterface parent_iface;
/* interface methods */
bool (*add_bookmark)(ZathuraDatabase* db, const char* file, zathura_bookmark_t* bookmark);
bool (*remove_bookmark)(ZathuraDatabase* db, const char* file, const char* id);
girara_list_t* (*load_bookmarks)(ZathuraDatabase* db, const char* file);
girara_list_t* (*load_jumplist)(ZathuraDatabase* db, const char* file);
bool (*save_jumplist)(ZathuraDatabase* db, const char* file, girara_list_t* jumplist);
bool (*set_fileinfo)(ZathuraDatabase* db, const char* file, zathura_fileinfo_t* file_info);
bool (*get_fileinfo)(ZathuraDatabase* db, const char* file, zathura_fileinfo_t* file_info);
girara_list_t* (*get_recent_files)(ZathuraDatabase* db, int max, const char* basepath);
};
GType zathura_database_get_type(void) G_GNUC_CONST;
/**
* Add or update bookmark in the database.
*
* @param db The database instance
* @param file The file to which the bookmark belongs.
* @param bookmark The bookmark instance.
* @return true on success, false otherwise
*/
bool zathura_db_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark);
/**
* Remove a bookmark from the database.
*
* @param db The database instance
* @param file The file to which the bookmark belongs.
* @param id The id of the bookmark
* @return true on success, false otherwise
*/
bool zathura_db_remove_bookmark(zathura_database_t* db, const char* file, const
char* id);
/**
* Loads all bookmarks from the database belonging to a specific file.
*
* @param db The database instance.
* @param file The file for which the bookmarks should be loaded.
* @return List of zathura_bookmark_t* or NULL on failure.
*/
girara_list_t* zathura_db_load_bookmarks(zathura_database_t* db, const char*
file);
/**
* Load the jumplist belonging to the specified file from the database.
*
* @param db The database instance.
* @param file The file to which the jumplist belongs.
*
* return A linked list constituting the jumplist of the specified file.
*/
girara_list_t* zathura_db_load_jumplist(ZathuraDatabase* db, const char* file);
/**
* Save the jumplist belonging to the specified file to the database.
*
* @param db The database instance.
* @param file The file to which the jumplist belongs.
* @param jumplist The jumplist to be saved
*
* return true on success, false otherwise.
*/
bool zathura_db_save_jumplist(ZathuraDatabase* db, const char* file, girara_list_t* jumplist);
/**
* Set file info (last site, ...) in the database.
*
* @param db The database instance
* @param file The file to which the file info belongs.
* @param file_info The file info
* @return true on success, false otherwise.
*/
bool zathura_db_set_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info);
/* Get file info (last site, ...) from the database.
*
* @param db The database instance
* @param file The file to which the file info belongs.
* @param file_info The file info
* @return true on success, false otherwise.
*/
bool zathura_db_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info);
/* Get a list of recent files from the database. The most recent file is listed
* first.
*
* @param db The database instance
* @param max The maximum number of recent files. If max is less than zero, now
* limit is applied.
* @return list of files
*/
girara_list_t* zathura_db_get_recent_files(zathura_database_t* db, int max, const char* basepath);
#endif // DATABASE_H
zathura-0.3.8/zathura/dbus-interface.c 0000664 0001750 0001750 00000042453 13216464200 020431 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "dbus-interface.h"
#include "synctex.h"
#include "macros.h"
#include "zathura.h"
#include "document.h"
#include "utils.h"
#include "adjustment.h"
#include "resources.h"
#include
#include
#include
#include
#include
#include
#include
static const char DBUS_XML_FILENAME[] = "/org/pwmt/zathura/DBus/org.pwmt.zathura.xml";
static GBytes* load_xml_data(void)
{
GResource* resource = zathura_resources_get_resource();
if (resource != NULL) {
return g_resource_lookup_data(resource, DBUS_XML_FILENAME,
G_RESOURCE_LOOKUP_FLAGS_NONE, NULL);
}
return NULL;
}
G_DEFINE_TYPE(ZathuraDbus, zathura_dbus, G_TYPE_OBJECT)
/* template for bus name */
static const char DBUS_NAME_TEMPLATE[] = "org.pwmt.zathura.PID-%d";
/* object path */
static const char DBUS_OBJPATH[] = "/org/pwmt/zathura";
/* interface name */
static const char DBUS_INTERFACE[] = "org.pwmt.zathura";
typedef struct private_s {
zathura_t* zathura;
GDBusNodeInfo* introspection_data;
GDBusConnection* connection;
guint owner_id;
guint registration_id;
} private_t;
#define GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), ZATHURA_TYPE_DBUS, private_t))
static const GDBusInterfaceVTable interface_vtable;
static void
finalize(GObject* object)
{
ZathuraDbus* dbus = ZATHURA_DBUS(object);
private_t* priv = GET_PRIVATE(dbus);
if (priv->connection != NULL && priv->registration_id > 0) {
g_dbus_connection_unregister_object(priv->connection, priv->registration_id);
}
if (priv->owner_id > 0) {
g_bus_unown_name(priv->owner_id);
}
if (priv->introspection_data != NULL) {
g_dbus_node_info_unref(priv->introspection_data);
}
G_OBJECT_CLASS(zathura_dbus_parent_class)->finalize(object);
}
static void
zathura_dbus_class_init(ZathuraDbusClass* class)
{
/* add private members */
g_type_class_add_private(class, sizeof(private_t));
/* overwrite methods */
GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->finalize = finalize;
}
static void
zathura_dbus_init(ZathuraDbus* dbus)
{
private_t* priv = GET_PRIVATE(dbus);
priv->zathura = NULL;
priv->introspection_data = NULL;
priv->connection = NULL;
priv->owner_id = 0;
priv->registration_id = 0;
}
static void
gdbus_connection_closed(GDBusConnection* UNUSED(connection),
gboolean UNUSED(remote_peer_vanished), GError* error, void* UNUSED(data))
{
if (error != NULL) {
girara_debug("D-Bus connection closed: %s", error->message);
}
}
static void
bus_acquired(GDBusConnection* connection, const gchar* name, void* data)
{
girara_debug("Bus acquired at '%s'.", name);
/* register callback for GDBusConnection's closed signal */
g_signal_connect(G_OBJECT(connection), "closed",
G_CALLBACK(gdbus_connection_closed), NULL);
ZathuraDbus* dbus = data;
private_t* priv = GET_PRIVATE(dbus);
GError* error = NULL;
priv->registration_id = g_dbus_connection_register_object(
connection, DBUS_OBJPATH, priv->introspection_data->interfaces[0],
&interface_vtable, dbus, NULL, &error);
if (priv->registration_id == 0) {
girara_warning("Failed to register object on D-Bus connection: %s",
error->message);
g_error_free(error);
return;
}
priv->connection = connection;
}
static void
name_acquired(GDBusConnection* UNUSED(connection), const gchar* name,
void* UNUSED(data))
{
girara_debug("Acquired '%s' on session bus.", name);
}
static void
name_lost(GDBusConnection* UNUSED(connection), const gchar* name,
void* UNUSED(data))
{
girara_debug("Lost connection or failed to acquire '%s' on session bus.",
name);
}
ZathuraDbus*
zathura_dbus_new(zathura_t* zathura)
{
GObject* obj = g_object_new(ZATHURA_TYPE_DBUS, NULL);
if (obj == NULL) {
return NULL;
}
ZathuraDbus* dbus = ZATHURA_DBUS(obj);
private_t* priv = GET_PRIVATE(dbus);
priv->zathura = zathura;
GBytes* xml_data = load_xml_data();
if (xml_data == NULL)
{
girara_warning("Failed to load introspection data.");
g_object_unref(obj);
return NULL;
}
GError* error = NULL;
priv->introspection_data = g_dbus_node_info_new_for_xml((const char*) g_bytes_get_data(xml_data, NULL), &error);
g_bytes_unref(xml_data);
if (priv->introspection_data == NULL) {
girara_warning("Failed to parse introspection data: %s", error->message);
g_error_free(error);
g_object_unref(obj);
return NULL;
}
char* well_known_name = g_strdup_printf(DBUS_NAME_TEMPLATE, getpid());
priv->owner_id = g_bus_own_name(G_BUS_TYPE_SESSION, well_known_name,
G_BUS_NAME_OWNER_FLAGS_NONE, bus_acquired,
name_acquired, name_lost, dbus, NULL);
g_free(well_known_name);
return dbus;
}
void
zathura_dbus_edit(ZathuraDbus* edit, unsigned int page, unsigned int x, unsigned int y) {
private_t* priv = GET_PRIVATE(edit);
const char* filename = zathura_document_get_path(priv->zathura->document);
char* input_file = NULL;
unsigned int line = 0;
unsigned int column = 0;
if (synctex_get_input_line_column(filename, page, x, y, &input_file, &line,
&column) == false) {
return;
}
GError* error = NULL;
g_dbus_connection_emit_signal(priv->connection, NULL, DBUS_OBJPATH,
DBUS_INTERFACE, "Edit", g_variant_new("(suu)", input_file, x, y), &error);
g_free(input_file);
if (error != NULL) {
girara_debug("Failed to emit 'Edit' signal: %s", error->message);
g_error_free(error);
}
}
/* D-Bus handler */
static void
handle_open_document(zathura_t* zathura, GVariant* parameters,
GDBusMethodInvocation* invocation)
{
gchar* filename = NULL;
gchar* password = NULL;
gint page = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
g_variant_get(parameters, "(ssi)", &filename, &password, &page);
document_close(zathura, false);
document_open_idle(zathura, filename,
strlen(password) > 0 ? password : NULL,
page,
NULL, NULL);
g_free(filename);
g_free(password);
GVariant* result = g_variant_new("(b)", true);
g_dbus_method_invocation_return_value(invocation, result);
}
static void
handle_close_document(zathura_t* zathura, GVariant* UNUSED(parameters),
GDBusMethodInvocation* invocation)
{
const bool ret = document_close(zathura, false);
GVariant* result = g_variant_new("(b)", ret);
g_dbus_method_invocation_return_value(invocation, result);
}
static void
handle_goto_page(zathura_t* zathura, GVariant* parameters,
GDBusMethodInvocation* invocation)
{
const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document);
guint page = 0;
g_variant_get(parameters, "(u)", &page);
bool ret = true;
if (page >= number_of_pages) {
ret = false;
} else {
page_set(zathura, page);
}
GVariant* result = g_variant_new("(b)", ret);
g_dbus_method_invocation_return_value(invocation, result);
}
static void
handle_highlight_rects(zathura_t* zathura, GVariant* parameters,
GDBusMethodInvocation* invocation)
{
const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document);
guint page = 0;
GVariantIter* iter = NULL;
GVariantIter* secondary_iter = NULL;
g_variant_get(parameters, "(ua(dddd)a(udddd))", &page, &iter,
&secondary_iter);
if (page >= number_of_pages) {
girara_debug("Got invalid page number.");
GVariant* result = g_variant_new("(b)", false);
g_variant_iter_free(iter);
g_variant_iter_free(secondary_iter);
g_dbus_method_invocation_return_value(invocation, result);
return;
}
/* get rectangles */
girara_list_t** rectangles = g_try_malloc0(number_of_pages * sizeof(girara_list_t*));
if (rectangles == NULL) {
g_variant_iter_free(iter);
g_variant_iter_free(secondary_iter);
g_dbus_method_invocation_return_error(invocation, G_DBUS_ERROR,
G_DBUS_ERROR_NO_MEMORY,
"Failed to allocate memory.");
return;
}
rectangles[page] = girara_list_new2(g_free);
if (rectangles[page] == NULL) {
g_free(rectangles);
g_variant_iter_free(iter);
g_variant_iter_free(secondary_iter);
g_dbus_method_invocation_return_error(invocation, G_DBUS_ERROR,
G_DBUS_ERROR_NO_MEMORY,
"Failed to allocate memory.");
return;
}
zathura_rectangle_t temp_rect = { 0, 0, 0, 0 };
while (g_variant_iter_loop(iter, "(dddd)", &temp_rect.x1, &temp_rect.x2,
&temp_rect.y1, &temp_rect.y2)) {
zathura_rectangle_t* rect = g_try_malloc0(sizeof(zathura_rectangle_t));
if (rect == NULL) {
g_variant_iter_free(iter);
g_variant_iter_free(secondary_iter);
girara_list_free(rectangles[page]);
g_free(rectangles);
g_dbus_method_invocation_return_error(invocation, G_DBUS_ERROR,
G_DBUS_ERROR_NO_MEMORY,
"Failed to allocate memory.");
return;
}
*rect = temp_rect;
girara_list_append(rectangles[page], rect);
}
g_variant_iter_free(iter);
/* get secondary rectangles */
guint temp_page = 0;
while (g_variant_iter_loop(secondary_iter, "(udddd)", &temp_page,
&temp_rect.x1, &temp_rect.x2, &temp_rect.y1,
&temp_rect.y2)) {
if (temp_page >= number_of_pages) {
/* error out here? */
girara_debug("Got invalid page number.");
continue;
}
if (rectangles[temp_page] == NULL) {
rectangles[temp_page] = girara_list_new2(g_free);
}
zathura_rectangle_t* rect = g_try_malloc0(sizeof(zathura_rectangle_t));
if (rect == NULL || rectangles[temp_page] == NULL) {
g_variant_iter_free(secondary_iter);
for (unsigned int p = 0; p != number_of_pages; ++p) {
girara_list_free(rectangles[p]);
}
g_free(rectangles);
g_free(rect);
g_dbus_method_invocation_return_error(invocation, G_DBUS_ERROR,
G_DBUS_ERROR_NO_MEMORY,
"Failed to allocate memory.");
return;
}
*rect = temp_rect;
girara_list_append(rectangles[temp_page], rect);
}
g_variant_iter_free(secondary_iter);
synctex_highlight_rects(zathura, page, rectangles);
g_free(rectangles);
GVariant* result = g_variant_new("(b)", true);
g_dbus_method_invocation_return_value(invocation, result);
}
static void
handle_synctex_view(zathura_t* zathura, GVariant* parameters,
GDBusMethodInvocation* invocation)
{
gchar* input_file = NULL;
guint line = 0;
guint column = 0;
g_variant_get(parameters, "(suu)", &input_file, &line, &column);
const bool ret = synctex_view(zathura, input_file, line, column);
g_free(input_file);
GVariant* result = g_variant_new("(b)", ret);
g_dbus_method_invocation_return_value(invocation, result);
}
static void
handle_method_call(GDBusConnection* UNUSED(connection),
const gchar* UNUSED(sender), const gchar* object_path,
const gchar* interface_name, const gchar* method_name,
GVariant* parameters, GDBusMethodInvocation* invocation,
void* data)
{
ZathuraDbus* dbus = data;
private_t* priv = GET_PRIVATE(dbus);
girara_debug("Handling call '%s.%s' on '%s'.", interface_name, method_name,
object_path);
static const struct {
const char* method;
void (*handler)(zathura_t*, GVariant*, GDBusMethodInvocation*);
bool needs_document;
} handlers[] = {
{ "OpenDocument", handle_open_document, false },
{ "CloseDocument", handle_close_document, false },
{ "GotoPage", handle_goto_page, true },
{ "HighlightRects", handle_highlight_rects, true },
{ "SynctexView", handle_synctex_view, true }
};
for (size_t idx = 0; idx != sizeof(handlers) / sizeof(handlers[0]); ++idx) {
if (g_strcmp0(method_name, handlers[idx].method) != 0) {
continue;
}
if (handlers[idx].needs_document == true && priv->zathura->document == NULL) {
g_dbus_method_invocation_return_dbus_error(
invocation, "org.pwmt.zathura.NoOpenDocumen",
"No document has been opened.");
return;
}
(*handlers[idx].handler)(priv->zathura, parameters, invocation);
return;
}
}
static GVariant*
handle_get_property(GDBusConnection* UNUSED(connection),
const gchar* UNUSED(sender),
const gchar* UNUSED(object_path),
const gchar* UNUSED(interface_name),
const gchar* property_name, GError** error, void* data)
{
ZathuraDbus* dbus = data;
private_t* priv = GET_PRIVATE(dbus);
if (priv->zathura->document == NULL) {
g_set_error(error, G_IO_ERROR, G_IO_ERROR_FAILED, "No document open.");
return NULL;
}
if (g_strcmp0(property_name, "filename") == 0) {
return g_variant_new_string(zathura_document_get_path(priv->zathura->document));
} else if (g_strcmp0(property_name, "pagenumber") == 0) {
return g_variant_new_uint32(zathura_document_get_current_page_number(priv->zathura->document));
} else if (g_strcmp0(property_name, "numberofpages") == 0) {
return g_variant_new_uint32(zathura_document_get_number_of_pages(priv->zathura->document));
}
return NULL;
}
static const GDBusInterfaceVTable interface_vtable =
{
.method_call = handle_method_call,
.get_property = handle_get_property,
.set_property = NULL
};
static const unsigned int TIMEOUT = 3000;
static bool
call_synctex_view(GDBusConnection* connection, const char* filename,
const char* name, const char* input_file, unsigned int line,
unsigned int column)
{
GError* error = NULL;
GVariant* vfilename = g_dbus_connection_call_sync(
connection, name, DBUS_OBJPATH, "org.freedesktop.DBus.Properties", "Get",
g_variant_new("(ss)", DBUS_INTERFACE, "filename"), G_VARIANT_TYPE("(v)"),
G_DBUS_CALL_FLAGS_NONE, TIMEOUT, NULL, &error);
if (vfilename == NULL) {
girara_error("Failed to query 'filename' property from '%s': %s",
name, error->message);
g_error_free(error);
return false;
}
GVariant* tmp = NULL;
g_variant_get(vfilename, "(v)", &tmp);
gchar* remote_filename = g_variant_dup_string(tmp, NULL);
girara_debug("Filename from '%s': %s", name, remote_filename);
g_variant_unref(tmp);
g_variant_unref(vfilename);
if (g_strcmp0(filename, remote_filename) != 0) {
g_free(remote_filename);
return false;
}
g_free(remote_filename);
GVariant* ret = g_dbus_connection_call_sync(
connection, name, DBUS_OBJPATH, DBUS_INTERFACE, "SynctexView",
g_variant_new("(suu)", input_file, line, column),
G_VARIANT_TYPE("(b)"), G_DBUS_CALL_FLAGS_NONE, TIMEOUT, NULL, &error);
if (ret == NULL) {
girara_error("Failed to run SynctexView on '%s': %s", name,
error->message);
g_error_free(error);
return false;
}
g_variant_unref(ret);
return true;
}
static int
iterate_instances_call_synctex_view(const char* filename,
const char* input_file, unsigned int line,
unsigned int column, pid_t hint)
{
if (filename == NULL) {
return -1;
}
GError* error = NULL;
GDBusConnection* connection = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL,
&error);
if (connection == NULL) {
girara_error("Could not connect to session bus: %s", error->message);
g_error_free(error);
return -1;
}
if (hint != -1) {
char* well_known_name = g_strdup_printf(DBUS_NAME_TEMPLATE, hint);
const bool ret = call_synctex_view(connection, filename, well_known_name,
input_file, line, column);
g_free(well_known_name);
return ret ? 1 : -1;
}
GVariant* vnames = g_dbus_connection_call_sync(
connection, "org.freedesktop.DBus", "/org/freedesktop/DBus",
"org.freedesktop.DBus", "ListNames", NULL, G_VARIANT_TYPE("(as)"),
G_DBUS_CALL_FLAGS_NONE, TIMEOUT, NULL, &error);
if (vnames == NULL) {
girara_error("Could not list available names: %s", error->message);
g_error_free(error);
g_object_unref(connection);
return -1;
}
GVariantIter* iter = NULL;
g_variant_get(vnames, "(as)", &iter);
gchar* name = NULL;
bool found_one = false;
while (found_one == false && g_variant_iter_loop(iter, "s", &name) == TRUE) {
if (g_str_has_prefix(name, "org.pwmt.zathura.PID") == FALSE) {
continue;
}
girara_debug("Found name: %s", name);
found_one = call_synctex_view(connection, filename, name, input_file, line, column);
}
g_variant_iter_free(iter);
g_variant_unref(vnames);
g_object_unref(connection);
return found_one ? 1 : 0;
}
int
zathura_dbus_synctex_position(const char* filename, const char* input_file,
int line, int column, pid_t hint)
{
if (filename == NULL || input_file == NULL || line < 0 || column < 0) {
return false;
}
return iterate_instances_call_synctex_view(filename, input_file, line, column, hint);
}
zathura-0.3.8/zathura/dbus-interface.h 0000664 0001750 0001750 00000003605 13216464200 020432 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef DBUS_INTERFACE_H
#define DBUS_INTERFACE_H
#include
#include
#include
#include
#include "types.h"
typedef struct zathura_dbus_class_s ZathuraDbusClass;
struct zathura_dbus_s
{
GObject parent;
};
struct zathura_dbus_class_s
{
GObjectClass parent_class;
};
#define ZATHURA_TYPE_DBUS \
(zathura_dbus_get_type())
#define ZATHURA_DBUS(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), ZATHURA_TYPE_DBUS, \
ZathuraDbus))
#define ZATHURA_DBUS_CLASS(obj) \
(G_TYPE_CHECK_CLASS_CAST((obj), ZATHURA_TYPE_DBUS, \
ZathuraDbus))
#define ZATHURA_IS_DBUS(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), ZATHURA_TYPE_DBUS))
#define ZATHURA_IS_DBUS_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((obj), ZATHURA_TYPE_DBUS))
#define ZATHURA_DBUS_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), ZATHURA_TYPE_DBUS, \
ZathuraDbusClass))
GType zathura_dbus_get_type(void) G_GNUC_CONST;
ZathuraDbus* zathura_dbus_new(zathura_t* zathura);
/**
* Emit the 'Edit' signal on the D-Bus connection.
*
* @param dbus ZathuraDbus instance
* @param page page
* @param x x coordinate
* @param y y coordinate
*/
void zathura_dbus_edit(ZathuraDbus* dbus, unsigned int page, unsigned int x, unsigned int y);
/**
* Highlight rectangles in a zathura instance that has filename open.
* input_file, line and column determine the rectangles to display and are
* passed to SyncTeX.
*
* @param filename path of the document
* @param input_file path of the input file
* @param line line index (starts at 0)
* @param column column index (starts at 0)
* @param hint zathura process ID that has filename open
*/
int zathura_dbus_synctex_position(const char* filename, const char* input_file,
int line, int column, pid_t hint);
#endif
zathura-0.3.8/zathura/document.c 0000664 0001750 0001750 00000040041 13216464200 017343 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include
#include
#include "adjustment.h"
#include "document.h"
#include "utils.h"
#include "zathura.h"
#include "page.h"
#include "plugin.h"
#include "content-type.h"
/**
* Document
*/
struct zathura_document_s {
char* file_path; /**< File path of the document */
char* uri; /**< URI of the document */
char* basename; /**< Basename of the document */
const char* password; /**< Password of the document */
unsigned int current_page_number; /**< Current page number */
unsigned int number_of_pages; /**< Number of pages */
double scale; /**< Scale value */
unsigned int rotate; /**< Rotation */
void* data; /**< Custom data */
zathura_adjust_mode_t adjust_mode; /**< Adjust mode (best-fit, width) */
int page_offset; /**< Page offset */
double cell_width; /**< width of a page cell in the document (not ransformed by scale and rotation) */
double cell_height; /**< height of a page cell in the document (not ransformed by scale and rotation) */
unsigned int view_width; /**< width of current viewport */
unsigned int view_height; /**< height of current viewport */
unsigned int pages_per_row; /**< number of pages in a row */
unsigned int first_page_column; /**< column of the first page */
unsigned int page_padding; /**< padding between pages */
double position_x; /**< X adjustment */
double position_y; /**< Y adjustment */
/**
* Document pages
*/
zathura_page_t** pages;
/**
* Used plugin
*/
zathura_plugin_t* plugin;
};
static void
check_set_error(zathura_error_t* error, zathura_error_t code) {
if (error != NULL) {
*error = code;
}
}
zathura_document_t*
zathura_document_open(zathura_t* zathura, const char* path, const char* uri,
const char* password, zathura_error_t* error)
{
if (zathura == NULL || path == NULL) {
return NULL;
}
GFile* file = g_file_new_for_path(path);
char* real_path = NULL;
char* content_type = NULL;
zathura_plugin_t* plugin = NULL;
zathura_document_t* document = NULL;
if (file == NULL) {
girara_error("Error while handling path '%s'.", path);
check_set_error(error, ZATHURA_ERROR_UNKNOWN);
goto error_free;
}
real_path = g_file_get_path(file);
if (real_path == NULL) {
girara_error("Error while handling path '%s'.", path);
check_set_error(error, ZATHURA_ERROR_UNKNOWN);
goto error_free;
}
content_type = zathura_content_type_guess(zathura->content_type_context, real_path);
if (content_type == NULL) {
girara_error("Could not determine file type.");
check_set_error(error, ZATHURA_ERROR_UNKNOWN);
goto error_free;
}
plugin = zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type);
if (plugin == NULL) {
girara_error("Unknown file type: '%s'", content_type);
check_set_error(error, ZATHURA_ERROR_UNKNOWN);
g_free((void*)content_type);
content_type = NULL;
goto error_free;
}
g_free(content_type);
content_type = NULL;
document = g_try_malloc0(sizeof(zathura_document_t));
if (document == NULL) {
check_set_error(error, ZATHURA_ERROR_OUT_OF_MEMORY);
goto error_free;
}
document->file_path = real_path;
document->uri = g_strdup(uri);
if (document->uri == NULL) {
document->basename = g_file_get_basename(file);
} else {
GFile *gf = g_file_new_for_uri(document->uri);
document->basename = g_file_get_basename(gf);
g_object_unref(gf);
}
document->password = password;
document->scale = 1.0;
document->plugin = plugin;
document->adjust_mode = ZATHURA_ADJUST_NONE;
document->cell_width = 0.0;
document->cell_height = 0.0;
document->view_height = 0;
document->view_width = 0;
document->position_x = 0.0;
document->position_y = 0.0;
real_path = NULL;
g_object_unref(file);
file = NULL;
/* open document */
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->document_open == NULL) {
girara_error("plugin has no open function\n");
goto error_free;
}
zathura_error_t int_error = functions->document_open(document);
if (int_error != ZATHURA_ERROR_OK) {
check_set_error(error, int_error);
girara_error("could not open document\n");
goto error_free;
}
/* read all pages */
document->pages = calloc(document->number_of_pages, sizeof(zathura_page_t*));
if (document->pages == NULL) {
check_set_error(error, ZATHURA_ERROR_OUT_OF_MEMORY);
goto error_free;
}
for (unsigned int page_id = 0; page_id < document->number_of_pages; page_id++) {
zathura_page_t* page = zathura_page_new(document, page_id, NULL);
if (page == NULL) {
check_set_error(error, ZATHURA_ERROR_OUT_OF_MEMORY);
goto error_free;
}
document->pages[page_id] = page;
/* cell_width and cell_height is the maximum of all the pages width and height */
const double width = zathura_page_get_width(page);
if (document->cell_width < width)
document->cell_width = width;
const double height = zathura_page_get_height(page);
if (document->cell_height < height)
document->cell_height = height;
}
return document;
error_free:
if (file != NULL) {
g_object_unref(file);
}
g_free(real_path);
if (document != NULL) {
zathura_document_free(document);
document = NULL; /* prevent double-free */
}
g_free(document);
return NULL;
}
zathura_error_t
zathura_document_free(zathura_document_t* document)
{
if (document == NULL || document->plugin == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
if (document->pages != NULL) {
/* free pages */
for (unsigned int page_id = 0; page_id < document->number_of_pages; page_id++) {
zathura_page_free(document->pages[page_id]);
document->pages[page_id] = NULL;
}
free(document->pages);
}
/* free document */
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin);
if (functions->document_free == NULL) {
error = ZATHURA_ERROR_NOT_IMPLEMENTED;
} else {
error = functions->document_free(document, document->data);
}
g_free(document->file_path);
g_free(document->uri);
g_free(document->basename);
g_free(document);
return error;
}
const char*
zathura_document_get_path(zathura_document_t* document)
{
if (document == NULL) {
return NULL;
}
return document->file_path;
}
const char*
zathura_document_get_uri(zathura_document_t* document)
{
if (document == NULL) {
return NULL;
}
return document->uri;
}
const char*
zathura_document_get_basename(zathura_document_t* document)
{
if (document == NULL) {
return NULL;
}
return document->basename;
}
const char*
zathura_document_get_password(zathura_document_t* document)
{
if (document == NULL) {
return NULL;
}
return document->password;
}
zathura_page_t*
zathura_document_get_page(zathura_document_t* document, unsigned int index)
{
if (document == NULL || document->pages == NULL || (document->number_of_pages <= index)) {
return NULL;
}
return document->pages[index];
}
void*
zathura_document_get_data(zathura_document_t* document)
{
if (document == NULL) {
return NULL;
}
return document->data;
}
void
zathura_document_set_data(zathura_document_t* document, void* data)
{
if (document == NULL) {
return;
}
document->data = data;
}
unsigned int
zathura_document_get_number_of_pages(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->number_of_pages;
}
void
zathura_document_set_number_of_pages(zathura_document_t* document, unsigned int number_of_pages)
{
if (document == NULL) {
return;
}
document->number_of_pages = number_of_pages;
}
unsigned int
zathura_document_get_current_page_number(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->current_page_number;
}
void
zathura_document_set_current_page_number(zathura_document_t* document, unsigned int
current_page)
{
if (document == NULL) {
return;
}
document->current_page_number = current_page;
}
double
zathura_document_get_position_x(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->position_x;
}
double
zathura_document_get_position_y(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->position_y;
}
void
zathura_document_set_position_x(zathura_document_t* document, double position_x)
{
if (document == NULL) {
return;
}
document->position_x = position_x;
}
void
zathura_document_set_position_y(zathura_document_t* document, double position_y)
{
if (document == NULL) {
return;
}
document->position_y = position_y;
}
double
zathura_document_get_scale(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->scale;
}
void
zathura_document_set_scale(zathura_document_t* document, double scale)
{
if (document == NULL) {
return;
}
document->scale = scale;
}
unsigned int
zathura_document_get_rotation(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->rotate;
}
void
zathura_document_set_rotation(zathura_document_t* document, unsigned int rotation)
{
if (document == NULL) {
return;
}
rotation = rotation % 360;
if (rotation == 0 || rotation > 270) {
document->rotate = 0;
} else if (rotation <= 90) {
document->rotate = 90;
} else if (rotation <= 180) {
document->rotate = 180;
} else {
document->rotate = 270;
}
}
zathura_adjust_mode_t
zathura_document_get_adjust_mode(zathura_document_t* document)
{
if (document == NULL) {
return ZATHURA_ADJUST_NONE;
}
return document->adjust_mode;
}
void
zathura_document_set_adjust_mode(zathura_document_t* document, zathura_adjust_mode_t mode)
{
if (document == NULL) {
return;
}
document->adjust_mode = mode;
}
int
zathura_document_get_page_offset(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->page_offset;
}
void
zathura_document_set_page_offset(zathura_document_t* document, unsigned int page_offset)
{
if (document == NULL) {
return;
}
document->page_offset = page_offset;
}
void
zathura_document_set_viewport_width(zathura_document_t* document, unsigned int width)
{
if (document == NULL) {
return;
}
document->view_width = width;
}
void
zathura_document_set_viewport_height(zathura_document_t* document, unsigned int height)
{
if (document == NULL) {
return;
}
document->view_height = height;
}
void
zathura_document_get_viewport_size(zathura_document_t* document,
unsigned int *height, unsigned int* width)
{
g_return_if_fail(document != NULL && height != NULL && width != NULL);
*height = document->view_height;
*width = document->view_width;
}
void
zathura_document_get_cell_size(zathura_document_t* document,
unsigned int* height, unsigned int* width)
{
g_return_if_fail(document != NULL && height != NULL && width != NULL);
page_calc_height_width(document, document->cell_height, document->cell_width,
height, width, true);
}
void
zathura_document_get_document_size(zathura_document_t* document,
unsigned int* height, unsigned int* width)
{
g_return_if_fail(document != NULL && height != NULL && width != NULL);
const unsigned int npag = zathura_document_get_number_of_pages(document);
const unsigned int ncol = zathura_document_get_pages_per_row(document);
if (npag == 0 || ncol == 0) {
return;
}
const unsigned int c0 = zathura_document_get_first_page_column(document);
const unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */
const unsigned int pad = zathura_document_get_page_padding(document);
unsigned int cell_height = 0;
unsigned int cell_width = 0;
zathura_document_get_cell_size(document, &cell_height, &cell_width);
*width = ncol * cell_width + (ncol - 1) * pad;
*height = nrow * cell_height + (nrow - 1) * pad;
}
void
zathura_document_set_page_layout(zathura_document_t* document, unsigned int page_padding,
unsigned int pages_per_row, unsigned int first_page_column)
{
g_return_if_fail(document != NULL);
document->page_padding = page_padding;
document->pages_per_row = pages_per_row;
if (first_page_column < 1) {
first_page_column = 1;
} else if (first_page_column > pages_per_row) {
first_page_column = ((first_page_column - 1) % pages_per_row) + 1;
}
document->first_page_column = first_page_column;
}
unsigned int
zathura_document_get_page_padding(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->page_padding;
}
unsigned int
zathura_document_get_pages_per_row(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->pages_per_row;
}
unsigned int
zathura_document_get_first_page_column(zathura_document_t* document)
{
if (document == NULL) {
return 0;
}
return document->first_page_column;
}
zathura_error_t
zathura_document_save_as(zathura_document_t* document, const char* path)
{
if (document == NULL || document->plugin == NULL || path == NULL) {
return ZATHURA_ERROR_UNKNOWN;
}
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin);
if (functions->document_save_as == NULL) {
return ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return functions->document_save_as(document, document->data, path);
}
girara_tree_node_t*
zathura_document_index_generate(zathura_document_t* document, zathura_error_t* error)
{
if (document == NULL || document->plugin == NULL) {
check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS);
return NULL;
}
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin);
if (functions->document_index_generate == NULL) {
check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED);
return NULL;
}
return functions->document_index_generate(document, document->data, error);
}
girara_list_t*
zathura_document_attachments_get(zathura_document_t* document, zathura_error_t* error)
{
if (document == NULL || document->plugin == NULL) {
check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS);
return NULL;
}
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin);
if (functions->document_attachments_get == NULL) {
check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED);
return NULL;
}
return functions->document_attachments_get(document, document->data, error);
}
zathura_error_t
zathura_document_attachment_save(zathura_document_t* document, const char* attachment, const char* file)
{
if (document == NULL || document->plugin == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin);
if (functions->document_attachment_save == NULL) {
return ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return functions->document_attachment_save(document, document->data, attachment, file);
}
girara_list_t*
zathura_document_get_information(zathura_document_t* document, zathura_error_t* error)
{
if (document == NULL || document->plugin == NULL) {
check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS);
return NULL;
}
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin);
if (functions->document_get_information == NULL) {
check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED);
return NULL;
}
girara_list_t* result = functions->document_get_information(document, document->data, error);
if (result != NULL) {
girara_list_set_free_function(result, (girara_free_function_t) zathura_document_information_entry_free);
}
return result;
}
zathura_plugin_t*
zathura_document_get_plugin(zathura_document_t* document)
{
if (document == NULL) {
return NULL;
}
return document->plugin;
}
zathura-0.3.8/zathura/document.h 0000664 0001750 0001750 00000024106 12750077577 017377 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef DOCUMENT_H
#define DOCUMENT_H
#include
#include
#include "types.h"
/**
* Open the document
*
* @param plugin_manager The zathura instance
* @param path Path to the document
* @param password Password of the document or NULL
* @param error Optional error parameter
* @return The document object and NULL if an error occurs
*/
zathura_document_t* zathura_document_open(zathura_t* zathura,
const char* path, const char *uri, const char* password, zathura_error_t*
error);
/**
* Free the document
*
* @param document
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
zathura_error_t zathura_document_free(zathura_document_t* document);
/**
* Returns the path of the document
*
* @param document The document
* @return The file path of the document
*/
const char* zathura_document_get_path(zathura_document_t* document);
/**
* Returns the URI of the document
*
* @param document The document
* @return The URI of the document
*/
const char* zathura_document_get_uri(zathura_document_t* document);
/**
* Returns the basename of the document
*
* @param document The document
* @return The basename of the document
*/
const char* zathura_document_get_basename(zathura_document_t* document);
/**
* Returns the password of the document
*
* @param document The document
* @return Returns the password of the document
*/
const char* zathura_document_get_password(zathura_document_t* document);
/**
* Returns the page at the given index
*
* @param document The document
* @param index The index of the page
* @return The page or NULL if an error occurred
*/
zathura_page_t* zathura_document_get_page(zathura_document_t* document, unsigned int index);
/**
* Returns the number of pages
*
* @param document The document
* @return Number of pages
*/
unsigned int zathura_document_get_number_of_pages(zathura_document_t* document);
/**
* Sets the number of pages
*
* @param document The document
* @param number_of_pages Number of pages
*/
void zathura_document_set_number_of_pages(zathura_document_t* document, unsigned
int number_of_pages);
/**
* Returns the current page number
*
* @param document The document
* @return Current page
*/
unsigned int zathura_document_get_current_page_number(zathura_document_t* document);
/**
* Sets the number of pages
*
* @param document The document
* @param current_page The current page number
*/
void zathura_document_set_current_page_number(zathura_document_t* document, unsigned
int current_page);
/**
* Returns the X position, as a value relative to the document width (0=left,
* 1=right).
*
* @param document The document
* @return X adjustment
*/
double zathura_document_get_position_x(zathura_document_t* document);
/**
* Returns the Y position as value relative to the document height (0=top,
* 1=bottom)
*
* @param document The document
* @return Y adjustment
*/
double zathura_document_get_position_y(zathura_document_t* document);
/**
* Sets the X position as a value relative to the document width (0=left,
* 1=right)
*
* @param document The document
* @param position_x the X adjustment
*/
void zathura_document_set_position_x(zathura_document_t* document, double position_x);
/**
* Sets the Y position as a value relative to the document height (0=top,
* 1=bottom)
*
* @param document The document
* @param position_y the Y adjustment
*/
void zathura_document_set_position_y(zathura_document_t* document, double position_y);
/**
* Returns the current scale value of the document
*
* @param document The document
* @return The current scale value
*/
double zathura_document_get_scale(zathura_document_t* document);
/**
* Sets the new scale value of the document
*
* @param document The document
* @param scale The new scale value
*/
void zathura_document_set_scale(zathura_document_t* document, double scale);
/**
* Returns the rotation value of zathura (0..360)
*
* @param document The document
* @return The current rotation value
*/
unsigned int zathura_document_get_rotation(zathura_document_t* document);
/**
* Sets the new rotation value
*
* @param document The document
* @param rotation The new rotation value
*/
void zathura_document_set_rotation(zathura_document_t* document, unsigned int rotation);
/**
* Returns the adjust mode of the document
*
* @param document The document
* @return The adjust mode
*/
zathura_adjust_mode_t zathura_document_get_adjust_mode(zathura_document_t* document);
/**
* Sets the new adjust mode of the document
*
* @param document The document
* @param mode The new adjust mode
*/
void zathura_document_set_adjust_mode(zathura_document_t* document, zathura_adjust_mode_t mode);
/**
* Returns the page offset of the document
*
* @param document The document
* @return The page offset
*/
int zathura_document_get_page_offset(zathura_document_t* document);
/**
* Sets the new page offset of the document
*
* @param document The document
* @param page_offset The new page offset
*/
void zathura_document_set_page_offset(zathura_document_t* document, unsigned int page_offset);
/**
* Returns the private data of the document
*
* @param document The document
* @return The private data or NULL
*/
void* zathura_document_get_data(zathura_document_t* document);
/**
* Sets the private data of the document
*
* @param document The document
* @param data The new private data
*/
void zathura_document_set_data(zathura_document_t* document, void* data);
/**
* Sets the width of the viewport in pixels.
*
* @param[in] document The document instance
* @param[in] width The width of the viewport
*/
void
zathura_document_set_viewport_width(zathura_document_t* document, unsigned int width);
/**
* Sets the height of the viewport in pixels.
*
* @param[in] document The document instance
* @param[in] height The height of the viewport
*/
void
zathura_document_set_viewport_height(zathura_document_t* document, unsigned int height);
/**
* Return the size of the viewport in pixels.
*
* @param[in] document The document instance
* @param[out] height,width The width and height of the viewport
*/
void
zathura_document_get_viewport_size(zathura_document_t* document,
unsigned int *height, unsigned int* width);
/**
* Return the size of a cell from the document's layout table in pixels. Assumes
* that the table is homogeneous (i.e. every cell has the same dimensions). It
* takes the current scale into account.
*
* @param[in] document The document instance
* @param[out] height,width The computed height and width of the cell
*/
void zathura_document_get_cell_size(zathura_document_t* document,
unsigned int* height, unsigned int* width);
/**
* Compute the size of the entire document to be displayed in pixels. Takes into
* account the scale, the layout of the pages, and the padding between them. It
* should be equal to the allocation of zathura->ui.page_widget once it's shown.
*
* @param[in] document The document
* @param[out] height,width The height and width of the document
*/
void zathura_document_get_document_size(zathura_document_t* document,
unsigned int* height, unsigned int* width);
/**
* Sets the layout of the pages in the document
*
* @param[in] document The document instance
* @param[in] page_padding pixels of padding between pages
* @param[in] pages_per_row number of pages per row
* @param[in] first_page_column column of the first page (first column is 1)
*/
void zathura_document_set_page_layout(zathura_document_t* document, unsigned int page_padding,
unsigned int pages_per_row, unsigned int first_page_column);
/**
* Returns the padding in pixels between pages
*
* @param document The document
* @return The padding in pixels between pages
*/
unsigned int zathura_document_get_page_padding(zathura_document_t* document);
/**
* Returns the number of pages per row
*
* @param document The document
* @return The number of pages per row
*/
unsigned int zathura_document_get_pages_per_row(zathura_document_t* document);
/**
* Returns the column for the first page (first column = 1)
*
* @param document The document
* @return The column for the first page
*/
unsigned int zathura_document_get_first_page_column(zathura_document_t* document);
/**
* Save the document
*
* @param document The document object
* @param path Path for the saved file
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
zathura_error_t zathura_document_save_as(zathura_document_t* document, const char* path);
/**
* Generate the document index
*
* @param document The document object
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return Generated index
*/
girara_tree_node_t* zathura_document_index_generate(zathura_document_t* document, zathura_error_t* error);
/**
* Get list of attachments
*
* @param document The document object
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return List of attachments
*/
girara_list_t* zathura_document_attachments_get(zathura_document_t* document, zathura_error_t* error);
/**
* Save document attachment
*
* @param document The document objects
* @param attachment name of the attachment
* @param file the target filename
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
zathura_error_t zathura_document_attachment_save(zathura_document_t* document, const char* attachment, const char* file);
/**
* Returns a string of the requested information
*
* @param document The zathura document
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return List of document information entries or NULL if information could not be retrieved
*/
girara_list_t* zathura_document_get_information(zathura_document_t* document, zathura_error_t* error);
#endif // DOCUMENT_H
zathura-0.3.8/zathura/file-monitor-glib.c 0000664 0001750 0001750 00000005434 13216464200 021053 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "file-monitor-glib.h"
#include "macros.h"
#include
#include
struct zathura_glibfilemonitor_s
{
ZathuraFileMonitor parent;
GFileMonitor* monitor; /**< File monitor */
GFile* file; /**< File for file monitor */
};
G_DEFINE_TYPE(ZathuraGLibFileMonitor, zathura_glibfilemonitor,
ZATHURA_TYPE_FILEMONITOR)
static void
file_changed(GFileMonitor* UNUSED(monitor), GFile* file,
GFile* UNUSED(other_file), GFileMonitorEvent event,
ZathuraGLibFileMonitor* file_monitor)
{
switch (event) {
case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT:
case G_FILE_MONITOR_EVENT_CREATED: {
char* uri = g_file_get_uri(file);
girara_debug("received file-monitor event for %s", uri);
g_free(uri);
g_signal_emit_by_name(file_monitor, "reload-file");
break;
}
default:
return;
}
}
static void
start(ZathuraFileMonitor* file_monitor)
{
ZathuraGLibFileMonitor* glib_file_monitor =
ZATHURA_GLIBFILEMONITOR(file_monitor);
const char* file_path =
zathura_filemonitor_get_filepath(file_monitor);
/* install file monitor */
glib_file_monitor->file = g_file_new_for_path(file_path);
if (glib_file_monitor->file == NULL) {
return;
}
glib_file_monitor->monitor = g_file_monitor_file(
glib_file_monitor->file, G_FILE_MONITOR_NONE, NULL, NULL);
if (glib_file_monitor->monitor != NULL) {
g_signal_connect_object(G_OBJECT(glib_file_monitor->monitor), "changed",
G_CALLBACK(file_changed), glib_file_monitor, 0);
}
}
static void
stop(ZathuraFileMonitor* file_monitor)
{
ZathuraGLibFileMonitor* glib_file_monitor =
ZATHURA_GLIBFILEMONITOR(file_monitor);
if (glib_file_monitor->monitor != NULL) {
g_file_monitor_cancel(glib_file_monitor->monitor);
}
g_clear_object(&glib_file_monitor->monitor);
g_clear_object(&glib_file_monitor->file);
}
static void
dispose(GObject* object)
{
stop(ZATHURA_FILEMONITOR(object));
G_OBJECT_CLASS(zathura_glibfilemonitor_parent_class)->dispose(object);
}
static void
finalize(GObject* object)
{
G_OBJECT_CLASS(zathura_glibfilemonitor_parent_class)->finalize(object);
}
static void
zathura_glibfilemonitor_class_init(ZathuraGLibFileMonitorClass* class)
{
ZathuraFileMonitorClass* filemonitor_class = ZATHURA_FILEMONITOR_CLASS(class);
filemonitor_class->start = start;
filemonitor_class->stop = stop;
GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->dispose = dispose;
object_class->finalize = finalize;
}
static void
zathura_glibfilemonitor_init(ZathuraGLibFileMonitor* glibfilemonitor)
{
glibfilemonitor->monitor = NULL;
glibfilemonitor->file = NULL;
}
zathura-0.3.8/zathura/file-monitor-glib.h 0000664 0001750 0001750 00000002677 13216464200 021066 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef FILEMONITOR_GLIB_H
#define FILEMONITOR_GLIB_H
#include "file-monitor.h"
#define ZATHURA_TYPE_GLIBFILEMONITOR (zathura_glibfilemonitor_get_type())
#define ZATHURA_GLIBFILEMONITOR(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), ZATHURA_TYPE_GLIBFILEMONITOR, \
ZathuraGLibFileMonitor))
#define ZATHURA_GLIBFILEMONITOR_CLASS(obj) \
(G_TYPE_CHECK_CLASS_CAST((obj), ZATHURA_TYPE_GLIBFILEMONITOR, \
ZathuraGLibFileMonitorClass))
#define ZATHURA_IS_GLIBFILEMONITOR(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), ZATHURA_TYPE_GLIBFILEMONITOR))
#define ZATHURA_IS_GLIBFILEMONITOR_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((obj), ZATHURA_TYPE_GLIBFILEMONITOR))
#define ZATHURA_GLIBFILEMONITOR_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), ZATHURA_TYPE_GLIBFILEMONITOR, \
ZathuraGLibFileMonitorClass))
typedef struct zathura_glibfilemonitor_s ZathuraGLibFileMonitor;
typedef struct zathura_glibfilemonitor_class_s ZathuraGLibFileMonitorClass;
struct zathura_glibfilemonitor_class_s
{
ZathuraFileMonitorClass parent_class;
};
GType zathura_glibfilemonitor_get_type(void) G_GNUC_CONST;
#endif
zathura-0.3.8/zathura/file-monitor-signal.c 0000664 0001750 0001750 00000003547 13216464200 021416 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "file-monitor-signal.h"
#include
#ifdef G_OS_UNIX
#include
#endif
struct zathura_signalfilemonitor_s
{
ZathuraFileMonitor parent;
gint handle;
};
G_DEFINE_TYPE(ZathuraSignalFileMonitor, zathura_signalfilemonitor,
ZATHURA_TYPE_FILEMONITOR)
static gboolean
signal_handler(gpointer data)
{
if (data == NULL) {
return TRUE;
}
ZathuraSignalFileMonitor* signalfilemonitor = data;
girara_debug("SIGHUP received");
g_signal_emit_by_name(signalfilemonitor, "reload-file");
return TRUE;
}
static void
start(ZathuraFileMonitor* file_monitor)
{
#ifdef G_OS_UNIX
ZathuraSignalFileMonitor* signal_file_monitor =
ZATHURA_SIGNALFILEMONITOR(file_monitor);
signal_file_monitor->handle =
g_unix_signal_add(SIGHUP, signal_handler, signal_file_monitor);
#endif
}
static void
stop(ZathuraFileMonitor* file_monitor)
{
#ifdef G_OS_UNIX
ZathuraSignalFileMonitor* signal_file_monitor =
ZATHURA_SIGNALFILEMONITOR(file_monitor);
if (signal_file_monitor->handle > 0) {
g_source_remove(signal_file_monitor->handle);
}
#endif
}
static void
zathura_signalfilemonitor_finalize(GObject* object)
{
stop(ZATHURA_FILEMONITOR(object));
G_OBJECT_CLASS(zathura_signalfilemonitor_parent_class)->finalize(object);
}
static void
zathura_signalfilemonitor_class_init(ZathuraSignalFileMonitorClass* class)
{
ZathuraFileMonitorClass* filemonitor_class = ZATHURA_FILEMONITOR_CLASS(class);
filemonitor_class->start = start;
filemonitor_class->stop = stop;
GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->finalize = zathura_signalfilemonitor_finalize;
}
static void
zathura_signalfilemonitor_init(ZathuraSignalFileMonitor* signalfilemonitor)
{
signalfilemonitor->handle = 0;
}
zathura-0.3.8/zathura/file-monitor-signal.h 0000664 0001750 0001750 00000002735 13216464200 021421 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef FILEMONITOR_SIGNAL_H
#define FILEMONITOR_SIGNAL_H
#include "file-monitor.h"
#define ZATHURA_TYPE_SIGNALFILEMONITOR (zathura_signalfilemonitor_get_type())
#define ZATHURA_SIGNALFILEMONITOR(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), ZATHURA_TYPE_SIGNALFILEMONITOR, \
ZathuraSignalFileMonitor))
#define ZATHURA_SIGNALFILEMONITOR_CLASS(obj) \
(G_TYPE_CHECK_CLASS_CAST((obj), ZATHURA_TYPE_SIGNALFILEMONITOR, \
ZathuraSignalFileMonitorClass))
#define ZATHURA_IS_SIGNALFILEMONITOR(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), ZATHURA_TYPE_SIGNALFILEMONITOR))
#define ZATHURA_IS_SIGNALFILEMONITOR_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((obj), ZATHURA_TYPE_SIGNALFILEMONITOR))
#define ZATHURA_SIGNALFILEMONITOR_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), ZATHURA_TYPE_SIGNALFILEMONITOR, \
ZathuraSignalFileMonitorClass))
typedef struct zathura_signalfilemonitor_s ZathuraSignalFileMonitor;
typedef struct zathura_signalfilemonitor_class_s ZathuraSignalFileMonitorClass;
struct zathura_signalfilemonitor_class_s
{
ZathuraFileMonitorClass parent_class;
};
GType zathura_signalfilemonitor_get_type(void) G_GNUC_CONST;
#endif
zathura-0.3.8/zathura/file-monitor.c 0000664 0001750 0001750 00000010127 13216464200 020133 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "file-monitor.h"
#include "file-monitor-glib.h"
#ifdef G_OS_UNIX
#include "file-monitor-signal.h"
#endif
#include "macros.h"
#include
G_DEFINE_TYPE(ZathuraFileMonitor, zathura_filemonitor, G_TYPE_OBJECT)
typedef struct private_s {
char* file_path;
} private_t;
#define GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), ZATHURA_TYPE_FILEMONITOR, private_t))
enum {
PROP_0,
PROP_FILE_PATH
};
enum {
RELOAD_FILE,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
static void
finalize(GObject* object)
{
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
private_t* private = GET_PRIVATE(file_monitor);
if (private->file_path != NULL) {
g_free(private->file_path);
}
G_OBJECT_CLASS(zathura_filemonitor_parent_class)->finalize(object);
}
static void
set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
private_t* private = GET_PRIVATE(file_monitor);
switch (prop_id) {
case PROP_FILE_PATH:
if (private->file_path != NULL) {
g_free(private->file_path);
}
private->file_path = g_value_dup_string(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
}
static void
get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(object);
private_t* private = GET_PRIVATE(file_monitor);
switch (prop_id) {
case PROP_FILE_PATH:
g_value_set_string(value, private->file_path);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
}
static void
zathura_filemonitor_class_init(ZathuraFileMonitorClass* class)
{
/* add private members */
g_type_class_add_private(class, sizeof(private_t));
/* set up methods */
class->start = NULL;
class->stop = NULL;
GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->finalize = finalize;
object_class->set_property = set_property;
object_class->get_property = get_property;
/* add properties */
g_object_class_install_property(
object_class, PROP_FILE_PATH,
g_param_spec_string("file-path", "file-path", "file path to monitor", NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
/* add signals */
signals[RELOAD_FILE] =
g_signal_new("reload-file", ZATHURA_TYPE_FILEMONITOR, G_SIGNAL_RUN_LAST, 0,
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0);
}
static void
zathura_filemonitor_init(ZathuraFileMonitor* file_monitor)
{
private_t* private = GET_PRIVATE(file_monitor);
private->file_path = NULL;
}
const char* zathura_filemonitor_get_filepath(ZathuraFileMonitor* filemonitor)
{
private_t* private = GET_PRIVATE(filemonitor);
return private->file_path;
}
ZathuraFileMonitor*
zathura_filemonitor_new(const char* file_path,
zathura_filemonitor_type_t filemonitor_type)
{
g_return_val_if_fail(file_path != NULL, NULL);
GObject* ret = NULL;
switch (filemonitor_type) {
case ZATHURA_FILEMONITOR_GLIB:
girara_debug("using glib file monitor");
ret = g_object_new(ZATHURA_TYPE_GLIBFILEMONITOR, "file-path", file_path,
NULL);
break;
#ifdef G_OS_UNIX
case ZATHURA_FILEMONITOR_SIGNAL:
girara_debug("using SIGHUB file monitor");
ret = g_object_new(ZATHURA_TYPE_SIGNALFILEMONITOR, "file-path", file_path,
NULL);
break;
#endif
default:
girara_debug("invalid filemonitor type: %d", filemonitor_type);
g_return_val_if_fail(false, NULL);
}
if (ret == NULL) {
return NULL;
}
girara_debug("starting file monitor");
ZathuraFileMonitor* file_monitor = ZATHURA_FILEMONITOR(ret);
ZATHURA_FILEMONITOR_GET_CLASS(file_monitor)->start(file_monitor);
return file_monitor;
}
zathura-0.3.8/zathura/file-monitor.h 0000664 0001750 0001750 00000004643 13216464200 020146 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef FILEMONITOR_H
#define FILEMONITOR_H
#include
#include
#include
#define ZATHURA_TYPE_FILEMONITOR (zathura_filemonitor_get_type())
#define ZATHURA_FILEMONITOR(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), ZATHURA_TYPE_FILEMONITOR, \
ZathuraFileMonitor))
#define ZATHURA_FILEMONITOR_CLASS(obj) \
(G_TYPE_CHECK_CLASS_CAST((obj), ZATHURA_TYPE_FILEMONITOR, \
ZathuraFileMonitorClass))
#define ZATHURA_IS_FILEMONITOR(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), ZATHURA_TYPE_FILEMONITOR))
#define ZATHURA_IS_FILEMONITOR_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((obj), ZATHURA_TYPE_FILEMONITOR))
#define ZATHURA_FILEMONITOR_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), ZATHURA_TYPE_FILEMONITOR, \
ZathuraFileMonitorClass))
typedef struct zathura_filemonitor_s ZathuraFileMonitor;
typedef struct zathura_filemonitor_class_s ZathuraFileMonitorClass;
/**
* Base class for all file monitors.
*
* The signal 'reload-file' is emitted if the monitored file changed.
*/
struct zathura_filemonitor_s
{
GObject parent;
};
struct zathura_filemonitor_class_s
{
GObjectClass parent_class;
void (*start)(ZathuraFileMonitor*);
void (*stop)(ZathuraFileMonitor*);
};
/**
* Get the type of the filemonitor.
*
* @return the type
*/
GType zathura_filemonitor_get_type(void) G_GNUC_CONST;
/**
* Type of file monitor.
*/
typedef enum zathura_filemonitor_type_e {
ZATHURA_FILEMONITOR_GLIB, /**< Use filemonitor from GLib */
ZATHURA_FILEMONITOR_SIGNAL /**< Reload when receiving SIGHUP */
} zathura_filemonitor_type_t;
/**
* Create a new file monitor.
*
* @param file_path file to monitor
* @param filemonitor_type type of file monitor
* @return new file monitor instance
*/
ZathuraFileMonitor*
zathura_filemonitor_new(const char* file_path,
zathura_filemonitor_type_t filemonitor_type);
/**
* Get path of the monitored file.
*
* @return path of monitored file
*/
const char* zathura_filemonitor_get_filepath(ZathuraFileMonitor* filemonitor);
#endif
zathura-0.3.8/zathura/internal.h 0000664 0001750 0001750 00000001350 12653114226 017352 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef INTERNAL_H
#define INTERNAL_H
#include "zathura.h"
#include "plugin.h"
/**
* Zathura password dialog
*/
typedef struct zathura_password_dialog_info_s
{
char* path; /**< Path to the file */
char* uri; /**< URI to the file */
zathura_t* zathura; /**< Zathura session */
} zathura_password_dialog_info_t;
struct zathura_document_information_entry_s
{
zathura_document_information_type_t type; /**< Type of the information */
char* value; /**< Value */
};
/**
* Returns the associated plugin
*
* @param document The document
* @return The plugin or NULL
*/
zathura_plugin_t* zathura_document_get_plugin(zathura_document_t* document);
#endif // INTERNAL_H
zathura-0.3.8/zathura/jumplist.c 0000664 0001750 0001750 00000011141 13216464200 017373 0 ustar sebastian sebastian #include "jumplist.h"
#include "zathura.h"
#include "document.h"
#include "database.h"
#include
#include
static void zathura_jumplist_reset_current(zathura_t* zathura);
static void zathura_jumplist_append_jump(zathura_t* zathura);
static void zathura_jumplist_save(zathura_t* zathura);
bool
zathura_jumplist_has_previous(zathura_t* zathura)
{
return girara_list_iterator_has_previous(zathura->jumplist.cur);
}
bool
zathura_jumplist_has_next(zathura_t* zathura)
{
return girara_list_iterator_has_next(zathura->jumplist.cur);
}
zathura_jump_t*
zathura_jumplist_current(zathura_t* zathura)
{
if (zathura->jumplist.cur != NULL) {
return girara_list_iterator_data(zathura->jumplist.cur);
} else {
return NULL;
}
}
void
zathura_jumplist_forward(zathura_t* zathura)
{
if (girara_list_iterator_has_next(zathura->jumplist.cur)) {
girara_list_iterator_next(zathura->jumplist.cur);
}
}
void
zathura_jumplist_backward(zathura_t* zathura)
{
if (girara_list_iterator_has_previous(zathura->jumplist.cur)) {
girara_list_iterator_previous(zathura->jumplist.cur);
}
}
static void
zathura_jumplist_reset_current(zathura_t* zathura)
{
g_return_if_fail(zathura != NULL && zathura->jumplist.cur != NULL);
while (girara_list_iterator_has_next(zathura->jumplist.cur) == true) {
girara_list_iterator_next(zathura->jumplist.cur);
}
}
static void
zathura_jumplist_append_jump(zathura_t* zathura)
{
g_return_if_fail(zathura != NULL && zathura->jumplist.list != NULL);
zathura_jump_t* jump = g_try_malloc0(sizeof(zathura_jump_t));
if (jump == NULL) {
return;
}
jump->page = 0;
jump->x = 0.0;
jump->y = 0.0;
girara_list_append(zathura->jumplist.list, jump);
if (zathura->jumplist.size == 0) {
zathura->jumplist.cur = girara_list_iterator(zathura->jumplist.list);
}
++zathura->jumplist.size;
zathura_jumplist_trim(zathura);
}
void
zathura_jumplist_trim(zathura_t* zathura)
{
g_return_if_fail(zathura != NULL && zathura->jumplist.list != NULL && zathura->jumplist.size != 0);
girara_list_iterator_t* cur = girara_list_iterator(zathura->jumplist.list);
while (zathura->jumplist.size > zathura->jumplist.max_size) {
if (girara_list_iterator_data(cur) == girara_list_iterator_data(zathura->jumplist.cur)) {
girara_list_iterator_free(zathura->jumplist.cur);
zathura->jumplist.cur = NULL;
}
girara_list_iterator_remove(cur);
--zathura->jumplist.size;
}
if (zathura->jumplist.size == 0 || zathura->jumplist.cur != NULL) {
girara_list_iterator_free(cur);
} else {
zathura->jumplist.cur = cur;
}
}
void
zathura_jumplist_add(zathura_t* zathura)
{
g_return_if_fail(zathura != NULL && zathura->document != NULL && zathura->jumplist.list != NULL);
unsigned int pagenum = zathura_document_get_current_page_number(zathura->document);
double x = zathura_document_get_position_x(zathura->document);
double y = zathura_document_get_position_y(zathura->document);
if (zathura->jumplist.size != 0) {
zathura_jumplist_reset_current(zathura);
zathura_jump_t* cur = zathura_jumplist_current(zathura);
if (cur != NULL) {
if (cur->page == pagenum && fabs(cur->x - x) <= DBL_EPSILON && fabs(cur->y - y) <= DBL_EPSILON) {
return;
}
}
}
zathura_jumplist_append_jump(zathura);
zathura_jumplist_reset_current(zathura);
zathura_jumplist_save(zathura);
}
bool
zathura_jumplist_load(zathura_t* zathura, const char* file)
{
g_return_val_if_fail(zathura != NULL && file != NULL, false);
if (zathura->database == NULL) {
return false;
}
zathura->jumplist.list = zathura_db_load_jumplist(zathura->database, file);
if (zathura->jumplist.list == NULL) {
girara_error("Failed to load the jumplist from the database");
return false;
}
zathura->jumplist.size = girara_list_size(zathura->jumplist.list);
if (zathura->jumplist.size != 0) {
zathura->jumplist.cur = girara_list_iterator(zathura->jumplist.list);
zathura_jumplist_reset_current(zathura);
zathura_jumplist_trim(zathura);
girara_debug("Loaded the jumplist from the database");
} else {
girara_debug("No jumplist for this file in the database yet");
}
return true;
}
static void
zathura_jumplist_save(zathura_t* zathura)
{
g_return_if_fail(zathura != NULL && zathura->document != NULL);
zathura_jump_t* cur = zathura_jumplist_current(zathura);
unsigned int pagenum = zathura_document_get_current_page_number(zathura->document);
if (cur != NULL) {
cur->page = pagenum;
cur->x = zathura_document_get_position_x(zathura->document);
cur->y = zathura_document_get_position_y(zathura->document);
}
}
zathura-0.3.8/zathura/jumplist.h 0000664 0001750 0001750 00000003434 12750077577 017431 0 ustar sebastian sebastian #ifndef ZATHURA_JUMPLIST_H
#define ZATHURA_JUMPLIST_H
#include
#include "types.h"
typedef struct zathura_jumplist_s
{
girara_list_t* list;
girara_list_iterator_t *cur;
unsigned int size;
unsigned int max_size;
} zathura_jumplist_t;
/**
* Checks whether current jump has a previous jump
*
* @param zathura The zathura session
* @return true if current jump has a previous jump
*/
bool zathura_jumplist_has_previous(zathura_t* jumplzathura);
/**
* Checks whether current jump has a next jump
*
* @param zathura The zathura session
* @return true if current jump has a next jump
*/
bool zathura_jumplist_has_next(zathura_t* zathura);
/**
* Return current jump in the jumplist
*
* @param zathura The zathura session
* @return current jump
*/
zathura_jump_t* zathura_jumplist_current(zathura_t* zathura);
/**
* Move forward in the jumplist
*
* @param zathura The zathura session
*/
void zathura_jumplist_forward(zathura_t* zathura);
/**
* Move backward in the jumplist
*
* @param zathura The zathura session
*/
void zathura_jumplist_backward(zathura_t* zathura);
/**
* Add current page as a new item to the jumplist after current position
*
* @param zathura The zathura session
*/
void zathura_jumplist_add(zathura_t* zathura);
/**
* Trim entries from the beginning of the jumplist to maintain it's maximum size constraint.
*
* @param zathura The zathura session
*/
void zathura_jumplist_trim(zathura_t* zathura);
/**
* Load the jumplist of the specified file
*
* @param zathura The zathura session
* @param file The file whose jumplist is to be loaded
*
* return A linked list of zathura_jump_t structures constituting the jumplist of the specified file, or NULL.
*/
bool zathura_jumplist_load(zathura_t* zathura, const char* file);
#endif
zathura-0.3.8/zathura/links.c 0000664 0001750 0001750 00000017047 12653114226 016663 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include "adjustment.h"
#include "links.h"
#include "zathura.h"
#include "document.h"
#include "utils.h"
#include "page.h"
#include "render.h"
struct zathura_link_s {
zathura_rectangle_t position; /**< Position of the link */
zathura_link_type_t type; /**< Link type */
zathura_link_target_t target; /**< Link target */
};
/* forward declarations */
static void link_remote(zathura_t* zathura, const char* file);
static void link_launch(zathura_t* zathura, zathura_link_t* link);
zathura_link_t*
zathura_link_new(zathura_link_type_t type, zathura_rectangle_t position,
zathura_link_target_t target)
{
zathura_link_t* link = g_try_malloc0(sizeof(zathura_link_t));
if (link == NULL) {
return NULL;
}
link->type = type;
link->position = position;
switch (type) {
case ZATHURA_LINK_NONE:
case ZATHURA_LINK_GOTO_DEST:
link->target = target;
if (target.value != NULL) {
link->target.value = g_strdup(target.value);
}
break;
case ZATHURA_LINK_GOTO_REMOTE:
case ZATHURA_LINK_URI:
case ZATHURA_LINK_LAUNCH:
case ZATHURA_LINK_NAMED:
if (target.value == NULL) {
g_free(link);
return NULL;
}
link->target.value = g_strdup(target.value);
break;
default:
g_free(link);
return NULL;
}
return link;
}
void
zathura_link_free(zathura_link_t* link)
{
if (link == NULL) {
return;
}
switch (link->type) {
case ZATHURA_LINK_NONE:
case ZATHURA_LINK_GOTO_DEST:
case ZATHURA_LINK_GOTO_REMOTE:
case ZATHURA_LINK_URI:
case ZATHURA_LINK_LAUNCH:
case ZATHURA_LINK_NAMED:
if (link->target.value != NULL) {
g_free(link->target.value);
}
break;
default:
break;
}
g_free(link);
}
zathura_link_type_t
zathura_link_get_type(zathura_link_t* link)
{
if (link == NULL) {
return ZATHURA_LINK_INVALID;
}
return link->type;
}
zathura_rectangle_t
zathura_link_get_position(zathura_link_t* link)
{
if (link == NULL) {
zathura_rectangle_t position = { 0, 0, 0, 0 };
return position;
}
return link->position;
}
zathura_link_target_t
zathura_link_get_target(zathura_link_t* link)
{
if (link == NULL) {
zathura_link_target_t target = { 0, NULL, 0, 0, 0, 0, 0, 0 };
return target;
}
return link->target;
}
void
zathura_link_evaluate(zathura_t* zathura, zathura_link_t* link)
{
if (zathura == NULL || zathura->document == NULL || link == NULL) {
return;
}
bool link_zoom = true;
girara_setting_get(zathura->ui.session, "link-zoom", &link_zoom);
switch (link->type) {
case ZATHURA_LINK_GOTO_DEST:
if (link->target.destination_type != ZATHURA_LINK_DESTINATION_UNKNOWN) {
if (link->target.scale >= DBL_EPSILON && link_zoom) {
zathura_document_set_scale(zathura->document,
zathura_correct_scale_value(zathura->ui.session, link->target.scale));
render_all(zathura);
}
/* get page */
zathura_page_t* page = zathura_document_get_page(zathura->document,
link->target.page_number);
if (page == NULL) {
return;
}
/* compute the position with the page aligned to the top and left
of the viewport */
double pos_x = 0;
double pos_y = 0;
page_number_to_position(zathura->document, link->target.page_number,
0.0, 0.0, &pos_x, &pos_y);
/* correct to place the target position at the top of the viewport */
/* NOTE: link->target is in page units, needs to be scaled and rotated */
unsigned int cell_height = 0;
unsigned int cell_width = 0;
zathura_document_get_cell_size(zathura->document, &cell_height, &cell_width);
unsigned int doc_height = 0;
unsigned int doc_width = 0;
zathura_document_get_document_size(zathura->document, &doc_height, &doc_width);
bool link_hadjust = true;
girara_setting_get(zathura->ui.session, "link-hadjust", &link_hadjust);
/* scale and rotate */
double scale = zathura_document_get_scale(zathura->document);
double shiftx = link->target.left * scale / (double)cell_width;
double shifty = link->target.top * scale / (double)cell_height;
page_calc_position(zathura->document, shiftx, shifty, &shiftx, &shifty);
/* shift the position or set to auto */
if (link->target.destination_type == ZATHURA_LINK_DESTINATION_XYZ &&
link->target.left != -1 && link_hadjust == true) {
pos_x += shiftx / (double)doc_width;
} else {
pos_x = -1; /* -1 means automatic */
}
if (link->target.destination_type == ZATHURA_LINK_DESTINATION_XYZ &&
link->target.top != -1) {
pos_y += shifty / (double)doc_height;
} else {
pos_y = -1; /* -1 means automatic */
}
/* move to position */
zathura_jumplist_add(zathura);
zathura_document_set_current_page_number(zathura->document, link->target.page_number);
position_set(zathura, pos_x, pos_y);
zathura_jumplist_add(zathura);
}
break;
case ZATHURA_LINK_GOTO_REMOTE:
link_remote(zathura, link->target.value);
break;
case ZATHURA_LINK_URI:
if (girara_xdg_open(link->target.value) == false) {
girara_notify(zathura->ui.session, GIRARA_ERROR, _("Failed to run xdg-open."));
}
break;
case ZATHURA_LINK_LAUNCH:
link_launch(zathura, link);
break;
default:
break;
}
}
void
zathura_link_display(zathura_t* zathura, zathura_link_t* link)
{
zathura_link_type_t type = zathura_link_get_type(link);
zathura_link_target_t target = zathura_link_get_target(link);
switch (type) {
case ZATHURA_LINK_GOTO_DEST:
girara_notify(zathura->ui.session, GIRARA_INFO, _("Link: page %d"),
target.page_number);
break;
case ZATHURA_LINK_GOTO_REMOTE:
case ZATHURA_LINK_URI:
case ZATHURA_LINK_LAUNCH:
case ZATHURA_LINK_NAMED:
girara_notify(zathura->ui.session, GIRARA_INFO, _("Link: %s"),
target.value);
break;
default:
girara_notify(zathura->ui.session, GIRARA_ERROR, _("Link: Invalid"));
}
}
static void
link_remote(zathura_t* zathura, const char* file)
{
if (zathura == NULL || file == NULL || zathura->document == NULL) {
return;
}
const char* path = zathura_document_get_path(zathura->document);
char* dir = g_path_get_dirname(path);
char* uri = g_build_filename(dir, file, NULL);
char* argv[] = {
*(zathura->global.arguments),
uri,
NULL
};
g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
g_free(uri);
g_free(dir);
}
static void
link_launch(zathura_t* zathura, zathura_link_t* link)
{
if (zathura == NULL || link == NULL || zathura->document == NULL) {
return;
}
/* get file path */
if (link->target.value == NULL) {
return;
};
char* path = NULL;
if (g_path_is_absolute(link->target.value) == TRUE) {
path = g_strdup(link->target.value);
} else {
const char* document = zathura_document_get_path(zathura->document);
char* dir = g_path_get_dirname(document);
path = g_build_filename(dir, link->target.value, NULL);
g_free(dir);
}
if (girara_xdg_open(path) == false) {
girara_notify(zathura->ui.session, GIRARA_ERROR, _("Failed to run xdg-open."));
}
g_free(path);
}
zathura-0.3.8/zathura/links.h 0000664 0001750 0001750 00000002576 12653114226 016671 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef LINK_H
#define LINK_H
#include "types.h"
/**
* Creates a new zathura link
*
* @param type Type of the link
* @param position Position of the link
* @param target Target
* @return New zathura link
*/
zathura_link_t*
zathura_link_new(zathura_link_type_t type, zathura_rectangle_t position,
zathura_link_target_t target);
/**
* Free link
*
* @param link The link
*/
void zathura_link_free(zathura_link_t* link);
/**
* Returns the type of the link
*
* @param link The link
* @return The target type of the link
*/
zathura_link_type_t zathura_link_get_type(zathura_link_t* link);
/**
* Returns the position of the link
*
* @param link The link
* @return The position of the link
*/
zathura_rectangle_t zathura_link_get_position(zathura_link_t* link);
/**
* The target value of the link
*
* @param link The link
* @return Returns the target of the link (depends on the link type)
*/
zathura_link_target_t zathura_link_get_target(zathura_link_t* link);
/**
* Evaluate link
*
* @param zathura Zathura instance
* @param link The link
*/
void zathura_link_evaluate(zathura_t* zathura, zathura_link_t* link);
/**
* Display a link using girara_notify
*
* @param zathura Zathura instance
* @param link The link
*/
void zathura_link_display(zathura_t* zathura, zathura_link_t* link);
#endif // LINK_H
zathura-0.3.8/zathura/macros.h 0000664 0001750 0001750 00000000525 12653114226 017025 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef ZATHURA_MACROS_H
#define ZATHURA_MACROS_H
#include
#define UNUSED(x) GIRARA_UNUSED(x)
#define DEPRECATED(x) GIRARA_DEPRECATED(x)
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
#endif
zathura-0.3.8/zathura/main.c 0000664 0001750 0001750 00000023155 13216464200 016460 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "zathura.h"
#include "utils.h"
#include "dbus-interface.h"
#ifdef WITH_SYNCTEX
#include "synctex.h"
#endif
/* Init locale */
static void
init_locale(void)
{
setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
}
/* Set log level */
static void
set_log_level(const char* loglevel)
{
if (loglevel == NULL || g_strcmp0(loglevel, "info") == 0) {
girara_set_log_level(GIRARA_INFO);
} else if (g_strcmp0(loglevel, "warning") == 0) {
girara_set_log_level(GIRARA_WARNING);
} else if (g_strcmp0(loglevel, "error") == 0) {
girara_set_log_level(GIRARA_ERROR);
}
}
/* Handle synctex forward synchronization */
#ifdef WITH_SYNCTEX
static int
run_synctex_forward(const char* synctex_fwd, const char* filename,
int synctex_pid)
{
GFile* file = g_file_new_for_commandline_arg(filename);
if (file == NULL) {
girara_error("Unable to handle argument '%s'.", filename);
return -1;
}
char* real_path = g_file_get_path(file);
g_object_unref(file);
if (real_path == NULL) {
girara_error("Failed to determine path for '%s'", filename);
return -1;
}
int line = 0;
int column = 0;
char* input_file = NULL;
if (synctex_parse_input(synctex_fwd, &input_file, &line, &column) == false) {
girara_error("Failed to parse argument to --synctex-forward.");
g_free(real_path);
return -1;
}
const int ret = zathura_dbus_synctex_position(real_path, input_file, line,
column, synctex_pid);
g_free(input_file);
g_free(real_path);
if (ret == -1) {
/* D-Bus or SyncTeX failed */
girara_error(
"Got no usable data from SyncTeX or D-Bus failed in some way.");
}
return ret;
}
#endif
static zathura_t*
init_zathura(const char* config_dir, const char* data_dir,
const char* cache_dir, const char* plugin_path, char** argv,
char* synctex_editor, Window embed)
{
/* create zathura session */
zathura_t* zathura = zathura_create();
if (zathura == NULL) {
return NULL;
}
zathura_set_xid(zathura, embed);
zathura_set_config_dir(zathura, config_dir);
zathura_set_data_dir(zathura, data_dir);
zathura_set_cache_dir(zathura, cache_dir);
zathura_set_plugin_dir(zathura, plugin_path);
zathura_set_argv(zathura, argv);
/* Init zathura */
if (zathura_init(zathura) == false) {
zathura_free(zathura);
return NULL;
}
if (synctex_editor != NULL) {
girara_setting_set(zathura->ui.session, "synctex-editor-command",
synctex_editor);
}
return zathura;
}
/* main function */
int
main(int argc, char* argv[])
{
init_locale();
/* parse command line arguments */
gchar* config_dir = NULL;
gchar* data_dir = NULL;
gchar* cache_dir = NULL;
gchar* plugin_path = NULL;
gchar* loglevel = NULL;
gchar* password = NULL;
gchar* synctex_editor = NULL;
gchar* synctex_fwd = NULL;
gchar* mode = NULL;
bool forkback = false;
bool print_version = false;
int page_number = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
#ifdef WITH_SYNCTEX
int synctex_pid = -1;
#endif
Window embed = 0;
GOptionEntry entries[] = {
{ "reparent", 'e', 0, G_OPTION_ARG_INT, &embed, _("Reparents to window specified by xid (X11)"), "xid" },
{ "config-dir", 'c', 0, G_OPTION_ARG_FILENAME, &config_dir, _("Path to the config directory"), "path" },
{ "data-dir", 'd', 0, G_OPTION_ARG_FILENAME, &data_dir, _("Path to the data directory"), "path" },
{ "cache-dir", '\0', 0, G_OPTION_ARG_FILENAME, &cache_dir, _("Path to the cache directory"), "path"},
{ "plugins-dir", 'p', 0, G_OPTION_ARG_STRING, &plugin_path, _("Path to the directories containing plugins"), "path" },
{ "fork", '\0', 0, G_OPTION_ARG_NONE, &forkback, _("Fork into the background"), NULL },
{ "password", 'w', 0, G_OPTION_ARG_STRING, &password, _("Document password"), "password" },
{ "page", 'P', 0, G_OPTION_ARG_INT, &page_number, _("Page number to go to"), "number" },
{ "log-level", 'l', 0, G_OPTION_ARG_STRING, &loglevel, _("Log level (debug, info, warning, error)"), "level" },
{ "version", 'v', 0, G_OPTION_ARG_NONE, &print_version, _("Print version information"), NULL },
#ifdef WITH_SYNCTEX
{ "synctex-editor-command", 'x', 0, G_OPTION_ARG_STRING, &synctex_editor, _("Synctex editor (forwarded to the synctex command)"), "cmd" },
{ "synctex-forward", '\0', 0, G_OPTION_ARG_STRING, &synctex_fwd, _("Move to given synctex position"), "position" },
{ "synctex-pid", '\0', 0, G_OPTION_ARG_INT, &synctex_pid, _("Highlight given position in the given process"), "pid" },
#endif
{ "mode", '\0', 0, G_OPTION_ARG_STRING, &mode, _("Start in a non-default mode"), "mode" },
{ NULL, '\0', 0, 0, NULL, NULL, NULL }
};
GOptionContext* context = g_option_context_new(" [file1] [file2] [...]");
g_option_context_add_main_entries(context, entries, NULL);
GError* error = NULL;
if (g_option_context_parse(context, &argc, &argv, &error) == false) {
girara_error("Error parsing command line arguments: %s\n", error->message);
g_option_context_free(context);
g_error_free(error);
return -1;
}
g_option_context_free(context);
int ret = 0;
set_log_level(loglevel);
#ifdef WITH_SYNCTEX
/* handle synctex forward synchronization */
if (synctex_fwd != NULL) {
if (argc != 2) {
girara_error("Too many arguments or missing filename while running with "
"--synctex-forward");
ret = -1;
goto free_and_ret;
}
ret = run_synctex_forward(synctex_fwd, argv[1], synctex_pid);
if (ret > 0) {
/* Instance found. */
ret = 0;
goto free_and_ret;
}
else if (ret < 0) {
/* Error occurred. */
ret = -1;
goto free_and_ret;
}
girara_debug("No instance found. Starting new one.");
}
#endif
/* check mode */
if (mode != NULL && g_strcmp0(mode, "presentation") != 0 &&
g_strcmp0(mode, "fullscreen") != 0) {
girara_error("Invalid argument for --mode: %s", mode);
ret = -1;
goto free_and_ret;
}
/* g_option_context_parse has some funny (documented) behavior:
* * for "-- a b c" you get no -- in argv
* * for "-- --" you get -- in argv twice
* * for "-- -a" you get -- in argv
*
* So if there is one -- in argv, we need to ignore it. */
const bool has_double_dash = argc > 1 && g_strcmp0(argv[1], "--") == 0;
const int file_idx_base = has_double_dash ? 2 : 1;
int file_idx = argc > file_idx_base ? file_idx_base : 0;
/* Fork instances for other files. */
if (print_version == false && argc > file_idx_base + 1) {
for (int idx = file_idx_base + 1; idx < argc; ++idx) {
const pid_t pid = fork();
if (pid == 0) { /* child */
file_idx = idx;
if (setsid() == -1) {
girara_error("Could not start new process group: %s",
strerror(errno));
ret = -1;
goto free_and_ret;
}
break;
}
else if (pid < 0) { /* error */
girara_error("Could not fork: %s", strerror(errno));
ret = -1;
goto free_and_ret;
}
}
}
/* Fork into the background if the user really wants to ... */
if (print_version == false && forkback == true &&
file_idx < file_idx_base + 1) {
const pid_t pid = fork();
if (pid > 0) { /* parent */
goto free_and_ret;
}
else if (pid < 0) { /* error */
girara_error("Could not fork: %s", strerror(errno));
ret = -1;
goto free_and_ret;
}
if (setsid() == -1) {
girara_error("Could not start new process group: %s", strerror(errno));
ret = -1;
goto free_and_ret;
}
}
/* Initialize GTK+ */
gtk_init(&argc, &argv);
/* Create zathura session */
zathura_t* zathura = init_zathura(config_dir, data_dir, cache_dir,
plugin_path, argv, synctex_editor, embed);
if (zathura == NULL) {
girara_error("Could not initialize zathura.");
ret = -1;
goto free_and_ret;
}
/* Print version */
if (print_version == true) {
char* string = zathura_get_version_string(zathura, false);
if (string != NULL) {
fprintf(stdout, "%s\n", string);
g_free(string);
}
zathura_free(zathura);
goto free_and_ret;
}
/* open document if passed */
if (file_idx != 0) {
if (page_number > 0) {
--page_number;
}
document_open_idle(zathura, argv[file_idx], password, page_number, mode,
synctex_fwd);
}
/* run zathura */
gtk_main();
/* free zathura */
zathura_free(zathura);
free_and_ret:
g_free(config_dir);
g_free(data_dir);
g_free(cache_dir);
g_free(plugin_path);
g_free(loglevel);
g_free(password);
g_free(synctex_editor);
g_free(synctex_fwd);
g_free(mode);
return ret;
}
zathura-0.3.8/zathura/marks.c 0000664 0001750 0001750 00000017676 13216464200 016664 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include "callbacks.h"
#include "marks.h"
#include "document.h"
#include "render.h"
#include "utils.h"
static void mark_add(zathura_t* zathura, int key);
static void mark_evaluate(zathura_t* zathura, int key);
static bool cb_marks_view_key_press_event_add(GtkWidget* widget, GdkEventKey*
event, girara_session_t* session);
static bool cb_marks_view_key_press_event_evaluate(GtkWidget* widget,
GdkEventKey* event, girara_session_t* session);
struct zathura_mark_s {
int key; /**> Marks key */
double position_x; /**> Horizontal adjustment */
double position_y; /**> Vertical adjustment */
unsigned int page; /**> Page number */
double scale; /**> Zoom level */
};
bool
sc_mark_add(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{
g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->gtk.view != NULL, FALSE);
/* redirect signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed);
session->signals.view_key_pressed = g_signal_connect(G_OBJECT(session->gtk.view), "key-press-event",
G_CALLBACK(cb_marks_view_key_press_event_add), session);
return true;
}
bool
sc_mark_evaluate(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{
g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->gtk.view != NULL, FALSE);
/* redirect signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed);
session->signals.view_key_pressed = g_signal_connect(G_OBJECT(session->gtk.view), "key-press-event",
G_CALLBACK(cb_marks_view_key_press_event_evaluate), session);
return true;
}
bool
cb_marks_view_key_press_event_add(GtkWidget* UNUSED(widget), GdkEventKey* event,
girara_session_t* session)
{
g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->gtk.view != NULL, FALSE);
g_return_val_if_fail(session->global.data != NULL, FALSE);
zathura_t* zathura = (zathura_t*) session->global.data;
/* reset signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed);
session->signals.view_key_pressed = g_signal_connect(G_OBJECT(session->gtk.view), "key-press-event",
G_CALLBACK(girara_callback_view_key_press_event), session);
/* evaluate key */
if (((event->keyval >= '0' && event->keyval <= '9') ||
(event->keyval >= 'a' && event->keyval <= 'z') ||
(event->keyval >= 'A' && event->keyval <= 'Z')
) == false) {
return false;
}
mark_add(zathura, event->keyval);
return true;
}
bool cb_marks_view_key_press_event_evaluate(GtkWidget* UNUSED(widget), GdkEventKey*
event, girara_session_t* session)
{
g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->gtk.view != NULL, FALSE);
g_return_val_if_fail(session->global.data != NULL, FALSE);
zathura_t* zathura = (zathura_t*) session->global.data;
/* reset signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed);
session->signals.view_key_pressed = g_signal_connect(G_OBJECT(session->gtk.view), "key-press-event",
G_CALLBACK(girara_callback_view_key_press_event), session);
/* evaluate key */
if (((event->keyval >= '0' && event->keyval <= '9') ||
(event->keyval >= 'a' && event->keyval <= 'z') ||
(event->keyval >= 'A' && event->keyval <= 'Z')
) == false) {
return true;
}
mark_evaluate(zathura, event->keyval);
return true;
}
bool
cmd_marks_add(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = (zathura_t*) session->global.data;
if (girara_list_size(argument_list) < 1) {
return false;
}
char* key_string = girara_list_nth(argument_list, 0);
if (key_string == NULL) {
return false;
}
if (strlen(key_string) != 1) {
return false;
}
char key = key_string[0];
if (((key >= 0x41 && key <= 0x5A) || (key >=
0x61 && key <= 0x7A)) == false) {
return false;
}
mark_add(zathura, key);
return false;
}
bool
cmd_marks_delete(girara_session_t* session, girara_list_t* argument_list)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = (zathura_t*) session->global.data;
if (girara_list_size(argument_list) < 1) {
return false;
}
if (girara_list_size(zathura->global.marks) == 0) {
return false;
}
GIRARA_LIST_FOREACH(argument_list, char*, iter, key_string)
if (key_string == NULL) {
girara_list_iterator_next(iter);
continue;
}
for (unsigned int i = 0; i < strlen(key_string); i++) {
char key = key_string[i];
if (((key >= 0x41 && key <= 0x5A) || (key >=
0x61 && key <= 0x7A)) == false) {
continue;
}
/* search for existing mark */
girara_list_iterator_t* mark_iter = girara_list_iterator(zathura->global.marks);
do {
zathura_mark_t* mark = (zathura_mark_t*) girara_list_iterator_data(mark_iter);
if (mark == NULL) {
continue;
}
if (mark->key == key) {
girara_list_remove(zathura->global.marks, mark);
continue;
}
} while (girara_list_iterator_next(mark_iter) != NULL);
girara_list_iterator_free(mark_iter);
}
GIRARA_LIST_FOREACH_END(argument_list, char*, iter, key_string);
return true;
}
void
mark_add(zathura_t* zathura, int key)
{
if (zathura == NULL || zathura->document == NULL || zathura->global.marks == NULL) {
return;
}
unsigned int page_id = zathura_document_get_current_page_number(zathura->document);
double position_x = zathura_document_get_position_x(zathura->document);
double position_y = zathura_document_get_position_y(zathura->document);
double scale = zathura_document_get_scale(zathura->document);
/* search for existing mark */
GIRARA_LIST_FOREACH(zathura->global.marks, zathura_mark_t*, iter, mark)
if (mark->key == key) {
mark->page = page_id;
mark->position_x = position_x;
mark->position_y = position_y;
mark->scale = scale;
return;
}
GIRARA_LIST_FOREACH_END(zathura->global.marks, zathura_mark_t*, iter, mark);
/* add new mark */
zathura_mark_t* mark = g_try_malloc0(sizeof(zathura_mark_t));
if (mark == NULL) {
return;
}
mark->key = key;
mark->page = page_id;
mark->position_x = position_x;
mark->position_y = position_y;
mark->scale = scale;
girara_list_append(zathura->global.marks, mark);
}
void
mark_evaluate(zathura_t* zathura, int key)
{
if (zathura == NULL || zathura->global.marks == NULL) {
return;
}
/* search for existing mark */
GIRARA_LIST_FOREACH(zathura->global.marks, zathura_mark_t*, iter, mark)
if (mark != NULL && mark->key == key) {
zathura_document_set_scale(zathura->document,
zathura_correct_scale_value(zathura->ui.session, mark->scale));
render_all(zathura);
zathura_jumplist_add(zathura);
page_set(zathura, mark->page);
position_set(zathura, mark->position_x, mark->position_y);
zathura_jumplist_add(zathura);
return;
}
GIRARA_LIST_FOREACH_END(zathura->global.marks, zathura_mark_t*, iter, mark);
}
void
mark_free(void* data)
{
if (data == NULL) {
return;
}
zathura_mark_t* mark = (zathura_mark_t*) data;
g_free(mark);
}
zathura-0.3.8/zathura/marks.h 0000664 0001750 0001750 00000002722 12750077577 016676 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef MARKS_H
#define MARKS_H
#include
#include "zathura.h"
typedef struct zathura_mark_s zathura_mark_t;
/**
* Saves a mark
*
* @param session The used girara session
* @param argument The used argument
* @param event Girara event
* @param t Number of executions
* @return true if no error occurred otherwise false
*/
bool sc_mark_add(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
/**
* Evaluates a mark
*
* @param session The used girara session
* @param argument The used argument
* @param event Girara event
* @param t Number of executions
* @return true if no error occurred otherwise false
*/
bool sc_mark_evaluate(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
/**
* Mark current location within the web page
*
* @param session The girara session
* @param argument_list Argument list
* @return true if no error occurred otherwise false
*/
bool cmd_marks_add(girara_session_t* session, girara_list_t* argument_list);
/**
* Delete the specified marks
*
* @param session The girara session
* @param argument_list Argument list
* @return true if no error occurred otherwise false
*/
bool cmd_marks_delete(girara_session_t* session, girara_list_t* argument_list);
/**
* Free function vor marks
*
* @param data
*/
void mark_free(void* data);
#endif // MARKS_H
zathura-0.3.8/zathura/page-widget.c 0000664 0001750 0001750 00000116522 13216464200 017732 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include
#include
#include
#include
#include "links.h"
#include "page-widget.h"
#include "page.h"
#include "render.h"
#include "utils.h"
#include "shortcuts.h"
#include "zathura.h"
G_DEFINE_TYPE(ZathuraPage, zathura_page_widget, GTK_TYPE_DRAWING_AREA)
typedef struct zathura_page_widget_private_s {
zathura_page_t* page; /**< Page object */
zathura_t* zathura; /**< Zathura object */
cairo_surface_t* surface; /**< Cairo surface */
cairo_surface_t* thumbnail; /**< Cairo surface */
ZathuraRenderRequest* render_request; /* Request object */
bool cached; /**< Cached state */
struct {
girara_list_t* list; /**< List of links on the page */
gboolean retrieved; /**< True if we already tried to retrieve the list of links */
gboolean draw; /**< True if links should be drawn */
unsigned int offset; /**< Offset to the links */
unsigned int n; /**< Number */
} links;
struct {
girara_list_t* list; /**< A list if there are search results that should be drawn */
int current; /**< The index of the current search result */
gboolean draw; /**< Draw search results */
} search;
struct {
girara_list_t* list; /**< List of images on the page */
gboolean retrieved; /**< True if we already tried to retrieve the list of images */
zathura_image_t* current; /**< Image data of selected image */
} images;
struct {
zathura_rectangle_t selection; /**< Region selected with the mouse */
struct {
int x; /**< X coordinate */
int y; /**< Y coordinate */
} selection_basepoint;
gboolean over_link;
} mouse;
} zathura_page_widget_private_t;
#define ZATHURA_PAGE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE((obj), ZATHURA_TYPE_PAGE, \
zathura_page_widget_private_t))
static gboolean zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo);
static void zathura_page_widget_finalize(GObject* object);
static void zathura_page_widget_dispose(GObject* object);
static void zathura_page_widget_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec);
static void zathura_page_widget_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec);
static void zathura_page_widget_size_allocate(GtkWidget* widget, GdkRectangle* allocation);
static void redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle);
static void redraw_all_rects(ZathuraPage* widget, girara_list_t* rectangles);
static void zathura_page_widget_popup_menu(GtkWidget* widget, GdkEventButton* event);
static gboolean cb_zathura_page_widget_button_press_event(GtkWidget* widget, GdkEventButton* button);
static gboolean cb_zathura_page_widget_button_release_event(GtkWidget* widget, GdkEventButton* button);
static gboolean cb_zathura_page_widget_motion_notify(GtkWidget* widget, GdkEventMotion* event);
static gboolean cb_zathura_page_widget_leave_notify(GtkWidget* widget, GdkEventCrossing* event);
static gboolean cb_zathura_page_widget_popup_menu(GtkWidget* widget);
static void cb_menu_image_copy(GtkMenuItem* item, ZathuraPage* page);
static void cb_menu_image_save(GtkMenuItem* item, ZathuraPage* page);
static void cb_update_surface(ZathuraRenderRequest* request, cairo_surface_t* surface, void* data);
static void cb_cache_added(ZathuraRenderRequest* request, void* data);
static void cb_cache_invalidated(ZathuraRenderRequest* request, void* data);
static bool surface_small_enough(cairo_surface_t* surface, size_t max_size, cairo_surface_t* old);
static cairo_surface_t *draw_thumbnail_image(cairo_surface_t* surface, size_t max_size);
enum properties_e {
PROP_0,
PROP_PAGE,
PROP_ZATHURA,
PROP_DRAW_LINKS,
PROP_LINKS_OFFSET,
PROP_LINKS_NUMBER,
PROP_SEARCH_RESULTS,
PROP_SEARCH_RESULTS_LENGTH,
PROP_SEARCH_RESULTS_CURRENT,
PROP_DRAW_SEARCH_RESULTS,
PROP_LAST_VIEW,
};
enum {
TEXT_SELECTED,
IMAGE_SELECTED,
BUTTON_RELEASE,
ENTER_LINK,
LEAVE_LINK,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
static void
zathura_page_widget_class_init(ZathuraPageClass* class)
{
/* add private members */
g_type_class_add_private(class, sizeof(zathura_page_widget_private_t));
/* overwrite methods */
GtkWidgetClass* widget_class = GTK_WIDGET_CLASS(class);
widget_class->draw = zathura_page_widget_draw;
widget_class->size_allocate = zathura_page_widget_size_allocate;
widget_class->button_press_event = cb_zathura_page_widget_button_press_event;
widget_class->button_release_event = cb_zathura_page_widget_button_release_event;
widget_class->motion_notify_event = cb_zathura_page_widget_motion_notify;
widget_class->leave_notify_event = cb_zathura_page_widget_leave_notify;
widget_class->popup_menu = cb_zathura_page_widget_popup_menu;
GObjectClass* object_class = G_OBJECT_CLASS(class);
object_class->dispose = zathura_page_widget_dispose;
object_class->finalize = zathura_page_widget_finalize;
object_class->set_property = zathura_page_widget_set_property;
object_class->get_property = zathura_page_widget_get_property;
/* add properties */
g_object_class_install_property(object_class, PROP_PAGE,
g_param_spec_pointer("page", "page", "the page to draw", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_ZATHURA,
g_param_spec_pointer("zathura", "zathura", "the zathura instance", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_DRAW_LINKS,
g_param_spec_boolean("draw-links", "draw-links", "Set to true if links should be drawn", FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_LINKS_OFFSET,
g_param_spec_int("offset-links", "offset-links", "Offset for the link numbers", 0, INT_MAX, 0, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_LINKS_NUMBER,
g_param_spec_int("number-of-links", "number-of-links", "Number of links", 0, INT_MAX, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_SEARCH_RESULTS,
g_param_spec_pointer("search-results", "search-results", "Set to the list of search results", G_PARAM_WRITABLE | G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_SEARCH_RESULTS_CURRENT,
g_param_spec_int("search-current", "search-current", "The current search result", -1, INT_MAX, 0, G_PARAM_WRITABLE | G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_SEARCH_RESULTS_LENGTH,
g_param_spec_int("search-length", "search-length", "The number of search results", -1, INT_MAX, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property(object_class, PROP_DRAW_SEARCH_RESULTS,
g_param_spec_boolean("draw-search-results", "draw-search-results", "Set to true if search results should be drawn", FALSE, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
/* add signals */
signals[TEXT_SELECTED] = g_signal_new("text-selected",
ZATHURA_TYPE_PAGE,
G_SIGNAL_RUN_LAST,
0,
NULL,
NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
1,
G_TYPE_STRING);
signals[IMAGE_SELECTED] = g_signal_new("image-selected",
ZATHURA_TYPE_PAGE,
G_SIGNAL_RUN_LAST,
0,
NULL,
NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
1,
G_TYPE_OBJECT);
signals[ENTER_LINK] = g_signal_new("enter-link",
ZATHURA_TYPE_PAGE,
G_SIGNAL_RUN_LAST,
0,
NULL,
NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
0);
signals[LEAVE_LINK] = g_signal_new("leave-link",
ZATHURA_TYPE_PAGE,
G_SIGNAL_RUN_LAST,
0,
NULL,
NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
0);
signals[BUTTON_RELEASE] = g_signal_new("scaled-button-release",
ZATHURA_TYPE_PAGE,
G_SIGNAL_RUN_LAST,
0,
NULL,
NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
1,
G_TYPE_POINTER);
}
static void
zathura_page_widget_init(ZathuraPage* widget)
{
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
priv->page = NULL;
priv->surface = NULL;
priv->thumbnail = NULL;
priv->render_request = NULL;
priv->cached = false;
priv->links.list = NULL;
priv->links.retrieved = false;
priv->links.draw = false;
priv->links.offset = 0;
priv->links.n = 0;
priv->search.list = NULL;
priv->search.current = INT_MAX;
priv->search.draw = false;
priv->images.list = NULL;
priv->images.retrieved = false;
priv->images.current = NULL;
priv->mouse.selection.x1 = -1;
priv->mouse.selection.y1 = -1;
priv->mouse.selection_basepoint.x = -1;
priv->mouse.selection_basepoint.y = -1;
const unsigned int event_mask = GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK;
gtk_widget_add_events(GTK_WIDGET(widget), event_mask);
}
GtkWidget*
zathura_page_widget_new(zathura_t* zathura, zathura_page_t* page)
{
g_return_val_if_fail(page != NULL, NULL);
GObject* ret = g_object_new(ZATHURA_TYPE_PAGE, "page", page, "zathura", zathura, NULL);
if (ret == NULL) {
return NULL;
}
ZathuraPage* widget = ZATHURA_PAGE(ret);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
priv->render_request = zathura_render_request_new(zathura->sync.render_thread, page);
g_signal_connect_object(priv->render_request, "completed",
G_CALLBACK(cb_update_surface), widget, 0);
g_signal_connect_object(priv->render_request, "cache-added",
G_CALLBACK(cb_cache_added), widget, 0);
g_signal_connect_object(priv->render_request, "cache-invalidated",
G_CALLBACK(cb_cache_invalidated), widget, 0);
return GTK_WIDGET(ret);
}
static void
zathura_page_widget_dispose(GObject* object)
{
ZathuraPage* widget = ZATHURA_PAGE(object);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
g_clear_object(&priv->render_request);
G_OBJECT_CLASS(zathura_page_widget_parent_class)->dispose(object);
}
static void
zathura_page_widget_finalize(GObject* object)
{
ZathuraPage* widget = ZATHURA_PAGE(object);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (priv->surface != NULL) {
cairo_surface_destroy(priv->surface);
}
if (priv->thumbnail != NULL) {
cairo_surface_destroy(priv->thumbnail);
}
if (priv->search.list != NULL) {
girara_list_free(priv->search.list);
}
if (priv->links.list != NULL) {
girara_list_free(priv->links.list);
}
G_OBJECT_CLASS(zathura_page_widget_parent_class)->finalize(object);
}
static void
zathura_page_widget_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
ZathuraPage* pageview = ZATHURA_PAGE(object);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(pageview);
switch (prop_id) {
case PROP_PAGE:
priv->page = g_value_get_pointer(value);
break;
case PROP_ZATHURA:
priv->zathura = g_value_get_pointer(value);
break;
case PROP_DRAW_LINKS:
priv->links.draw = g_value_get_boolean(value);
/* get links */
if (priv->links.draw == TRUE && priv->links.retrieved == FALSE) {
priv->links.list = zathura_page_links_get(priv->page, NULL);
priv->links.retrieved = TRUE;
priv->links.n = (priv->links.list == NULL) ? 0 : girara_list_size(priv->links.list);
}
if (priv->links.retrieved == TRUE && priv->links.list != NULL) {
GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link)
if (link != NULL) {
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, zathura_link_get_position(link));
redraw_rect(pageview, &rectangle);
}
GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link);
}
break;
case PROP_LINKS_OFFSET:
priv->links.offset = g_value_get_int(value);
break;
case PROP_SEARCH_RESULTS:
if (priv->search.list != NULL && priv->search.draw) {
redraw_all_rects(pageview, priv->search.list);
girara_list_free(priv->search.list);
}
priv->search.list = g_value_get_pointer(value);
if (priv->search.list != NULL && priv->search.draw) {
priv->links.draw = FALSE;
redraw_all_rects(pageview, priv->search.list);
}
priv->search.current = -1;
break;
case PROP_SEARCH_RESULTS_CURRENT: {
g_return_if_fail(priv->search.list != NULL);
if (priv->search.current >= 0 && priv->search.current < (signed) girara_list_size(priv->search.list)) {
zathura_rectangle_t* rect = girara_list_nth(priv->search.list, priv->search.current);
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect);
redraw_rect(pageview, &rectangle);
}
int val = g_value_get_int(value);
if (val < 0) {
priv->search.current = girara_list_size(priv->search.list);
} else {
priv->search.current = val;
if (priv->search.draw == TRUE && val >= 0 && val < (signed) girara_list_size(priv->search.list)) {
zathura_rectangle_t* rect = girara_list_nth(priv->search.list, priv->search.current);
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect);
redraw_rect(pageview, &rectangle);
}
}
break;
}
case PROP_DRAW_SEARCH_RESULTS:
priv->search.draw = g_value_get_boolean(value);
/*
* we do the following instead of only redrawing the rectangles of the
* search results in order to avoid the rectangular margins that appear
* around the search terms after their highlighted rectangular areas are
* redrawn without highlighting.
*/
if (priv->search.list != NULL && zathura_page_get_visibility(priv->page)) {
gtk_widget_queue_draw(GTK_WIDGET(object));
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
}
static void
zathura_page_widget_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
{
ZathuraPage* pageview = ZATHURA_PAGE(object);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(pageview);
switch (prop_id) {
case PROP_LINKS_NUMBER:
g_value_set_int(value, priv->links.n);
break;
case PROP_SEARCH_RESULTS_LENGTH:
g_value_set_int(value, priv->search.list == NULL ? 0 : girara_list_size(priv->search.list));
break;
case PROP_SEARCH_RESULTS_CURRENT:
g_value_set_int(value, priv->search.list == NULL ? -1 : priv->search.current);
break;
case PROP_SEARCH_RESULTS:
g_value_set_pointer(value, priv->search.list);
break;
case PROP_DRAW_SEARCH_RESULTS:
g_value_set_boolean(value, priv->search.draw);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
}
static gboolean
zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
{
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
zathura_document_t* document = zathura_page_get_document(priv->page);
const unsigned int page_height = gtk_widget_get_allocated_height(widget);
const unsigned int page_width = gtk_widget_get_allocated_width(widget);
if (priv->surface != NULL || priv->thumbnail != NULL) {
cairo_save(cairo);
const unsigned int rotation = zathura_document_get_rotation(document);
switch (rotation) {
case 90:
cairo_translate(cairo, page_width, 0);
break;
case 180:
cairo_translate(cairo, page_width, page_height);
break;
case 270:
cairo_translate(cairo, 0, page_height);
break;
}
if (rotation != 0) {
cairo_rotate(cairo, rotation * G_PI / 180.0);
}
if (priv->surface != NULL) {
cairo_set_source_surface(cairo, priv->surface, 0, 0);
cairo_paint(cairo);
cairo_restore(cairo);
} else {
const unsigned int height = cairo_image_surface_get_height(priv->thumbnail);
const unsigned int width = cairo_image_surface_get_width(priv->thumbnail);
const unsigned int pheight = (rotation % 180 ? page_width : page_height);
const unsigned int pwidth = (rotation % 180 ? page_height : page_width);
cairo_scale(cairo, pwidth / (double)width, pheight / (double)height);
cairo_set_source_surface(cairo, priv->thumbnail, 0, 0);
cairo_pattern_set_extend(cairo_get_source(cairo), CAIRO_EXTEND_PAD);
if (pwidth < width || pheight < height) {
/* pixman bilinear downscaling is slow */
cairo_pattern_set_filter(cairo_get_source(cairo), CAIRO_FILTER_FAST);
}
cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
cairo_paint(cairo);
cairo_restore(cairo);
/* All but the last jobs requested here are aborted during zooming.
* Processing and aborting smaller jobs first improves responsiveness. */
const gint64 penalty = pwidth * pheight;
zathura_render_request(priv->render_request, g_get_real_time() + penalty);
return FALSE;
}
/* draw rectangles */
char* font = NULL;
girara_setting_get(priv->zathura->ui.session, "font", &font);
float transparency = 0.5;
girara_setting_get(priv->zathura->ui.session, "highlight-transparency", &transparency);
if (font != NULL) {
cairo_select_font_face(cairo, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
}
g_free(font);
/* draw links */
if (priv->links.draw == true && priv->links.n != 0) {
unsigned int link_counter = 0;
GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link)
if (link != NULL) {
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, zathura_link_get_position(link));
/* draw position */
const GdkRGBA color = priv->zathura->ui.colors.highlight_color;
cairo_set_source_rgba(cairo, color.red, color.green, color.blue, transparency);
cairo_rectangle(cairo, rectangle.x1, rectangle.y1,
(rectangle.x2 - rectangle.x1), (rectangle.y2 - rectangle.y1));
cairo_fill(cairo);
/* draw text */
cairo_set_source_rgba(cairo, 0, 0, 0, 1);
cairo_set_font_size(cairo, 10);
cairo_move_to(cairo, rectangle.x1 + 1, rectangle.y2 - 1);
char* link_number = g_strdup_printf("%i", priv->links.offset + ++link_counter);
cairo_show_text(cairo, link_number);
g_free(link_number);
}
GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link);
}
/* draw search results */
if (priv->search.list != NULL && priv->search.draw == true) {
int idx = 0;
GIRARA_LIST_FOREACH(priv->search.list, zathura_rectangle_t*, iter, rect)
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect);
/* draw position */
if (idx == priv->search.current) {
const GdkRGBA color = priv->zathura->ui.colors.highlight_color_active;
cairo_set_source_rgba(cairo, color.red, color.green, color.blue, transparency);
} else {
const GdkRGBA color = priv->zathura->ui.colors.highlight_color;
cairo_set_source_rgba(cairo, color.red, color.green, color.blue, transparency);
}
cairo_rectangle(cairo, rectangle.x1, rectangle.y1,
(rectangle.x2 - rectangle.x1), (rectangle.y2 - rectangle.y1));
cairo_fill(cairo);
++idx;
GIRARA_LIST_FOREACH_END(priv->search.list, zathura_rectangle_t*, iter, rect);
}
/* draw selection */
if (priv->mouse.selection.y2 != -1 && priv->mouse.selection.x2 != -1) {
const GdkRGBA color = priv->zathura->ui.colors.highlight_color;
cairo_set_source_rgba(cairo, color.red, color.green, color.blue, transparency);
cairo_rectangle(cairo, priv->mouse.selection.x1, priv->mouse.selection.y1,
(priv->mouse.selection.x2 - priv->mouse.selection.x1), (priv->mouse.selection.y2 - priv->mouse.selection.y1));
cairo_fill(cairo);
}
} else {
/* set background color */
if (zathura_renderer_recolor_enabled(priv->zathura->sync.render_thread) == true) {
GdkRGBA color;
zathura_renderer_get_recolor_colors(priv->zathura->sync.render_thread, &color, NULL);
cairo_set_source_rgb(cairo, color.red, color.green, color.blue);
} else {
const GdkRGBA color = priv->zathura->ui.colors.render_loading_bg;
cairo_set_source_rgb(cairo, color.red, color.green, color.blue);
}
cairo_rectangle(cairo, 0, 0, page_width, page_height);
cairo_fill(cairo);
bool render_loading = true;
girara_setting_get(priv->zathura->ui.session, "render-loading", &render_loading);
/* write text */
if (render_loading == true) {
if (zathura_renderer_recolor_enabled(priv->zathura->sync.render_thread) == true) {
GdkRGBA color;
zathura_renderer_get_recolor_colors(priv->zathura->sync.render_thread, NULL, &color);
cairo_set_source_rgb(cairo, color.red, color.green, color.blue);
} else {
const GdkRGBA color = priv->zathura->ui.colors.render_loading_fg;
cairo_set_source_rgb(cairo, color.red, color.green, color.blue);
}
const char* text = _("Loading...");
cairo_select_font_face(cairo, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size(cairo, 16.0);
cairo_text_extents_t extents;
cairo_text_extents(cairo, text, &extents);
double x = page_width * 0.5 - (extents.width * 0.5 + extents.x_bearing);
double y = page_height * 0.5 - (extents.height * 0.5 + extents.y_bearing);
cairo_move_to(cairo, x, y);
cairo_show_text(cairo, text);
}
/* render real page */
zathura_render_request(priv->render_request, g_get_real_time());
}
return FALSE;
}
static void
zathura_page_widget_redraw_canvas(ZathuraPage* pageview)
{
GtkWidget* widget = GTK_WIDGET(pageview);
gtk_widget_queue_draw(widget);
}
/* smaller than max to be replaced by actual renders */
#define THUMBNAIL_INITIAL_SCALE 0.5
/* small enough to make bilinear downscaling fast */
#define THUMBNAIL_MAX_SCALE 0.5
static bool
surface_small_enough(cairo_surface_t* surface, size_t max_size, cairo_surface_t* old)
{
if (cairo_surface_get_type(surface) != CAIRO_SURFACE_TYPE_IMAGE) {
return true;
}
const unsigned int width = cairo_image_surface_get_width(surface);
const unsigned int height = cairo_image_surface_get_height(surface);
const size_t new_size = width * height;
if (new_size > max_size) {
return false;
}
if (old != NULL) {
const unsigned int width_old = cairo_image_surface_get_width(old);
const unsigned int height_old = cairo_image_surface_get_height(old);
const size_t old_size = width_old * height_old;
if (new_size < old_size && new_size >= old_size * THUMBNAIL_MAX_SCALE * THUMBNAIL_MAX_SCALE) {
return false;
}
}
return true;
}
static cairo_surface_t *
draw_thumbnail_image(cairo_surface_t* surface, size_t max_size)
{
unsigned int width = cairo_image_surface_get_width(surface);
unsigned int height = cairo_image_surface_get_height(surface);
double scale = sqrt((double)max_size / (width * height)) * THUMBNAIL_INITIAL_SCALE;
if (scale > THUMBNAIL_MAX_SCALE) {
scale = THUMBNAIL_MAX_SCALE;
}
width = width * scale;
height = height * scale;
cairo_surface_t *thumbnail;
thumbnail = cairo_surface_create_similar(surface, CAIRO_CONTENT_COLOR, width, height);
if (thumbnail == NULL) {
return NULL;
}
cairo_t *cr = cairo_create(thumbnail);
if (cr == NULL) {
cairo_surface_destroy(thumbnail);
return NULL;
}
cairo_scale(cr, scale, scale);
cairo_set_source_surface(cr, surface, 0, 0);
cairo_pattern_set_filter(cairo_get_source(cr), CAIRO_FILTER_BILINEAR);
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_paint(cr);
cairo_destroy(cr);
return thumbnail;
}
void
zathura_page_widget_update_surface(ZathuraPage* widget, cairo_surface_t* surface, bool keep_thumbnail)
{
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
int thumbnail_size = 0;
girara_setting_get(priv->zathura->ui.session, "page-thumbnail-size", &thumbnail_size);
if (thumbnail_size <= 0) {
thumbnail_size = ZATHURA_PAGE_THUMBNAIL_DEFAULT_SIZE;
}
bool new_render = (priv->surface == NULL && priv->thumbnail == NULL);
if (priv->surface != NULL) {
cairo_surface_destroy(priv->surface);
priv->surface = NULL;
}
if (surface != NULL) {
priv->surface = surface;
cairo_surface_reference(surface);
if (surface_small_enough(surface, thumbnail_size, priv->thumbnail)) {
if (priv->thumbnail != NULL) {
cairo_surface_destroy(priv->thumbnail);
}
priv->thumbnail = surface;
cairo_surface_reference(surface);
} else if (new_render) {
priv->thumbnail = draw_thumbnail_image(surface, thumbnail_size);
}
} else if (!keep_thumbnail && priv->thumbnail != NULL) {
cairo_surface_destroy(priv->thumbnail);
priv->thumbnail = NULL;
}
/* force a redraw here */
if (priv->surface != NULL) {
zathura_page_widget_redraw_canvas(widget);
}
}
static void
cb_update_surface(ZathuraRenderRequest* UNUSED(request),
cairo_surface_t* surface, void* data)
{
ZathuraPage* widget = data;
g_return_if_fail(ZATHURA_IS_PAGE(widget));
zathura_page_widget_update_surface(widget, surface, false);
}
static void
cb_cache_added(ZathuraRenderRequest* UNUSED(request), void* data)
{
ZathuraPage* widget = data;
g_return_if_fail(ZATHURA_IS_PAGE(widget));
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
priv->cached = true;
}
static void
cb_cache_invalidated(ZathuraRenderRequest* UNUSED(request), void* data)
{
ZathuraPage* widget = data;
g_return_if_fail(ZATHURA_IS_PAGE(widget));
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (zathura_page_widget_have_surface(widget) == true &&
priv->cached == true &&
zathura_page_get_visibility(priv->page) == false) {
/* The page was in the cache but got removed and is invisible, so get rid of
* the surface. */
zathura_page_widget_update_surface(widget, NULL, false);
}
priv->cached = false;
}
static void
zathura_page_widget_size_allocate(GtkWidget* widget, GdkRectangle* allocation)
{
GTK_WIDGET_CLASS(zathura_page_widget_parent_class)->size_allocate(widget, allocation);
ZathuraPage* page = ZATHURA_PAGE(widget);
zathura_page_widget_abort_render_request(page);
zathura_page_widget_update_surface(page, NULL, true);
}
static void
redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle)
{
/* cause the rect to be drawn */
GdkRectangle grect;
grect.x = rectangle->x1;
grect.y = rectangle->y1;
grect.width = (rectangle->x2 + 1) - rectangle->x1;
grect.height = (rectangle->y2 + 1) - rectangle->y1;
gtk_widget_queue_draw_area(GTK_WIDGET(widget), grect.x, grect.y, grect.width, grect.height);
}
static void
redraw_all_rects(ZathuraPage* widget, girara_list_t* rectangles)
{
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
GIRARA_LIST_FOREACH(rectangles, zathura_rectangle_t*, iter, rect)
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect);
redraw_rect(widget, &rectangle);
GIRARA_LIST_FOREACH_END(rectangles, zathura_recantgle_t*, iter, rect);
}
zathura_link_t*
zathura_page_widget_link_get(ZathuraPage* widget, unsigned int index)
{
g_return_val_if_fail(widget != NULL, NULL);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
g_return_val_if_fail(priv != NULL, NULL);
if (priv->links.list != NULL && index >= priv->links.offset &&
girara_list_size(priv->links.list) > index - priv->links.offset) {
return girara_list_nth(priv->links.list, index - priv->links.offset);
} else {
return NULL;
}
}
static gboolean
cb_zathura_page_widget_button_press_event(GtkWidget* widget, GdkEventButton* button)
{
g_return_val_if_fail(widget != NULL, false);
g_return_val_if_fail(button != NULL, false);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (girara_callback_view_button_press_event(widget, button, priv->zathura->ui.session) == true) {
return true;
}
if (button->button == GDK_BUTTON_PRIMARY) { /* left click */
if (button->type == GDK_BUTTON_PRESS) {
/* start the selection */
priv->mouse.selection_basepoint.x = button->x;
priv->mouse.selection_basepoint.y = button->y;
priv->mouse.selection.x1 = button->x;
priv->mouse.selection.y1 = button->y;
priv->mouse.selection.x2 = button->x;
priv->mouse.selection.y2 = button->y;
} else if (button->type == GDK_2BUTTON_PRESS || button->type == GDK_3BUTTON_PRESS) {
/* abort the selection */
priv->mouse.selection_basepoint.x = -1;
priv->mouse.selection_basepoint.y = -1;
priv->mouse.selection.x1 = -1;
priv->mouse.selection.y1 = -1;
priv->mouse.selection.x2 = -1;
priv->mouse.selection.y2 = -1;
}
return true;
} else if (gdk_event_triggers_context_menu((GdkEvent*) button) == TRUE && button->type == GDK_BUTTON_PRESS) { /* right click */
zathura_page_widget_popup_menu(widget, button);
return true;
}
return false;
}
static gboolean
cb_zathura_page_widget_button_release_event(GtkWidget* widget, GdkEventButton* button)
{
g_return_val_if_fail(widget != NULL, false);
g_return_val_if_fail(button != NULL, false);
if (button->type != GDK_BUTTON_RELEASE) {
return false;
}
const int oldx = button->x;
const int oldy = button->y;
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
zathura_document_t* document = zathura_page_get_document(priv->page);
const double scale = zathura_document_get_scale(document);
button->x /= scale;
button->y /= scale;
g_signal_emit(ZATHURA_PAGE(widget), signals[BUTTON_RELEASE], 0, button);
button->x = oldx;
button->y = oldy;
if (button->button != GDK_BUTTON_PRIMARY) {
return false;
}
if (priv->mouse.selection.y2 == -1 && priv->mouse.selection.x2 == -1 ) {
/* simple single click */
/* get links */
if (priv->links.retrieved == false) {
priv->links.list = zathura_page_links_get(priv->page, NULL);
priv->links.retrieved = true;
priv->links.n = (priv->links.list == NULL) ? 0 : girara_list_size(priv->links.list);
}
if (priv->links.list != NULL && priv->links.n > 0) {
GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link)
zathura_rectangle_t rect = recalc_rectangle(priv->page, zathura_link_get_position(link));
if (rect.x1 <= button->x && rect.x2 >= button->x
&& rect.y1 <= button->y && rect.y2 >= button->y) {
zathura_link_evaluate(priv->zathura, link);
}
GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link);
}
} else {
redraw_rect(ZATHURA_PAGE(widget), &priv->mouse.selection);
zathura_rectangle_t tmp = priv->mouse.selection;
const double scale = zathura_document_get_scale(document);
tmp.x1 /= scale;
tmp.x2 /= scale;
tmp.y1 /= scale;
tmp.y2 /= scale;
char* text = zathura_page_get_text(priv->page, tmp, NULL);
if (text != NULL && *text != '\0') {
/* emit text-selected signal */
g_signal_emit(ZATHURA_PAGE(widget), signals[TEXT_SELECTED], 0, text);
}
g_free(text);
}
priv->mouse.selection_basepoint.x = -1;
priv->mouse.selection_basepoint.y = -1;
priv->mouse.selection.x1 = -1;
priv->mouse.selection.y1 = -1;
priv->mouse.selection.x2 = -1;
priv->mouse.selection.y2 = -1;
return false;
}
static gboolean
cb_zathura_page_widget_motion_notify(GtkWidget* widget, GdkEventMotion* event)
{
g_return_val_if_fail(widget != NULL, false);
g_return_val_if_fail(event != NULL, false);
if ((event->state & GDK_BUTTON1_MASK) == 0) {
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (priv->links.retrieved == false) {
priv->links.list = zathura_page_links_get(priv->page, NULL);
priv->links.retrieved = true;
priv->links.n = (priv->links.list == NULL) ? 0 : girara_list_size(priv->links.list);
}
if (priv->links.list != NULL && priv->links.n > 0) {
bool over_link = false;
GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link)
zathura_rectangle_t rect = recalc_rectangle(priv->page, zathura_link_get_position(link));
if (rect.x1 <= event->x && rect.x2 >= event->x && rect.y1 <= event->y && rect.y2 >= event->y) {
over_link = true;
}
GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link);
if (priv->mouse.over_link != over_link) {
if (over_link == true) {
g_signal_emit(ZATHURA_PAGE(widget), signals[ENTER_LINK], 0);
} else {
g_signal_emit(ZATHURA_PAGE(widget), signals[LEAVE_LINK], 0);
}
priv->mouse.over_link = over_link;
}
}
return false;
}
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
zathura_rectangle_t tmp = priv->mouse.selection;
if (event->x < priv->mouse.selection_basepoint.x) {
tmp.x1 = event->x;
tmp.x2 = priv->mouse.selection_basepoint.x;
} else {
tmp.x2 = event->x;
tmp.x1 = priv->mouse.selection_basepoint.x;
}
if (event->y < priv->mouse.selection_basepoint.y) {
tmp.y1 = event->y;
tmp.y2 = priv->mouse.selection_basepoint.y;
} else {
tmp.y1 = priv->mouse.selection_basepoint.y;
tmp.y2 = event->y;
}
redraw_rect(ZATHURA_PAGE(widget), &priv->mouse.selection);
redraw_rect(ZATHURA_PAGE(widget), &tmp);
priv->mouse.selection = tmp;
return false;
}
static gboolean
cb_zathura_page_widget_leave_notify(GtkWidget* widget, GdkEventCrossing* UNUSED(event))
{
g_return_val_if_fail(widget != NULL, false);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (priv->mouse.over_link == true) {
g_signal_emit(ZATHURA_PAGE(widget), signals[LEAVE_LINK], 0);
priv->mouse.over_link = false;
}
return false;
}
static void
zathura_page_widget_popup_menu(GtkWidget* widget, GdkEventButton* event)
{
g_return_if_fail(widget != NULL);
if (event == NULL) {
/* do something here in the future in case we have general popups */
return;
}
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (priv->images.retrieved == false) {
priv->images.list = zathura_page_images_get(priv->page, NULL);
priv->images.retrieved = true;
}
if (priv->images.list == NULL) {
return;
}
/* search for underlaying image */
zathura_image_t* image = NULL;
GIRARA_LIST_FOREACH(priv->images.list, zathura_image_t*, iter, image_it)
zathura_rectangle_t rect = recalc_rectangle(priv->page, image_it->position);
if (rect.x1 <= event->x && rect.x2 >= event->x && rect.y1 <= event->y && rect.y2 >= event->y) {
image = image_it;
}
GIRARA_LIST_FOREACH_END(priv->images.list, zathura_image_t*, iter, image_it);
if (image == NULL) {
return;
}
priv->images.current = image;
/* setup menu */
GtkWidget* menu = gtk_menu_new();
typedef struct menu_item_s {
char* text;
void (*callback)(GtkMenuItem*, ZathuraPage*);
} menu_item_t;
const menu_item_t menu_items[] = {
{ _("Copy image"), cb_menu_image_copy },
{ _("Save image as"), cb_menu_image_save },
};
for (unsigned int i = 0; i < LENGTH(menu_items); i++) {
GtkWidget* item = gtk_menu_item_new_with_label(menu_items[i].text);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show(item);
g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(menu_items[i].callback), ZATHURA_PAGE(widget));
}
/* attach and popup */
gtk_menu_attach_to_widget(GTK_MENU(menu), widget, NULL);
#if GTK_CHECK_VERSION(3, 22, 0)
gtk_menu_popup_at_pointer(GTK_MENU(menu), (GdkEvent*) event);
#else
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event->button, event->time);
#endif
}
static gboolean
cb_zathura_page_widget_popup_menu(GtkWidget* widget)
{
zathura_page_widget_popup_menu(widget, NULL);
return TRUE;
}
static void
cb_menu_image_copy(GtkMenuItem* item, ZathuraPage* page)
{
g_return_if_fail(item != NULL);
g_return_if_fail(page != NULL);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(page);
g_return_if_fail(priv->images.current != NULL);
cairo_surface_t* surface = zathura_page_image_get_cairo(priv->page, priv->images.current, NULL);
if (surface == NULL) {
return;
}
const int width = cairo_image_surface_get_width(surface);
const int height = cairo_image_surface_get_height(surface);
GdkPixbuf* pixbuf = gdk_pixbuf_get_from_surface(surface, 0, 0, width, height);
g_signal_emit(page, signals[IMAGE_SELECTED], 0, pixbuf);
g_object_unref(pixbuf);
cairo_surface_destroy(surface);
/* reset */
priv->images.current = NULL;
}
static void
cb_menu_image_save(GtkMenuItem* item, ZathuraPage* page)
{
g_return_if_fail(item != NULL);
g_return_if_fail(page != NULL);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(page);
g_return_if_fail(priv->images.current != NULL);
g_return_if_fail(priv->images.list != NULL);
/* generate image identifier */
unsigned int page_id = zathura_page_get_index(priv->page) + 1;
unsigned int image_id = 1;
GIRARA_LIST_FOREACH(priv->images.list, zathura_image_t*, iter, image_it)
if (image_it == priv->images.current) {
break;
}
image_id++;
GIRARA_LIST_FOREACH_END(priv->images.list, zathura_image_t*, iter, image_it);
/* set command */
char* export_command = g_strdup_printf(":export image-p%d-%d ", page_id, image_id);
girara_argument_t argument = { 0, export_command };
sc_focus_inputbar(priv->zathura->ui.session, &argument, NULL, 0);
g_free(export_command);
/* reset */
priv->images.current = NULL;
}
void
zathura_page_widget_update_view_time(ZathuraPage* widget)
{
g_return_if_fail(ZATHURA_IS_PAGE(widget));
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
if (zathura_page_get_visibility(priv->page) == true) {
zathura_render_request_update_view_time(priv->render_request);
}
}
bool
zathura_page_widget_have_surface(ZathuraPage* widget)
{
g_return_val_if_fail(ZATHURA_IS_PAGE(widget), false);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
return priv->surface != NULL;
}
void
zathura_page_widget_abort_render_request(ZathuraPage* widget)
{
g_return_if_fail(ZATHURA_IS_PAGE(widget));
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
zathura_render_request_abort(priv->render_request);
/* Make sure that if we are not cached and invisible, that there is no
* surface.
*
* TODO: Maybe this should be moved somewhere else. */
if (zathura_page_widget_have_surface(widget) == true &&
priv->cached == false) {
zathura_page_widget_update_surface(widget, NULL, false);
}
}
zathura_page_t*
zathura_page_widget_get_page(ZathuraPage* widget) {
g_return_val_if_fail(ZATHURA_IS_PAGE(widget), NULL);
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
return priv->page;
}
zathura-0.3.8/zathura/page-widget.h 0000664 0001750 0001750 00000006535 13216464200 017741 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef PAGE_WIDGET_H
#define PAGE_WIDGET_H
#include
#include "types.h"
#include "document.h"
/**
* The page view widget. The widget handles all the rendering on its own. It
* only has to be resized. The widget also manages and handles all the
* rectangles for highlighting.
*
* Before the properties contain the correct values, 'draw-links' has to be set
* to TRUE at least one time.
* */
struct zathura_page_widget_s
{
GtkDrawingArea parent;
};
struct zathura_page_widget_class_s
{
GtkDrawingAreaClass parent_class;
};
#define ZATHURA_TYPE_PAGE (zathura_page_widget_get_type())
#define ZATHURA_PAGE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), ZATHURA_TYPE_PAGE, ZathuraPage))
#define ZATHURA_PAGE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_CAST((obj), ZATHURA_TYPE_PAGE, ZathuraPageClass))
#define ZATHURA_IS_PAGE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), ZATHURA_TYPE_PAGE))
#define ZATHURA_IS_PAGE_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((obj), ZATHURA_TYPE_PAGE))
#define ZATHURA_PAGE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), ZATHURA_TYPE_PAGE, ZathuraPageClass))
/**
* Returns the type of the page view widget.
* @return the type
*/
GType zathura_page_widget_get_type(void) G_GNUC_CONST;
/**
* Create a page view widget.
* @param zathura the zathura instance
* @param page the page to be displayed
* @return a page view widget
*/
GtkWidget* zathura_page_widget_new(zathura_t* zathura, zathura_page_t* page);
/**
* Update the widget's surface. This should only be called from the render
* thread.
* @param widget the widget
* @param surface the new surface
* @param keep_thumbnail don't destroy when surface is NULL
*/
void zathura_page_widget_update_surface(ZathuraPage* widget, cairo_surface_t* surface, bool keep_thumbnail);
/**
* Draw a rectangle to mark links or search results
* @param widget the widget
* @param rectangle the rectangle
* @param linkid the link id if it's a link, -1 otherwise
*/
void zathura_page_widget_draw_rectangle(ZathuraPage* widget, zathura_rectangle_t* rectangle, int linkid);
/**
* Clear all rectangles.
* @param widget the widget
*/
void zathura_page_widget_clear_rectangles(ZathuraPage* widget);
/**
* Returns the zathura link object at the given index
*
* @param widget the widget
* @param index Index of the link
* @return Link object or NULL if an error occurred
*/
zathura_link_t* zathura_page_widget_link_get(ZathuraPage* widget, unsigned int index);
/**
* Update the last view time of the page.
*
* @param widget the widget
*/
void zathura_page_widget_update_view_time(ZathuraPage* widget);
/**
* Check if we have a surface.
*
* @param widget the widget
* @returns true if the widget has a surface, false otherwise
*/
bool zathura_page_widget_have_surface(ZathuraPage* widget);
/**
* Abort outstanding render requests
*
* @param widget the widget
*/
void zathura_page_widget_abort_render_request(ZathuraPage* widget);
/**
* Get underlying page
*
* @param widget the widget
* @return underlying zathura_page_t instance
*/
zathura_page_t* zathura_page_widget_get_page(ZathuraPage* widget);
#endif
zathura-0.3.8/zathura/page.c 0000664 0001750 0001750 00000017445 12653114226 016461 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include
#include
#include
#include "document.h"
#include "page.h"
#include "plugin.h"
#include "utils.h"
#include "internal.h"
#include "types.h"
struct zathura_page_s {
double height; /**< Page height */
double width; /**< Page width */
unsigned int index; /**< Page number */
void* data; /**< Custom data */
bool visible; /**< Page is visible */
zathura_document_t* document; /**< Document */
};
zathura_page_t*
zathura_page_new(zathura_document_t* document, unsigned int index, zathura_error_t* error)
{
if (document == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_INVALID_ARGUMENTS;
}
goto error_ret;
}
/* init page */
zathura_page_t* page = g_try_malloc0(sizeof(zathura_page_t));
if (page == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_OUT_OF_MEMORY;
}
goto error_ret;
}
page->index = index;
page->visible = false;
page->document = document;
/* init plugin */
zathura_plugin_t* plugin = zathura_document_get_plugin(document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_init == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_NOT_IMPLEMENTED;
}
goto error_free;
}
zathura_error_t ret = functions->page_init(page);
if (ret != ZATHURA_ERROR_OK) {
if (error != NULL) {
*error = ret;
}
goto error_free;
}
return page;
error_free:
if (page != NULL) {
zathura_page_free(page);
}
error_ret:
return NULL;
}
zathura_error_t
zathura_page_free(zathura_page_t* page)
{
if (page == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
if (page->document == NULL) {
g_free(page);
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_clear == NULL) {
return ZATHURA_ERROR_NOT_IMPLEMENTED;
}
zathura_error_t error = functions->page_clear(page, page->data);
g_free(page);
return error;
}
zathura_document_t*
zathura_page_get_document(zathura_page_t* page)
{
if (page == NULL) {
return NULL;
}
return page->document;
}
unsigned int
zathura_page_get_index(zathura_page_t* page)
{
if (page == NULL) {
return 0;
}
return page->index;
}
double
zathura_page_get_width(zathura_page_t* page)
{
if (page == NULL) {
return -1;
}
return page->width;
}
void
zathura_page_set_width(zathura_page_t* page, double width)
{
if (page == NULL) {
return;
}
page->width = width;
}
double
zathura_page_get_height(zathura_page_t* page)
{
if (page == NULL) {
return -1;
}
return page->height;
}
void
zathura_page_set_height(zathura_page_t* page, double height)
{
if (page == NULL) {
return;
}
page->height = height;
}
bool
zathura_page_get_visibility(zathura_page_t* page)
{
if (page == NULL) {
return false;
}
return page->visible;
}
void
zathura_page_set_visibility(zathura_page_t* page, bool visibility)
{
if (page == NULL) {
return;
}
page->visible = visibility;
}
void*
zathura_page_get_data(zathura_page_t* page)
{
if (page == NULL) {
return NULL;
}
return page->data;
}
void
zathura_page_set_data(zathura_page_t* page, void* data)
{
if (page == NULL) {
return;
}
page->data = data;
}
girara_list_t*
zathura_page_search_text(zathura_page_t* page, const char* text, zathura_error_t* error)
{
if (page == NULL || page->document == NULL || text == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_INVALID_ARGUMENTS;
}
return NULL;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_search_text == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return NULL;
}
return functions->page_search_text(page, page->data, text, error);
}
girara_list_t*
zathura_page_links_get(zathura_page_t* page, zathura_error_t* error)
{
if (page == NULL || page->document == NULL ) {
if (error != NULL) {
*error = ZATHURA_ERROR_INVALID_ARGUMENTS;
}
return NULL;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_links_get == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return NULL;
}
return functions->page_links_get(page, page->data, error);
}
zathura_error_t
zathura_page_links_free(girara_list_t* UNUSED(list))
{
return false;
}
girara_list_t*
zathura_page_form_fields_get(zathura_page_t* page, zathura_error_t* error)
{
if (page == NULL || page->document == NULL ) {
if (error != NULL) {
*error = ZATHURA_ERROR_INVALID_ARGUMENTS;
}
return NULL;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_form_fields_get == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return NULL;
}
return functions->page_form_fields_get(page, page->data, error);
}
zathura_error_t
zathura_page_form_fields_free(girara_list_t* UNUSED(list))
{
return ZATHURA_ERROR_NOT_IMPLEMENTED;
}
girara_list_t*
zathura_page_images_get(zathura_page_t* page, zathura_error_t* error)
{
if (page == NULL || page->document == NULL ) {
if (error != NULL) {
*error = ZATHURA_ERROR_INVALID_ARGUMENTS;
}
return NULL;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_images_get == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return NULL;
}
return functions->page_images_get(page, page->data, error);
}
cairo_surface_t*
zathura_page_image_get_cairo(zathura_page_t* page, zathura_image_t* image, zathura_error_t* error)
{
if (page == NULL || page->document == NULL || image == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_INVALID_ARGUMENTS;
}
return NULL;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_image_get_cairo == NULL) {
if (error != NULL) {
*error = ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return NULL;
}
return functions->page_image_get_cairo(page, page->data, image, error);
}
char*
zathura_page_get_text(zathura_page_t* page, zathura_rectangle_t rectangle, zathura_error_t* error)
{
if (page == NULL || page->document == NULL ) {
if (error) {
*error = ZATHURA_ERROR_INVALID_ARGUMENTS;
}
return NULL;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_get_text == NULL) {
if (error) {
*error = ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return NULL;
}
return functions->page_get_text(page, page->data, rectangle, error);
}
zathura_error_t
zathura_page_render(zathura_page_t* page, cairo_t* cairo, bool printing)
{
if (page == NULL || page->document == NULL || cairo == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_plugin_t* plugin = zathura_document_get_plugin(page->document);
zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin);
if (functions->page_render_cairo == NULL) {
return ZATHURA_ERROR_NOT_IMPLEMENTED;
}
return functions->page_render_cairo(page, page->data, cairo, printing);
}
zathura-0.3.8/zathura/page.h 0000664 0001750 0001750 00000012030 12750077577 016466 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef PAGE_H
#define PAGE_H
#include
#include
#include "types.h"
/**
* Get the page object
*
* @param document The document
* @param index Page number
* @param error Optional error
* @return Page object or NULL if an error occurred
*/
zathura_page_t* zathura_page_new(zathura_document_t* document, unsigned int
index, zathura_error_t* error);
/**
* Frees the page object
*
* @param page The page object
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
zathura_error_t zathura_page_free(zathura_page_t* page);
/**
* Returns the associated document
*
* @param page The page object
* @return The associated document
* @return NULL if an error occurred
*/
zathura_document_t* zathura_page_get_document(zathura_page_t* page);
/**
* Returns the set id of the page
*
* @param page The page object
* @return The id of the page
*/
unsigned int zathura_page_get_index(zathura_page_t* page);
/**
* Returns the width of the page
*
* @param page The page object
* @return Width of the page
* @return -1 If an error occurred
*/
double zathura_page_get_width(zathura_page_t* page);
/**
* Sets the new width of the page
*
* @param page The page object
* @param width The new width of the page
*/
void zathura_page_set_width(zathura_page_t* page, double width);
/**
* Returns the height of the page
*
* @param page The page object
* @return Height of the page
* @return -1 If an error occurred
*/
double zathura_page_get_height(zathura_page_t* page);
/**
* Sets the new height of the page
*
* @param page The page object
* @param height The new height of the page
*/
void zathura_page_set_height(zathura_page_t* page, double height);
/**
* Returns the visibility of the page
*
* @param page The page object
* @return true if the page is visible
* @return false if the page is hidden
*/
bool zathura_page_get_visibility(zathura_page_t* page);
/**
* Sets the visibility of the page
*
* @param page The page object
* @param visibility The new visibility value
*/
void zathura_page_set_visibility(zathura_page_t* page, bool visibility);
/**
* Returns the custom data
*
* @param page The page object
* @return The custom data or NULL
*/
void* zathura_page_get_data(zathura_page_t* page);
/**
* Sets the custom data
*
* @param page The page object
* @param data The custom data
*/
void zathura_page_set_data(zathura_page_t* page, void* data);
/**
* Search page
*
* @param page The page object
* @param text Search item
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return List of results
*/
girara_list_t* zathura_page_search_text(zathura_page_t* page, const char* text, zathura_error_t* error);
/**
* Get page links
*
* @param page The page object
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return List of links
*/
girara_list_t* zathura_page_links_get(zathura_page_t* page, zathura_error_t* error);
/**
* Free page links
*
* @param list List of links
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
zathura_error_t zathura_page_links_free(girara_list_t* list);
/**
* Get list of form fields
*
* @param page The page object
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return List of form fields
*/
girara_list_t* zathura_page_form_fields_get(zathura_page_t* page, zathura_error_t* error);
/**
* Free list of form fields
*
* @param list List of form fields
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
zathura_error_t zathura_page_form_fields_free(girara_list_t* list);
/**
* Get list of images
*
* @param page Page
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return List of images or NULL if an error occurred
*/
girara_list_t* zathura_page_images_get(zathura_page_t* page, zathura_error_t* error);
/**
* Get image
*
* @param page Page
* @param image Image identifier
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occurred
* @return The cairo image surface or NULL if an error occurred
*/
cairo_surface_t* zathura_page_image_get_cairo(zathura_page_t* page, zathura_image_t* image, zathura_error_t* error);
/**
* Get text for selection
* @param page Page
* @param rectangle Selection
* @param error Set to an error value (see \ref zathura_error_t) if an error
* occurred
* @return The selected text (needs to be deallocated with g_free)
*/
char* zathura_page_get_text(zathura_page_t* page, zathura_rectangle_t rectangle, zathura_error_t* error);
/**
* Render page
*
* @param page The page object
* @param cairo Cairo object
* @param printing render for printing
* @return ZATHURA_ERROR_OK when no error occurred, otherwise see
* zathura_error_t
*/
zathura_error_t zathura_page_render(zathura_page_t* page, cairo_t* cairo, bool printing);
#endif // PAGE_H
zathura-0.3.8/zathura/plugin-api.h 0000664 0001750 0001750 00000016023 13216464200 017602 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#ifndef PLUGIN_API_H
#define PLUGIN_API_H
#include "page.h"
#include "document.h"
#include "links.h"
#include "version.h"
typedef struct zathura_plugin_functions_s zathura_plugin_functions_t;
/**
* Opens a document
*/
typedef zathura_error_t (*zathura_plugin_document_open_t)(zathura_document_t* document);
/**
* Frees the document
*/
typedef zathura_error_t (*zathura_plugin_document_free_t)(zathura_document_t* document, void* data);
/**
* Generates the document index
*/
typedef girara_tree_node_t* (*zathura_plugin_document_index_generate_t)(zathura_document_t* document, void* data, zathura_error_t* error);
/**
* Save the document
*/
typedef zathura_error_t (*zathura_plugin_document_save_as_t)(zathura_document_t* document, void* data, const char* path);
/**
* Get list of attachments
*/
typedef girara_list_t* (*zathura_plugin_document_attachments_get_t)(zathura_document_t* document, void* data, zathura_error_t* error);
/**
* Save attachment to a file
*/
typedef zathura_error_t (*zathura_plugin_document_attachment_save_t)(zathura_document_t* document, void* data, const char* attachment, const char* file);
/**
* Get document information
*/
typedef girara_list_t* (*zathura_plugin_document_get_information_t)(zathura_document_t* document, void* data, zathura_error_t* error);
/**
* Gets the page object
*/
typedef zathura_error_t (*zathura_plugin_page_init_t)(zathura_page_t* page);
/**
* Free page
*/
typedef zathura_error_t (*zathura_plugin_page_clear_t)(zathura_page_t* page, void* data);
/**
* Search text
*/
typedef girara_list_t* (*zathura_plugin_page_search_text_t)(zathura_page_t* page, void* data, const char* text, zathura_error_t* error);
/**
* Get links on a page
*/
typedef girara_list_t* (*zathura_plugin_page_links_get_t)(zathura_page_t* page, void* data, zathura_error_t* error);
/**
* Get form fields
*/
typedef girara_list_t* (*zathura_plugin_page_form_fields_get_t)(zathura_page_t* page, void* data, zathura_error_t* error);
/**
* Get list of images
*/
typedef girara_list_t* (*zathura_plugin_page_images_get_t)(zathura_page_t* page, void* data, zathura_error_t* error);
/**
* Get the image
*/
typedef cairo_surface_t* (*zathura_plugin_page_image_get_cairo_t)(zathura_page_t* page, void* data, zathura_image_t* image, zathura_error_t* error);
/**
* Get text for selection
*/
typedef char* (*zathura_plugin_page_get_text_t)(zathura_page_t* page, void* data, zathura_rectangle_t rectangle, zathura_error_t* error);
/**
* Renders the page
*/
typedef zathura_image_buffer_t* (*zathura_plugin_page_render_t)(zathura_page_t* page, void* data, zathura_error_t* error);
/**
* Renders the page
*/
typedef zathura_error_t (*zathura_plugin_page_render_cairo_t)(zathura_page_t* page, void* data, cairo_t* cairo, bool printing);
struct zathura_plugin_functions_s
{
/**
* Opens a document
*/
zathura_plugin_document_open_t document_open;
/**
* Frees the document
*/
zathura_plugin_document_free_t document_free;
/**
* Generates the document index
*/
zathura_plugin_document_index_generate_t document_index_generate;
/**
* Save the document
*/
zathura_plugin_document_save_as_t document_save_as;
/**
* Get list of attachments
*/
zathura_plugin_document_attachments_get_t document_attachments_get;
/**
* Save attachment to a file
*/
zathura_plugin_document_attachment_save_t document_attachment_save;
/**
* Get document information
*/
zathura_plugin_document_get_information_t document_get_information;
/**
* Gets the page object
*/
zathura_plugin_page_init_t page_init;
/**
* Free page
*/
zathura_plugin_page_clear_t page_clear;
/**
* Search text
*/
zathura_plugin_page_search_text_t page_search_text;
/**
* Get links on a page
*/
zathura_plugin_page_links_get_t page_links_get;
/**
* Get form fields
*/
zathura_plugin_page_form_fields_get_t page_form_fields_get;
/**
* Get list of images
*/
zathura_plugin_page_images_get_t page_images_get;
/**
* Get the image
*/
zathura_plugin_page_image_get_cairo_t page_image_get_cairo;
/**
* Get text for selection
*/
zathura_plugin_page_get_text_t page_get_text;
/**
* Renders the page
*/
zathura_plugin_page_render_t page_render;
/**
* Renders the page
*/
zathura_plugin_page_render_cairo_t page_render_cairo;
};
/**
* Functions register function
*
* @param functions The functions struct
*/
typedef void (*zathura_plugin_register_function_t)(zathura_plugin_functions_t* functions);
typedef struct zathura_plugin_version_s {
unsigned int major; /**< Major */
unsigned int minor; /**< Minor */
unsigned int rev; /**< Revision */
} zathura_plugin_version_t;
typedef struct zathura_plugin_definition_s {
const char* name;
const zathura_plugin_version_t version;
const zathura_plugin_register_function_t register_function;
zathura_plugin_functions_t functions;
const size_t mime_types_size;
const char** mime_types;
} zathura_plugin_definition_t;
#define JOIN(x, y) JOIN2(x, y)
#define JOIN2(x, y) x ## _ ## y
#define ZATHURA_PLUGIN_DEFINITION_SYMBOL \
JOIN(zathura_plugin, JOIN(ZATHURA_API_VERSION, ZATHURA_ABI_VERSION))
/**
* Register a plugin.
*
* @param plugin_name the name of the plugin
* @param major the plugin's major version
* @param minor the plugin's minor version
* @param rev the plugin's revision
* @param register_functions function to register the plugin's document functions
* @param mimetypes a char array of mime types supported by the plugin
*/
#define ZATHURA_PLUGIN_REGISTER(plugin_name, major, minor, rev, register_functions, mimetypes) \
static const char* zathura_plugin_mime_types[] = mimetypes; \
\
const zathura_plugin_definition_t ZATHURA_PLUGIN_DEFINITION_SYMBOL = { \
.name = plugin_name, \
.version = { major, minor, rev }, \
.register_function = register_functions, \
.mime_types_size = sizeof(zathura_plugin_mime_types) / sizeof(zathura_plugin_mime_types[0]), \
.mime_types = zathura_plugin_mime_types \
}; \
/**
* Register a plugin.
*
* @param plugin_name the name of the plugin
* @param major the plugin's major version
* @param minor the plugin's minor version
* @param rev the plugin's revision
* @param plugin_functions function to register the plugin's document functions
* @param mimetypes a char array of mime types supported by the plugin
*/
#define ZATHURA_PLUGIN_REGISTER_WITH_FUNCTIONS(plugin_name, major, minor, rev, plugin_functions, mimetypes) \
static const char* zathura_plugin_mime_types[] = mimetypes; \
\
const zathura_plugin_definition_t ZATHURA_PLUGIN_DEFINITION_SYMBOL = { \
.name = plugin_name, \
.version = { major, minor, rev }, \
.register_function = NULL, \
.functions = plugin_functions, \
.mime_types_size = sizeof(zathura_plugin_mime_types) / sizeof(zathura_plugin_mime_types[0]), \
.mime_types = zathura_plugin_mime_types \
}; \
#define ZATHURA_PLUGIN_MIMETYPES(...) __VA_ARGS__
#define ZATHURA_PLUGIN_FUNCTIONS(...) __VA_ARGS__
#endif // PLUGIN_API_H
zathura-0.3.8/zathura/plugin.c 0000664 0001750 0001750 00000024467 13216464200 017041 0 ustar sebastian sebastian /* See LICENSE file for license and copyright information */
#include "plugin.h"
#include
#include
#include
#include
#include
#include