Commit 81399510 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Imported Upstream version 0.3.3

parent 7d84151a
Copyright (c) 2009-2014 pwmt.org
Copyright (c) 2009-2015 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
......
......@@ -12,7 +12,7 @@ LIBS += $(SQLITE_LIB)
SOURCE = $(OSOURCE)
CPPFLAGS += -DWITH_SQLITE
else
SOURCE = $(filter-out database-sqlite.c,$(OSOURCE))
SOURCE = $(filter-out ${PROJECT}/database-sqlite.c,$(OSOURCE))
endif
ifneq ($(WITH_MAGIC),0)
......@@ -68,8 +68,8 @@ 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 minium required version of $(*) is $($(*)_MIN_VERSION)" && \
${PKG_CONFIG} --atleast-version $($(*)_MIN_VERSION) $($(*)_PKG_CONFIG_NAME) || ( \
echo "The minimum required version of $(*) is $($(*)_MIN_VERSION)" && \
false \
)
@mkdir -p .version-checks
......@@ -87,8 +87,8 @@ ${PROJECT}/version.h: ${PROJECT}/version.h.in config.mk
-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 > version.h.tmp
$(QUIET)mv version.h.tmp ${PROJECT}/version.h
-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
......@@ -143,8 +143,8 @@ ${BUILDDIR_DEBUG}/%.o: %.c
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}: ${OBJECTS_DEBUG}
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_DEBUG}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
-o ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT} ${OBJECTS} ${LIBS}
$(QUIET)${CC} ${LDFLAGS} \
-o ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT} ${OBJECTS_DEBUG} ${LIBS}
debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
......@@ -166,8 +166,8 @@ ${BUILDDIR_GCOV}/%.o: %.c
${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}: ${OBJECTS_GCOV}
$(call colorecho,CC,$@)
@mkdir -p ${BUILDDIR_GCOV}/${BINDIR}
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} ${GCOV_CFLAGS} ${GCOV_LDFLAGS} \
-o ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT} ${OBJECTS} ${LIBS}
$(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
......@@ -188,8 +188,8 @@ clean:
${TARFILE} \
${TARDIR} \
${PROJECT}.pc \
version.h \
version.h.tmp \
${PROJECT}/version.h \
${PROJECT}/version.h.tmp \
${PROJECT}/dbus-interface-definitions.c \
${PROJECT}/dbus-interface-definitions.c.tmp \
${PROJECT}/css-definitions.c \
......@@ -213,13 +213,13 @@ ${PROJECT}.pc: ${PROJECT}.pc.in config.mk
valgrind: debug
$(QUIET)G_SLICE=always-malloc G_DEBUG=gc-friendly ${VALGRIND} ${VALGRIND_ARGUMENTS} \
./${PROJECT}-debug
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
gdb: debug
$(QUIET)cgdb ${PROJECT}-debug
$(QUIET)cgdb ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
test: ${OBJECTS}
$(QUIET)make -C tests run
$(QUIET)$(MAKE) -C tests run
dist: clean build-manpages
$(QUIET)tar -czf $(TARFILE) --exclude=.gitignore \
......@@ -228,7 +228,7 @@ dist: clean build-manpages
doc/_build/$(PROJECT).1 doc/_build/$(PROJECT)rc.5
doc:
$(QUIET)make -C doc
$(QUIET)$(MAKE) -C doc
po:
$(QUIET)${MAKE} -C po
......@@ -298,7 +298,7 @@ uninstall: uninstall-headers
$(QUIET)rm -f $(DESTDIR)$(APPDATAPREFIX)/$(PROJECT).appdata.xml
$(MAKE) -C po uninstall
-include $(wildcard .depend/*.dep)
-include $(wildcard ${DEPENDDIR}/*.dep)
.PHONY: all options clean doc debug valgrind gdb dist doc install uninstall \
test po install-headers uninstall-headers update-po install-manpages \
......
......@@ -7,7 +7,7 @@ Requirements
------------
gtk3
glib (>= 2.28)
girara (>= 0.2.0)
girara (>= 0.2.4)
sqlite3 (optional, >= 3.5.9)
check (for tests)
intltool
......
......@@ -6,7 +6,7 @@ PROJECT = zathura
ZATHURA_VERSION_MAJOR = 0
ZATHURA_VERSION_MINOR = 3
ZATHURA_VERSION_REV = 2
ZATHURA_VERSION_REV = 3
# 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.
......@@ -18,7 +18,7 @@ VERSION = ${ZATHURA_VERSION_MAJOR}.${ZATHURA_VERSION_MINOR}.${ZATHURA_VERSION_RE
# girara
GIRARA_VERSION_CHECK ?= 1
GIRARA_MIN_VERSION = 0.2.3
GIRARA_MIN_VERSION = 0.2.4
GIRARA_PKG_CONFIG_NAME = girara-gtk3
# glib
GLIB_VERSION_CHECK ?= 1
......@@ -29,13 +29,16 @@ GTK_VERSION_CHECK ?= 1
GTK_MIN_VERSION = 3.0
GTK_PKG_CONFIG_NAME = gtk+-3.0
# pkg-config binary
PKG_CONFIG ?= pkg-config
# 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)
WITH_SQLITE ?= $(shell (${PKG_CONFIG} --atleast-version=3.5.9 sqlite3 && echo 1) || echo 0)
# synctex
# To use the embedded copy of the syntex parser set WITH_SYSTEM_SYNCTEX to 0.
WITH_SYSTEM_SYNCTEX ?= $(shell (pkg-config synctex && echo 1) || echo 0)
WITH_SYSTEM_SYNCTEX ?= $(shell (${PKG_CONFIG} synctex && echo 1) || echo 0)
# mimetype detection
# To disable support for mimetype detction with libmagic set WITH_MAGIC to 0.
......@@ -63,24 +66,24 @@ 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)
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)
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)
GMODULE_INC ?= $(shell ${PKG_CONFIG} --cflags gmodule-no-export-2.0)
GMODULE_LIB ?= $(shell ${PKG_CONFIG} --libs gmodule-no-export-2.0)
GLIB_INC ?= $(shell pkg-config --cflags glib-2.0)
GLIB_LIB ?= $(shell pkg-config --libs glib-2.0)
GLIB_INC ?= $(shell ${PKG_CONFIG} --cflags glib-2.0)
GLIB_LIB ?= $(shell ${PKG_CONFIG} --libs glib-2.0)
GIRARA_INC ?= $(shell pkg-config --cflags girara-gtk3)
GIRARA_LIB ?= $(shell pkg-config --libs girara-gtk3)
GIRARA_INC ?= $(shell ${PKG_CONFIG} --cflags girara-gtk3)
GIRARA_LIB ?= $(shell ${PKG_CONFIG} --libs girara-gtk3)
ifneq (${WITH_SQLITE},0)
SQLITE_INC ?= $(shell pkg-config --cflags sqlite3)
SQLITE_LIB ?= $(shell pkg-config --libs sqlite3)
SQLITE_INC ?= $(shell ${PKG_CONFIG} --cflags sqlite3)
SQLITE_LIB ?= $(shell ${PKG_CONFIG} --libs sqlite3)
endif
ifneq (${WITH_MAGIC},0)
......@@ -89,11 +92,11 @@ MAGIC_LIB ?= -lmagic
endif
ifneq ($(WITH_SYSTEM_SYNCTEX),0)
SYNCTEX_INC ?= $(shell pkg-config --cflags synctex)
SYNCTEX_LIB ?= $(shell pkg-config --libs synctex)
SYNCTEX_INC ?= $(shell ${PKG_CONFIG} --cflags synctex)
SYNCTEX_LIB ?= $(shell ${PKG_CONFIG} --libs synctex)
else
ZLIB_INC ?= $(shell pkg-config --cflags zlib)
ZLIB_LIB ?= $(shell pkg-config --libs zlib)
ZLIB_INC ?= $(shell ${PKG_CONFIG} --cflags zlib)
ZLIB_LIB ?= $(shell ${PKG_CONFIG} --libs zlib)
endif
INCS = ${GIRARA_INC} ${GTK_INC} ${GTHREAD_INC} ${GMODULE_INC} ${GLIB_INC}
......
.\" Man page generated from reStructuredText.
.
.TH "ZATHURA" "1" "November 09, 2014" "0.2.7" "zathura"
.TH "ZATHURA" "1" "April 13, 2015" "0.2.7" "zathura"
.SH NAME
zathura \- a document viewer
.
......@@ -330,6 +330,9 @@ Save document (and force overwriting)
.TP
.B export
Export attachments
.TP
.B dump
Write values, descriptions, etc. of all current settings to a file.
.UNINDENT
.SH CONFIGURATION
.sp
......@@ -351,13 +354,14 @@ instance.
.sp
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.
properly. Disabling GDK_NATIVE_WINDOWS fixes this issue. The same issue may
appear, if overlay\-scrollbar is enabled in GTK_MODULES.
.SH SEE ALSO
.sp
\fIzathurarc(5)\fP
.SH AUTHOR
pwmt.org
.SH COPYRIGHT
2014, pwmt.org
2009-2015, pwmt.org
.\" Generated by docutils manpage writer.
.
.\" Man page generated from reStructuredText.
.
.TH "ZATHURARC" "5" "November 09, 2014" "0.2.7" "zathura"
.TH "ZATHURARC" "5" "April 13, 2015" "0.2.7" "zathura"
.SH NAME
zathurarc \- a document viewer
zathurarc \- zathura configuration file
.
.nr rst2man-indent-level 0
.
......@@ -30,29 +30,17 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH ZATHURA CONFIGURATION FILE
.INDENT 0.0
.TP
.B Author
pwmt.org
.TP
.B Date
VERSION
.TP
.B Manual section
5
.UNINDENT
.SS SYNOPSIS
.SH SYNOPSIS
.sp
/etc/zathurarc, $XDG_CONFIG_HOME/zathura/zathurarc
.SS DESCRIPTION
.SH DESCRIPTION
.sp
The \fIzathurarc\fP 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.
.SS COMMANDS
.SH COMMANDS
.SS set \- Changing options
.sp
In addition to the build\-in \fB:set\fP command zathura offers more options to be
......@@ -131,6 +119,21 @@ map [mode] <binding> <shortcut function> <argument>
.fi
.UNINDENT
.UNINDENT
.SS include \- Including another config file
.sp
This commands allows 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.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
include another\-config
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Mode
.sp
The \fBmap\fP command expects several arguments where only the \fBbinding\fP as well as
......@@ -487,7 +490,7 @@ unmap [mode] <binding>
.fi
.UNINDENT
.UNINDENT
.SS OPTIONS
.SH OPTIONS
.SS girara
.sp
This section describes settings concerning the behaviour of libgirara and
......@@ -853,6 +856,16 @@ Value type: String
.IP \(bu 2
Default value: plain
.UNINDENT
.SS dbus\-service
.sp
En/Disables the D\-Bus service. If the services is disabled, SyncTeX forward
synchronization is not available.
.INDENT 0.0
.IP \(bu 2
Value type: Boolean
.IP \(bu 2
Default value: true
.UNINDENT
.SS incremental\-search
.sp
En/Disables incremental search (search while typing).
......@@ -1203,15 +1216,6 @@ Value type: String
.IP \(bu 2
Default value:
.UNINDENT
.SS syntex\-dbus\-service
.sp
En/Disables the D\-Bus service required for SyncTeX forward synchronization.
.INDENT 0.0
.IP \(bu 2
Value type: Boolean
.IP \(bu 2
Default value: true
.UNINDENT
.SS index\-fg
.sp
Defines the foreground color of the index mode.
......@@ -1248,12 +1252,12 @@ Value type: String
.IP \(bu 2
Default value: #9FBC00
.UNINDENT
.SS SEE ALSO
.SH SEE ALSO
.sp
zathura(1)
.SH AUTHOR
pwmt.org
.SH COPYRIGHT
2014, pwmt.org
2009-2015, pwmt.org
.\" Generated by docutils manpage writer.
.
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.
properly. Disabling GDK_NATIVE_WINDOWS fixes this issue. The same issue may
appear, if overlay-scrollbar is enabled in GTK_MODULES.
......@@ -33,3 +33,6 @@ write(!)
export
Export attachments
dump
Write values, descriptions, etc. of all current settings to a file.
......@@ -11,7 +11,7 @@ templates_path = ['_templates']
# -- Project configuration ------------------------------------------------
project = 'zathura'
copyright = '2014, pwmt.org'
copyright = '2009-2015, pwmt.org'
version = '0.2.7'
release = '0.2.7'
......@@ -19,5 +19,5 @@ release = '0.2.7'
man_pages = [
('zathura.1', 'zathura', 'a document viewer', ['pwmt.org'], 1),
('zathurarc.5', 'zathurarc', 'a document viewer', ['pwmt.org'], 5)
('zathurarc.5', 'zathurarc', 'zathura configuration file', ['pwmt.org'], 5)
]
......@@ -2,14 +2,6 @@
zathurarc
=========
--------------------------
zathura configuration file
--------------------------
:Author: pwmt.org
:Date: VERSION
:Manual section: 5
SYNOPSIS
========
......@@ -80,6 +72,16 @@ the *zathurarc* file to make those changes permanent:
map [mode] <binding> <shortcut function> <argument>
include - Including another config file
---------------------------------------
This commands allows 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
......@@ -651,6 +653,14 @@ values are "plain", "sqlite" (if built with sqlite support) and "null". If
* 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
incremental-search
^^^^^^^^^^^^^^^^^^
En/Disables incremental search (search while typing).
......@@ -927,13 +937,6 @@ Defines the command executed for SyncTeX backward synchronization.
* Value type: String
* Default value:
syntex-dbus-service
^^^^^^^^^^^^^^^^^^^
En/Disables the D-Bus service required for SyncTeX forward synchronization.
* Value type: Boolean
* Default value: true
index-fg
^^^^^^^^
Defines the foreground color of the index mode.
......
......@@ -52,7 +52,7 @@ install: ${MOS}
uninstall: ${MOS}
$(ECHO) removing translations
$(QUIET)set -e && for f in $^ ; do \
rm -f $(LOCALEDIR)/$$f; \
rm -f $(DESTDIR)$(LOCALEDIR)/$$f; \
done
.PHONY: all clean update-po install uninstall
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.
......@@ -34,6 +34,8 @@ CPPFLAGS += -DWITH_MAGIC
endif
ifneq ($(WITH_SYSTEM_SYNCTEX),0)
INCS += $(SYNCTEX_INC)
LIBS += $(SYNCTEX_LIB)
else
ZATHURA_OBJECTS += $(wildcard ../${BUILDDIR_RELEASE}/zathura/synctex/*.o)
ZATHURA_OBJECTS_DEBUG += $(wildcard ../${BUILDDIR_DEBUG}/zathura/synctex/*.o)
......@@ -140,6 +142,6 @@ clean:
$(QUIET)rm -rf ${BUILDDIR}
$(QUIET)rm -rf ${DEPENDDIR}
.PHONY: all options clean debug run
.PHONY: all clean debug run
-include $(wildcard ${DEPENDDIR}/*.dep)
......@@ -12,8 +12,10 @@
* desired.
*
* @param document the document
* @param height width the original height and width
* @return page_height page_width the scaled and rotated height and width
* @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
*/
......@@ -26,8 +28,10 @@ double page_calc_height_width(zathura_document_t* document, double height, doubl
* relative to the entire document.
*
* @param document the document
* @param x y the x y coordinates on the unrotated page
* @param xn yn the x y coordinates after rotation
* @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);
......@@ -36,7 +40,8 @@ void page_calc_position(zathura_document_t* document, double x, double y,
* Converts a relative position within the document to a page number.
*
* @param document The document
* @param pos_x pos_y the position relative to 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,
......@@ -54,8 +59,10 @@ unsigned int position_to_page_number(zathura_document_t* document,
*
* @param document The document
* @param page_number the given page number
* @param xalign yalign where to align the viewport and the page
* @return pos_x pos_y position that will lie at the center of the viewport.
* @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);
......
......@@ -79,9 +79,10 @@ update_visible_pages(zathura_t* zathura)
/* reset current search result */
girara_list_t* results = NULL;
g_object_get(page_widget, "search-results", &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(page_widget, "search-current", 0, NULL);
g_object_set(obj_page_widget, "search-current", 0, NULL);
}
}
}
......@@ -264,7 +265,7 @@ cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
GtkTreeModel *model;
GtkTreeIter iter;
g_object_get(tree_view, "model", &model, NULL);
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;
......@@ -322,7 +323,7 @@ handle_link(GtkEntry* entry, girara_session_t* session,
}
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(page_widget, "draw-links", FALSE, NULL);
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);
......@@ -579,9 +580,13 @@ cb_page_widget_text_selected(ZathuraPage* page, const char* text, void* data)
girara_setting_get(zathura->ui.session, "selection-notification", &notification);
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 clipboard: %s"), stripped_text);
_("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);
......
......@@ -201,7 +201,7 @@ bool cb_unknown_command(girara_session_t* session, const char* input);
/**
* Emitted when text has been selected in the page widget
*
* @param widget page view widget
* @param page page view widget
* @param text selected text
* @param data user data
*/
......
......@@ -373,7 +373,8 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
}
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(page_widget, "draw-links", FALSE, NULL);
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);
......@@ -381,7 +382,7 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
if (result == NULL || girara_list_size(result) == 0) {
girara_list_free(result);
g_object_set(page_widget, "search-results", NULL, NULL);
g_object_set(obj_page_widget, "search-results", NULL, NULL);
if (error == ZATHURA_ERROR_NOT_IMPLEMENTED) {
break;
......@@ -390,13 +391,13 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
}
}
g_object_set(page_widget, "search-results", result, NULL);
g_object_set(obj_page_widget, "search-results", result, NULL);
if (argument->n == BACKWARD) {
/* start at bottom hit in page */
g_object_set(page_widget, "search-current", girara_list_size(result) - 1, NULL);
g_object_set(obj_page_widget, "search-current", girara_list_size(result) - 1, NULL);
} else {
g_object_set(page_widget, "search-current", 0, NULL);
g_object_set(obj_page_widget, "search-current", 0, NULL);
}
}
......
......@@ -16,7 +16,6 @@ void config_load_default(zathura_t* zathura);
* Loads and evaluates a configuration file
*
* @param zathura The zathura session
* @param path Path to the configuration file
*/
void config_load_files(zathura_t* zathura);
......
......@@ -611,7 +611,7 @@ sqlite_get_fileinfo(zathura_database_t* db, const char* file,
if (sqlite3_step(stmt) != SQLITE_ROW) {
sqlite3_finalize(stmt);
girara_info("No info for file %s available.", file);
girara_debug("No info for file %s available.", file);
return false;
}
......
......@@ -94,15 +94,20 @@ zathura_document_open(zathura_plugin_manager_t* plugin_manager, const char*
}
plugin = zathura_plugin_manager_get_plugin(plugin_manager, content_type);
g_free((void*)content_type);
content_type = NULL;
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((void*)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);
......
This diff is collapsed.
This diff is collapsed.
......@@ -195,7 +195,7 @@ void zathura_render_request(ZathuraRenderRequest* request,
/**
* Abort an existing render request.
*
* @param reqeust request that should be aborted
* @param request request that should be aborted
*/
void zathura_render_request_abort(ZathuraRenderRequest* request);
......
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