Commit 3093c795 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Merge branch 'release/0.3.8'

parents cd711c98 e79f61f3
......@@ -9,8 +9,7 @@
*.pyc
# generated files
dbus-interface-definitions.c
css-definitions.c
resources.*
zathura.1
zathurarc.5
......
Copyright (c) 2009-2016 pwmt.org
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
......
......@@ -4,26 +4,22 @@ include config.mk
include colors.mk
include common.mk
OSOURCE = $(filter-out ${PROJECT}/css-definitions.c, $(filter-out ${PROJECT}/dbus-interface-definitions.c, $(wildcard ${PROJECT}/*.c)))
# source files
OSOURCE = $(sort $(wildcard ${PROJECT}/*.c) \
${PROJECT}/resources.c)
SOURCE_FILTER =
ifneq (${WITH_SQLITE},0)
INCS += $(SQLITE_INC)
LIBS += $(SQLITE_LIB)
SOURCE = $(OSOURCE)
CPPFLAGS += -DWITH_SQLITE
else
SOURCE = $(filter-out ${PROJECT}/database-sqlite.c,$(OSOURCE))
SOURCE_FILTER += ${PROJECT}/database-sqlite.c
endif
ifneq ($(WITH_MAGIC),0)
INCS += $(MAGIC_INC)
LIBS += $(MAGIC_LIB)
CPPFLAGS += -DWITH_MAGIC
endif
ifneq ($(WITH_SYNCTEX),0)
INCS += $(SYNCTEX_INC)
LIBS += $(SYNCTEX_LIB)
CPPFLAGS += -DWITH_SYNCTEX
endif
......@@ -41,16 +37,10 @@ ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS}))
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
endif
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o}) \
${BUILDDIR_RELEASE}/${PROJECT}/css-definitions.o \
${BUILDDIR_RELEASE}/${PROJECT}/dbus-interface-definitions.o
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o}) \
${BUILDDIR_DEBUG}/${PROJECT}/css-definitions.o \
${BUILDDIR_DEBUG}/${PROJECT}/dbus-interface-definitions.o
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o}) \
${BUILDDIR_GCOV}/${PROJECT}/css-definitions.o \
${BUILDDIR_GCOV}/${PROJECT}/dbus-interface-definitions.o
HEADER = $(wildcard ${PROJECT}/*.h) $(wildcard synctex/*.h)
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
......@@ -72,6 +62,8 @@ options:
@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}/' \
......@@ -80,24 +72,23 @@ ${PROJECT}/version.h: ${PROJECT}/version.h.in config.mk
-e 's/ZVABI/${ZATHURA_ABI_VERSION}/' ${PROJECT}/version.h.in > ${PROJECT}/version.h.tmp
$(QUIET)mv ${PROJECT}/version.h.tmp ${PROJECT}/version.h
${PROJECT}/dbus-interface-definitions.c: data/org.pwmt.zathura.xml
$(QUIET)echo '#include "dbus-interface-definitions.h"' > $@.tmp
$(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> $@.tmp
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> $@.tmp
$(QUIET)echo ';' >> $@.tmp
$(QUIET)mv $@.tmp $@
${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
${PROJECT}/css-definitions.c: data/zathura.css_t
$(QUIET)echo '#include "css-definitions.h"' > $@.tmp
$(QUIET)echo 'const char* CSS_TEMPLATE_INDEX =' >> $@.tmp
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' $< >> $@.tmp
$(QUIET)echo ';' >> $@.tmp
$(QUIET)mv $@.tmp $@
# common dependencies
# release build
${OBJECTS} ${OBJECTS_DEBUG} ${OBJECTS_GCOV}: config.mk \
.version-checks/GIRARA \
.version-checks/GLIB \
.version-checks/GTK \
${PROJECT}/version.h \
${PROJECT}/resources.h
${OBJECTS}: config.mk ${PROJECT}/version.h \
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
# rlease build
${BUILDDIR_RELEASE}/%.o: %.c
$(call colorecho,CC,$<)
......@@ -120,9 +111,6 @@ run: release
# debug build
${OBJECTS_DEBUG}: config.mk ${PROJECT}/version.h \
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
${BUILDDIR_DEBUG}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $@)
......@@ -143,9 +131,6 @@ run-debug: debug
# gcov build
${OBJECTS_GCOV}: config.mk ${PROJECT}/version.h \
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
${BUILDDIR_GCOV}/%.o: %.c
$(call colorecho,CC,$<)
@mkdir -p ${DEPENDDIR}/$(dir $@)
......@@ -157,7 +142,7 @@ ${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}
-o ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT} ${OBJECTS_GCOV} ${LIBS}
gcov: options ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
$(QUIET)${MAKE} -C tests run-gcov
......@@ -180,10 +165,8 @@ clean:
${PROJECT}.pc \
${PROJECT}/version.h \
${PROJECT}/version.h.tmp \
${PROJECT}/dbus-interface-definitions.c \
${PROJECT}/dbus-interface-definitions.c.tmp \
${PROJECT}/css-definitions.c \
${PROJECT}/css-definitions.c.tmp \
${PROJECT}/resources.c \
${PROJECT}/resources.h \
$(PROJECT).info \
gcov \
.version-checks
......
......@@ -6,8 +6,8 @@ girara user interface library and several document libraries.
Requirements
------------
gtk3 (>= 3.6)
glib (>= 2.32)
girara (>= 0.2.4)
glib (>= 2.50)
girara (>= 0.2.8)
sqlite3 (optional, >= 3.5.9)
check (for tests)
intltool
......
......@@ -6,11 +6,11 @@ PROJECT = zathura
ZATHURA_VERSION_MAJOR = 0
ZATHURA_VERSION_MINOR = 3
ZATHURA_VERSION_REV = 6
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 = 2
ZATHURA_ABI_VERSION = 3
VERSION = ${ZATHURA_VERSION_MAJOR}.${ZATHURA_VERSION_MINOR}.${ZATHURA_VERSION_REV}
# version checks
......@@ -18,11 +18,11 @@ VERSION = ${ZATHURA_VERSION_MAJOR}.${ZATHURA_VERSION_MINOR}.${ZATHURA_VERSION_RE
# girara
GIRARA_VERSION_CHECK ?= 1
GIRARA_MIN_VERSION = 0.2.6
GIRARA_MIN_VERSION = 0.2.8
GIRARA_PKG_CONFIG_NAME = girara-gtk3
# glib
GLIB_VERSION_CHECK ?= 1
GLIB_MIN_VERSION = 2.32
GLIB_MIN_VERSION = 2.50
GLIB_PKG_CONFIG_NAME = glib-2.0
# GTK
GTK_VERSION_CHECK ?= 1
......@@ -32,6 +32,9 @@ 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)
......@@ -48,7 +51,7 @@ WITH_MAGIC ?= 1
PREFIX ?= /usr
MANPREFIX ?= ${PREFIX}/share/man
DESKTOPPREFIX ?= ${PREFIX}/share/applications
APPDATAPREFIX ?= ${PREFIX}/share/appdata
APPDATAPREFIX ?= ${PREFIX}/share/metainfo
LIBDIR ?= ${PREFIX}/lib
INCLUDEDIR ?= ${PREFIX}/include
DBUSINTERFACEDIR ?= ${PREFIX}/share/dbus-1/interfaces
......@@ -66,38 +69,58 @@ PLUGINDIR ?= ${LIBDIR}/zathura
LOCALEDIR ?= ${PREFIX}/share/locale
# libs
GTK_INC ?= $(shell ${PKG_CONFIG} --cflags gtk+-3.0)
GTK_LIB ?= $(shell ${PKG_CONFIG} --libs gtk+-3.0)
GTHREAD_INC ?= $(shell ${PKG_CONFIG} --cflags gthread-2.0)
GTHREAD_LIB ?= $(shell ${PKG_CONFIG} --libs gthread-2.0)
GMODULE_INC ?= $(shell ${PKG_CONFIG} --cflags gmodule-no-export-2.0)
GMODULE_LIB ?= $(shell ${PKG_CONFIG} --libs gmodule-no-export-2.0)
ifeq (${GTK_INC}-${GTK_LIB},-)
PKG_CONFIG_LIBS += gtk+-3.0
else
INCS += ${GTK_INC}
LIBS += ${GTK_LIB}
endif
GLIB_INC ?= $(shell ${PKG_CONFIG} --cflags glib-2.0)
GLIB_LIB ?= $(shell ${PKG_CONFIG} --libs glib-2.0)
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
GIRARA_INC ?= $(shell ${PKG_CONFIG} --cflags girara-gtk3)
GIRARA_LIB ?= $(shell ${PKG_CONFIG} --libs girara-gtk3)
ifeq (${GIRARA_INC}-${GIRARA_LIB},-)
PKG_CONFIG_LIBS += girara-gtk3
else
INCS += ${GIRARA_INC}
LIBS += ${GIRARA_LIB}
endif
ifneq (${WITH_SQLITE},0)
SQLITE_INC ?= $(shell ${PKG_CONFIG} --cflags sqlite3)
SQLITE_LIB ?= $(shell ${PKG_CONFIG} --libs sqlite3)
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)
SYNCTEX_INC ?= $(shell ${PKG_CONFIG} --cflags synctex)
SYNCTEX_LIB ?= $(shell ${PKG_CONFIG} --libs synctex)
ifeq (${SYNCTEX_INC}-${SYNCTEX_LIB},-)
PKG_CONFIG_LIBS += synctex
else
INCS += ${SYNCTEX_INC}
LIBS += ${SYNCTEX_LIB}
endif
endif
INCS = ${GIRARA_INC} ${GTK_INC} ${GTHREAD_INC} ${GMODULE_INC} ${GLIB_INC}
LIBS = ${GIRARA_LIB} ${GTK_LIB} ${GTHREAD_LIB} ${GMODULE_LIB} ${GLIB_LIB} -lpthread -lm
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
......
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/pwmt/zathura/CSS">
<file compressed="true">zathura.css_t</file>
</gresource>
<gresource prefix="/org/pwmt/zathura/DBus">
<file compressed="true">org.pwmt.zathura.xml</file>
</gresource>
</gresources>
set - Changing options
======================
In addition to the build-in *:set* command zathura offers more 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
......
......@@ -39,7 +39,7 @@ General
r
Rotate by 90 degrees
^r
Recolor
Recolor (grayscale and invert colors)
R
Reload document
Tab
......
......@@ -20,8 +20,8 @@
with 1, and negative numbers indicate page numbers starting from the end
of the document, -1 being the last page.
-l, --debug=level
Set log debug level (debug, info, warning, error)
-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.
......
......@@ -7,3 +7,8 @@ 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)
......@@ -22,7 +22,7 @@ COMMANDS
set - Changing options
----------------------
In addition to the build-in ``:set`` command zathura offers more options to be
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
......@@ -91,6 +91,7 @@ argument which can take one of the following values:
* normal (default)
* fullscreen
* presentation
* index
The brackets around the value are mandatory.
......@@ -225,6 +226,10 @@ The following shortcut functions can be mapped:
Display link target.
* ``exec``:
Execute an external command.
* ``focus_inputbar``
Focus inputbar.
......@@ -370,7 +375,7 @@ OPTIONS
girara
------
This section describes settings concerning the behaviour of libgirara and
This section describes settings concerning the behaviour of girara and
zathura. The settings described here can be changed with ``set``.
n-completion-items
......@@ -444,7 +449,7 @@ Defines the default background color
exec-command
^^^^^^^^^^^^
Defines a command the should be prepanded to any command run with exec.
Defines a command the should be prepended to any command run with exec.
* Value type: String
* Default value:
......@@ -651,6 +656,14 @@ 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
......@@ -661,13 +674,21 @@ values are "plain", "sqlite" (if built with sqlite support) and "null". If
* 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).
......@@ -741,7 +762,7 @@ 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
explicitely.
explicitly.
Per default, the first column is set to 2 for double-page layout.
......@@ -866,7 +887,7 @@ Defines if scrolling by half or full pages stops at page boundaries.
smooth-scroll
^^^^^^^^^^^^^
Defines if scrolling via touchpad should be smooth(only available with gtk >= 3.4).
Defines if scrolling via touchpad should be smooth.
* Value type: Boolean
* Default value: false
......@@ -935,6 +956,13 @@ 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.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,33 +12,29 @@ OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o})
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o})
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o})
ZATHURA_OBJECTS = \
$(filter-out ../${BUILDDIR_RELEASE}/zathura/main.o, $(wildcard ../${BUILDDIR_RELEASE}/zathura/*.o))
ZATHURA_OBJECTS_DEBUG = \
$(filter-out ../${BUILDDIR_DEBUG}/zathura/main.o, $(wildcard ../${BUILDDIR_DEBUG}/zathura/*.o))
ZATHURA_OBJECTS_GCOV= \
$(filter-out ../${BUILDDIR_GCOV}/zathura/main.o, $(wildcard ../${BUILDDIR_GCOV}/zathura/*.o))
FILTER = %/main.o
ifneq (${WITH_SQLITE},0)
INCS += $(SQLITE_INC)
LIBS += $(SQLITE_LIB)
CPPFLAGS += -DWITH_SQLITE
else
SOURCE = $(filter-out database-sqlite.c,$(OSOURCE))
FILTER += %/database-sqlite.o
endif
ifneq ($(WITH_MAGIC),0)
INCS += $(MAGIC_INC)
LIBS += $(MAGIC_LIB)
CPPFLAGS += -DWITH_MAGIC
endif
ifneq ($(WITH_SYNCTEX),0)
INCS += $(SYNCTEX_INC)
LIBS += $(SYNCTEX_LIB)
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
......
......@@ -4,6 +4,7 @@ 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
......
......@@ -13,7 +13,7 @@ page_calc_height_width(zathura_document_t* document, double height,
g_return_val_if_fail(document != NULL && page_height != NULL && page_width != NULL, 0.0);
double scale = zathura_document_get_scale(document);
if (rotate && zathura_document_get_rotation(document) % 180) {
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);
......
This diff is collapsed.
......@@ -110,7 +110,7 @@ void cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
* @param session The girara session
* @return true if no error occurred and the event has been handled
*/
bool cb_sc_follow(GtkEntry* entry, girara_session_t* session);
gboolean cb_sc_follow(GtkEntry* entry, void* session);
/**
* Called when input has been passed to the sc_display_link dialog
......@@ -119,19 +119,15 @@ bool cb_sc_follow(GtkEntry* entry, girara_session_t* session);
* @param session The girara session
* @return true if no error occurred and the event has been handled
*/
bool cb_sc_display_link(GtkEntry* entry, girara_session_t* session);
gboolean cb_sc_display_link(GtkEntry* entry, void* session);
/**
* Emitted when file has been changed
*
* @param monitor The file monitor
* @param file The file
* @param other_file A file or NULL
* @param event The monitor event
* @param session The girara session
*/
void cb_file_monitor(GFileMonitor* monitor, GFile* file, GFile* other_file,
GFileMonitorEvent event, girara_session_t* session);
void cb_file_monitor(ZathuraFileMonitor* monitor, girara_session_t* session);
/**
* Callback to read new password for file that should be opened
......@@ -140,7 +136,7 @@ void cb_file_monitor(GFileMonitor* monitor, GFile* file, GFile* other_file,
* @param dialog The dialog information
* @return true if input has been handled
*/
bool cb_password_dialog(GtkEntry* entry, zathura_password_dialog_info_t* dialog);
gboolean cb_password_dialog(GtkEntry* entry, void* dialog);
/**
* Emitted when the view has been resized
......@@ -150,7 +146,7 @@ bool cb_password_dialog(GtkEntry* entry, zathura_password_dialog_info_t* dialog)
* @param zathura Zathura session
* @return true if signal has been handled successfully
*/
bool cb_view_resized(GtkWidget* widget, GtkAllocation* allocation, zathura_t* zathura);
gboolean cb_view_resized(GtkWidget* widget, GtkAllocation* allocation, zathura_t* zathura);
/**
* Emitted when the 'recolor' setting is changed
......
......@@ -106,7 +106,20 @@ cmd_bookmark_open(girara_session_t* session, girara_list_t* argument_list)
const unsigned int argc = girara_list_size(argument_list);
if (argc != 1) {
girara_notify(session, GIRARA_ERROR, _("Invalid number of arguments given."));
GString* string = g_string_new(NULL);
GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark)
g_string_append_printf(string, "<b>%s</b>: %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;
}
......@@ -181,9 +194,7 @@ cmd_info(girara_session_t* session, girara_list_t* UNUSED(argument_list))
if (entry != NULL) {
for (unsigned int i = 0; i < LENGTH(meta_fields); i++) {
if (meta_fields[i].field == entry->type) {
char* text = g_strdup_printf("<b>%s:</b> %s\n", meta_fields[i].name, entry->value);
g_string_append(string, text);
g_free(text);
g_string_append_printf(string, "<b>%s:</b> %s\n", meta_fields[i].name, entry->value);
}
}
}
......@@ -407,6 +418,7 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
}
arg->n = FORWARD;
arg->data = (void*) input;
sc_search(session, arg, NULL, 0);
g_free(arg);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment